@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/docs/llms-full.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @umriss-ui/core 0.
|
|
1
|
+
# @umriss-ui/core 0.35.0
|
|
2
2
|
|
|
3
3
|
> React component library for data-dense dashboards and tools - forms, date pickers, overlays, a tree view and a command palette. Precise, quiet, professional.
|
|
4
4
|
|
|
@@ -18,10 +18,10 @@ The engineer on call at Quillmere works an open incident from this console: chec
|
|
|
18
18
|
4. The alerts that belong to the incident stand in the list; acknowledging one records who knew when.
|
|
19
19
|
5. Resolving asks for a cause and a summary, and a toast confirms it without covering the console.
|
|
20
20
|
|
|
21
|
-
Built from: Breadcrumb, Badge, Tag, Stepper, Stat, Tabs, Menu, Modal, FormField, Select, Textarea, Checkbox, Toast, Line,
|
|
21
|
+
Built from: Breadcrumb, Badge, Tag, Stepper, Stat, Tabs, Menu, Modal, FormField, Select, Textarea, Checkbox, Toast, Line, Table.
|
|
22
22
|
|
|
23
23
|
```tsx
|
|
24
|
-
import {
|
|
24
|
+
import { useState } from "react";
|
|
25
25
|
import {
|
|
26
26
|
Badge,
|
|
27
27
|
Breadcrumb,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
} from "@umriss-ui/core";
|
|
58
58
|
import type { LimitSet } from "@umriss-ui/core";
|
|
59
59
|
import { LimitLine, Tooltip, useChart } from "@umriss-ui/charts";
|
|
60
|
-
import {
|
|
60
|
+
import { useTable } from "@umriss-ui/table";
|
|
61
61
|
|
|
62
62
|
/* Data from the operations world, written out here so the example runs on its own. */
|
|
63
63
|
/** A small LCG - the same numbers on every computer. */
|
|
@@ -201,44 +201,31 @@ const INCIDENTS: readonly Incident[] = [
|
|
|
201
201
|
{ id: "INC-1041", title: "Invoices generated twice", service: "billing", severity: "SEV2", opened: at(12, 16, 10), acknowledged: at(12, 16, 18), resolved: at(12, 18, 40), assignee: "priya" },
|
|
202
202
|
];
|
|
203
203
|
|
|
204
|
-
|
|
205
|
-
interface AlertType {
|
|
206
|
-
id: string;
|
|
207
|
-
label: string;
|
|
208
|
-
priority: "high" | "medium" | "low";
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
const ALERT_TYPES: readonly AlertType[] = [
|
|
212
|
-
{ id: "checkout-latency", label: "Checkout · p95 latency above 300 ms", priority: "high" },
|
|
213
|
-
{ id: "checkout-errors", label: "Checkout · error rate above 2\u00a0%", priority: "high" },
|
|
214
|
-
{ id: "webhooks-queue", label: "Webhooks · queue older than 5 min", priority: "medium" },
|
|
215
|
-
{ id: "search-latency", label: "Search · p95 latency above 250 ms", priority: "medium" },
|
|
216
|
-
{ id: "images-disk", label: "Image service · disk 85 % full", priority: "low" },
|
|
217
|
-
{ id: "reports-job", label: "Reporting · nightly job late", priority: "low" },
|
|
218
|
-
];
|
|
204
|
+
type Priority = "high" | "medium" | "low";
|
|
219
205
|
|
|
220
|
-
|
|
221
|
-
type Alert = {
|
|
206
|
+
interface Alert {
|
|
222
207
|
id: string;
|
|
223
|
-
type: string;
|
|
224
|
-
lifecycle: "active-unacknowledged" | "active-acknowledged" | "resolved-unacknowledged" | "resolved-acknowledged";
|
|
225
208
|
raised: number;
|
|
226
|
-
|
|
209
|
+
priority: Priority;
|
|
210
|
+
message: string;
|
|
211
|
+
state: "Active" | "Resolved";
|
|
227
212
|
acknowledgedAt?: number;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
const TONE = { high: "danger", medium: "warning", low: "neutral" } as const;
|
|
216
|
+
const RANK = { high: 0, medium: 1, low: 2 } as const;
|
|
217
|
+
|
|
218
|
+
/** Worst first: by priority, then what nobody has acknowledged, then the newest. */
|
|
219
|
+
const WORST_FIRST = [
|
|
220
|
+
{ column: "priority", direction: "asc" },
|
|
221
|
+
{ column: "acknowledged", direction: "asc" },
|
|
222
|
+
{ column: "raised", direction: "desc" },
|
|
223
|
+
] as const;
|
|
232
224
|
|
|
233
225
|
/** The alerts as they stand at 10:30. */
|
|
234
226
|
const ALERTS: readonly Alert[] = [
|
|
235
|
-
{ id: "a-1",
|
|
236
|
-
{ id: "a-2",
|
|
237
|
-
{ id: "a-3", type: "webhooks-queue", lifecycle: "active-acknowledged", raised: at(17, 7, 12), acknowledgedAt: at(17, 8, 2) },
|
|
238
|
-
{ id: "a-4", type: "search-latency", lifecycle: "active-unacknowledged", raised: at(17, 10, 24) },
|
|
239
|
-
{ id: "a-5", type: "search-latency", lifecycle: "resolved-acknowledged", raised: at(17, 8, 5), resolved: at(17, 8, 9), acknowledgedAt: at(17, 8, 6) },
|
|
240
|
-
{ id: "a-6", type: "images-disk", lifecycle: "active-unacknowledged", raised: at(17, 6, 0), availability: "snoozed", snooze: { until: at(17, 14), by: "Tomasz Nowak" } },
|
|
241
|
-
{ id: "a-7", type: "reports-job", lifecycle: "active-unacknowledged", raised: at(17, 4, 30), availability: "disabled" },
|
|
227
|
+
{ id: "a-1", raised: at(17, 9, 41), priority: "high", message: "Checkout · p95 latency above 300 ms", state: "Active", acknowledgedAt: at(17, 9, 46) },
|
|
228
|
+
{ id: "a-2", raised: at(17, 9, 43), priority: "high", message: "Checkout · error rate above 2\u00a0%", state: "Resolved" },
|
|
242
229
|
];
|
|
243
230
|
|
|
244
231
|
const INCIDENT = INCIDENTS.find((one) => one.id === "INC-1048")!;
|
|
@@ -274,31 +261,22 @@ const STEPS = [
|
|
|
274
261
|
{ label: "Resolved" },
|
|
275
262
|
];
|
|
276
263
|
|
|
277
|
-
/* The alerts of the services this incident touches. */
|
|
278
|
-
const OWN = new Set(["checkout-latency", "checkout-errors"]);
|
|
279
|
-
|
|
280
264
|
function Content() {
|
|
281
265
|
const { toast } = useToast();
|
|
282
266
|
const { Chart, XAxis, YAxis, Line } = useChart(TODAY);
|
|
283
|
-
const [alerts, setAlerts] = useState<readonly Alert[]>(
|
|
267
|
+
const [alerts, setAlerts] = useState<readonly Alert[]>(ALERTS);
|
|
284
268
|
const [resolved, setResolved] = useState<number | null>(null);
|
|
285
269
|
const [resolving, setResolving] = useState(false);
|
|
286
270
|
const [cause, setCause] = useState("");
|
|
287
271
|
const [summary, setSummary] = useState("");
|
|
288
272
|
const [tried, setTried] = useState(false);
|
|
289
273
|
|
|
290
|
-
const
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
const acknowledge = (
|
|
294
|
-
setAlerts((before) =>
|
|
295
|
-
|
|
296
|
-
ids.includes(one.id) && one.lifecycle.endsWith("-unacknowledged")
|
|
297
|
-
? { ...one, lifecycle: one.lifecycle.replace("-unacknowledged", "-acknowledged") as Alert["lifecycle"], acknowledgedAt: NOW }
|
|
298
|
-
: one,
|
|
299
|
-
),
|
|
300
|
-
);
|
|
301
|
-
selection.clear();
|
|
274
|
+
const t = useTable(alerts, { rowKey: (a) => a.id, defaultSort: WORST_FIRST });
|
|
275
|
+
const { Table, Column } = t;
|
|
276
|
+
|
|
277
|
+
const acknowledge = () => {
|
|
278
|
+
setAlerts((before) => before.map((one) => (t.selection.selected.has(one.id) ? { ...one, acknowledgedAt: one.acknowledgedAt ?? NOW } : one)));
|
|
279
|
+
t.selection.clear();
|
|
302
280
|
};
|
|
303
281
|
|
|
304
282
|
const resolve = () => {
|
|
@@ -406,7 +384,26 @@ function Content() {
|
|
|
406
384
|
</TabList>
|
|
407
385
|
<TabPanel value="alerts">
|
|
408
386
|
<div data-callout="4">
|
|
409
|
-
<
|
|
387
|
+
<Stack gap={2}>
|
|
388
|
+
<Table selectable ariaLabel="Alerts of the incident">
|
|
389
|
+
<Column value="raised" label="Raised">
|
|
390
|
+
{(raised) => time(raised)}
|
|
391
|
+
</Column>
|
|
392
|
+
<Column value="priority" label="Priority" sortValue={(priority) => RANK[priority]}>
|
|
393
|
+
{(priority) => <Badge tone={TONE[priority]}>{priority}</Badge>}
|
|
394
|
+
</Column>
|
|
395
|
+
<Column value="message" label="Alert" rowHeader />
|
|
396
|
+
<Column value="state" label="State" />
|
|
397
|
+
<Column id="acknowledged" label="Acknowledged" value={(a) => a.acknowledgedAt ?? 0}>
|
|
398
|
+
{(_, a) => (a.acknowledgedAt === undefined ? "No" : time(a.acknowledgedAt))}
|
|
399
|
+
</Column>
|
|
400
|
+
</Table>
|
|
401
|
+
<div>
|
|
402
|
+
<Button size="sm" disabled={t.selection.selected.size === 0} onClick={acknowledge}>
|
|
403
|
+
Acknowledge
|
|
404
|
+
</Button>
|
|
405
|
+
</div>
|
|
406
|
+
</Stack>
|
|
410
407
|
</div>
|
|
411
408
|
</TabPanel>
|
|
412
409
|
<TabPanel value="earlier">
|
|
@@ -1605,18 +1602,19 @@ export default function SetUpATeam() {
|
|
|
1605
1602
|
A line lead at Brenholt Tile Works keeps this control room open through the shift to see the kiln, its alarms, the plan and the OEE at once.
|
|
1606
1603
|
|
|
1607
1604
|
1. The shift runs a minute per second; Pause stops it, and under reduced motion it starts stopped. The skip links reach each region by keyboard.
|
|
1608
|
-
2. The tile reads zone 3 against its limits and says the verdict in a word. The minute the kiln crosses its alarm limit is the same minute in the trend and in the alarm
|
|
1605
|
+
2. The tile reads zone 3 against its limits and says the verdict in a word. The minute the kiln crosses its alarm limit is the same minute in the trend and in the alarm table.
|
|
1609
1606
|
3. The trend draws the limits the tile reads, and its table view holds every reading for a screen reader.
|
|
1610
|
-
4. The alarm the kiln raised stands in the
|
|
1607
|
+
4. The alarm the kiln raised stands in the table; acknowledging it records who knew when and changes nothing else on the screen.
|
|
1611
1608
|
5. Choosing a batch in the plan and opening its details shows what the kiln has fired of it so far, in a drawer.
|
|
1612
1609
|
6. The OEE shows its working, down to the counts it is made of, so the scrap from the excursion can be traced back.
|
|
1613
1610
|
|
|
1614
|
-
Built from: Stat, Card, ProgressBar, Drawer, Line, ControlChart,
|
|
1611
|
+
Built from: Stat, Card, ProgressBar, Drawer, Line, ControlChart, Table, Schedule, Calculation.
|
|
1615
1612
|
|
|
1616
1613
|
```tsx
|
|
1617
1614
|
import { useEffect, useMemo, useState } from "react";
|
|
1618
1615
|
import type { MouseEvent, ReactNode } from "react";
|
|
1619
1616
|
import {
|
|
1617
|
+
Badge,
|
|
1620
1618
|
Button,
|
|
1621
1619
|
Card,
|
|
1622
1620
|
CardBody,
|
|
@@ -1634,29 +1632,28 @@ import {
|
|
|
1634
1632
|
} from "@umriss-ui/core";
|
|
1635
1633
|
import type { FreshnessAges, LimitSet } from "@umriss-ui/core";
|
|
1636
1634
|
import { ControlChart, DataTable, LimitBand, LimitLine, Tooltip, useChart } from "@umriss-ui/charts";
|
|
1637
|
-
import {
|
|
1635
|
+
import { useTable } from "@umriss-ui/table";
|
|
1638
1636
|
import { useSchedule } from "@umriss-ui/schedule";
|
|
1639
1637
|
import type { Subtask, Task } from "@umriss-ui/schedule";
|
|
1640
1638
|
import { Calculation, Difference, Given, Product, Quotient, Ref } from "@umriss-ui/calculation";
|
|
1641
1639
|
|
|
1642
1640
|
/* Data from the plant world, written out here so the example runs on its own. */
|
|
1643
1641
|
|
|
1644
|
-
/** An alarm's dead band
|
|
1642
|
+
/** An alarm's dead band. */
|
|
1645
1643
|
interface ReturnBand {
|
|
1646
1644
|
direction: "upper" | "lower";
|
|
1647
1645
|
limit: number;
|
|
1648
1646
|
returnTo: number;
|
|
1649
1647
|
}
|
|
1650
1648
|
|
|
1651
|
-
/** A kind of alarm
|
|
1649
|
+
/** A kind of alarm. */
|
|
1652
1650
|
interface AlarmType {
|
|
1653
1651
|
id: string;
|
|
1654
1652
|
label: string;
|
|
1655
1653
|
priority: "high" | "medium" | "low";
|
|
1656
|
-
returnBand?: ReturnBand;
|
|
1657
1654
|
}
|
|
1658
1655
|
|
|
1659
|
-
/** One alarm
|
|
1656
|
+
/** One alarm. */
|
|
1660
1657
|
interface Alarm {
|
|
1661
1658
|
id: string;
|
|
1662
1659
|
type: string;
|
|
@@ -1698,7 +1695,7 @@ const KILN_LIMITS: LimitSet = {
|
|
|
1698
1695
|
the ideal cycle time of the OEE's performance. */
|
|
1699
1696
|
const IDEAL_CYCLE_MINUTES = 0.25;
|
|
1700
1697
|
|
|
1701
|
-
/** The kiln alarm's condition and its dead band
|
|
1698
|
+
/** The kiln alarm's condition and its dead band. */
|
|
1702
1699
|
const KILN_RETURN: ReturnBand = { direction: "upper", limit: KILN.alarm, returnTo: KILN.returnTo };
|
|
1703
1700
|
|
|
1704
1701
|
/** What the four measuring points of the line can report. */
|
|
@@ -1707,9 +1704,6 @@ const ALARM_TYPES: readonly AlarmType[] = [
|
|
|
1707
1704
|
id: "kiln-high",
|
|
1708
1705
|
label: "Kiln K1 · zone 3 above alarm limit",
|
|
1709
1706
|
priority: "high",
|
|
1710
|
-
/* The dead band: back below `returnTo`, not merely below the limit, or a
|
|
1711
|
-
reading riding on the limit would raise an alarm a minute. */
|
|
1712
|
-
returnBand: KILN_RETURN,
|
|
1713
1707
|
},
|
|
1714
1708
|
{ id: "exit-silent", label: "Kiln K1 · exit pyrometer sends nothing", priority: "medium" },
|
|
1715
1709
|
{ id: "belt-empty", label: "Kiln K1 · belt empty", priority: "medium" },
|
|
@@ -1871,8 +1865,9 @@ function spans(
|
|
|
1871
1865
|
* The alarms of the shift as they stand at the minute: raised, resolved - and
|
|
1872
1866
|
* acknowledged where the operator did, at the instant he did.
|
|
1873
1867
|
*
|
|
1874
|
-
* `start` is the instant the shift began; the alarms carry instants
|
|
1875
|
-
*
|
|
1868
|
+
* `start` is the instant the shift began; the alarms carry instants.
|
|
1869
|
+
* The dead band applies: an alarm clears only below `returnTo`, not merely
|
|
1870
|
+
* below the limit, or a reading riding on the limit would raise one a minute.
|
|
1876
1871
|
*/
|
|
1877
1872
|
function alarmsAt(
|
|
1878
1873
|
p: Plant,
|
|
@@ -2111,6 +2106,17 @@ function skipTo(event: MouseEvent<HTMLAnchorElement>, id: string) {
|
|
|
2111
2106
|
region?.scrollIntoView({ block: "start" });
|
|
2112
2107
|
}
|
|
2113
2108
|
|
|
2109
|
+
const clock = (t: number) => new Date(t).toLocaleTimeString("en-GB", { hour: "2-digit", minute: "2-digit" });
|
|
2110
|
+
|
|
2111
|
+
const RANK = { high: 0, medium: 1, low: 2 } as const;
|
|
2112
|
+
|
|
2113
|
+
/** Worst first: by priority, then what nobody has acknowledged, then the newest. */
|
|
2114
|
+
const WORST_FIRST = [
|
|
2115
|
+
{ column: "priority", direction: "asc" },
|
|
2116
|
+
{ column: "acknowledged", direction: "asc" },
|
|
2117
|
+
{ column: "raised", direction: "desc" },
|
|
2118
|
+
] as const;
|
|
2119
|
+
|
|
2114
2120
|
export default function ControlRoom() {
|
|
2115
2121
|
const { Schedule, Lane, Subtasks } = useSchedule({ initialView: { domain: PLAN_DOMAIN } });
|
|
2116
2122
|
const { minute, wall, running, setRunning } = usePlantMinute();
|
|
@@ -2118,7 +2124,6 @@ export default function ControlRoom() {
|
|
|
2118
2124
|
const reading = SHIFT.readings[minute]!;
|
|
2119
2125
|
|
|
2120
2126
|
const [acknowledged, setAcknowledged] = useState<ReadonlyMap<string, number>>(new Map());
|
|
2121
|
-
const [hiddenOnly, setHiddenOnly] = useState(false);
|
|
2122
2127
|
const [batch, setBatch] = useState<string | null>(() => inKiln(FROM)?.id ?? null);
|
|
2123
2128
|
const [details, setDetails] = useState(false);
|
|
2124
2129
|
|
|
@@ -2134,13 +2139,22 @@ export default function ControlRoom() {
|
|
|
2134
2139
|
const tileLength = useChart(measured);
|
|
2135
2140
|
const alarms = useMemo(
|
|
2136
2141
|
() =>
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2142
|
+
alarmsAt(SHIFT, minute, START, acknowledged).map((one) => {
|
|
2143
|
+
const type = ALARM_TYPES.find((kind) => kind.id === one.type)!;
|
|
2144
|
+
const ended = one.resolved === undefined ? "Active" : "Resolved";
|
|
2145
|
+
return {
|
|
2146
|
+
id: one.id,
|
|
2147
|
+
raised: one.raised,
|
|
2148
|
+
priority: type.priority,
|
|
2149
|
+
message: type.label,
|
|
2150
|
+
state: one.availability === "suppressed" || one.availability === "disabled" ? `${ended}, ${one.availability}` : ended,
|
|
2151
|
+
acknowledgedAt: one.acknowledgedAt,
|
|
2152
|
+
};
|
|
2153
|
+
}),
|
|
2154
|
+
[minute, acknowledged],
|
|
2155
|
+
);
|
|
2156
|
+
const t = useTable(alarms, { rowKey: (a) => a.id, defaultSort: WORST_FIRST });
|
|
2157
|
+
const { Table, Column } = t;
|
|
2144
2158
|
|
|
2145
2159
|
const count = countAt(SHIFT, minute);
|
|
2146
2160
|
const oee = (IDEAL_CYCLE_MINUTES * count.good) / count.planned;
|
|
@@ -2226,17 +2240,33 @@ export default function ControlRoom() {
|
|
|
2226
2240
|
</Region>
|
|
2227
2241
|
|
|
2228
2242
|
<Region id="room-alarms" title="Alarms" quiet callout="4">
|
|
2229
|
-
<
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2243
|
+
<Stack gap={2}>
|
|
2244
|
+
<Table selectable ariaLabel="Alarms">
|
|
2245
|
+
<Column value="raised" label="Raised">
|
|
2246
|
+
{(raised) => clock(raised)}
|
|
2247
|
+
</Column>
|
|
2248
|
+
<Column value="priority" label="Priority" sortValue={(priority) => RANK[priority]}>
|
|
2249
|
+
{(priority) => <Badge tone={priority === "high" ? "danger" : priority === "medium" ? "warning" : "neutral"}>{priority}</Badge>}
|
|
2250
|
+
</Column>
|
|
2251
|
+
<Column value="message" label="Alarm" rowHeader />
|
|
2252
|
+
<Column value="state" label="State" />
|
|
2253
|
+
<Column id="acknowledged" label="Acknowledged" value={(a) => a.acknowledgedAt ?? 0}>
|
|
2254
|
+
{(_, a) => (a.acknowledgedAt === undefined ? "No" : clock(a.acknowledgedAt))}
|
|
2255
|
+
</Column>
|
|
2256
|
+
</Table>
|
|
2257
|
+
<div>
|
|
2258
|
+
<Button
|
|
2259
|
+
size="sm"
|
|
2260
|
+
disabled={t.selection.selected.size === 0}
|
|
2261
|
+
onClick={() => {
|
|
2262
|
+
setAcknowledged((before) => new Map([...before, ...[...t.selection.selected].map((id) => [String(id), now] as const)]));
|
|
2263
|
+
t.selection.clear();
|
|
2264
|
+
}}
|
|
2265
|
+
>
|
|
2266
|
+
Acknowledge
|
|
2267
|
+
</Button>
|
|
2268
|
+
</div>
|
|
2269
|
+
</Stack>
|
|
2240
2270
|
</Region>
|
|
2241
2271
|
|
|
2242
2272
|
<Region
|
|
@@ -2360,7 +2390,7 @@ npm install @umriss-ui/core
|
|
|
2360
2390
|
|
|
2361
2391
|
Demo page: https://romanhaendler.github.io/umriss-ui/core/installation/
|
|
2362
2392
|
|
|
2363
|
-
The command installs the package alone: React
|
|
2393
|
+
The command installs the package alone: React 19 or newer is its only peer and stays the application's own. Importing a component brings its stylesheet along; `@umriss-ui/core/styles.css` stays exported for setups that link stylesheets by hand. The styles touch nothing outside the components: no rule on `html`, `body` or `*` ([ADR-0021](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0021-the-styles-load-themselves-and-touch-nothing-else.md)).
|
|
2364
2394
|
|
|
2365
2395
|
Colours, sizes, fonts and light and dark are tokens, `--u-…` custom properties you override with ordinary CSS: [Theming](#/theming) lists them. The fonts are the application's: the tokens name Geist first and fall back to the system fonts, and nothing is loaded. For Geist, install `@fontsource/geist-sans` (400, 500, 600) and `@fontsource/geist-mono` (400).
|
|
2366
2396
|
|
|
@@ -2548,7 +2578,7 @@ The keys of [Button](#/button/keyboard-button), [Menu](#/menu/keyboard-menu) and
|
|
|
2548
2578
|
|
|
2549
2579
|
| Prop | Type | Default | Description |
|
|
2550
2580
|
|---|---|---|---|
|
|
2551
|
-
| `density` | [`Density`](#type-Density)<br>`"comfortable" \| "compact"` | none - a component keeps its own density | The default for the `density` of every component that reads it with `useDensityFor` - in `@umriss-ui/table` `Table
|
|
2581
|
+
| `density` | [`Density`](#type-Density)<br>`"comfortable" \| "compact"` | none - a component keeps its own density | The default for the `density` of every component that reads it with `useDensityFor` - in `@umriss-ui/table` `Table`, in `@umriss-ui/calculation` `Calculation` ("comfortable" means "regular").<br>Shown in: [Set up an application](#/umrissprovider/everything-at-once) |
|
|
2552
2582
|
| `portalTarget` | [`PortalTarget`](#type-PortalTarget) | `null` | Where overlays portal to. A function is evaluated on every opening - a target that only enters the tree later cannot be given otherwise; `null` means "as before". The callers' own rules take precedence: the popover seam portals into the nearest `<dialog>` ancestor, because a portal at the body does not reach the top layer.<br>Shown in: [Open overlays inside a full-screen panel](#/umrissprovider/portal-target), [Set up an application](#/umrissprovider/everything-at-once) |
|
|
2553
2583
|
| `toast` | [`ToastConfig`](#type-ToastConfig) | — | The setting for toasts: the display duration where the individual toast names none, where they stand, and how many stand at once.<br>Shown in: [At the root](#/umrissprovider/at-the-root), [Set up an application](#/umrissprovider/everything-at-once), [Where they stand (Toast)](#/toast/where-they-stand) and 1 more |
|
|
2554
2584
|
| `language` | [`LanguageOptions`](#/language/type-LanguageOptions) | none - the surrounding language holds, English at the root | Formats and wording, entry by entry - see [Language](#/language).<br>Shown in: [Set up an application](#/umrissprovider/everything-at-once) |
|
|
@@ -2631,7 +2661,6 @@ import { Badge, Button, Card, CardBody, CardHeader, Checkbox, Link, Stack, Switc
|
|
|
2631
2661
|
:root {
|
|
2632
2662
|
--u-color-accent: light-dark(#4338ca, #818cf8);
|
|
2633
2663
|
--u-color-accent-hover: light-dark(#3730a3, #a5b4fc);
|
|
2634
|
-
--u-color-accent-active: light-dark(#312e81, #6366f1);
|
|
2635
2664
|
--u-color-accent-subtle: light-dark(#eef0fb, #1e1f3d);
|
|
2636
2665
|
--u-color-accent-subtle-pressed: light-dark(#dfe2f7, #282a52);
|
|
2637
2666
|
--u-color-accent-text: light-dark(#4338ca, #a5b4fc);
|
|
@@ -2643,7 +2672,6 @@ import { Badge, Button, Card, CardBody, CardHeader, Checkbox, Link, Stack, Switc
|
|
|
2643
2672
|
const INDIGO = {
|
|
2644
2673
|
"--u-color-accent": "light-dark(#4338ca, #818cf8)",
|
|
2645
2674
|
"--u-color-accent-hover": "light-dark(#3730a3, #a5b4fc)",
|
|
2646
|
-
"--u-color-accent-active": "light-dark(#312e81, #6366f1)",
|
|
2647
2675
|
"--u-color-accent-subtle": "light-dark(#eef0fb, #1e1f3d)",
|
|
2648
2676
|
"--u-color-accent-subtle-pressed": "light-dark(#dfe2f7, #282a52)",
|
|
2649
2677
|
"--u-color-accent-text": "light-dark(#4338ca, #a5b4fc)",
|
|
@@ -2770,7 +2798,7 @@ Every token the components draw with, grouped as the stylesheet groups them. A s
|
|
|
2770
2798
|
| `--u-color-bg` | `#fafafa` | `#0f0f10` | — |
|
|
2771
2799
|
| `--u-color-surface` | `#ffffff` | `#161618` | — |
|
|
2772
2800
|
| `--u-color-surface-sunken` | `#f4f4f5` | `#1e1e21` | — |
|
|
2773
|
-
| `--u-color-surface-pressed` | `#e9e9eb` | `#28282c` | The pressed step of a quiet key: what sinks to the sunken surface under the pointer sinks once more while it is pressed (the interaction-state canon
|
|
2801
|
+
| `--u-color-surface-pressed` | `#e9e9eb` | `#28282c` | The pressed step of a quiet key: what sinks to the sunken surface under the pointer sinks once more while it is pressed (the interaction-state canon). The three `-pressed` surfaces exist because a hover for each ground needs something stronger. |
|
|
2774
2802
|
| `--u-color-text` | `#171717` | `#ededed` | — |
|
|
2775
2803
|
| `--u-color-text-secondary` | `#565656` | `#a5a5ab` | — |
|
|
2776
2804
|
| `--u-color-text-muted` | `#8b8b8b` | `#77777e` | — |
|
|
@@ -2784,7 +2812,7 @@ Every token the components draw with, grouped as the stylesheet groups them. A s
|
|
|
2784
2812
|
| `--u-edge` | `0 0 0 1px var(`[--u-edge-color](#token-u-edge-color)`)` | same | — |
|
|
2785
2813
|
| `--u-edge-strong` | `0 0 0 1px var(`[--u-edge-color-strong](#token-u-edge-color-strong)`)` | same | — |
|
|
2786
2814
|
| `--u-hairline` | `rgba(23, 23, 23, 0.06)` | `rgba(255, 255, 255, 0.07)` | inner dividing lines |
|
|
2787
|
-
| `--u-color-edge-hover` | `color-mix(in srgb, var(`[--u-color-text](#token-u-color-text)`) 30%, transparent)` | same | The edge of a field under the pointer.
|
|
2815
|
+
| `--u-color-edge-hover` | `color-mix(in srgb, var(`[--u-color-text](#token-u-color-text)`) 30%, transparent)` | same | The edge of a field under the pointer. |
|
|
2788
2816
|
| `--u-hairline-strong` | `rgba(23, 23, 23, 0.12)` | `rgba(255, 255, 255, 0.14)` | e.g. under table heads |
|
|
2789
2817
|
|
|
2790
2818
|
##### Ink as interaction (the primary button)
|
|
@@ -2802,12 +2830,11 @@ Every token the components draw with, grouped as the stylesheet groups them. A s
|
|
|
2802
2830
|
|---|---|---|---|
|
|
2803
2831
|
| `--u-color-accent` | `#0e7d72` | `#17a292` | — |
|
|
2804
2832
|
| `--u-color-accent-hover` | `#0a685f` | `#1cb5a3` | — |
|
|
2805
|
-
| `--u-color-accent-active` | `#085a52` | `#128d7f` | — |
|
|
2806
2833
|
| `--u-color-accent-subtle` | `#e9f4f2` | `#142e2b` | — |
|
|
2807
2834
|
| `--u-color-accent-subtle-pressed` | `#d5e9e6` | `#1b3d39` | — |
|
|
2808
2835
|
| `--u-color-accent-text` | `#0b6a61` | `#4cc4b5` | — |
|
|
2809
2836
|
| `--u-color-on-accent` | `#ffffff` | `#072522` | — |
|
|
2810
|
-
| `--u-color-on-danger` | `#ffffff` | `#2b0f0d` | Type on the danger surface
|
|
2837
|
+
| `--u-color-on-danger` | `#ffffff` | `#2b0f0d` | Type on the danger surface, a token so that a contrast check sees it. Dark: White measures only 3.68:1 on the lighter danger surface. The polarity turns as it does for the accent: dark type on a light ground. |
|
|
2811
2838
|
|
|
2812
2839
|
##### Semantics (muted)
|
|
2813
2840
|
|
|
@@ -2815,7 +2842,7 @@ Every token the components draw with, grouped as the stylesheet groups them. A s
|
|
|
2815
2842
|
|---|---|---|---|
|
|
2816
2843
|
| `--u-color-success` | `#217a4b` | `#4fae7c` | — |
|
|
2817
2844
|
| `--u-color-success-subtle` | `#e8f2ec` | `#16241d` | — |
|
|
2818
|
-
| `--u-color-warning` | `#8a5c00` | `#d0a24d` | Darkened from #9a6700: on its own pale surface
|
|
2845
|
+
| `--u-color-warning` | `#8a5c00` | `#d0a24d` | Darkened from #9a6700, which reached only 4.24:1 on its own pale surface and so missed the 4.5:1 for normal text; this reaches 4.97:1. |
|
|
2819
2846
|
| `--u-color-warning-subtle` | `#f7efdb` | `#2b2415` | — |
|
|
2820
2847
|
| `--u-color-danger` | `#b13636` | `#d0655c` | — |
|
|
2821
2848
|
| `--u-color-danger-hover` | `#9a2c2c` | `#da7a72` | — |
|
|
@@ -2826,7 +2853,7 @@ Every token the components draw with, grouped as the stylesheet groups them. A s
|
|
|
2826
2853
|
|
|
2827
2854
|
##### Focus: a crisp accent edge, two pixels, no glow
|
|
2828
2855
|
|
|
2829
|
-
One look for every component.
|
|
2856
|
+
One look for every component. A soft glow would read as a second, shadowy border. On a field the ring lies where its edge lies, so the edge seems to grow. `-danger` for an invalid field, which keeps its colour.
|
|
2830
2857
|
|
|
2831
2858
|
| Token | Light | Dark | Description |
|
|
2832
2859
|
|---|---|---|---|
|
|
@@ -2845,7 +2872,7 @@ One look for every component. It was a soft 4px glow at 20 %, and on fields an a
|
|
|
2845
2872
|
| `--u-text-lg` | `1rem` | same | — |
|
|
2846
2873
|
| `--u-text-xl` | `1.1875rem` | same | — |
|
|
2847
2874
|
| `--u-text-2xl` | `1.5rem` | same | — |
|
|
2848
|
-
| `--u-text-mono` | `0.75rem` | same | Figures in Geist Mono inside a control or a cell, beside --u-text-sm set in Sans. The mono cut runs wider and taller, so one step down reads as the same size. It
|
|
2875
|
+
| `--u-text-mono` | `0.75rem` | same | Figures in Geist Mono inside a control or a cell, beside --u-text-sm set in Sans. The mono cut runs wider and taller, so one step down reads as the same size. It serves as a role: the date picker's value, days and time fields, the numeric field and input, the table's numeric cells. |
|
|
2849
2876
|
| `--u-leading-none` | `1` | same | A box as tall as its type: a badge, a tag, a count, a glyph. The height comes from the control or the padding, and the line adds no leading. |
|
|
2850
2877
|
| `--u-leading-tight` | `1.3` | same | — |
|
|
2851
2878
|
| `--u-leading-normal` | `1.5` | same | — |
|
|
@@ -2882,24 +2909,7 @@ One look for every component. It was a soft 4px glow at 20 %, and on fields an a
|
|
|
2882
2909
|
| `--u-icon-size-sm` | `12px` | same | — |
|
|
2883
2910
|
| `--u-button-padding` | `10px` | same | The room left and right of a button's label, one step per control height. What stands beside a quiet button and has to align with its word hangs out by exactly this much (the date pickers' foot, the MultiSelect's quick keys) - so they read it here instead of repeating the number. |
|
|
2884
2911
|
| `--u-button-padding-sm` | `6px` | same | — |
|
|
2885
|
-
|
|
2886
|
-
##### Dock (floating-dock)
|
|
2887
|
-
|
|
2888
|
-
A dock's measurements stand here and not only in the module, because the component READS THEM BACK at runtime: whether a resting place fits is a calculation over exactly these values (Dock/place.ts), and a second copy of them in JavaScript would be one that stops being true at some point. Whoever changes them here also changes how many tools it takes for a side edge to be refused - and that is as it should be.
|
|
2889
|
-
|
|
2890
|
-
The travel of the grip is the knob to turn when the gesture feels lifeless: [ADR-0013](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0013-a-dock-snaps-it-does-not-follow.md) lets the grip follow the pointer and not the dock, and if that looks broken rather than like resistance, this value grows - the dock does not become movable.
|
|
2891
|
-
|
|
2892
|
-
| Token | Light | Dark | Description |
|
|
2893
|
-
|---|---|---|---|
|
|
2894
|
-
| `--u-dock-tool` | `30px` | same | edge length of one tool |
|
|
2895
|
-
| `--u-dock-grip` | `18px` | same | extent of the grip along the strip |
|
|
2896
|
-
| `--u-dock-gap` | `2px` | same | gap between two tools |
|
|
2897
|
-
| `--u-dock-padding` | `5px` | same | padding at the ends |
|
|
2898
|
-
| `--u-dock-margin` | `16px` | same | air between strip and host edge |
|
|
2899
|
-
| `--u-dock-grip-travel` | `6px` | same | how far the grip may follow the pointer |
|
|
2900
|
-
| `--u-dock-refusal-surface` | `color-mix(in srgb, var(`[--u-color-material-fallback](#token-u-color-material-fallback)`) 55%, transparent)` | same | The refusal: the outline the dock would have at a place it does not fit. The same material, half as present - no warning colour, because nothing has gone wrong here. The duration deliberately does NOT stand in the `--u-duration-*` scale and therefore does not fall to zero under `prefers-reduced-motion`: it measures how long a statement stays readable, not how long a movement lasts. Whoever switches motion off does not mean to switch a refusal off. It is needed only for the keyboard - with the pointer the refusal ends as soon as it leaves the zone. |
|
|
2901
|
-
| `--u-dock-refusal-duration` | `1400ms` | same | — |
|
|
2902
|
-
| `--u-drawer-width` | `400px` | same | The width of a drawer (core-foundations 03). A token rather than a size prop: a detail beside a process picture wants one width across an application, and one drawer that needs another sets it in its `style`. |
|
|
2912
|
+
| `--u-drawer-width` | `400px` | same | The width of a drawer A token rather than a size prop: a detail beside a process picture wants one width across an application, and one drawer that needs another sets it in its `style`. |
|
|
2903
2913
|
|
|
2904
2914
|
##### Toast (toast-inset-tokens)
|
|
2905
2915
|
|
|
@@ -2918,7 +2928,7 @@ Card: edge, contact with the ground, soft depth. Overlay: edge, near shadow, dep
|
|
|
2918
2928
|
|---|---|---|---|
|
|
2919
2929
|
| `--u-shadow-card` | `var(`[--u-edge](#token-u-edge)`), 0 1px 2px rgba(23, 23, 23, 0.04), 0 8px 24px -12px rgba(23, 23, 23, 0.14)` | `var(`[--u-edge](#token-u-edge)`), 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6)` | — |
|
|
2920
2930
|
| `--u-shadow-overlay` | `var(`[--u-edge](#token-u-edge)`), 0 4px 8px rgba(23, 23, 23, 0.06), 0 24px 48px -16px rgba(23, 23, 23, 0.24)` | `var(`[--u-edge](#token-u-edge)`), 0 4px 8px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.7)` | — |
|
|
2921
|
-
| `--u-shadow-sticky` | `rgba(23, 23, 23, 0.09)` | `rgba(0, 0, 0, 0.5)` | The shadow a sticking part casts on what scrolls under it - a pinned column block, a stuck group header - as the colour its gradient starts from. Dark is black at a higher opacity: the text colour at 9 % read as a glow on the dark ground
|
|
2931
|
+
| `--u-shadow-sticky` | `rgba(23, 23, 23, 0.09)` | `rgba(0, 0, 0, 0.5)` | The shadow a sticking part casts on what scrolls under it - a pinned column block, a stuck group header - as the colour its gradient starts from. Dark is black at a higher opacity: the text colour at 9 % read as a glow on the dark ground. |
|
|
2922
2932
|
|
|
2923
2933
|
##### Translucent material and scrim ([ADR-0012](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0012-a-translucent-material-needs-a-floor.md))
|
|
2924
2934
|
|
|
@@ -2928,11 +2938,11 @@ The alpha value is a FLOOR and not a matter of taste: the opaque colour carries
|
|
|
2928
2938
|
|
|
2929
2939
|
Three tokens, because there are three jobs: - `-fallback` is the opaque colour underneath. It is really painted where `backdrop-filter` is missing or switched off, and it is what the contrast test checks (see tests-unit/contrast.test.ts). - `--u-color-material` is the same colour with the floor alpha. - `--u-material-blur` softens what shows through. Decoration under the same rule: the blur does not make the type legible.
|
|
2930
2940
|
|
|
2931
|
-
The scrim dims the page behind an overlay.
|
|
2941
|
+
The scrim dims the page behind an overlay. Dark gets its own values, chosen by eye: inverting a light surface lands wrong, because light type over a dark blur tolerates far less transparency than the other way round.
|
|
2932
2942
|
|
|
2933
2943
|
| Token | Light | Dark | Description |
|
|
2934
2944
|
|---|---|---|---|
|
|
2935
|
-
| `--u-color-material-fallback` | `#fdfdfe` | `#1f1f23` | The numbers were looked at, not calculated.
|
|
2945
|
+
| `--u-color-material-fallback` | `#fdfdfe` | `#1f1f23` | The numbers were looked at, not calculated. In the light theme the scrim must dim less and the panel cover more: a scrim that presses the whole page to a middling grey leaves the panel a grey slab within it, legible but looking like a fault. The distance between the two carries the step. The dark theme needs no such correction: there the lightness already separates them. Dark: Chosen by eye, not derived from the light theme: the alpha floor lies higher here, because light type over a dark blur tolerates markedly less transparency. |
|
|
2936
2946
|
| `--u-color-material` | `rgba(253, 253, 254, 0.86)` | `rgba(31, 31, 35, 0.82)` | — |
|
|
2937
2947
|
| `--u-material-blur` | `24px` | same | — |
|
|
2938
2948
|
| `--u-color-scrim` | `rgba(23, 23, 23, 0.30)` | `rgba(0, 0, 0, 0.60)` | — |
|
|
@@ -2960,7 +2970,7 @@ Continuous process. A spinner or a shimmer has no start and no end; it runs stea
|
|
|
2960
2970
|
| `--u-duration-draw` | `320ms` | same | a stroke drawn slowly enough to watch: the tick **0ms under reduced motion.** |
|
|
2961
2971
|
| `--u-delay-draw` | `60ms` | same | the box fills first, then the tick is drawn **0ms under reduced motion.** |
|
|
2962
2972
|
| `--u-delay-stale` | `200ms` | same | content being reloaded dims only after this: a quick answer never flickers |
|
|
2963
|
-
| `--u-duration-exit-fast` | `100ms` | same | Exits.
|
|
2973
|
+
| `--u-duration-exit-fast` | `100ms` | same | Exits. The stylesheet drawing the movement and the code waiting for its end read the same tokens, so the two cannot drift apart. a panel or a tooltip goes **0ms under reduced motion.** |
|
|
2964
2974
|
| `--u-duration-exit` | `160ms` | same | a sheet takes its leave: modal **0ms under reduced motion.** |
|
|
2965
2975
|
| `--u-duration-exit-collapse` | `200ms` | same | a message goes and its place closes **0ms under reduced motion.** |
|
|
2966
2976
|
| `--u-duration-spin` | `700ms` | same | Continuous processes. They do NOT fall to zero under reduced motion - a spinner at 0ms says nothing; each module slows or stops its own. |
|
|
@@ -2971,7 +2981,7 @@ Continuous process. A spinner or a shimmer has no start and no end; it runs stea
|
|
|
2971
2981
|
|
|
2972
2982
|
##### Stacking order
|
|
2973
2983
|
|
|
2974
|
-
|
|
2984
|
+
Popovers portal into the nearest <dialog> ancestor, and this scale orders the rest.
|
|
2975
2985
|
|
|
2976
2986
|
| Token | Light | Dark | Description |
|
|
2977
2987
|
|---|---|---|---|
|
|
@@ -3797,9 +3807,9 @@ Every entry of `Wording`: the English of `DEFAULT_WORDING` beside the German of
|
|
|
3797
3807
|
| `selectNone` | None | Keine | — |
|
|
3798
3808
|
| `invertSelection` | Invert | Umkehren | — |
|
|
3799
3809
|
| `nothingSelected` | Nothing selected | Nichts ausgewählt | — |
|
|
3800
|
-
| `removeSelectedValue(beschriftung)` | `` `Remove ${beschriftung}` `` | `` `${
|
|
3810
|
+
| `removeSelectedValue(beschriftung)` | `` `Remove ${beschriftung}` `` | `` `${label} entfernen` `` | The cross on a selected value in the trigger. |
|
|
3801
3811
|
| `manageMoreSelected(count)` | `` `Manage all ${count} selected` `` | `` `Alle ${count} Gewählten verwalten` `` | The "+N" counter in the trigger. |
|
|
3802
|
-
| `multiSelectSummary(gewaehlt, total)` | `` `${gewaehlt} / ${total}` `` | `` `${
|
|
3812
|
+
| `multiSelectSummary(gewaehlt, total)` | `` `${gewaehlt} / ${total}` `` | `` `${selected} / ${total}` `` | The summary in the panel: "3 / 12". The sentence structure belongs to the language, even where it is only a slash here. |
|
|
3803
3813
|
| `optionCount(count)` | `` (count === 1 ? "1 option" : `${count} options`) `` | `` (count === 1 ? "1 Option" : `${count} Optionen`) `` | How many options stand, when a list opens or its filter changes; never zero - an empty list says its own empty text. Named, like the three below, after the moment it is spoken in: an announcement labels no element. |
|
|
3804
3814
|
| `optionActive(label, state)` | `[label, group, selected && "selected", disabled && "unavailable"].filter(Boolean).join(", ")` | `[label, group, selected && "ausgewählt", disabled && "nicht verfügbar"].filter(Boolean).join(", ")` | The option the keys moved onto, with what VoiceOver leaves out. |
|
|
3805
3815
|
| `optionAdded(label)` | `` `${label} added` `` | `` `${label} hinzugefügt` `` | A value the multi-select took or gave away where no checkbox had the focus to say it - Enter in the search, a chip, Backspace. |
|
|
@@ -3821,16 +3831,6 @@ Every entry of `Wording`: the English of `DEFAULT_WORDING` beside the German of
|
|
|
3821
3831
|
| `paletteHintClose` | close | schließen | — |
|
|
3822
3832
|
| `paletteKeyEsc` | Esc | Esc | The legend on the Escape key. The arrows and the return key are glyphs and therefore do not stand here; "Esc" is a word and is called something else elsewhere. |
|
|
3823
3833
|
|
|
3824
|
-
##### Dock
|
|
3825
|
-
|
|
3826
|
-
| Key | English | German | Description |
|
|
3827
|
-
|---|---|---|---|
|
|
3828
|
-
| `dockTools` | Tools | Werkzeuge | Accessible name of a dock's tools. |
|
|
3829
|
-
| `dockGrip` | Move dock | Dock verschieben | Accessible name of the grip - it says what it does, not what it is. |
|
|
3830
|
-
| `dockPlace(place)` | `({ top: "top", right: "right", bottom: "bottom", left: "left" })[place]` | `({ top: "oben", right: "rechts", bottom: "unten", left: "links" })[place]` | The four resting places, named. The keys are the `DockPlace` type's, and a register translates them: the German one answers "oben" where the English one answers "top". |
|
|
3831
|
-
| `dockPlaced(place)` | `` `Dock at the ${place}` `` | `` `Dock ${place}` `` | What the screen reader hears once the dock has taken a place. |
|
|
3832
|
-
| `dockNoPlace(place)` | `` `No room for the dock on the ${place}` `` | `` `Für das Dock ist ${place} kein Platz` `` | And what it hears when a place has refused. A refusal is not a fault: a wide, flat host with no room for a standing dock is not a mistake anyone made. |
|
|
3833
|
-
|
|
3834
3834
|
##### Date and time
|
|
3835
3835
|
|
|
3836
3836
|
| Key | English | German | Description |
|
|
@@ -3866,23 +3866,23 @@ Every entry of `Wording`: the English of `DEFAULT_WORDING` beside the German of
|
|
|
3866
3866
|
| `endHour` | End hour | Endstunde | — |
|
|
3867
3867
|
| `endMinute` | End minute | Endminute | — |
|
|
3868
3868
|
| `endSecond` | End second | Endsekunde | — |
|
|
3869
|
-
| `timeFieldIncrease(feld)` | `` `Increase ${feld}` `` | `` `${
|
|
3870
|
-
| `timeFieldDecrease(feld)` | `` `Decrease ${feld}` `` | `` `${
|
|
3869
|
+
| `timeFieldIncrease(feld)` | `` `Increase ${feld}` `` | `` `${field} erhöhen` `` | Stepper buttons of a time field; the label comes from above. |
|
|
3870
|
+
| `timeFieldDecrease(feld)` | `` `Decrease ${feld}` `` | `` `${field} verringern` `` | — |
|
|
3871
3871
|
| `chooseStartDate` | Select start date | Startdatum wählen | Footer of the range panels. |
|
|
3872
3872
|
| `chooseEndDate` | Select end date – backwards is allowed | Enddatum wählen – rückwärts ist erlaubt | — |
|
|
3873
3873
|
| `days(count)` | `` `${count} ${count === 1 ? "day" : "days"}` `` | `` `${count} ${count === 1 ? "Tag" : "Tage"}` `` | "3 days" or "1 day" - the plural belongs to the language. |
|
|
3874
3874
|
| `daysSelected(count)` | `` `${count} ${count === 1 ? "day" : "days"} selected` `` | `` `${count} ${count === 1 ? "Tag" : "Tage"} gewählt` `` | "3 days selected" |
|
|
3875
3875
|
| `rangePreview(from, to, count)` | `` `${from} – ${to} · ${count} ${count === 1 ? "day" : "days"}` `` | `` `${from} – ${to}\u2009·\u2009${count} ${count === 1 ? "Tag" : "Tage"}` `` | "17.03. – 19.03. · 3 days" while dragging; the dates come from the formats. |
|
|
3876
3876
|
| `daysAllDay(count)` | `` `${count} ${count === 1 ? "day" : "days"} (all day)` `` | `` `${count} ${count === 1 ? "Tag" : "Tage"} (ganztägig)` `` | "3 days (all day)" |
|
|
3877
|
-
| `duration(teile)` | `` `Duration: ${teile.join(" ")}` `` | `` `Dauer: ${
|
|
3877
|
+
| `duration(teile)` | `` `Duration: ${teile.join(" ")}` `` | `` `Dauer: ${parts.join(" ")}` `` | "Duration: 1 day 2 hrs 30 min" |
|
|
3878
3878
|
| `hoursShort(count)` | `` `${count} ${count === 1 ? "hr" : "hrs"}` `` | `` `${count} Std` `` | — |
|
|
3879
3879
|
| `minutesShort(count)` | `` `${count} min` `` | `` `${count} Min` `` | — |
|
|
3880
3880
|
| `timeMissingHint(timeOfDay)` | `` `This time does not exist on this day (start of daylight saving time). ${timeOfDay} is used instead.` `` | `` `Diese Uhrzeit existiert an diesem Tag nicht (Beginn der Sommerzeit). Es wird ${timeOfDay} Uhr verwendet.` `` | Daylight-saving change: the hour that does not exist. |
|
|
3881
3881
|
| `timeMissingHintSide(side, timeOfDay)` | `` `${side}: This time does not exist on this day (start of daylight saving time). ${timeOfDay} is used instead.` `` | `` `${side}: Diese Uhrzeit existiert an diesem Tag nicht (Beginn der Sommerzeit). Es wird ${timeOfDay} Uhr verwendet.` `` | The same, with the side put in front ("From"/"To"). |
|
|
3882
3882
|
| `timeAmbiguousHint` | This time occurs twice on this day (end of daylight saving time): | Diese Uhrzeit kommt an diesem Tag zweimal vor (Ende der Sommerzeit): | Daylight-saving change: the hour that occurs twice. |
|
|
3883
3883
|
| `timeAmbiguousHintSide(side)` | `` `${side}: This time occurs twice on this day (end of daylight saving time):` `` | `` `${side}: Diese Uhrzeit kommt an diesem Tag zweimal vor (Ende der Sommerzeit):` `` | — |
|
|
3884
|
-
| `timeEarlier(versatz)` | `` `Earlier (${versatz})` `` | `` `Frühere (${
|
|
3885
|
-
| `timeLater(versatz)` | `` `Later (${versatz})` `` | `` `Spätere (${
|
|
3884
|
+
| `timeEarlier(versatz)` | `` `Earlier (${versatz})` `` | `` `Frühere (${offset})` `` | — |
|
|
3885
|
+
| `timeLater(versatz)` | `` `Later (${versatz})` `` | `` `Spätere (${offset})` `` | — |
|
|
3886
3886
|
| `weekdays` | `["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]` | `["Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"]` | The calendar's weekday headers, starting at Monday. |
|
|
3887
3887
|
| `presets.today` | Today | Heute | The quick-select ranges, in the order of PRESET_LABELS. |
|
|
3888
3888
|
| `presets.yesterday` | Yesterday | Gestern | The quick-select ranges, in the order of PRESET_LABELS. |
|
|
@@ -3935,7 +3935,7 @@ Every entry of `Wording`: the English of `DEFAULT_WORDING` beside the German of
|
|
|
3935
3935
|
| `expandRowNamed(row)` | `` `Expand ${row}` `` | `` `${row} aufklappen` `` | The expand button, named after the row header. |
|
|
3936
3936
|
| `collapseRowNamed(row)` | `` `Collapse ${row}` `` | `` `${row} zuklappen` `` | — |
|
|
3937
3937
|
| `rowActions` | Actions | Aktionen | Header of the actions column - for the screen reader, not visible. |
|
|
3938
|
-
| `rowAction(aktion, row)` | `` `${aktion}: ${row}` `` | `` `${
|
|
3938
|
+
| `rowAction(aktion, row)` | `` `${aktion}: ${row}` `` | `` `${action}: ${row}` `` | One action on a row: "Open: A-2041". |
|
|
3939
3939
|
| `rowActionsMenu(row)` | `` `Actions: ${row}` `` | `` `Aktionen: ${row}` `` | The menu holding a row's actions. |
|
|
3940
3940
|
| `editCell(column, row)` | `` `Edit ${column}: ${row}` `` | `` `${column} bearbeiten: ${row}` `` | The editor of a cell in a table's grid mode, named after its column and its row: "Edit Budget: Marketing". |
|
|
3941
3941
|
| `newRow` | New row | Neue Zeile | The button above a grid that opens an empty row to fill in, and the name of that row while it has none ([ADR-0036](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0036-a-grid-edits-on-the-first-click-and-saves-rows-on-purpose.md)). |
|
|
@@ -3984,8 +3984,8 @@ Every entry of `Wording`: the English of `DEFAULT_WORDING` beside the German of
|
|
|
3984
3984
|
| `treeSearchPlaceholder` | Search the tree … | Im Baum suchen … | — |
|
|
3985
3985
|
| `treeNoMatches` | Nothing matches the search. | Nichts passt zur Suche. | — |
|
|
3986
3986
|
| `conditions` | Active filters | Aktive Filter | Group name of the conditions in the table toolbar. |
|
|
3987
|
-
| `removeConditionNamed(label, value)` | `` `Remove ${label}: ${value}` `` | `` `${label}: ${
|
|
3988
|
-
| `editConditionNamed(label, value)` | `` `Edit ${label}: ${value}` `` | `` `${label}: ${
|
|
3987
|
+
| `removeConditionNamed(label, value)` | `` `Remove ${label}: ${value}` `` | `` `${label}: ${value} entfernen` `` | The button that removes a condition: "Remove Region: EU, US". |
|
|
3988
|
+
| `editConditionNamed(label, value)` | `` `Edit ${label}: ${value}` `` | `` `${label}: ${value} bearbeiten` `` | The condition itself, which opens its filter: "Edit Region: EU, US". |
|
|
3989
3989
|
| `moreValues(count, formatted)` | `` `+${formatted}` `` | `` `+${formatted}` `` | The remainder of a long list in a condition: "+1". |
|
|
3990
3990
|
| `filterFrom` | From | Von | The two fields of the range filter. |
|
|
3991
3991
|
| `filterTo` | To | Bis | — |
|
|
@@ -4006,54 +4006,13 @@ Every entry of `Wording`: the English of `DEFAULT_WORDING` beside the German of
|
|
|
4006
4006
|
| `verdictUnknown` | No value | Kein Wert | — |
|
|
4007
4007
|
| `statAbsentValue` | — | — | What stands in the value field when there is no value. No dash, no zero: either could be a value. |
|
|
4008
4008
|
| `target` | Target | Ziel | — |
|
|
4009
|
-
| `deviationAbove(betrag)` | `` `${betrag} above target` `` | `` `${
|
|
4010
|
-
| `deviationBelow(betrag)` | `` `${betrag} below target` `` | `` `${
|
|
4009
|
+
| `deviationAbove(betrag)` | `` `${betrag} above target` `` | `` `${amount} über Ziel` `` | "3,2 above target" or "1,5 below target" - the amount comes from the formats, which is where the comma is from. |
|
|
4010
|
+
| `deviationBelow(betrag)` | `` `${betrag} below target` `` | `` `${amount} unter Ziel` `` | — |
|
|
4011
4011
|
| `deviationOnTarget` | on target | auf Ziel | — |
|
|
4012
4012
|
| `freshnessFresh` | Fresh | Aktuell | The three freshness states. They are a DIFFERENT axis from the verdict: a stale value keeps its verdict ([ADR-0010](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0010-a-stale-value-keeps-its-verdict.md)). |
|
|
4013
4013
|
| `freshnessStale` | Stale | Veraltet | — |
|
|
4014
4014
|
| `freshnessDisconnected` | No connection | Keine Verbindung | — |
|
|
4015
|
-
| `asOfAgo(duration)` | `` `As of: ${
|
|
4016
|
-
| `asOfUnknown` | As-of time unknown | Stand unbekannt | — |
|
|
4017
|
-
|
|
4018
|
-
##### Alarm list
|
|
4019
|
-
|
|
4020
|
-
| Key | English | German | Description |
|
|
4021
|
-
|---|---|---|---|
|
|
4022
|
-
| `alarms` | Alarms | Meldungen | — |
|
|
4023
|
-
| `noAlarms` | No alarms | Keine Meldungen | — |
|
|
4024
|
-
| `noAlarmsDisconnected` | No alarms – the connection is down | Keine Meldungen – die Verbindung steht nicht | Empty, but the line is down - that is something other than quiet. |
|
|
4025
|
-
| `acknowledgeAlarm` | Acknowledge | Quittieren | — |
|
|
4026
|
-
| `acknowledgeAlarms(count)` | `` count === 1 ? "Acknowledge 1 alarm" : `Acknowledge ${count} alarms` `` | `` count === 1 ? "1 Meldung quittieren" : `${count} Meldungen quittieren` `` | Bulk acknowledgement; the number stands in the text on purpose. |
|
|
4027
|
-
| `snoozeAlarm` | Snooze | Zurückstellen | The alarm list's snooze menu, beside "Acknowledge": the word on its button, and the sentence with the number of alarms it acts on. |
|
|
4028
|
-
| `snoozeAlarms(count)` | `` (count === 1 ? "Snooze 1 alarm" : `Snooze ${count} alarms`) `` | `` (count === 1 ? "1 Meldung zurückstellen" : `${count} Meldungen zurückstellen`) `` | — |
|
|
4029
|
-
| `snoozeDuration` | Duration | Dauer | The labels in the panel that opens with `snoozeReason`: the duration to choose and the reason to give. The panel's own button is `snoozeAlarm`. |
|
|
4030
|
-
| `snoozeReason` | Reason | Grund | — |
|
|
4031
|
-
| `unsnoozeAlarm` | Unsnooze | Zurückstellung aufheben | Ends the snooze of the ticked alarms before its time. |
|
|
4032
|
-
| `unsnoozeAlarms(count)` | `` (count === 1 ? "Unsnooze 1 alarm" : `Unsnooze ${count} alarms`) `` | `` count === 1 ? "Zurückstellung von 1 Meldung aufheben" : `Zurückstellung von ${count} Meldungen aufheben` `` | — |
|
|
4033
|
-
| `priorityHigh` | High | Hoch | — |
|
|
4034
|
-
| `priorityMedium` | Medium | Mittel | — |
|
|
4035
|
-
| `priorityLow` | Low | Niedrig | — |
|
|
4036
|
-
| `lifecycleActiveUnacknowledged` | Active, unacknowledged | Aktiv, unquittiert | The four lifecycle states, written out. |
|
|
4037
|
-
| `lifecycleActiveAcknowledged` | Active, acknowledged | Aktiv, quittiert | — |
|
|
4038
|
-
| `lifecycleResolvedUnacknowledged` | Resolved, unacknowledged | Behoben, unquittiert | — |
|
|
4039
|
-
| `lifecycleResolvedAcknowledged` | Resolved, acknowledged | Behoben, quittiert | — |
|
|
4040
|
-
| `floodHint(count)` | `` `Alarm flood: ${count} in quick succession` `` | `` `Meldungsflut: ${count} in kurzer Folge` `` | "Alarm flood: 12 in quick succession" - a flood is marked, never suppressed. |
|
|
4041
|
-
| `chatterHint(count)` | `` `${count}×` `` | `` `${count}×` `` | "40×" on a chattering alarm type. |
|
|
4042
|
-
| `activeUnacknowledged(count)` | `` count === 1 ? "1 active alarm, unacknowledged" : `${count} active alarms, unacknowledged` `` | `` count === 1 ? "1 aktive Meldung, unquittiert" : `${count} aktive Meldungen, unquittiert` `` | The text of the live region: the number of active unacknowledged alarms. |
|
|
4043
|
-
| `columnAlarm` | Alarm | Meldung | — |
|
|
4044
|
-
| `columnLifecycleState` | State | Zustand | — |
|
|
4045
|
-
| `columnPriority` | Priority | Priorität | — |
|
|
4046
|
-
| `columnRaised` | Raised | Gekommen | — |
|
|
4047
|
-
| `columnDuration` | Duration | Dauer | — |
|
|
4048
|
-
| `columnFrequency` | Frequency | Häufigkeit | — |
|
|
4049
|
-
| `columnAcknowledgement` | Acknowledgement | Quittierung | The two columns of the alarm model the list does not show, but which do land in the column menu and the CSV header (`alarmColumns`). |
|
|
4050
|
-
| `columnAge` | Age | Alter | — |
|
|
4051
|
-
| `availabilitySnoozed(until, by, reason)` | `` `Snoozed until ${until} by ${by}${reason ? `: ${reason}` : ""}` `` | `` `Zurückgestellt bis ${until} von ${by}${reason ? `: ${reason}` : ""}` `` | The availability of an alarm (ISA-18.2's special states), written out. A snooze names its end and who snoozed it - a snooze is tracked, not anonymous; the time comes from the formats. The reason, when the snooze has one, comes last and is optional: a wording of two parameters fits. |
|
|
4052
|
-
| `availabilitySnoozedShort` | Snoozed | Zurückgestellt | A snooze as one word - the alarm list's badge; the sentence above stands in its tooltip and in what is spoken. |
|
|
4053
|
-
| `availabilitySuppressed` | Suppressed | Unterdrückt | — |
|
|
4054
|
-
| `availabilityDisabled` | Disabled | Deaktiviert | — |
|
|
4055
|
-
| `hiddenAlarms(count)` | `` `Hidden: ${count}` `` | `` `Ausgeblendet: ${count}` `` | "Hidden: 3" - the count of the view of snoozed, suppressed and disabled alarms, and its name where the list offers the view as a switch. |
|
|
4056
|
-
| `columnAvailability` | Availability | Verfügbarkeit | The availability column of the alarm model: the column menu and the CSV header, like the two above. |
|
|
4015
|
+
| `asOfAgo(duration)` | `` `As of: ${duration}` `` | `` `Stand: ${duration}` `` | "As of: 3 minutes ago", where the duration comes from the formats. |
|
|
4057
4016
|
|
|
4058
4017
|
##### Overlays and states
|
|
4059
4018
|
|
|
@@ -4084,7 +4043,7 @@ Every entry of `Wording`: the English of `DEFAULT_WORDING` beside the German of
|
|
|
4084
4043
|
| `hide` | Hide | Ausblenden | — |
|
|
4085
4044
|
| `moreActions` | More actions | Weitere Aktionen | — |
|
|
4086
4045
|
| `remove` | Remove | Entfernen | The cross on a tag without text content. |
|
|
4087
|
-
| `removeTag(beschriftung)` | `` `Remove ${beschriftung}` `` | `` `${
|
|
4046
|
+
| `removeTag(beschriftung)` | `` `Remove ${beschriftung}` `` | `` `${label} entfernen` `` | The cross on a tag with text content. |
|
|
4088
4047
|
|
|
4089
4048
|
##### @umriss-ui/schedule
|
|
4090
4049
|
|
|
@@ -4144,6 +4103,7 @@ Every entry of `ChartsWording` from `@umriss-ui/charts`, which a chart takes thr
|
|
|
4144
4103
|
|
|
4145
4104
|
| Key | English | German | Description |
|
|
4146
4105
|
|---|---|---|---|
|
|
4106
|
+
| `locale` | en-GB | de-DE | The BCP 47 tag every number and every date or time label of the chart is formatted in (`en-GB`, `de-DE`). The one input for the locale: the browser's language is not read. The clock stays 24-hour in both. |
|
|
4147
4107
|
| `roleDescription` | chart | Diagramm | What a screen reader calls the plot area that takes the keys (`aria-roledescription`). |
|
|
4148
4108
|
| `empty` | No data | Keine Daten | Shown in the plot area when no visible series has a point to show. |
|
|
4149
4109
|
| `seriesList(names)` | `` `${names.length === 1 ? "1 series" : `${names.length} series`}: ${names.join(", ")}.` `` | `` `${names.length === 1 ? "1 Serie" : `${names.length} Serien`}: ${names.join(", ")}.` `` | The summary's visible series, by name. |
|
|
@@ -4151,15 +4111,15 @@ Every entry of `ChartsWording` from `@umriss-ui/charts`, which a chart takes thr
|
|
|
4151
4111
|
| `seriesExtent(name, min, max)` | `` `${name} from ${min} to ${max}.` `` | `` `${name} von ${min} bis ${max}.` `` | The summary's lowest and highest value of one series in that stretch. |
|
|
4152
4112
|
| `limitList(limits)` | `` `Limits: ${limits.map((l) => `${l.name} ${l.value}`).join(", ")}.` `` | `` `Grenzen: ${limits.map((l) => `${l.name} ${l.value}`).join(", ")}.` `` | The summary's labelled limits, each with its value in its axis' format (a band's two edges as one value). |
|
|
4153
4113
|
| `readout(x, rows)` | `` [`${x}.`, ...rows.map((r) => `${r.name} ${r.value}${r.x === "" ? "" : ` at ${r.x}`}.`)].join(" ") `` | `` [`${x}.`, ...rows.map((r) => `${r.name} ${r.value}${r.x === "" ? "" : ` bei ${r.x}`}.`)].join(" ") `` | What is read after a key: the position, then each series with its value (and its own x where it stands on another x axis), the emphasised one first. |
|
|
4154
|
-
| `stackTotal` | Total | Summe | The last row of a stack in the tooltip and the readout: the sum of its members at the point
|
|
4155
|
-
| `percent(value)` | `` `${value}%` `` | `` `${value} %` `` | A share in a normalised stack, its number already formatted
|
|
4114
|
+
| `stackTotal` | Total | Summe | The last row of a stack in the tooltip and the readout: the sum of its members at the point. |
|
|
4115
|
+
| `percent(value)` | `` `${value}%` `` | `` `${value} %` `` | A share in a normalised stack, its number already formatted. |
|
|
4156
4116
|
| `walkHelp` | Left and right arrows move through the values, up and down change the series, Home and End go to the first and the last, Escape clears. | Pfeil links und rechts gehen durch die Werte, Pfeil hoch und runter wechseln die Serie, Pos1 und Ende springen zum ersten und letzten Wert, Escape hebt die Markierung auf. | The keys that walk the chart. |
|
|
4157
4117
|
| `selectHelp` | Enter chooses the point. | Enter wählt den Punkt. | The key that reports the Active point - only where `onSelect` is given. |
|
|
4158
4118
|
| `zoomHelp` | Plus and minus zoom, Shift with left or right pans, 0 goes back to the axis' own span. | Plus und Minus zoomen, Umschalt mit Pfeil links oder rechts verschiebt, 0 kehrt zum eigenen Bereich der Achse zurück. | The keys that zoom and pan it - only where the chart can be zoomed. |
|
|
4159
4119
|
| `legendHelp` | In the legend, Enter hides or shows a series, Shift+Enter shows only it. | In der Legende blendet Enter eine Serie aus oder ein, Umschalt+Enter zeigt nur sie. | The keys of the legend's entries - only where it has one to press. |
|
|
4160
4120
|
| `allShown` | Nothing would be left to see, so every series is shown. | Sonst wäre nichts mehr zu sehen, darum werden alle Serien gezeigt. | Read out where hiding would leave nothing to see, and every series is shown instead. |
|
|
4161
4121
|
| `showAll` | Show all | Alles zeigen | The control over a zoomed plot that brings every zoomed axis back to its own domain (component-view 04). |
|
|
4162
|
-
| `showData` | Show data | Daten zeigen | The data table's disclosure key, closed and open
|
|
4122
|
+
| `showData` | Show data | Daten zeigen | The data table's disclosure key, closed and open. |
|
|
4163
4123
|
| `hideData` | Hide data | Daten verbergen | — |
|
|
4164
4124
|
| `positionColumn` | Position | Position | The heading of the table's x column where its axis has no `label`, and of a matrix' row column where its y axis has none. |
|
|
4165
4125
|
| `rowColumn` | Row | Zeile | — |
|
|
@@ -4174,7 +4134,7 @@ Every entry of `ChartsWording` from `@umriss-ui/charts`, which a chart takes thr
|
|
|
4174
4134
|
| `notch` | Notch | Notch | — |
|
|
4175
4135
|
| `count` | n | n | — |
|
|
4176
4136
|
| `outlierList(values, more)` | `` `${values.length + more}: ${values.join(", ")}${more > 0 ? ` and ${more} more` : ""}` `` | `` `${values.length + more}: ${values.join(", ")}${more > 0 ? ` und ${more} weitere` : ""}` `` | — |
|
|
4177
|
-
| `downsampled(readings)` | `` `Downsampled from ${readings.toLocaleString("en-GB")} readings: the first, lowest, highest and last value of each stretch.` `` | `` `Ausgedünnt aus ${readings.toLocaleString("de-DE")} Messwerten: erster, kleinster, größter und letzter Wert je Abschnitt.` `` | Added to the caption where the table shows the downsampled course
|
|
4137
|
+
| `downsampled(readings)` | `` `Downsampled from ${readings.toLocaleString("en-GB")} readings: the first, lowest, highest and last value of each stretch.` `` | `` `Ausgedünnt aus ${readings.toLocaleString("de-DE")} Messwerten: erster, kleinster, größter und letzter Wert je Abschnitt.` `` | Added to the caption where the table shows the downsampled course: how many readings its rows stand for. |
|
|
4178
4138
|
|
|
4179
4139
|
#### Formats
|
|
4180
4140
|
|
|
@@ -4274,11 +4234,6 @@ Everything the library puts out as text.
|
|
|
4274
4234
|
| `paletteHintChoose` *required* | `string` | — | |
|
|
4275
4235
|
| `paletteHintClose` *required* | `string` | — | |
|
|
4276
4236
|
| `paletteKeyEsc` *required* | `string` | — | The legend on the Escape key. The arrows and the return key are glyphs and therefore do not stand here; "Esc" is a word and is called something else elsewhere. |
|
|
4277
|
-
| `dockTools` *required* | `string` | — | Accessible name of a dock's tools. |
|
|
4278
|
-
| `dockGrip` *required* | `string` | — | Accessible name of the grip - it says what it does, not what it is. |
|
|
4279
|
-
| `dockPlace` *required* | `(place: "top" \| "right" \| "bottom" \| "left") => string` | — | The four resting places, named. The keys are the `DockPlace` type's, and a register translates them: the German one answers "oben" where the English one answers "top". |
|
|
4280
|
-
| `dockPlaced` *required* | `(place: string) => string` | — | What the screen reader hears once the dock has taken a place. |
|
|
4281
|
-
| `dockNoPlace` *required* | `(place: string) => string` | — | And what it hears when a place has refused. A refusal is not a fault: a wide, flat host with no room for a standing dock is not a mistake anyone made. |
|
|
4282
4237
|
| `datePlaceholder` *required* | `string` | — | |
|
|
4283
4238
|
| `datePanel` *required* | `string` | — | Accessible name of the panel. Deliberately kept apart from the placeholder: whoever labels the field differently does not thereby rename the dialog. |
|
|
4284
4239
|
| `dateClear` *required* | `string` | — | |
|
|
@@ -4435,42 +4390,6 @@ Everything the library puts out as text.
|
|
|
4435
4390
|
| `freshnessStale` *required* | `string` | — | |
|
|
4436
4391
|
| `freshnessDisconnected` *required* | `string` | — | |
|
|
4437
4392
|
| `asOfAgo` *required* | `(duration: string) => string` | — | "As of: 3 minutes ago", where the duration comes from the formats. |
|
|
4438
|
-
| `asOfUnknown` *required* | `string` | — | |
|
|
4439
|
-
| `alarms` *required* | `string` | — | |
|
|
4440
|
-
| `noAlarms` *required* | `string` | — | |
|
|
4441
|
-
| `noAlarmsDisconnected` *required* | `string` | — | Empty, but the line is down - that is something other than quiet. |
|
|
4442
|
-
| `acknowledgeAlarm` *required* | `string` | — | |
|
|
4443
|
-
| `acknowledgeAlarms` *required* | `(count: number) => string` | — | Bulk acknowledgement; the number stands in the text on purpose. |
|
|
4444
|
-
| `snoozeAlarm` *required* | `string` | — | The alarm list's snooze menu, beside "Acknowledge": the word on its button, and the sentence with the number of alarms it acts on. |
|
|
4445
|
-
| `snoozeAlarms` *required* | `(count: number) => string` | — | |
|
|
4446
|
-
| `snoozeDuration` *required* | `string` | — | The labels in the panel that opens with `snoozeReason`: the duration to choose and the reason to give. The panel's own button is `snoozeAlarm`. |
|
|
4447
|
-
| `snoozeReason` *required* | `string` | — | |
|
|
4448
|
-
| `unsnoozeAlarm` *required* | `string` | — | Ends the snooze of the ticked alarms before its time. |
|
|
4449
|
-
| `unsnoozeAlarms` *required* | `(count: number) => string` | — | |
|
|
4450
|
-
| `priorityHigh` *required* | `string` | — | |
|
|
4451
|
-
| `priorityMedium` *required* | `string` | — | |
|
|
4452
|
-
| `priorityLow` *required* | `string` | — | |
|
|
4453
|
-
| `lifecycleActiveUnacknowledged` *required* | `string` | — | The four lifecycle states, written out. |
|
|
4454
|
-
| `lifecycleActiveAcknowledged` *required* | `string` | — | |
|
|
4455
|
-
| `lifecycleResolvedUnacknowledged` *required* | `string` | — | |
|
|
4456
|
-
| `lifecycleResolvedAcknowledged` *required* | `string` | — | |
|
|
4457
|
-
| `floodHint` *required* | `(count: number) => string` | — | "Alarm flood: 12 in quick succession" - a flood is marked, never suppressed. |
|
|
4458
|
-
| `chatterHint` *required* | `(count: number) => string` | — | "40×" on a chattering alarm type. |
|
|
4459
|
-
| `activeUnacknowledged` *required* | `(count: number) => string` | — | The text of the live region: the number of active unacknowledged alarms. |
|
|
4460
|
-
| `columnAlarm` *required* | `string` | — | |
|
|
4461
|
-
| `columnLifecycleState` *required* | `string` | — | |
|
|
4462
|
-
| `columnPriority` *required* | `string` | — | |
|
|
4463
|
-
| `columnRaised` *required* | `string` | — | |
|
|
4464
|
-
| `columnDuration` *required* | `string` | — | |
|
|
4465
|
-
| `columnFrequency` *required* | `string` | — | |
|
|
4466
|
-
| `columnAcknowledgement` *required* | `string` | — | The two columns of the alarm model the list does not show, but which do land in the column menu and the CSV header (`alarmColumns`). |
|
|
4467
|
-
| `columnAge` *required* | `string` | — | |
|
|
4468
|
-
| `availabilitySnoozed` *required* | `(until: string, by: string, reason?: string) => string` | — | The availability of an alarm (ISA-18.2's special states), written out. A snooze names its end and who snoozed it - a snooze is tracked, not anonymous; the time comes from the formats. The reason, when the snooze has one, comes last and is optional: a wording of two parameters fits. |
|
|
4469
|
-
| `availabilitySnoozedShort` *required* | `string` | — | A snooze as one word - the alarm list's badge; the sentence above stands in its tooltip and in what is spoken. |
|
|
4470
|
-
| `availabilitySuppressed` *required* | `string` | — | |
|
|
4471
|
-
| `availabilityDisabled` *required* | `string` | — | |
|
|
4472
|
-
| `hiddenAlarms` *required* | `(count: number) => string` | — | "Hidden: 3" - the count of the view of snoozed, suppressed and disabled alarms, and its name where the list offers the view as a switch. |
|
|
4473
|
-
| `columnAvailability` *required* | `string` | — | The availability column of the alarm model: the column menu and the CSV header, like the two above. |
|
|
4474
4393
|
| `close` *required* | `string` | — | |
|
|
4475
4394
|
| `closeToast` *required* | `string` | — | |
|
|
4476
4395
|
| `toastDeckCount` *required* | `(count: number) => string` | — | The count on the front toast of a closed deck; pressing it shows them all. |
|
|
@@ -4850,10 +4769,11 @@ The keys of [Button](#/button/keyboard-button) apply here.
|
|
|
4850
4769
|
| Prop | Type | Default | Description |
|
|
4851
4770
|
|---|---|---|---|
|
|
4852
4771
|
| `direction` | `"row" \| "column"` | `"column"` | Below one another or beside one another. Below is the direction content stands in anyway, without being asked.<br>Shown in: [A row](#/stack-and-grid/a-row), [Gaps](#/stack-and-grid/gaps), [Wrapping](#/stack-and-grid/wrapping) and 68 more |
|
|
4853
|
-
| `gap` | [`SpaceStep`](#type-SpaceStep)<br>`1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8` | `3` | Spacing as a step of the 4 px spacing steps (1–8).<br>Shown in: [A column](#/stack-and-grid/a-column), [A row](#/stack-and-grid/a-row), [Gaps](#/stack-and-grid/gaps) and
|
|
4772
|
+
| `gap` | [`SpaceStep`](#type-SpaceStep)<br>`1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8` | `3` | Spacing as a step of the 4 px spacing steps (1–8).<br>Shown in: [A column](#/stack-and-grid/a-column), [A row](#/stack-and-grid/a-row), [Gaps](#/stack-and-grid/gaps) and 163 more |
|
|
4854
4773
|
| `align` | `CSSProperties["alignItems"]` | — | Alignment across the direction – `alignItems` unchanged.<br>Shown in: [A row](#/stack-and-grid/a-row), [Gaps](#/stack-and-grid/gaps), [A tour summary](#/stack-and-grid/a-tour-summary) and 77 more |
|
|
4855
4774
|
| `justify` | `CSSProperties["justifyContent"]` | — | Distribution along the direction – `justifyContent` unchanged.<br>Shown in: [A row](#/stack-and-grid/a-row), [A tour summary](#/stack-and-grid/a-tour-summary), [Name the same action in every row (VisuallyHidden)](#/visuallyhidden/actions-in-rows) and 9 more |
|
|
4856
4775
|
| `wrap` | `boolean` | `false` | Lets the children wrap when the line does not suffice.<br>Shown in: [Gaps](#/stack-and-grid/gaps), [Wrapping](#/stack-and-grid/wrapping), [Sized to the value (Sizes)](#/sizes/sized-to-the-value) and 32 more |
|
|
4776
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
4857
4777
|
|
|
4858
4778
|
Also takes every attribute of `<div>`.
|
|
4859
4779
|
|
|
@@ -4864,6 +4784,7 @@ Also takes every attribute of `<div>`.
|
|
|
4864
4784
|
| `columns` | `number \| readonly `[`GridColumnWidth`](#type-GridColumnWidth)`[]` | `2` | How many columns, all of one width - or a list with one width per column: a number in pixels, or `"fill"` for a share of what is left. Overridden by minItemWidth.<br>Shown in: [Fixed columns](#/stack-and-grid/fixed-columns), [Columns of their own widths](#/stack-and-grid/columns-of-their-own-widths), [A token for one region (Theming)](#/theming/a-token-for-one-region) and 5 more |
|
|
4865
4785
|
| `minItemWidth` | `string` | — | Responsive: as many columns as fit at this minimum width; wins over `columns`, a list included.<br>Shown in: [Columns by width](#/stack-and-grid/columns-by-width), [A tour summary](#/stack-and-grid/a-tour-summary), [A dark region (Theming)](#/theming/a-dark-region) and 51 more |
|
|
4866
4786
|
| `gap` | [`SpaceStep`](#type-SpaceStep)<br>`1 \| 2 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8` | `4` | Spacing as a step of the 4 px spacing steps (1–8); applies in both directions.<br>Shown in: [Fixed columns](#/stack-and-grid/fixed-columns), [Columns by width](#/stack-and-grid/columns-by-width), [Columns of their own widths](#/stack-and-grid/columns-of-their-own-widths) and 58 more |
|
|
4787
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
4867
4788
|
|
|
4868
4789
|
Also takes every attribute of `<div>`.
|
|
4869
4790
|
|
|
@@ -4996,6 +4917,7 @@ The keys of [Button](#/button/keyboard-button) apply here.
|
|
|
4996
4917
|
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | Horizontally it separates rows, vertically it separates columns.<br>Shown in: [Configurator](#/divider/configurator-divider), [Upright in a bar](#/divider/upright-in-a-bar) |
|
|
4997
4918
|
| `strong` | `boolean` | `false` | A stronger line - for section boundaries rather than row separation.<br>Shown in: [Configurator](#/divider/configurator-divider), [Strength and label](#/divider/strength-and-label), [Upright in a bar](#/divider/upright-in-a-bar) |
|
|
4998
4919
|
| `label` | `ReactNode` | — | A label in the middle. It makes the line a named separator.<br>Shown in: [Configurator](#/divider/configurator-divider), [Strength and label](#/divider/strength-and-label) |
|
|
4920
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
4999
4921
|
|
|
5000
4922
|
Also takes every attribute of `<div>`.
|
|
5001
4923
|
|
|
@@ -5267,6 +5189,7 @@ The keys of [Button](#/button/keyboard-button) apply here.
|
|
|
5267
5189
|
| `defaultCollapsed` | `boolean` | `false` | Initial state of the collapse mechanism; afterwards it belongs to the card. Only effective together with `collapsible`.<br>Shown in: [Fold the body](#/card/fold-the-body) |
|
|
5268
5190
|
| `collapsed` | `boolean` | — | Controlled: whether the body is folded away - for a card folded from outside, or one whose state is kept in an address. Only effective together with `collapsible`.<br>Shown in: [Fold from outside](#/card/fold-from-outside) |
|
|
5269
5191
|
| `onCollapsedChange` | `(collapsed: boolean) => void` | — | Reports the wish of the header's button. Controlled, the card folds only once `collapsed` follows; uncontrolled it is merely a message.<br>Shown in: [Fold from outside](#/card/fold-from-outside) |
|
|
5192
|
+
| `ref` | `Ref<HTMLElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
5270
5193
|
|
|
5271
5194
|
Also takes every attribute of the rendered element.
|
|
5272
5195
|
|
|
@@ -5278,6 +5201,7 @@ Also takes every attribute of the rendered element.
|
|
|
5278
5201
|
| `eyebrow` | `ReactNode` | — | Small all-caps label above the title, e.g. a category.<br>Shown in: [Eyebrow and actions](#/card/eyebrow-and-actions), [A flush body](#/card/a-flush-body), [Fold the body](#/card/fold-the-body) and 17 more |
|
|
5279
5202
|
| `actions` | `ReactNode` | — | Right-aligned area, e.g. buttons or badges.<br>Shown in: [Eyebrow and actions](#/card/eyebrow-and-actions), [Fold the body](#/card/fold-the-body), [Cards on a dashboard](#/card/cards-on-a-dashboard) and 13 more |
|
|
5280
5203
|
| `divider` | `boolean` | `false` | A dividing line below the head. Only set it where the body needs it - typically with flush data (flush tables, logs). With normal content the white space carries the hierarchy on its own.<br>Shown in: [A flush body](#/card/a-flush-body) |
|
|
5204
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
5281
5205
|
|
|
5282
5206
|
Also takes every attribute of `<div>` – without `title`.
|
|
5283
5207
|
|
|
@@ -5286,6 +5210,7 @@ Also takes every attribute of `<div>` – without `title`.
|
|
|
5286
5210
|
| Prop | Type | Default | Description |
|
|
5287
5211
|
|---|---|---|---|
|
|
5288
5212
|
| `flush` | `boolean` | `false` | Removes the inner padding, e.g. for flush tables.<br>Shown in: [A flush body](#/card/a-flush-body) |
|
|
5213
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
5289
5214
|
|
|
5290
5215
|
Also takes every attribute of `<div>`.
|
|
5291
5216
|
|
|
@@ -5572,7 +5497,7 @@ function metrics(serviceId: string): MetricPoint[] {
|
|
|
5572
5497
|
return points;
|
|
5573
5498
|
}
|
|
5574
5499
|
|
|
5575
|
-
/** A kind of alert
|
|
5500
|
+
/** A kind of alert. */
|
|
5576
5501
|
interface AlertType {
|
|
5577
5502
|
id: string;
|
|
5578
5503
|
label: string;
|
|
@@ -5588,7 +5513,7 @@ const ALERT_TYPES: readonly AlertType[] = [
|
|
|
5588
5513
|
{ id: "reports-job", label: "Reporting · nightly job late", priority: "low" },
|
|
5589
5514
|
];
|
|
5590
5515
|
|
|
5591
|
-
/** One alert
|
|
5516
|
+
/** One alert. */
|
|
5592
5517
|
type Alert = {
|
|
5593
5518
|
id: string;
|
|
5594
5519
|
type: string;
|
|
@@ -5671,449 +5596,53 @@ export default function ThreePanes() {
|
|
|
5671
5596
|
)}
|
|
5672
5597
|
</Stack>
|
|
5673
5598
|
</Splitter>
|
|
5674
|
-
</Splitter>
|
|
5675
|
-
</Card>
|
|
5676
|
-
);
|
|
5677
|
-
}
|
|
5678
|
-
```
|
|
5679
|
-
|
|
5680
|
-
#### When to use something else
|
|
5681
|
-
|
|
5682
|
-
- Views the user switches between rather than sees together → Tabs
|
|
5683
|
-
|
|
5684
|
-
#### Keyboard
|
|
5685
|
-
|
|
5686
|
-
| Key | Action |
|
|
5687
|
-
|---|---|
|
|
5688
|
-
| `Arrow Left / Arrow Right` | Side by side: moves the line by one step, 5 % unless set otherwise. |
|
|
5689
|
-
| `Arrow Up / Arrow Down` | One above the other: moves the line by one step. |
|
|
5690
|
-
| `Home / End` | Moves the line to the smallest or the largest share. |
|
|
5691
|
-
| `Enter` | Folds the first pane to its smallest share; again, brings it back. |
|
|
5692
|
-
|
|
5693
|
-
#### API
|
|
5694
|
-
|
|
5695
|
-
##### `SplitterProps`
|
|
5696
|
-
|
|
5697
|
-
| Prop | Type | Default | Description |
|
|
5698
|
-
|---|---|---|---|
|
|
5699
|
-
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | How the two panes stand: `horizontal` side by side, `vertical` one above the other - a trend above, its alarms below.<br>Shown in: [One above the other](#/splitter/one-above-the-other), [Three panes](#/splitter/three-panes) |
|
|
5700
|
-
| `defaultValue` | `number` | `50` | Uncontrolled: the share to start at.<br>Shown in: [Two panes](#/splitter/two-panes), [One above the other](#/splitter/one-above-the-other), [Three panes](#/splitter/three-panes) |
|
|
5701
|
-
| `value` | `number` | — | Controlled: the first pane's share of the room, in per cent.<br>Shown in: [Keep the share](#/splitter/keep-the-share) |
|
|
5702
|
-
| `min` | `number` | `0` | The smallest share of the first pane, and where Enter collapses it to.<br>Shown in: [One above the other](#/splitter/one-above-the-other), [Keep the share](#/splitter/keep-the-share), [Three panes](#/splitter/three-panes) |
|
|
5703
|
-
| `max` | `number` | `100` | The largest share of the first pane.<br>Shown in: [One above the other](#/splitter/one-above-the-other), [Keep the share](#/splitter/keep-the-share), [Three panes](#/splitter/three-panes) |
|
|
5704
|
-
| `step` | `number` | `5` | How far an arrow key moves the separator, in per cent.<br>Shown in: [Keep the share](#/splitter/keep-the-share) |
|
|
5705
|
-
| `separatorLabel` | `string` | the wording's "Resize the panes" | The separator's name. The APG names it after the first pane ("Trend").<br>Shown in: [One above the other](#/splitter/one-above-the-other), [Keep the share](#/splitter/keep-the-share), [Three panes](#/splitter/three-panes) |
|
|
5706
|
-
| `children` *required* | `[ReactNode, ReactNode]` | — | The first pane and the second, in this order.<br>Shown in: [Two panes](#/splitter/two-panes), [One above the other](#/splitter/one-above-the-other), [Keep the share](#/splitter/keep-the-share) and 1 more |
|
|
5707
|
-
|
|
5708
|
-
###### Events
|
|
5709
|
-
|
|
5710
|
-
| Prop | Type | Default | Description |
|
|
5711
|
-
|---|---|---|---|
|
|
5712
|
-
| `onChange` | `(value: number) => void` | — | Reports every move, by pointer or key, as the first pane's share.<br>Shown in: [Keep the share](#/splitter/keep-the-share) |
|
|
5713
|
-
|
|
5714
|
-
Also takes every attribute of `<div>` – without `children`, `defaultValue`, `onChange`.
|
|
5715
|
-
|
|
5716
|
-
#### Known limits
|
|
5717
|
-
|
|
5718
|
-
- Two panes per splitter, no more. Tiles are not arranged by the user ([ADR-0060](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0060-validation-and-a-layout-editor-are-never-time-zones-not-yet.md)).
|
|
5719
|
-
- It does not remember the share beyond its own life; keep it in the user's settings through `value` and `onChange`.
|
|
5720
|
-
|
|
5721
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
|
|
5722
|
-
|
|
5723
|
-
### Dock
|
|
5724
|
-
|
|
5725
|
-
A strip of tools that floats above one surface, a chart or a map, and rests at the edge the user moves it to (also called a floating toolbar). Reach for it when the tools act on that surface and must not take room from it.
|
|
5726
|
-
|
|
5727
|
-
```ts
|
|
5728
|
-
import { Dock } from "@umriss-ui/core";
|
|
5729
|
-
```
|
|
5730
|
-
|
|
5731
|
-
Demo page: https://romanhaendler.github.io/umriss-ui/core/dock/
|
|
5732
|
-
|
|
5733
|
-
It snaps and does not follow: dragging moves the handle, and the dock jumps to the edge whose zone the pointer reaches. It always rests at one of four places, never in between and never in a corner ([ADR-0013](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0013-a-dock-snaps-it-does-not-follow.md)).
|
|
5734
|
-
|
|
5735
|
-
It belongs to one surface; two charts side by side have two docks. Which tools are modes is yours to say through `mode`; without it, every tool simply reports its use.
|
|
5736
|
-
|
|
5737
|
-
Where an edge has no room for the strip, as the side edges of a wide, flat chart, that edge refuses visibly and shows the outline the dock would take. Nothing shrinks and nothing overflows.
|
|
5738
|
-
|
|
5739
|
-
#### Examples
|
|
5740
|
-
|
|
5741
|
-
##### A tool strip
|
|
5742
|
-
|
|
5743
|
-
Put the dock inside a positioned surface and give it `tools`; it lies above the surface and takes no room from it.
|
|
5744
|
-
|
|
5745
|
-
```tsx
|
|
5746
|
-
import { Dock, GridGlyph, MeasureGlyph } from "@umriss-ui/core";
|
|
5747
|
-
import type { DockTool } from "@umriss-ui/core";
|
|
5748
|
-
|
|
5749
|
-
const TOOLS: readonly DockTool[] = [
|
|
5750
|
-
{ id: "grid", label: "Grid", icon: <GridGlyph /> },
|
|
5751
|
-
{ id: "measure", label: "Measure", icon: <MeasureGlyph /> },
|
|
5752
|
-
];
|
|
5753
|
-
|
|
5754
|
-
export default function AToolStrip() {
|
|
5755
|
-
return (
|
|
5756
|
-
<div
|
|
5757
|
-
style={{
|
|
5758
|
-
position: "relative",
|
|
5759
|
-
height: 200,
|
|
5760
|
-
borderRadius: "var(--u-radius-lg)",
|
|
5761
|
-
background: "var(--u-color-surface-sunken)",
|
|
5762
|
-
boxShadow: "var(--u-edge)",
|
|
5763
|
-
}}
|
|
5764
|
-
>
|
|
5765
|
-
<Dock tools={TOOLS} defaultPlace="bottom" />
|
|
5766
|
-
</div>
|
|
5767
|
-
);
|
|
5768
|
-
}
|
|
5769
|
-
```
|
|
5770
|
-
|
|
5771
|
-
##### Four resting places
|
|
5772
|
-
|
|
5773
|
-
Drag the handle or press an arrow on it to move the dock; control `place` with `onPlaceChange` to keep it in the user's settings.
|
|
5774
|
-
|
|
5775
|
-
```tsx
|
|
5776
|
-
import { useState } from "react";
|
|
5777
|
-
import { Dock, GridGlyph, MeasureGlyph, PlusGlyph, Stack, Text } from "@umriss-ui/core";
|
|
5778
|
-
import type { DockPlace, DockTool } from "@umriss-ui/core";
|
|
5779
|
-
|
|
5780
|
-
const TOOLS: readonly DockTool[] = [
|
|
5781
|
-
{ id: "zoom-in", label: "Zoom in", icon: <PlusGlyph /> },
|
|
5782
|
-
{ id: "grid", label: "Grid", icon: <GridGlyph /> },
|
|
5783
|
-
{ id: "measure", label: "Measure", icon: <MeasureGlyph /> },
|
|
5784
|
-
];
|
|
5785
|
-
|
|
5786
|
-
export default function FourRestingPlaces() {
|
|
5787
|
-
const [place, setPlace] = useState<DockPlace>("top");
|
|
5788
|
-
|
|
5789
|
-
return (
|
|
5790
|
-
<Stack gap={2}>
|
|
5791
|
-
<div
|
|
5792
|
-
style={{
|
|
5793
|
-
position: "relative",
|
|
5794
|
-
height: 260,
|
|
5795
|
-
borderRadius: "var(--u-radius-lg)",
|
|
5796
|
-
background: "var(--u-color-surface-sunken)",
|
|
5797
|
-
boxShadow: "var(--u-edge)",
|
|
5798
|
-
}}
|
|
5799
|
-
>
|
|
5800
|
-
<Dock tools={TOOLS} place={place} onPlaceChange={setPlace} />
|
|
5801
|
-
</div>
|
|
5802
|
-
<Text size="xs" tone="muted">
|
|
5803
|
-
Resting place: <code>{place}</code>
|
|
5804
|
-
</Text>
|
|
5805
|
-
</Stack>
|
|
5806
|
-
);
|
|
5807
|
-
}
|
|
5808
|
-
```
|
|
5809
|
-
|
|
5810
|
-
##### Modes and actions
|
|
5811
|
-
|
|
5812
|
-
Set `mode` for the tool the surface stands in and let `onUse` report the rest; a `disabled` tool stays in its place.
|
|
5813
|
-
|
|
5814
|
-
```tsx
|
|
5815
|
-
import { useState } from "react";
|
|
5816
|
-
import { CrossGlyph, Dock, GridGlyph, MeasureGlyph, MinusGlyph, PlusGlyph, Stack, Text } from "@umriss-ui/core";
|
|
5817
|
-
import type { DockTool } from "@umriss-ui/core";
|
|
5818
|
-
|
|
5819
|
-
const TOOLS: readonly DockTool[] = [
|
|
5820
|
-
{ id: "zoom-in", label: "Zoom in", icon: <PlusGlyph /> },
|
|
5821
|
-
{ id: "zoom-out", label: "Zoom out", icon: <MinusGlyph />, disabled: true },
|
|
5822
|
-
{ id: "grid", label: "Grid", icon: <GridGlyph /> },
|
|
5823
|
-
{ id: "measure", label: "Measure", icon: <MeasureGlyph /> },
|
|
5824
|
-
{ id: "clear", label: "Clear the selection", icon: <CrossGlyph /> },
|
|
5825
|
-
];
|
|
5826
|
-
|
|
5827
|
-
/** Which tools are modes is the application's knowledge, not the dock's. */
|
|
5828
|
-
const MODES = new Set(["grid", "measure"]);
|
|
5829
|
-
|
|
5830
|
-
export default function ModesAndActions() {
|
|
5831
|
-
const [mode, setMode] = useState("grid");
|
|
5832
|
-
const [last, setLast] = useState<string | null>(null);
|
|
5833
|
-
|
|
5834
|
-
return (
|
|
5835
|
-
<Stack gap={2}>
|
|
5836
|
-
<div
|
|
5837
|
-
style={{
|
|
5838
|
-
position: "relative",
|
|
5839
|
-
height: 220,
|
|
5840
|
-
borderRadius: "var(--u-radius-lg)",
|
|
5841
|
-
background: "var(--u-color-surface-sunken)",
|
|
5842
|
-
boxShadow: "var(--u-edge)",
|
|
5843
|
-
}}
|
|
5844
|
-
>
|
|
5845
|
-
<Dock
|
|
5846
|
-
tools={TOOLS}
|
|
5847
|
-
defaultPlace="bottom"
|
|
5848
|
-
mode={mode}
|
|
5849
|
-
onModeChange={(id) => {
|
|
5850
|
-
if (MODES.has(id)) setMode(id);
|
|
5851
|
-
}}
|
|
5852
|
-
onUse={setLast}
|
|
5853
|
-
/>
|
|
5854
|
-
</div>
|
|
5855
|
-
<Text size="xs" tone="muted">
|
|
5856
|
-
Mode: <code>{mode}</code>, last used: <code>{last ?? "none"}</code>
|
|
5857
|
-
</Text>
|
|
5858
|
-
</Stack>
|
|
5859
|
-
);
|
|
5860
|
-
}
|
|
5861
|
-
```
|
|
5862
|
-
|
|
5863
|
-
##### Move the dock, and where it does not fit
|
|
5864
|
-
|
|
5865
|
-
Above a latency chart the dock reaches all four edges; on a flat chart the two side edges refuse and show why.
|
|
5866
|
-
|
|
5867
|
-
```tsx
|
|
5868
|
-
/* `data-dock` names the two hosts for the screenshot and interaction suites:
|
|
5869
|
-
`spacious` has room for an upright dock, `flat` has not. */
|
|
5870
|
-
|
|
5871
|
-
import { useState } from "react";
|
|
5872
|
-
import type { ReactNode } from "react";
|
|
5873
|
-
import { CrossGlyph, Dock, GridGlyph, MeasureGlyph, MinusGlyph, PlusGlyph, Stack, Text } from "@umriss-ui/core";
|
|
5874
|
-
import type { DockPlace, DockTool } from "@umriss-ui/core";
|
|
5875
|
-
|
|
5876
|
-
/* Data from the operations world, written out here so the example runs on its own. */
|
|
5877
|
-
/** A small LCG - the same numbers on every computer. */
|
|
5878
|
-
function random(seed: number): () => number {
|
|
5879
|
-
let s = seed >>> 0;
|
|
5880
|
-
return () => {
|
|
5881
|
-
s = (Math.imul(s, 1664525) + 1013904223) >>> 0;
|
|
5882
|
-
return s / 4294967296;
|
|
5883
|
-
};
|
|
5884
|
-
}
|
|
5885
|
-
|
|
5886
|
-
const at = (day: number, hours: number, minutes = 0) => new Date(2026, 2, day, hours, minutes).getTime();
|
|
5887
|
-
const MINUTE = 60_000;
|
|
5888
|
-
|
|
5889
|
-
/** Tuesday, 17 March 2026, 10:30 - the moment the screens are read at. */
|
|
5890
|
-
const NOW = at(17, 10, 30);
|
|
5891
|
-
|
|
5892
|
-
interface Service {
|
|
5893
|
-
id: string;
|
|
5894
|
-
name: string;
|
|
5895
|
-
team: string;
|
|
5896
|
-
/** 1 is customer-facing and pages at night; 3 waits for the morning. */
|
|
5897
|
-
tier: 1 | 2 | 3;
|
|
5898
|
-
/** The latency objective: the 95th percentile stays below this, in ms. */
|
|
5899
|
-
latencySlo: number;
|
|
5900
|
-
/** The availability promised for a month, in per cent. */
|
|
5901
|
-
availabilityTarget: number;
|
|
5902
|
-
}
|
|
5903
|
-
|
|
5904
|
-
const SERVICES: readonly Service[] = [
|
|
5905
|
-
{ id: "checkout", name: "Checkout", team: "Payments", tier: 1, latencySlo: 300, availabilityTarget: 99.95 },
|
|
5906
|
-
{ id: "billing", name: "Billing", team: "Payments", tier: 1, latencySlo: 400, availabilityTarget: 99.9 },
|
|
5907
|
-
{ id: "sign-in", name: "Sign-in", team: "Identity", tier: 1, latencySlo: 200, availabilityTarget: 99.95 },
|
|
5908
|
-
{ id: "search", name: "Search", team: "Discovery", tier: 1, latencySlo: 250, availabilityTarget: 99.9 },
|
|
5909
|
-
{ id: "images", name: "Image service", team: "Discovery", tier: 2, latencySlo: 500, availabilityTarget: 99.5 },
|
|
5910
|
-
{ id: "notifications", name: "Notifications", team: "Messaging", tier: 2, latencySlo: 800, availabilityTarget: 99.5 },
|
|
5911
|
-
{ id: "webhooks", name: "Webhooks", team: "Integrations", tier: 2, latencySlo: 1000, availabilityTarget: 99.5 },
|
|
5912
|
-
{ id: "reports", name: "Reporting", team: "Insights", tier: 3, latencySlo: 2000, availabilityTarget: 99 },
|
|
5913
|
-
];
|
|
5914
|
-
|
|
5915
|
-
interface MetricPoint {
|
|
5916
|
-
t: number;
|
|
5917
|
-
/** Median and 95th percentile latency, in ms. */
|
|
5918
|
-
p50: number;
|
|
5919
|
-
p95: number;
|
|
5920
|
-
/** Failed requests, in per cent. */
|
|
5921
|
-
errorRate: number;
|
|
5922
|
-
/** Requests per minute. */
|
|
5923
|
-
requests: number;
|
|
5924
|
-
}
|
|
5925
|
-
|
|
5926
|
-
/** Requests per minute at the busiest hour, by tier. */
|
|
5927
|
-
const VOLUME = { 1: 900, 2: 400, 3: 120 } as const;
|
|
5928
|
-
|
|
5929
|
-
/** A service's latency and error rate every five minutes of today, from
|
|
5930
|
-
midnight up to now. Busy by day, quiet at night; Checkout's 95th percentile
|
|
5931
|
-
climbs well past its objective from 09:40 to 10:10, and its errors with it. */
|
|
5932
|
-
function metrics(serviceId: string): MetricPoint[] {
|
|
5933
|
-
const index = SERVICES.findIndex((one) => one.id === serviceId);
|
|
5934
|
-
const service = SERVICES[index];
|
|
5935
|
-
if (service === undefined) throw new Error(`No service "${serviceId}".`);
|
|
5936
|
-
const r = random(1000 + index * 37);
|
|
5937
|
-
const points: MetricPoint[] = [];
|
|
5938
|
-
let drift = 0;
|
|
5939
|
-
for (let t = at(17, 0); t <= NOW; t += 5 * MINUTE) {
|
|
5940
|
-
const hour = (t - at(17, 0)) / (60 * MINUTE);
|
|
5941
|
-
const load = 0.35 + 0.65 * Math.max(0, Math.sin((Math.PI * (hour - 5)) / 16));
|
|
5942
|
-
drift = 0.8 * drift + (r() - 0.5) * 0.08;
|
|
5943
|
-
const base = service.latencySlo * (0.45 + 0.2 * load + drift);
|
|
5944
|
-
const surge = serviceId === "checkout" && t >= at(17, 9, 40) && t < at(17, 10, 10) ? 1.9 : 1;
|
|
5945
|
-
const p95 = Math.round(base * surge * (1 + r() * 0.08));
|
|
5946
|
-
points.push({
|
|
5947
|
-
t,
|
|
5948
|
-
p50: Math.round(p95 * (0.42 + r() * 0.06)),
|
|
5949
|
-
p95,
|
|
5950
|
-
errorRate: Math.round((0.05 + r() * 0.12 + (surge > 1 ? 2.4 + r() : 0)) * 100) / 100,
|
|
5951
|
-
requests: Math.round(VOLUME[service.tier] * load * (1 + (r() - 0.5) * 0.1)),
|
|
5952
|
-
});
|
|
5953
|
-
}
|
|
5954
|
-
return points;
|
|
5955
|
-
}
|
|
5956
|
-
|
|
5957
|
-
const TOOLS: readonly DockTool[] = [
|
|
5958
|
-
{ id: "zoom-in", label: "Zoom in", icon: <PlusGlyph /> },
|
|
5959
|
-
{ id: "zoom-out", label: "Zoom out", icon: <MinusGlyph />, disabled: true },
|
|
5960
|
-
{ id: "grid", label: "Grid", icon: <GridGlyph /> },
|
|
5961
|
-
{ id: "measure", label: "Measure", icon: <MeasureGlyph /> },
|
|
5962
|
-
{ id: "clear", label: "Clear the selection", icon: <CrossGlyph /> },
|
|
5963
|
-
];
|
|
5964
|
-
|
|
5965
|
-
/** Which tools are modes is the application's knowledge, not the dock's. */
|
|
5966
|
-
const MODES = new Set(["grid", "measure"]);
|
|
5967
|
-
|
|
5968
|
-
/* Checkout's p95 today, scaled into a 400 × 100 box: the chart the tools
|
|
5969
|
-
would act on, drawn as a plain line. */
|
|
5970
|
-
const P95 = metrics("checkout").map((point) => point.p95);
|
|
5971
|
-
const TOP = Math.max(...P95) * 1.1;
|
|
5972
|
-
const POINTS = P95.map((value, i) => `${((i / (P95.length - 1)) * 400).toFixed(1)},${(100 - (value / TOP) * 100).toFixed(1)}`).join(" ");
|
|
5973
|
-
|
|
5974
|
-
function Chart({ height, children }: { height: number; children: ReactNode }) {
|
|
5975
|
-
return (
|
|
5976
|
-
<div
|
|
5977
|
-
style={{
|
|
5978
|
-
position: "relative",
|
|
5979
|
-
height: `${height}px`,
|
|
5980
|
-
borderRadius: "var(--u-radius-lg)",
|
|
5981
|
-
overflow: "hidden",
|
|
5982
|
-
background:
|
|
5983
|
-
"repeating-linear-gradient(0deg, var(--u-hairline-strong) 0 1px, transparent 1px 24px)," +
|
|
5984
|
-
"repeating-linear-gradient(90deg, var(--u-hairline-strong) 0 1px, transparent 1px 24px)," +
|
|
5985
|
-
"var(--u-color-surface-sunken)",
|
|
5986
|
-
boxShadow: "var(--u-edge)",
|
|
5987
|
-
}}
|
|
5988
|
-
>
|
|
5989
|
-
<svg
|
|
5990
|
-
viewBox="0 0 400 100"
|
|
5991
|
-
preserveAspectRatio="none"
|
|
5992
|
-
role="img"
|
|
5993
|
-
aria-label="Checkout, p95 latency today"
|
|
5994
|
-
style={{ position: "absolute", inset: 0, width: "100%", height: "100%" }}
|
|
5995
|
-
>
|
|
5996
|
-
<polyline
|
|
5997
|
-
points={POINTS}
|
|
5998
|
-
fill="none"
|
|
5999
|
-
stroke="var(--u-color-accent)"
|
|
6000
|
-
strokeWidth="1.5"
|
|
6001
|
-
vectorEffect="non-scaling-stroke"
|
|
6002
|
-
strokeLinejoin="round"
|
|
6003
|
-
strokeLinecap="round"
|
|
6004
|
-
/>
|
|
6005
|
-
</svg>
|
|
6006
|
-
{children}
|
|
6007
|
-
</div>
|
|
6008
|
-
);
|
|
6009
|
-
}
|
|
6010
|
-
|
|
6011
|
-
export default function RoomAndNoRoom() {
|
|
6012
|
-
const [place, setPlace] = useState<DockPlace>("bottom");
|
|
6013
|
-
const [mode, setMode] = useState("grid");
|
|
6014
|
-
const [last, setLast] = useState<string | null>(null);
|
|
6015
|
-
|
|
6016
|
-
return (
|
|
6017
|
-
<Stack gap={4}>
|
|
6018
|
-
<div data-dock="spacious">
|
|
6019
|
-
<Chart height={320}>
|
|
6020
|
-
<Dock
|
|
6021
|
-
tools={TOOLS}
|
|
6022
|
-
place={place}
|
|
6023
|
-
onPlaceChange={setPlace}
|
|
6024
|
-
mode={mode}
|
|
6025
|
-
onModeChange={(id) => {
|
|
6026
|
-
if (MODES.has(id)) setMode(id);
|
|
6027
|
-
}}
|
|
6028
|
-
onUse={setLast}
|
|
6029
|
-
/>
|
|
6030
|
-
</Chart>
|
|
6031
|
-
</div>
|
|
6032
|
-
<Text size="xs" tone="muted">
|
|
6033
|
-
Resting place: <code>{place}</code>, mode: <code>{mode}</code>, last used: <code>{last ?? "none"}</code>
|
|
6034
|
-
</Text>
|
|
6035
|
-
|
|
6036
|
-
<Text size="sm" weight="medium">
|
|
6037
|
-
A flat chart, where the side edges refuse
|
|
6038
|
-
</Text>
|
|
6039
|
-
<div data-dock="flat">
|
|
6040
|
-
<Chart height={140}>
|
|
6041
|
-
<Dock tools={TOOLS} defaultPlace="bottom" mode="grid" />
|
|
6042
|
-
</Chart>
|
|
6043
|
-
</div>
|
|
6044
|
-
</Stack>
|
|
5599
|
+
</Splitter>
|
|
5600
|
+
</Card>
|
|
6045
5601
|
);
|
|
6046
5602
|
}
|
|
6047
5603
|
```
|
|
6048
5604
|
|
|
6049
5605
|
#### When to use something else
|
|
6050
5606
|
|
|
6051
|
-
-
|
|
5607
|
+
- Views the user switches between rather than sees together → Tabs
|
|
6052
5608
|
|
|
6053
5609
|
#### Keyboard
|
|
6054
5610
|
|
|
6055
5611
|
| Key | Action |
|
|
6056
5612
|
|---|---|
|
|
6057
|
-
| `
|
|
6058
|
-
| `Arrow
|
|
6059
|
-
| `Home / End
|
|
6060
|
-
| `Enter
|
|
6061
|
-
| `Arrow Up / Right / Down / Left (on the handle)` | Moves the dock to the top, right, bottom or left edge. |
|
|
6062
|
-
| `Escape (while dragging)` | Puts the dock back where the drag started. |
|
|
6063
|
-
|
|
6064
|
-
#### Accessibility
|
|
6065
|
-
|
|
6066
|
-
The strip is a `group` named by `label`, "Tools" by default. The handle is a button named "Move dock", and each tool a button named by its `label`, which its tooltip shows too. Only the tool of the current `mode` carries `aria-pressed`; the others are not announced as switches that are off, since which tools are modes is yours to say.
|
|
6067
|
-
|
|
6068
|
-
A polite live region beside the strip says where the dock has gone - "Dock at the top" - or that an edge has no room for it - "No room for the dock on the left" - so a move by the arrow keys on the handle is heard, not only seen.
|
|
5613
|
+
| `Arrow Left / Arrow Right` | Side by side: moves the line by one step, 5 % unless set otherwise. |
|
|
5614
|
+
| `Arrow Up / Arrow Down` | One above the other: moves the line by one step. |
|
|
5615
|
+
| `Home / End` | Moves the line to the smallest or the largest share. |
|
|
5616
|
+
| `Enter` | Folds the first pane to its smallest share; again, brings it back. |
|
|
6069
5617
|
|
|
6070
5618
|
#### API
|
|
6071
5619
|
|
|
6072
|
-
##### `
|
|
5620
|
+
##### `SplitterProps`
|
|
6073
5621
|
|
|
6074
5622
|
| Prop | Type | Default | Description |
|
|
6075
5623
|
|---|---|---|---|
|
|
6076
|
-
| `
|
|
6077
|
-
| `
|
|
6078
|
-
| `
|
|
6079
|
-
| `
|
|
6080
|
-
| `
|
|
6081
|
-
| `
|
|
6082
|
-
| `
|
|
5624
|
+
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | How the two panes stand: `horizontal` side by side, `vertical` one above the other - a trend above, its alarms below.<br>Shown in: [One above the other](#/splitter/one-above-the-other), [Three panes](#/splitter/three-panes) |
|
|
5625
|
+
| `defaultValue` | `number` | `50` | Uncontrolled: the share to start at.<br>Shown in: [Two panes](#/splitter/two-panes), [One above the other](#/splitter/one-above-the-other), [Three panes](#/splitter/three-panes) |
|
|
5626
|
+
| `value` | `number` | — | Controlled: the first pane's share of the room, in per cent.<br>Shown in: [Keep the share](#/splitter/keep-the-share) |
|
|
5627
|
+
| `min` | `number` | `0` | The smallest share of the first pane, and where Enter collapses it to.<br>Shown in: [One above the other](#/splitter/one-above-the-other), [Keep the share](#/splitter/keep-the-share), [Three panes](#/splitter/three-panes) |
|
|
5628
|
+
| `max` | `number` | `100` | The largest share of the first pane.<br>Shown in: [One above the other](#/splitter/one-above-the-other), [Keep the share](#/splitter/keep-the-share), [Three panes](#/splitter/three-panes) |
|
|
5629
|
+
| `step` | `number` | `5` | How far an arrow key moves the separator, in per cent.<br>Shown in: [Keep the share](#/splitter/keep-the-share) |
|
|
5630
|
+
| `separatorLabel` | `string` | the wording's "Resize the panes" | The separator's name. The APG names it after the first pane ("Trend").<br>Shown in: [One above the other](#/splitter/one-above-the-other), [Keep the share](#/splitter/keep-the-share), [Three panes](#/splitter/three-panes) |
|
|
5631
|
+
| `children` *required* | `[ReactNode, ReactNode]` | — | The first pane and the second, in this order.<br>Shown in: [Two panes](#/splitter/two-panes), [One above the other](#/splitter/one-above-the-other), [Keep the share](#/splitter/keep-the-share) and 1 more |
|
|
5632
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
6083
5633
|
|
|
6084
5634
|
###### Events
|
|
6085
5635
|
|
|
6086
5636
|
| Prop | Type | Default | Description |
|
|
6087
5637
|
|---|---|---|---|
|
|
6088
|
-
| `
|
|
6089
|
-
|
|
6090
|
-
Also takes every attribute of `<div>` – without `onSelect`.
|
|
6091
|
-
|
|
6092
|
-
##### `DockTool`
|
|
6093
|
-
|
|
6094
|
-
| Prop | Type | Default | Description |
|
|
6095
|
-
|---|---|---|---|
|
|
6096
|
-
| `id` *required* | `string` | — | What is reported on taking.<br>Shown in: [A tool strip](#/dock/a-tool-strip), [Four resting places](#/dock/four-resting-places), [Modes and actions](#/dock/modes-and-actions) and 1 more |
|
|
6097
|
-
| `label` *required* | `string` | — | The name. It reaches the eye through the tooltip and the screen reader through the accessible name - it never stands written, because a standing dock has no room for text.<br>Shown in: [A tool strip](#/dock/a-tool-strip), [Four resting places](#/dock/four-resting-places), [Modes and actions](#/dock/modes-and-actions) and 1 more |
|
|
6098
|
-
| `icon` *required* | `ReactNode` | — | The glyph. Drawn according to `packages/core/docs/glyphs.md`: only `currentColor`.<br>Shown in: [A tool strip](#/dock/a-tool-strip), [Four resting places](#/dock/four-resting-places), [Modes and actions](#/dock/modes-and-actions) and 1 more |
|
|
6099
|
-
| `disabled` | `boolean` | — | Shows the tool but does not let it be taken. It stays standing in the strip: a dock whose tools come and go grows and shrinks under the hand reaching for them.<br>Shown in: [Modes and actions](#/dock/modes-and-actions), [Move the dock, and where it does not fit](#/dock/room-and-no-room) |
|
|
6100
|
-
|
|
6101
|
-
##### Types on this page
|
|
6102
|
-
|
|
6103
|
-
###### `DockPlace`
|
|
6104
|
-
|
|
6105
|
-
The outside of the resting place: one of the four edges of the host.
|
|
6106
|
-
There is no fifth and no corner.
|
|
5638
|
+
| `onChange` | `(value: number) => void` | — | Reports every move, by pointer or key, as the first pane's share.<br>Shown in: [Keep the share](#/splitter/keep-the-share) |
|
|
6107
5639
|
|
|
6108
|
-
|
|
6109
|
-
type DockPlace = "top" | "right" | "bottom" | "left";
|
|
6110
|
-
```
|
|
5640
|
+
Also takes every attribute of `<div>` – without `children`, `defaultValue`, `onChange`.
|
|
6111
5641
|
|
|
6112
5642
|
#### Known limits
|
|
6113
5643
|
|
|
6114
|
-
-
|
|
6115
|
-
-
|
|
6116
|
-
- It does not remember its place beyond its own life; keep it in the user's settings through `place`.
|
|
5644
|
+
- Two panes per splitter, no more. Tiles are not arranged by the user ([ADR-0060](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0060-validation-and-a-layout-editor-are-never-time-zones-not-yet.md)).
|
|
5645
|
+
- It does not remember the share beyond its own life; keep it in the user's settings through `value` and `onChange`.
|
|
6117
5646
|
|
|
6118
5647
|
What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
|
|
6119
5648
|
|
|
@@ -6474,13 +6003,14 @@ export default function IncidentSummary() {
|
|
|
6474
6003
|
|
|
6475
6004
|
| Prop | Type | Default | Description |
|
|
6476
6005
|
|---|---|---|---|
|
|
6477
|
-
| `as` | `ElementType` | `"p"` | Element to render as.<br>Shown in: [Tones and weights](#/typography/tones-and-weights), [Set an incident summary](#/typography/incident-summary), [Use the language in your own components (Language)](#/language/own-components) and
|
|
6478
|
-
| `size` | [`TextSize`](#type-TextSize)<br>`"xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` | Type size from the token set. It is independent of the element: a `p` may be small without becoming a different element.<br>Shown in: [Configurator](#/typography/configurator-typography), [Sizes](#/typography/sizes), [Tones and weights](#/typography/tones-and-weights) and
|
|
6479
|
-
| `weight` | [`TextWeight`](#type-TextWeight)<br>`"regular" \| "medium" \| "semibold"` | `"regular"` | Font weight from the token set.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tones and weights](#/typography/tones-and-weights), [Tracking and leading](#/typography/tracking-and-leading) and
|
|
6480
|
-
| `tone` | [`TextTone`](#type-TextTone)<br>`"default" \| "secondary" \| "muted"` | `"default"` | How loud the text is. `secondary` and `muted` step back without falling below the contrast threshold.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tones and weights](#/typography/tones-and-weights), [Tracking and leading](#/typography/tracking-and-leading) and
|
|
6481
|
-
| `mono` | `boolean` | `false` | Geist Mono with tabular figures – for numbers and identifiers.<br>Shown in: [Configurator](#/typography/configurator-typography), [Numbers and identifiers](#/typography/numbers), [Handle long values](#/typography/long-values) and
|
|
6006
|
+
| `as` | `ElementType` | `"p"` | Element to render as.<br>Shown in: [Tones and weights](#/typography/tones-and-weights), [Set an incident summary](#/typography/incident-summary), [Use the language in your own components (Language)](#/language/own-components) and 17 more |
|
|
6007
|
+
| `size` | [`TextSize`](#type-TextSize)<br>`"xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` | Type size from the token set. It is independent of the element: a `p` may be small without becoming a different element.<br>Shown in: [Configurator](#/typography/configurator-typography), [Sizes](#/typography/sizes), [Tones and weights](#/typography/tones-and-weights) and 128 more |
|
|
6008
|
+
| `weight` | [`TextWeight`](#type-TextWeight)<br>`"regular" \| "medium" \| "semibold"` | `"regular"` | Font weight from the token set.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tones and weights](#/typography/tones-and-weights), [Tracking and leading](#/typography/tracking-and-leading) and 15 more |
|
|
6009
|
+
| `tone` | [`TextTone`](#type-TextTone)<br>`"default" \| "secondary" \| "muted"` | `"default"` | How loud the text is. `secondary` and `muted` step back without falling below the contrast threshold.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tones and weights](#/typography/tones-and-weights), [Tracking and leading](#/typography/tracking-and-leading) and 93 more |
|
|
6010
|
+
| `mono` | `boolean` | `false` | Geist Mono with tabular figures – for numbers and identifiers.<br>Shown in: [Configurator](#/typography/configurator-typography), [Numbers and identifiers](#/typography/numbers), [Handle long values](#/typography/long-values) and 31 more |
|
|
6482
6011
|
| `tracking` | [`TextTracking`](#type-TextTracking)<br>`"normal" \| "tight" \| "display" \| "caps"` | `"normal"` | Letter spacing from the token set. `caps` belongs with letterspaced capitals.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tracking and leading](#/typography/tracking-and-leading), [Set an incident summary](#/typography/incident-summary) |
|
|
6483
6012
|
| `leading` | [`TextLeading`](#type-TextLeading)<br>`"normal" \| "tight"` | `"normal"` | Line spacing. `tight` for multi-line headings and key figures, where the normal spacing lets the lines fall apart.<br>Shown in: [Configurator](#/typography/configurator-typography), [Tracking and leading](#/typography/tracking-and-leading) |
|
|
6013
|
+
| `ref` | `Ref<HTMLElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
6484
6014
|
|
|
6485
6015
|
Also takes every attribute of the rendered element.
|
|
6486
6016
|
|
|
@@ -6492,6 +6022,7 @@ Also takes every attribute of the rendered element.
|
|
|
6492
6022
|
| `size` | [`TextSize`](#type-TextSize)<br>`"xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | the size matching the level | Optical size; independent of the level.<br>Shown in: [Tones and weights](#/typography/tones-and-weights), [Choose the level apart from the size](#/typography/level-and-size), [Set an incident summary](#/typography/incident-summary) and 4 more |
|
|
6493
6023
|
| `weight` | [`TextWeight`](#type-TextWeight)<br>`"regular" \| "medium" \| "semibold"` | `"semibold"` | Font weight from the token set.<br>Shown in: [Tones and weights](#/typography/tones-and-weights) |
|
|
6494
6024
|
| `tone` | [`TextTone`](#type-TextTone)<br>`"default" \| "secondary" \| "muted"` | `"default"` | How loud the heading is.<br>Shown in: [Choose the level apart from the size](#/typography/level-and-size) |
|
|
6025
|
+
| `ref` | `Ref<HTMLHeadingElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
6495
6026
|
|
|
6496
6027
|
Also takes every attribute of the heading.
|
|
6497
6028
|
|
|
@@ -6501,6 +6032,7 @@ Also takes every attribute of the heading.
|
|
|
6501
6032
|
|---|---|---|---|
|
|
6502
6033
|
| `size` | [`TextSize`](#type-TextSize)<br>`"xs" \| "sm" \| "md" \| "lg" \| "xl" \| "2xl"` | `"md"` | Size from the token set – a link has to match its body text.<br>Shown in: [Watch a kiln line over a shift (Scenarios)](#/scenarios/watch-a-kiln-line) |
|
|
6503
6034
|
| `external` | `boolean` | `false` | Opens in a new tab and sets the necessary protective attributes.<br>Shown in: [Link out of the application](#/typography/external-link), [Set an incident summary](#/typography/incident-summary) |
|
|
6035
|
+
| `ref` | `Ref<HTMLAnchorElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
6504
6036
|
|
|
6505
6037
|
Also takes every attribute of `<a>`.
|
|
6506
6038
|
|
|
@@ -6671,8 +6203,9 @@ export default function ActionsInRows() {
|
|
|
6671
6203
|
|---|---|---|---|
|
|
6672
6204
|
| `as` | `E` | `"span"` | Element to render as.<br>Shown in: [Add a skip link](#/visuallyhidden/skip-link) |
|
|
6673
6205
|
| `focusable` | `boolean` | `false` | Becomes visible as soon as the content receives the focus (skip link).<br>Shown in: [Add a skip link](#/visuallyhidden/skip-link) |
|
|
6206
|
+
| `ref` | `Ref<HTMLElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
6674
6207
|
|
|
6675
|
-
Also takes every attribute of the chosen element – without `as`.
|
|
6208
|
+
Also takes every attribute of the chosen element – without `as`, `ref`.
|
|
6676
6209
|
|
|
6677
6210
|
#### Known limits
|
|
6678
6211
|
|
|
@@ -6967,8 +6500,9 @@ Under forced colours every variant keeps an outline where its edge would lie, an
|
|
|
6967
6500
|
| Prop | Type | Default | Description |
|
|
6968
6501
|
|---|---|---|---|
|
|
6969
6502
|
| `variant` | [`ButtonVariant`](#type-ButtonVariant)<br>`"primary" \| "secondary" \| "ghost" \| "plain" \| "danger"` | `"secondary"` | How loud the button is. `primary` exactly once per surface - two main actions side by side are no longer a main action. `ghost` is quiet in the accent, `plain` quiet and neutral.<br>Shown in: [Configurator](#/button/configurator-button), [Variants](#/button/variants), [Sizes](#/button/sizes) and 51 more |
|
|
6970
|
-
| `size` | [`ButtonSize`](#type-ButtonSize)<br>`"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for buttons in header bars and table rows, `md` otherwise.<br>Shown in: [Configurator](#/button/configurator-button), [Sizes](#/button/sizes), [Add an icon](#/button/with-an-icon) and
|
|
6503
|
+
| `size` | [`ButtonSize`](#type-ButtonSize)<br>`"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for buttons in header bars and table rows, `md` otherwise.<br>Shown in: [Configurator](#/button/configurator-button), [Sizes](#/button/sizes), [Add an icon](#/button/with-an-icon) and 56 more |
|
|
6971
6504
|
| `loading` | `boolean` | `false` | Shows a loading indicator and locks the button.<br>Shown in: [Configurator](#/button/configurator-button), [Loading and disabled](#/button/loading-and-disabled), [Submit a form](#/button/submit-a-form) and 4 more |
|
|
6505
|
+
| `ref` | `Ref<HTMLButtonElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
6972
6506
|
|
|
6973
6507
|
Also takes every attribute of `<button>`.
|
|
6974
6508
|
|
|
@@ -7302,7 +6836,6 @@ export default function Toolbar() {
|
|
|
7302
6836
|
|
|
7303
6837
|
- The action is clearer said than drawn → Button
|
|
7304
6838
|
- Icon buttons that act on the same thing → ButtonGroup
|
|
7305
|
-
- A floating strip of tools over a canvas → Dock
|
|
7306
6839
|
|
|
7307
6840
|
#### Keyboard
|
|
7308
6841
|
|
|
@@ -7320,8 +6853,9 @@ export default function Toolbar() {
|
|
|
7320
6853
|
|---|---|---|---|
|
|
7321
6854
|
| `children` *required* | `ReactNode` | — | The icon: an SVG, a glyph of the set or an icon font's element. The button sets its size - `--u-icon-size`, `--u-icon-size-sm` at `sm`.<br>Shown in: [Configurator](#/iconbutton/configurator-iconbutton), [Name the icon](#/iconbutton/name-the-icon), [Variants](#/iconbutton/variants) and 5 more |
|
|
7322
6855
|
| `variant` | [`ButtonVariant`](#type-ButtonVariant)<br>`"primary" \| "secondary" \| "ghost" \| "plain" \| "danger"` | `"plain"` | How loud the button is; `plain` is quiet and neutral, and the rest mean what they mean on a `Button`.<br>Shown in: [Configurator](#/iconbutton/configurator-iconbutton), [Variants](#/iconbutton/variants), [Sizes](#/iconbutton/sizes) and 3 more |
|
|
7323
|
-
| `size` | [`ButtonSize`](#type-ButtonSize)<br>`"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for buttons in header bars and table rows, `md` otherwise. From `ButtonProps`.<br>Shown in: [Configurator](#/iconbutton/configurator-iconbutton), [Sizes](#/iconbutton/sizes), [Build a toolbar](#/iconbutton/a-toolbar) and
|
|
6856
|
+
| `size` | [`ButtonSize`](#type-ButtonSize)<br>`"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for buttons in header bars and table rows, `md` otherwise. From `ButtonProps`.<br>Shown in: [Configurator](#/iconbutton/configurator-iconbutton), [Sizes](#/iconbutton/sizes), [Build a toolbar](#/iconbutton/a-toolbar) and 56 more |
|
|
7324
6857
|
| `loading` | `boolean` | `false` | Shows a loading indicator and locks the button. From `ButtonProps`.<br>Shown in: [Configurator](#/iconbutton/configurator-iconbutton), [Loading and disabled](#/iconbutton/loading-and-disabled), [Configurator (Button)](#/button/configurator-button) and 4 more |
|
|
6858
|
+
| `ref` | `Ref<HTMLButtonElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
7325
6859
|
|
|
7326
6860
|
###### Accessibility
|
|
7327
6861
|
|
|
@@ -7663,6 +7197,7 @@ export default function InvoiceToolbar() {
|
|
|
7663
7197
|
| Prop | Type | Default | Description |
|
|
7664
7198
|
|---|---|---|---|
|
|
7665
7199
|
| `size` | [`ButtonSize`](#type-ButtonSize)<br>`"sm" \| "md"` | the size around it, else `"md"` | The size of the buttons in it that do not say their own - one group, one height.<br>Shown in: [Variants and sizes](#/buttongroup/variants-and-sizes) |
|
|
7200
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
7666
7201
|
|
|
7667
7202
|
###### Accessibility
|
|
7668
7203
|
|
|
@@ -7683,6 +7218,7 @@ Also takes every attribute of `<div>`.
|
|
|
7683
7218
|
| `menuLabel` | `string` | the wording's "More actions" | Label of the trigger. |
|
|
7684
7219
|
| `align` | `"start" \| "end"` | `"end"` | Alignment of the menu relative to the trigger.<br>Shown in: [Offer variants of the main action](#/buttongroup/split-button) |
|
|
7685
7220
|
| `loading` | `boolean` | `false` | Shows a loading indicator and locks the button. From `ButtonProps`.<br>Shown in: [Configurator (Button)](#/button/configurator-button), [Loading and disabled (Button)](#/button/loading-and-disabled), [Submit a form (Button)](#/button/submit-a-form) and 4 more |
|
|
7221
|
+
| `ref` | `Ref<HTMLButtonElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
7686
7222
|
|
|
7687
7223
|
###### Events
|
|
7688
7224
|
|
|
@@ -7998,6 +7534,7 @@ export default function TakeADeliveryAddress() {
|
|
|
7998
7534
|
| `invalid` | `boolean` | — | Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`.<br>Shown in: [Configurator](#/input/configurator-input), [With an error](#/input/with-an-error), [With an error (TreeView)](#/treeview/with-an-error) |
|
|
7999
7535
|
| `numeric` | `boolean` | `false` | Right-aligned tabular figures in Geist Mono, e.g. for key figures.<br>Shown in: [Configurator](#/input/configurator-input), [Align reference numbers](#/input/align-reference-numbers), [Take a delivery address](#/input/take-a-delivery-address) and 2 more |
|
|
8000
7536
|
| `clearable` | `boolean` | `false` | Shows a gently appearing cross where there is content, which clears the input. Requires a controlled field (value) and onClear.<br>Shown in: [Clear the field](#/input/clear-the-field), [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still) |
|
|
7537
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
8001
7538
|
|
|
8002
7539
|
###### Events
|
|
8003
7540
|
|
|
@@ -8196,6 +7733,7 @@ The keys of [Input](#/input/keyboard-input), [NumberInput](#/numberinput/keyboar
|
|
|
8196
7733
|
| `error` | `ReactNode` | — | Error message; it marks the field as invalid at the same time.<br>Shown in: [Configurator](#/formfield/configurator-formfield), [Show an error](#/formfield/show-an-error), [Check an invoice on submit](#/formfield/check-an-invoice-on-submit) and 22 more |
|
|
8197
7734
|
| `required` | `boolean` | `false` | Sets the required mark on the label and `aria-required` on the field - on Input, Select, Textarea, NumberInput, Combobox, RadioGroup and Checkbox. The triggers of the pickers and of the MultiSelect are buttons, on which `aria-required` is not a permitted attribute; there the mark carries it alone. It validates nothing - validation belongs to the caller ([ADR-0060](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0060-validation-and-a-layout-editor-are-never-time-zones-not-yet.md)).<br>Shown in: [Configurator](#/formfield/configurator-formfield), [Mark a field as required](#/formfield/mark-a-field-as-required), [Check an invoice on submit](#/formfield/check-an-invoice-on-submit) and 9 more |
|
|
8198
7735
|
| `fieldId` | `string` | — | Optional: a fixed id for the input element (instead of a generated one).<br>Shown in: [Sum up a form's errors (Alert)](#/alert/above-a-form) |
|
|
7736
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
8199
7737
|
|
|
8200
7738
|
Also takes every attribute of `<div>`.
|
|
8201
7739
|
|
|
@@ -8386,6 +7924,7 @@ With `showCount` the characters left stand in a polite live region: a screen rea
|
|
|
8386
7924
|
| `maxRows` | `number` | — | Upper bound for `autoGrow` in rows; beyond it the field scrolls.<br>Shown in: [Grow with the text](#/textarea/grow-with-the-text), [Resolve an incident (Scenarios)](#/scenarios/resolve-an-incident), [Approve spending against a budget (Scenarios)](#/scenarios/approve-spending) |
|
|
8387
7925
|
| `showCount` | `boolean` | `false` | Shows at the bottom right how many characters still fit. Needs `maxLength`.<br>Shown in: [Count the characters](#/textarea/count-the-characters) |
|
|
8388
7926
|
| `resize` | `"none" \| "vertical"` | `"none"` while the field grows by itself, else `"vertical"` | Whether the browser's handle for dragging is offered.<br>Shown in: [Configurator](#/textarea/configurator-textarea) |
|
|
7927
|
+
| `ref` | `Ref<HTMLTextAreaElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
8389
7928
|
|
|
8390
7929
|
Also takes every attribute of `<textarea>` – without `cols`.
|
|
8391
7930
|
|
|
@@ -8622,6 +8161,7 @@ export default function PriceAnInvoiceLine() {
|
|
|
8622
8161
|
| `size` | `"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for a toolbar and dense forms, `md` otherwise.<br>Shown in: [Configurator](#/numberinput/configurator-numberinput), [States](#/numberinput/states), [Set up a team (Scenarios)](#/scenarios/set-up-a-team) |
|
|
8623
8162
|
| `chars` | `number` | — | The width in characters - room for the number; the field adds its own padding and steppers, and the room for a `prefix` and `suffix` given as text. Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and is 10 characters wide where the place asks - in a toolbar or a row.<br>Shown in: [Configurator](#/numberinput/configurator-numberinput), [Sized to the value (Sizes)](#/sizes/sized-to-the-value) |
|
|
8624
8163
|
| `invalid` | `boolean` | — | Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` – by hand only needed without `FormField`.<br>Shown in: [Configurator](#/numberinput/configurator-numberinput), [With an error](#/numberinput/with-an-error) |
|
|
8164
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
8625
8165
|
|
|
8626
8166
|
###### Events
|
|
8627
8167
|
|
|
@@ -8806,6 +8346,7 @@ export default function SplitABudget() {
|
|
|
8806
8346
|
| `marks` | `readonly `[`SliderMark`](#type-SliderMark)`[]` | — | Values marked on the track; an object with a `label` writes the word beneath its mark. A mark shows a value, it does not catch the thumb.<br>Shown in: [Units and marks](#/slider/units-and-marks), [Set roughly, then exactly](#/slider/set-roughly-then-exactly), [Split a budget](#/slider/split-a-budget) and 1 more |
|
|
8807
8347
|
| `format` | `(value: number) => string` | the number in the formats' notation, with as many decimals as the step has | The value as text: for the readout and for the screen reader (`aria-valuetext`).<br>Shown in: [Units and marks](#/slider/units-and-marks), [Set roughly, then exactly](#/slider/set-roughly-then-exactly), [Split a budget](#/slider/split-a-budget) and 3 more |
|
|
8808
8348
|
| `showValue` | `boolean` | `true` | The value in mono beside the track.<br>Shown in: [Configurator](#/slider/configurator-slider), [Units and marks](#/slider/units-and-marks), [Set roughly, then exactly](#/slider/set-roughly-then-exactly) and 1 more |
|
|
8349
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
8809
8350
|
|
|
8810
8351
|
###### Events
|
|
8811
8352
|
|
|
@@ -8948,6 +8489,7 @@ export default function SelectAllWithAMixedState() {
|
|
|
8948
8489
|
|---|---|---|---|
|
|
8949
8490
|
| `label` | `ReactNode` | — | Label to the right of the checkbox.<br>Shown in: [Configurator](#/checkbox/configurator-checkbox), [Checkbox](#/checkbox/checkbox), [States](#/checkbox/states) and 10 more |
|
|
8950
8491
|
| `indeterminate` | `boolean` | `false` | Partially checked (e.g. "select all" with a mixed selection).<br>Shown in: [Configurator](#/checkbox/configurator-checkbox), [States](#/checkbox/states), [Select all with a mixed state](#/checkbox/select-all-with-a-mixed-state) |
|
|
8492
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
8951
8493
|
|
|
8952
8494
|
Also takes every attribute of `<input>` – without `size`, `type`.
|
|
8953
8495
|
|
|
@@ -9153,6 +8695,7 @@ export default function SettingsOfAService() {
|
|
|
9153
8695
|
| `label` | `ReactNode` | — | Label to the right of the switch.<br>Shown in: [Configurator](#/switch/configurator-switch), [On and off](#/switch/on-and-off), [States and sizes](#/switch/states-and-sizes) and 12 more |
|
|
9154
8696
|
| `size` | `"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for a toolbar and dense forms, `md` otherwise.<br>Shown in: [Configurator](#/switch/configurator-switch), [States and sizes](#/switch/states-and-sizes) |
|
|
9155
8697
|
| `invalid` | `boolean` | — | Marks the switch as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`.<br>Shown in: [Configurator](#/switch/configurator-switch), [With an error](#/switch/with-an-error) |
|
|
8698
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
9156
8699
|
|
|
9157
8700
|
Also takes every attribute of `<input>` – without `role`, `size`, `type`.
|
|
9158
8701
|
|
|
@@ -9317,6 +8860,7 @@ export default function States() {
|
|
|
9317
8860
|
| `size` | `"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for a toolbar and dense forms, `md` otherwise.<br>Shown in: [Configurator](#/radiogroup/configurator-radiogroup), [States](#/radiogroup/states) |
|
|
9318
8861
|
| `disabled` | `boolean` | `false` | Disables the whole group. `RadioOption` disables single possibilities.<br>Shown in: [Configurator](#/radiogroup/configurator-radiogroup), [States](#/radiogroup/states) |
|
|
9319
8862
|
| `name` | `string` | a generated one | Name of the radio group within the form. |
|
|
8863
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
9320
8864
|
|
|
9321
8865
|
###### Events
|
|
9322
8866
|
|
|
@@ -9603,6 +9147,7 @@ export default function DrawnAsAField() {
|
|
|
9603
9147
|
| `fill` | `boolean` | `false` | Takes the whole width its place gives it, as a field in a column does, and shares it equally between the segments. Without it the control is as wide as its words.<br>Shown in: [Configurator](#/segmentedcontrol/configurator-segmentedcontrol), [A theme switch](#/segmentedcontrol/a-theme-switch) |
|
|
9604
9148
|
| `disabled` | `boolean` | `false` | Disables the whole control. `SegmentedOption` disables single possibilities.<br>Shown in: [Configurator](#/segmentedcontrol/configurator-segmentedcontrol), [States and sizes](#/segmentedcontrol/states-and-sizes) |
|
|
9605
9149
|
| `name` | `string` | a generated one | Name of the radio group within the form. |
|
|
9150
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
9606
9151
|
|
|
9607
9152
|
###### Events
|
|
9608
9153
|
|
|
@@ -9863,6 +9408,7 @@ export default function ImportBudgets() {
|
|
|
9863
9408
|
|---|---|---|---|
|
|
9864
9409
|
| `value` | `readonly File[]` | — | Controlled: the chosen files. Uncontrolled, the input keeps its own and starts empty.<br>Shown in: [Several files](#/fileinput/several-files), [With an error](#/fileinput/with-an-error), [Require a file before sending](#/fileinput/require-a-file-before-sending) and 1 more |
|
|
9865
9410
|
| `invalid` | `boolean` | — | Marks the input as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`.<br>Shown in: [With an error](#/fileinput/with-an-error) |
|
|
9411
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
9866
9412
|
|
|
9867
9413
|
###### Events
|
|
9868
9414
|
|
|
@@ -10060,6 +9606,7 @@ export default function ClearTheChoice() {
|
|
|
10060
9606
|
| `chars` | `number` | — | The width in characters - room for the chosen option; the field adds its own padding, chevron and cross. Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and is 20 characters wide where the place asks - never as wide as its longest option.<br>Shown in: [Configurator](#/select/configurator-select), [A row of fields (Sizes)](#/sizes/a-row-of-fields) |
|
|
10061
9607
|
| `invalid` | `boolean` | — | Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` – by hand only necessary without `FormField`.<br>Shown in: [Configurator](#/select/configurator-select), [With an error](#/select/with-an-error) |
|
|
10062
9608
|
| `clearable` | `boolean` | `false` | Shows a × once a selection has been made, which fades in on hover/focus and empties the selection. Requires a controlled field (value) and onClear; sensible for optional selects with a placeholder option.<br>Shown in: [Clear the choice](#/select/clear-the-choice) |
|
|
9609
|
+
| `ref` | `Ref<HTMLSelectElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
10063
9610
|
|
|
10064
9611
|
###### Events
|
|
10065
9612
|
|
|
@@ -10318,6 +9865,7 @@ export default function AssignAnIncident() {
|
|
|
10318
9865
|
| `invalid` | `boolean` | — | Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`.<br>Shown in: [Configurator](#/combobox/configurator-combobox), [With an error](#/combobox/with-an-error) |
|
|
10319
9866
|
| `emptyText` | `string` | — | Text shown for an empty search result.<br>Shown in: [States](#/combobox/states) |
|
|
10320
9867
|
| `clearable` | `boolean` | `false` | Shows a cross on selection or input that clears field and selection.<br>Shown in: [Configurator](#/combobox/configurator-combobox), [Combobox](#/combobox/pick-a-driver), [Assign an incident](#/combobox/assign-an-incident) and 2 more |
|
|
9868
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
10321
9869
|
|
|
10322
9870
|
###### Events
|
|
10323
9871
|
|
|
@@ -10598,6 +10146,7 @@ export default function FilterIncidentsByService() {
|
|
|
10598
10146
|
| `disabled` | `boolean` | `false` | Locks field and panel.<br>Shown in: [Configurator](#/multiselect/configurator-multiselect), [States](#/multiselect/states), [Dispatch a tour (Scenarios)](#/scenarios/dispatch-a-tour) |
|
|
10599
10147
|
| `invalid` | `boolean` | — | Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` – by hand only necessary without `FormField`.<br>Shown in: [Configurator](#/multiselect/configurator-multiselect), [With an error](#/multiselect/with-an-error) |
|
|
10600
10148
|
| `clearable` | `boolean` | `false` | Shows a cross beside the chips that empties the selection, as "Select none" does: a chosen value whose option is disabled stays. The field keeps room for it, chosen values or none, so that it never moves.<br>Shown in: [Configurator](#/multiselect/configurator-multiselect), [Filter incidents by service](#/multiselect/filter-incidents-by-service), [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still) |
|
|
10149
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
10601
10150
|
|
|
10602
10151
|
###### Events
|
|
10603
10152
|
|
|
@@ -10783,12 +10332,13 @@ export default function CheckADueDate() {
|
|
|
10783
10332
|
| `size` | `"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for a toolbar and dense forms, `md` otherwise.<br>Shown in: [Configurator](#/datepicker/configurator-datepicker), [States](#/datepicker/states) |
|
|
10784
10333
|
| `chars` | `number` | — | The width in characters - room for the value; the field adds its own padding, glyph and cross. Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and where the place asks - in a toolbar or a row - it is as wide as its longest value in the formats in use, so a date never truncates.<br>Shown in: [Configurator](#/datepicker/configurator-datepicker) |
|
|
10785
10334
|
| `clearable` | `boolean` | `false` | Shows a cross where a value is set, which fades in on hover/focus and clears the value.<br>Shown in: [Configurator](#/datepicker/configurator-datepicker), [Pick a day](#/datepicker/pick-a-day), [States](#/datepicker/states) and 4 more |
|
|
10335
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
10786
10336
|
|
|
10787
10337
|
###### Events
|
|
10788
10338
|
|
|
10789
10339
|
| Prop | Type | Default | Description |
|
|
10790
10340
|
|---|---|---|---|
|
|
10791
|
-
| `onChange` *required* | `(date: Date \| null) => void` | — | Runs as soon as a day is settled - on a click in the grid, on "Today"
|
|
10341
|
+
| `onChange` *required* | `(date: Date \| null) => void` | — | Runs as soon as a day is settled - on a click in the grid, on "Today" and on clearing (`null`). Every one of these ways hands out local midnight; there is none that delivers a time along with it.<br>Shown in: [Configurator](#/datepicker/configurator-datepicker), [Pick a day](#/datepicker/pick-a-day), [States](#/datepicker/states) and 8 more |
|
|
10792
10342
|
|
|
10793
10343
|
Also takes every attribute of `<span>` – without `defaultValue`, `onChange`.
|
|
10794
10344
|
|
|
@@ -10954,6 +10504,7 @@ export default function WithAnError() {
|
|
|
10954
10504
|
| `chars` | `number` | — | The width in characters - room for the value; the field adds its own padding, glyph and cross. Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and where the place asks - in a toolbar or a row - it is as wide as its longest value in the formats in use, so a date never truncates.<br>Shown in: [Configurator](#/datetimepicker/configurator-datetimepicker) |
|
|
10955
10505
|
| `invalid` | `boolean` | — | Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`.<br>Shown in: [Configurator](#/datetimepicker/configurator-datetimepicker), [With an error](#/datetimepicker/with-an-error) |
|
|
10956
10506
|
| `clearable` | `boolean` | `false` | Shows a cross where a value is set, which fades in on hover/focus and clears the value.<br>Shown in: [Configurator](#/datetimepicker/configurator-datetimepicker), [Set an instant](#/datetimepicker/set-an-instant), [States](#/datetimepicker/states) |
|
|
10507
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
10957
10508
|
|
|
10958
10509
|
###### Events
|
|
10959
10510
|
|
|
@@ -11150,6 +10701,7 @@ export default function WithAnError() {
|
|
|
11150
10701
|
| `chars` | `number` | — | The width in characters - room for the value; the field adds its own padding, glyph and cross. Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and where the place asks - in a toolbar or a row - it is as wide as its longest value in the formats in use, so a date never truncates.<br>Shown in: [Configurator](#/daterangepicker/configurator-daterangepicker) |
|
|
11151
10702
|
| `clearable` | `boolean` | `false` | Shows a cross where a value is set, which fades in on hover/focus and clears the value.<br>Shown in: [Configurator](#/daterangepicker/configurator-daterangepicker), [A span of days](#/daterangepicker/a-span-of-days), [Presets](#/daterangepicker/presets) and 2 more |
|
|
11152
10703
|
| `presets` | [`RangePreset`](#type-RangePreset)`[]` | `DEFAULT_PRESETS`, in the wording's labels | The quick-select column in the panel. An empty array hides the column.<br>Shown in: [Presets](#/daterangepicker/presets) |
|
|
10704
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
11153
10705
|
|
|
11154
10706
|
###### Events
|
|
11155
10707
|
|
|
@@ -11364,6 +10916,7 @@ export default function WithAnError() {
|
|
|
11364
10916
|
| `chars` | `number` | — | The width in characters - room for the value; the field adds its own padding, glyph and cross. Given, the field is that wide wherever it stands, and never wider than its place. Without it the field fills its place, and where the place asks - in a toolbar or a row - it is as wide as its longest value in the formats in use, so a date never truncates.<br>Shown in: [Configurator](#/datetimerangepicker/configurator-datetimerangepicker) |
|
|
11365
10917
|
| `clearable` | `boolean` | `false` | Shows a cross where a value is set, which fades in on hover/focus and clears the value.<br>Shown in: [Configurator](#/datetimerangepicker/configurator-datetimerangepicker), [A downtime window](#/datetimerangepicker/a-downtime-window), [States](#/datetimerangepicker/states) |
|
|
11366
10918
|
| `presets` | [`RangePreset`](#type-RangePreset)`[]` | `DEFAULT_PRESETS`, in the wording's labels | The quick-select column in the panel; presets apply for the whole day and close immediately. An empty array hides the column.<br>Shown in: [With seconds](#/datetimerangepicker/with-seconds) |
|
|
10919
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
11367
10920
|
|
|
11368
10921
|
###### Events
|
|
11369
10922
|
|
|
@@ -11545,6 +11098,7 @@ With reduced motion it turns at less than half its speed instead of stopping, so
|
|
|
11545
11098
|
| Prop | Type | Default | Description |
|
|
11546
11099
|
|---|---|---|---|
|
|
11547
11100
|
| `size` | `number` | `14` | Edge length in pixels.<br>Shown in: [Sizes](#/spinner/sizes), [Colour](#/spinner/colour) |
|
|
11101
|
+
| `ref` | `Ref<SVGSVGElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
11548
11102
|
|
|
11549
11103
|
Also takes every attribute of `<svg>`.
|
|
11550
11104
|
|
|
@@ -11729,6 +11283,7 @@ Under forced colours the track takes an edge and the fill the system's selection
|
|
|
11729
11283
|
| `label` | `string` | the wording's "Progress" | What is progressing, e.g. "Import of the invoice records". A progress bar needs a name from the author.<br>Shown in: [How far a job has come](#/progressbar/how-far), [Count instead of a share](#/progressbar/a-count), [Run without a known end](#/progressbar/without-an-end) and 3 more |
|
|
11730
11284
|
| `valueText` | `string` | — | What a screen reader says instead of the percentage, where a count says it better - "3 of 12 files".<br>Shown in: [Count instead of a share](#/progressbar/a-count), [Follow a job through its steps](#/progressbar/a-close-in-steps), [A deployment (Stepper)](#/stepper/a-deployment) |
|
|
11731
11285
|
| `showLabel` | `boolean` | `false` | The percentage beside the bar (Geist Mono). Never for an indeterminate bar - it has no figure to show.<br>Shown in: [Configurator](#/progressbar/configurator-progressbar), [How far a job has come](#/progressbar/how-far), [Follow a job through its steps](#/progressbar/a-close-in-steps) and 1 more |
|
|
11286
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
11732
11287
|
|
|
11733
11288
|
Also takes every attribute of `<div>`.
|
|
11734
11289
|
|
|
@@ -11887,6 +11442,7 @@ With reduced motion the shimmer stops, and the shape stands in a still, faint gr
|
|
|
11887
11442
|
| `width` | `string \| number` | `"100%"` | Width, e.g. "120px" or "60%".<br>Shown in: [Configurator](#/skeleton/configurator-skeleton), [Lines of text to come](#/skeleton/lines), [Shapes](#/skeleton/shapes) and 2 more |
|
|
11888
11443
|
| `height` | `string \| number` | `"12px"` | Height, e.g. "12px" or 16.<br>Shown in: [Configurator](#/skeleton/configurator-skeleton), [Shapes](#/skeleton/shapes), [Hold a list's place while it loads](#/skeleton/a-list-loading) |
|
|
11889
11444
|
| `circle` | `boolean` | `false` | Circular shape, e.g. for an avatar placeholder.<br>Shown in: [Configurator](#/skeleton/configurator-skeleton), [Shapes](#/skeleton/shapes), [Hold a list's place while it loads](#/skeleton/a-list-loading) |
|
|
11445
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
11890
11446
|
|
|
11891
11447
|
Also takes every attribute of `<span>`.
|
|
11892
11448
|
|
|
@@ -12088,6 +11644,7 @@ The title is a paragraph, not a heading, so an alert does not enter the page's o
|
|
|
12088
11644
|
| `title` | `ReactNode` | — | Heading; without it the body text carries the message on its own.<br>Shown in: [A message](#/alert/a-message), [Tones](#/alert/tones), [Offer the way forward](#/alert/with-actions) and 5 more |
|
|
12089
11645
|
| `actions` | `ReactNode` | — | Actions below the text, e.g. "Try again".<br>Shown in: [Offer the way forward](#/alert/with-actions), [Sum up a form's errors](#/alert/above-a-form), [A deployment (Stepper)](#/stepper/a-deployment) |
|
|
12090
11646
|
| `dismissLabel` | `string` | the wording's "Close message" | Label of the dismiss cross. |
|
|
11647
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
12091
11648
|
|
|
12092
11649
|
###### Events
|
|
12093
11650
|
|
|
@@ -12729,6 +12286,7 @@ The keys of [Button](#/button/keyboard-button) and [Tag](#/tag/keyboard-tag) app
|
|
|
12729
12286
|
| `description` | `ReactNode` | — | One sentence on why nothing is here and what would put something here.<br>Shown in: [Nothing yet](#/emptystate/nothing-yet), [Say why a filter found nothing](#/emptystate/a-filter-found-nothing), [Mark good news in a panel](#/emptystate/in-a-panel) and 3 more |
|
|
12730
12287
|
| `action` | `ReactNode` | — | The way into the next action, e.g. a button.<br>Shown in: [Nothing yet](#/emptystate/nothing-yet), [Say why a filter found nothing](#/emptystate/a-filter-found-nothing), [Cards on a dashboard (Card)](#/card/cards-on-a-dashboard) and 1 more |
|
|
12731
12288
|
| `icon` | `ReactNode` | — | Optional symbol above the title.<br>Shown in: [Mark good news in a panel](#/emptystate/in-a-panel) |
|
|
12289
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
12732
12290
|
|
|
12733
12291
|
Also takes every attribute of `<div>` – without `title`.
|
|
12734
12292
|
|
|
@@ -13349,6 +12907,7 @@ export default function PerRow() {
|
|
|
13349
12907
|
| Prop | Type | Default | Description |
|
|
13350
12908
|
|---|---|---|---|
|
|
13351
12909
|
| `tone` | `"default" \| "danger"` | `"default"` | "danger" for destructive actions.<br>Shown in: [Run actions from a trigger](#/menu/actions), [Disable an entry, mark a destructive one](#/menu/disabled-and-danger), [Act on a row](#/menu/per-row) and 5 more |
|
|
12910
|
+
| `ref` | `Ref<HTMLButtonElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
13352
12911
|
|
|
13353
12912
|
###### Events
|
|
13354
12913
|
|
|
@@ -13868,6 +13427,7 @@ export default function MustBeAnswered() {
|
|
|
13868
13427
|
| `open` *required* | `boolean` | — | Whether the window stands. Controlled: the opening is the caller's decision, and only the caller knows whether something may be open.<br>Shown in: [A window that holds focus](#/modal/a-window), [Sizes](#/modal/sizes), [Scroll long content](#/modal/long-content) and 9 more |
|
|
13869
13428
|
| `size` | [`ModalSize`](#type-ModalSize)<br>`"sm" \| "md" \| "lg"` | `"md"` | The width of the window. The height comes from the content; only the body scrolls, header and footer stand fast.<br>Shown in: [Sizes](#/modal/sizes), [Scroll long content](#/modal/long-content), [Guard unsaved changes](#/modal/unsaved-changes) and 2 more |
|
|
13870
13429
|
| `closeOnBackdrop` | `boolean` | `true` | Closes on a click on the backdrop.<br>Shown in: [A window that must be answered](#/modal/must-be-answered) |
|
|
13430
|
+
| `ref` | `Ref<HTMLDialogElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
13871
13431
|
|
|
13872
13432
|
###### Events
|
|
13873
13433
|
|
|
@@ -13884,6 +13444,7 @@ Also takes every attribute of `<dialog>` – without `onClose`.
|
|
|
13884
13444
|
| `title` *required* | `ReactNode` | — | The heading of the window. It names it for the screen reader at the same time – a dialog without a name says only "dialog".<br>Shown in: [A window that holds focus](#/modal/a-window), [Sizes](#/modal/sizes), [Scroll long content](#/modal/long-content) and 9 more |
|
|
13885
13445
|
| `description` | `ReactNode` | — | One sentence below the heading: what is to be decided here.<br>Shown in: [A window that holds focus](#/modal/a-window), [Scroll long content](#/modal/long-content), [Guard unsaved changes](#/modal/unsaved-changes) and 7 more |
|
|
13886
13446
|
| `hideClose` | `boolean` | `false` | Hides the close button.<br>Shown in: [A window that must be answered](#/modal/must-be-answered) |
|
|
13447
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
13887
13448
|
|
|
13888
13449
|
Also takes every attribute of `<div>` – without `title`.
|
|
13889
13450
|
|
|
@@ -13899,7 +13460,7 @@ type ModalSize = "sm" | "md" | "lg";
|
|
|
13899
13460
|
|
|
13900
13461
|
#### Known limits
|
|
13901
13462
|
|
|
13902
|
-
- No non-modal window and no dragging or resizing: a panel that leaves the page usable is layout – a [Splitter](#/splitter)
|
|
13463
|
+
- No non-modal window and no dragging or resizing: a panel that leaves the page usable is layout – a [Splitter](#/splitter).
|
|
13903
13464
|
|
|
13904
13465
|
What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
|
|
13905
13466
|
|
|
@@ -14203,6 +13764,7 @@ export default function BesideAServiceList() {
|
|
|
14203
13764
|
| `side` | `"right" \| "left"` | `"right"` | The edge the drawer stands at and enters from.<br>Shown in: [From the left, and wider](#/drawer/left-and-wider) |
|
|
14204
13765
|
| `open` *required* | `boolean` | — | Whether the window stands. Controlled: the opening is the caller's decision, and only the caller knows whether something may be open. From `ModalProps`.<br>Shown in: [A detail from the edge](#/drawer/a-detail-from-the-edge), [From the left, and wider](#/drawer/left-and-wider), [Open a service's detail from its list](#/drawer/beside-a-service-list) and 9 more |
|
|
14205
13766
|
| `closeOnBackdrop` | `boolean` | `true` | Closes on a click on the backdrop. From `ModalProps`.<br>Shown in: [A window that must be answered (Modal)](#/modal/must-be-answered) |
|
|
13767
|
+
| `ref` | `Ref<HTMLDialogElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
14206
13768
|
|
|
14207
13769
|
###### Events
|
|
14208
13770
|
|
|
@@ -14381,6 +13943,7 @@ export default function WhileItRuns() {
|
|
|
14381
13943
|
| `cancelLabel` | `string` | the wording's "Cancel" | Label of the cancelling button.<br>Shown in: [Guard unsaved changes (Modal)](#/modal/unsaved-changes) |
|
|
14382
13944
|
| `tone` | `"primary" \| "danger"` | `"primary"` | "danger" for destructive actions.<br>Shown in: [The one question](#/confirmdialog/the-one-question), [Ask before a commitment](#/confirmdialog/a-commitment), [Stay open while it runs](#/confirmdialog/while-it-runs) and 2 more |
|
|
14383
13945
|
| `loading` | `boolean` | `false` | Locks the actions while the confirmation is running.<br>Shown in: [Stay open while it runs](#/confirmdialog/while-it-runs) |
|
|
13946
|
+
| `ref` | `Ref<HTMLDialogElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
14384
13947
|
|
|
14385
13948
|
###### Events
|
|
14386
13949
|
|
|
@@ -14669,6 +14232,7 @@ export default function SearchHundredsOfPages() {
|
|
|
14669
14232
|
| `items` *required* | `readonly `[`CommandPaletteItem`](#type-CommandPaletteItem)`[]` | — | The candidates that are searched. They belong to the caller: the palette keeps no memory and does not reorder them.<br>Shown in: [Run a command](#/commandpalette/commands), [Show recent choices first](#/commandpalette/recent-first), [Open it with a shortcut](#/commandpalette/shortcut) and 2 more |
|
|
14670
14233
|
| `restingItems` | `readonly `[`CommandPaletteItem`](#type-CommandPaletteItem)`[]` | — | What stands there as long as nothing is typed. Without a value: nothing, and the window is only the field. A LIST and not a switch, because the interesting question is not "all or none" but "which". Whoever really wants to show everything passes `restingItems={items}`; whoever wants to show the five most recently used passes those - and a switch cannot do that. With long lists "all" is also exactly the state this component did away with: a list that is already full can only shrink. The rows stand in THIS order and without marks: without a query there is no rank and nothing to mark. Rank and weight therefore play no part here; the order belongs to the caller.<br>Shown in: [Run a command](#/commandpalette/commands), [Show recent choices first](#/commandpalette/recent-first) |
|
|
14671
14234
|
| `maxFinds` | `number` | every find | The most finds that stand at once - the best by rank. A last line says how many more there are, and typing on narrows them. For a long list of candidates, where a single letter finds hundreds and drawing them all would make every keystroke wait.<br>Shown in: [Search hundreds of pages](#/commandpalette/search-hundreds-of-pages) |
|
|
14235
|
+
| `ref` | `Ref<HTMLDialogElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
14672
14236
|
|
|
14673
14237
|
###### Events
|
|
14674
14238
|
|
|
@@ -14997,6 +14561,7 @@ export default function BrowseDownAndBackUp() {
|
|
|
14997
14561
|
| Prop | Type | Default | Description |
|
|
14998
14562
|
|---|---|---|---|
|
|
14999
14563
|
| `items` *required* | `readonly `[`BreadcrumbEntry`](#type-BreadcrumbEntry)`[]` | — | The trail from the root to the current page; the last is the page.<br>Shown in: [A trail](#/breadcrumb/a-trail), [Route it yourself](#/breadcrumb/route-it-yourself), [Fold when narrow](#/breadcrumb/fold-when-narrow) and 3 more |
|
|
14564
|
+
| `ref` | `Ref<HTMLElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
15000
14565
|
|
|
15001
14566
|
Also takes every attribute of the rendered element.
|
|
15002
14567
|
|
|
@@ -15326,6 +14891,7 @@ export default function AnInvoiceInTabs() {
|
|
|
15326
14891
|
|---|---|---|---|
|
|
15327
14892
|
| `defaultValue` | `string` | — | Uncontrolled: the tab that stands first. Afterwards the choice belongs to the tabs - for a switch no address and no handler needs to know.<br>Shown in: [One view at a time](#/tabs/one-view-at-a-time), [Loading and empty panels](#/tabs/loading-and-empty-panels), [An invoice in tabs](#/tabs/an-invoice-in-tabs) and 1 more |
|
|
15328
14893
|
| `value` | `string` | — | The value of the visible tab. Controlled, `Tabs` remember nothing, so that the tab can come out of an address.<br>Shown in: [Keep the tab in the address](#/tabs/keep-the-tab-in-the-address) |
|
|
14894
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
15329
14895
|
|
|
15330
14896
|
###### Events
|
|
15331
14897
|
|
|
@@ -15340,6 +14906,7 @@ Also takes every attribute of `<div>` – without `defaultValue`, `onChange`.
|
|
|
15340
14906
|
| Prop | Type | Default | Description |
|
|
15341
14907
|
|---|---|---|---|
|
|
15342
14908
|
| `value` *required* | `string` | — | The value this tab reports – and under which its panel stands.<br>Shown in: [One view at a time](#/tabs/one-view-at-a-time), [Keep the tab in the address](#/tabs/keep-the-tab-in-the-address), [Loading and empty panels](#/tabs/loading-and-empty-panels) and 2 more |
|
|
14909
|
+
| `ref` | `Ref<HTMLButtonElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
15343
14910
|
|
|
15344
14911
|
Also takes every attribute of `<button>`.
|
|
15345
14912
|
|
|
@@ -15348,6 +14915,7 @@ Also takes every attribute of `<button>`.
|
|
|
15348
14915
|
| Prop | Type | Default | Description |
|
|
15349
14916
|
|---|---|---|---|
|
|
15350
14917
|
| `value` *required* | `string` | — | The value of the tab this panel belongs to. Only the matching panel stands in the document – a hidden panel would keep focus, scroll position and live regions that nobody sees.<br>Shown in: [One view at a time](#/tabs/one-view-at-a-time), [Keep the tab in the address](#/tabs/keep-the-tab-in-the-address), [Loading and empty panels](#/tabs/loading-and-empty-panels) and 2 more |
|
|
14918
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
15351
14919
|
|
|
15352
14920
|
Also takes every attribute of `<div>`.
|
|
15353
14921
|
|
|
@@ -15581,6 +15149,7 @@ export default function LongSettingsInSections() {
|
|
|
15581
15149
|
| `defaultValue` | `readonly string[]` | `[]` | Uncontrolled: the sections open at the start.<br>Shown in: [One section at a time](#/accordion/one-section-at-a-time), [Several open, one locked](#/accordion/several-open), [Long settings in sections](#/accordion/long-settings-in-sections) |
|
|
15582
15150
|
| `value` | `readonly string[]` | — | Controlled: the values of the open sections. A list for both types, so that switching the type changes nothing else.<br>Shown in: [Open and fold all](#/accordion/open-and-fold-all) |
|
|
15583
15151
|
| `headingLevel` | `2 \| 3 \| 4 \| 5 \| 6` | `3` | The level of the heading each header stands in - the one that fits the page's outline.<br>Shown in: [Several open, one locked](#/accordion/several-open), [Long settings in sections](#/accordion/long-settings-in-sections) |
|
|
15152
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
15584
15153
|
|
|
15585
15154
|
###### Events
|
|
15586
15155
|
|
|
@@ -15597,6 +15166,7 @@ Also takes every attribute of `<div>` – without `defaultValue`, `onChange`.
|
|
|
15597
15166
|
| `value` *required* | `string` | — | What names the section in the accordion's `value`.<br>Shown in: [One section at a time](#/accordion/one-section-at-a-time), [Several open, one locked](#/accordion/several-open), [Open and fold all](#/accordion/open-and-fold-all) and 1 more |
|
|
15598
15167
|
| `title` *required* | `ReactNode` | — | The header's text. It names the section's region too.<br>Shown in: [One section at a time](#/accordion/one-section-at-a-time), [Several open, one locked](#/accordion/several-open), [Open and fold all](#/accordion/open-and-fold-all) and 1 more |
|
|
15599
15168
|
| `disabled` | `boolean` | `false` | A section that cannot be opened now; its header stays in the list.<br>Shown in: [Several open, one locked](#/accordion/several-open) |
|
|
15169
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
15600
15170
|
|
|
15601
15171
|
Also takes every attribute of `<div>` – without `title`.
|
|
15602
15172
|
|
|
@@ -15799,6 +15369,7 @@ Under forced colours the lines between the steps take the system's text colour,
|
|
|
15799
15369
|
| `steps` *required* | `readonly `[`StepperStep`](#type-StepperStep)`[]` | — | The steps in the order they are walked.<br>Shown in: [Where a procedure stands](#/stepper/where-a-procedure-stands), [Steps in a column](#/stepper/steps-in-a-column), [A failed step](#/stepper/a-failed-step) and 6 more |
|
|
15800
15370
|
| `current` *required* | `number` | — | The index of the step being worked on. The steps before it are done, the ones after it upcoming; past the last step, every step is done.<br>Shown in: [Where a procedure stands](#/stepper/where-a-procedure-stands), [Steps in a column](#/stepper/steps-in-a-column), [A failed step](#/stepper/a-failed-step) and 6 more |
|
|
15801
15371
|
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | `horizontal` in a row, `vertical` in a column for steps with longer descriptions.<br>Shown in: [Steps in a column](#/stepper/steps-in-a-column), [A failed step](#/stepper/a-failed-step), [An invoice in tabs (Tabs)](#/tabs/an-invoice-in-tabs) |
|
|
15372
|
+
| `ref` | `Ref<HTMLOListElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
15802
15373
|
|
|
15803
15374
|
Also takes every attribute of the rendered element.
|
|
15804
15375
|
|
|
@@ -16374,15 +15945,16 @@ export default function SearchCheckAndReveal() {
|
|
|
16374
15945
|
|
|
16375
15946
|
| Prop | Type | Default | Description |
|
|
16376
15947
|
|---|---|---|---|
|
|
16377
|
-
| `tree` *required* | [`Tree`](#type-Tree)`<K, S>` | — | The tree from `useTree`. It is the whole state: flattening, active node, checks, anchor. The view holds nothing beside it.<br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and
|
|
15948
|
+
| `tree` *required* | [`Tree`](#type-Tree)`<K, S>` | — | The tree from `useTree`. It is the whole state: flattening, active node, checks, anchor. The view holds nothing beside it.<br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and 5 more |
|
|
16378
15949
|
| `checkable` | `boolean` | `false` | Show ticks. Without them a tree remains that knows only an active node - and no space is kept free for them.<br>Shown in: [Tick a selection](#/treeview/tick-a-selection), [With an error](#/treeview/with-an-error), [Search, check and reveal in a large tree](#/treeview/search-check-and-reveal) |
|
|
16379
|
-
| `children` *required* | `(entry: `[`FlatteningEntry`](#type-FlatteningEntry)`<K, S>) => ReactNode` | — | What the node says.<br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and
|
|
15950
|
+
| `children` *required* | `(entry: `[`FlatteningEntry`](#type-FlatteningEntry)`<K, S>) => ReactNode` | — | What the node says.<br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and 5 more |
|
|
15951
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
16380
15952
|
|
|
16381
15953
|
###### Accessibility
|
|
16382
15954
|
|
|
16383
15955
|
| Prop | Type | Default | Description |
|
|
16384
15956
|
|---|---|---|---|
|
|
16385
|
-
| `ariaLabel` *required* | `string` | — | Required: the tree is a structure of its own and needs a name.<br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and
|
|
15957
|
+
| `ariaLabel` *required* | `string` | — | Required: the tree is a structure of its own and needs a name.<br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and 5 more |
|
|
16386
15958
|
|
|
16387
15959
|
Also takes every attribute of `<div>` – without `children`.
|
|
16388
15960
|
|
|
@@ -16396,6 +15968,7 @@ Also takes every attribute of `<div>` – without `children`.
|
|
|
16396
15968
|
| `invalid` | `boolean` | — | Marks the field as invalid. `FormField` sets it itself as soon as it carries an `error` - by hand only necessary without `FormField`. From `InputProps`.<br>Shown in: [With an error](#/treeview/with-an-error), [Configurator (Input)](#/input/configurator-input), [With an error (Input)](#/input/with-an-error) |
|
|
16397
15969
|
| `numeric` | `boolean` | `false` | Right-aligned tabular figures in Geist Mono, e.g. for key figures. From `InputProps`.<br>Shown in: [Configurator (Input)](#/input/configurator-input), [Align reference numbers (Input)](#/input/align-reference-numbers), [Take a delivery address (Input)](#/input/take-a-delivery-address) and 2 more |
|
|
16398
15970
|
| `clearable` | `boolean` | `false` | Shows a gently appearing cross where there is content, which clears the input. Requires a controlled field (value) and onClear. From `InputProps`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [Clear the field (Input)](#/input/clear-the-field) |
|
|
15971
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
16399
15972
|
|
|
16400
15973
|
###### Events
|
|
16401
15974
|
|
|
@@ -16441,7 +16014,7 @@ among its siblings.
|
|
|
16441
16014
|
|
|
16442
16015
|
| Prop | Type | Default | Description |
|
|
16443
16016
|
|---|---|---|---|
|
|
16444
|
-
| `node` *required* | `K` | — | <br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and
|
|
16017
|
+
| `node` *required* | `K` | — | <br>Shown in: [A tree](#/treeview/a-tree), [Tick a selection](#/treeview/tick-a-selection), [Load branches on demand](#/treeview/load-branches-on-demand) and 5 more |
|
|
16445
16018
|
| `key` *required* | `S` | — | |
|
|
16446
16019
|
| `level` *required* | `number` | — | Roots stand at 0. Drives the indentation and what is read out. |
|
|
16447
16020
|
| `label` *required* | `string` | — | The node's text; here, so that typeahead can be a pure function over the flattening and needs no reader. |
|
|
@@ -16495,6 +16068,291 @@ to render and the heights of the filler rows around it.
|
|
|
16495
16068
|
|
|
16496
16069
|
What umriss deliberately does not build, and why: [ADR-0032](https://romanhaendler.github.io/umriss-ui/what-umriss-ui-is-not/).
|
|
16497
16070
|
|
|
16071
|
+
### Benchmark
|
|
16072
|
+
|
|
16073
|
+
A large virtualised tree, measured in this browser rather than claimed: the first render, a walk down it with the arrow keys and a scroll.
|
|
16074
|
+
|
|
16075
|
+
```ts
|
|
16076
|
+
import { useVirtual } from "@umriss-ui/core";
|
|
16077
|
+
```
|
|
16078
|
+
|
|
16079
|
+
Demo page: https://romanhaendler.github.io/umriss-ui/core/benchmark/
|
|
16080
|
+
|
|
16081
|
+
The figures in `packages/core/docs/capabilities-tree.md` come from here. The page adds nothing to the tree; it times it from outside.
|
|
16082
|
+
|
|
16083
|
+
#### Examples
|
|
16084
|
+
|
|
16085
|
+
##### Measure a large tree
|
|
16086
|
+
|
|
16087
|
+
Set a node count and press the buttons: the first render, a walk down the tree with the arrow keys and a scroll are timed in this browser.
|
|
16088
|
+
|
|
16089
|
+
```tsx
|
|
16090
|
+
/* What a large virtualised tree costs, measured from outside: the first render,
|
|
16091
|
+
a walk of the Active node with the arrow keys, and a scroll. Nothing here is
|
|
16092
|
+
a prop of the tree. Not photographed: it measures the moment it runs.
|
|
16093
|
+
|
|
16094
|
+
The scripted runs start from a button and are driven by the page itself, so
|
|
16095
|
+
a person and a script read the same figures. `data-role` names every control
|
|
16096
|
+
and every figure; `status` reads idle, running or done.
|
|
16097
|
+
|
|
16098
|
+
What a figure covers: script, React's commit and a forced layout - the
|
|
16099
|
+
clock stops after two macrotasks and a layout read, not at the paint, so
|
|
16100
|
+
that frame quantisation does not enter the figure. */
|
|
16101
|
+
|
|
16102
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
16103
|
+
import { Button, Text, TreeView, useTree } from "@umriss-ui/core";
|
|
16104
|
+
import type { NodeReader } from "@umriss-ui/core";
|
|
16105
|
+
|
|
16106
|
+
interface Unit {
|
|
16107
|
+
id: string;
|
|
16108
|
+
name: string;
|
|
16109
|
+
children?: Unit[];
|
|
16110
|
+
}
|
|
16111
|
+
|
|
16112
|
+
const SIZES = [10_000, 50_000, 100_000] as const;
|
|
16113
|
+
const ROW = 26;
|
|
16114
|
+
const KEYS = 200;
|
|
16115
|
+
const SCROLLS = 100;
|
|
16116
|
+
/* Rows per scroll step: far enough to replace the window every time. */
|
|
16117
|
+
const SCROLL_ROWS = 10;
|
|
16118
|
+
|
|
16119
|
+
/** A forest of folders (6 groups of 7 leaves each, 49 nodes per root) cut off at
|
|
16120
|
+
`count` nodes; every folder is open, so the visible rows are the nodes. */
|
|
16121
|
+
function build(count: number): { roots: Unit[]; open: string[] } {
|
|
16122
|
+
const roots: Unit[] = [];
|
|
16123
|
+
const open: string[] = [];
|
|
16124
|
+
let made = 0;
|
|
16125
|
+
const node = (id: string, children?: Unit[]): Unit => ({ id, name: `Node ${id}`, children });
|
|
16126
|
+
for (let r = 0; made < count; r++) {
|
|
16127
|
+
const groups: Unit[] = [];
|
|
16128
|
+
open.push(`r${r}`);
|
|
16129
|
+
made++;
|
|
16130
|
+
for (let g = 0; g < 6 && made < count; g++) {
|
|
16131
|
+
const leaves: Unit[] = [];
|
|
16132
|
+
made++;
|
|
16133
|
+
open.push(`r${r}-${g}`);
|
|
16134
|
+
for (let l = 0; l < 7 && made < count; l++) {
|
|
16135
|
+
leaves.push(node(`r${r}-${g}-${l}`));
|
|
16136
|
+
made++;
|
|
16137
|
+
}
|
|
16138
|
+
groups.push(node(`r${r}-${g}`, leaves));
|
|
16139
|
+
}
|
|
16140
|
+
roots.push(node(`r${r}`, groups));
|
|
16141
|
+
}
|
|
16142
|
+
return { roots, open };
|
|
16143
|
+
}
|
|
16144
|
+
|
|
16145
|
+
const READER: NodeReader<Unit> = {
|
|
16146
|
+
key: (unit) => unit.id,
|
|
16147
|
+
children: (unit) => unit.children,
|
|
16148
|
+
label: (unit) => unit.name,
|
|
16149
|
+
};
|
|
16150
|
+
|
|
16151
|
+
type Status = "idle" | "running" | "done";
|
|
16152
|
+
type Figures = { firstRender: number | null; perKey: number | null; perScroll: number | null };
|
|
16153
|
+
|
|
16154
|
+
/** Two macrotasks, then a layout read: React has committed by then. */
|
|
16155
|
+
function settled(): Promise<void> {
|
|
16156
|
+
const tick = () =>
|
|
16157
|
+
new Promise<void>((resolve) => {
|
|
16158
|
+
const channel = new MessageChannel();
|
|
16159
|
+
channel.port1.onmessage = () => resolve();
|
|
16160
|
+
channel.port2.postMessage(null);
|
|
16161
|
+
});
|
|
16162
|
+
return tick()
|
|
16163
|
+
.then(tick)
|
|
16164
|
+
.then(() => void document.body.offsetHeight);
|
|
16165
|
+
}
|
|
16166
|
+
|
|
16167
|
+
function Body({ built, onShown }: { built: { roots: Unit[]; open: string[] }; onShown: () => void }) {
|
|
16168
|
+
const tree = useTree(built.roots, {
|
|
16169
|
+
reader: READER,
|
|
16170
|
+
defaultExpanded: built.open,
|
|
16171
|
+
defaultActive: built.roots[0]?.id ?? null,
|
|
16172
|
+
virtual: { rowHeight: ROW },
|
|
16173
|
+
});
|
|
16174
|
+
useEffect(onShown, [onShown]);
|
|
16175
|
+
return (
|
|
16176
|
+
<TreeView tree={tree} ariaLabel="Benchmark tree" style={{ height: 320 }}>
|
|
16177
|
+
{(entry) => entry.node.name}
|
|
16178
|
+
</TreeView>
|
|
16179
|
+
);
|
|
16180
|
+
}
|
|
16181
|
+
|
|
16182
|
+
/** The clock, behind a function so that it is read in handlers only. */
|
|
16183
|
+
const now = () => performance.now();
|
|
16184
|
+
|
|
16185
|
+
const show = (ms: number | null) => (ms === null ? "-" : ms.toFixed(2));
|
|
16186
|
+
|
|
16187
|
+
export default function Benchmark() {
|
|
16188
|
+
const [size, setSize] = useState<(typeof SIZES)[number]>(SIZES[0]);
|
|
16189
|
+
const [built, setBuilt] = useState(() => build(SIZES[0]));
|
|
16190
|
+
const [status, setStatus] = useState<Status>("idle");
|
|
16191
|
+
const [figures, setFigures] = useState<Figures>({ firstRender: null, perKey: null, perScroll: null });
|
|
16192
|
+
const [run, setRun] = useState(0);
|
|
16193
|
+
const started = useRef<number | null>(null);
|
|
16194
|
+
const host = useRef<HTMLDivElement>(null);
|
|
16195
|
+
|
|
16196
|
+
const choose = (n: (typeof SIZES)[number]) => {
|
|
16197
|
+
if (status === "running") return;
|
|
16198
|
+
const next = build(n);
|
|
16199
|
+
setStatus("running");
|
|
16200
|
+
setFigures({ firstRender: null, perKey: null, perScroll: null });
|
|
16201
|
+
started.current = now();
|
|
16202
|
+
setSize(n);
|
|
16203
|
+
setBuilt(next);
|
|
16204
|
+
setRun((r) => r + 1);
|
|
16205
|
+
};
|
|
16206
|
+
|
|
16207
|
+
/* Stable between renders: the body's effect runs on mount only, which is
|
|
16208
|
+
the first render of a run (the body is keyed by the run, so the
|
|
16209
|
+
same size again renders anew). */
|
|
16210
|
+
const onShown = useCallback(() => {
|
|
16211
|
+
const from = started.current;
|
|
16212
|
+
if (from === null) return;
|
|
16213
|
+
started.current = null;
|
|
16214
|
+
void settled().then(() => {
|
|
16215
|
+
setFigures((f) => ({ ...f, firstRender: performance.now() - from }));
|
|
16216
|
+
setStatus("done");
|
|
16217
|
+
});
|
|
16218
|
+
}, []);
|
|
16219
|
+
|
|
16220
|
+
const tree = () => host.current?.querySelector<HTMLElement>('[role="tree"]') ?? null;
|
|
16221
|
+
|
|
16222
|
+
const walk = async () => {
|
|
16223
|
+
const root = tree();
|
|
16224
|
+
const active = root?.querySelector<HTMLElement>('[role="treeitem"][tabindex="0"]');
|
|
16225
|
+
if (status === "running" || !root || !active) return;
|
|
16226
|
+
setStatus("running");
|
|
16227
|
+
active.focus();
|
|
16228
|
+
await settled();
|
|
16229
|
+
let total = 0;
|
|
16230
|
+
for (let i = 0; i < KEYS; i++) {
|
|
16231
|
+
const target = document.activeElement ?? root;
|
|
16232
|
+
const from = performance.now();
|
|
16233
|
+
target.dispatchEvent(new KeyboardEvent("keydown", { key: "ArrowDown", bubbles: true, cancelable: true }));
|
|
16234
|
+
await settled();
|
|
16235
|
+
total += performance.now() - from;
|
|
16236
|
+
}
|
|
16237
|
+
setFigures((f) => ({ ...f, perKey: total / KEYS }));
|
|
16238
|
+
setStatus("done");
|
|
16239
|
+
};
|
|
16240
|
+
|
|
16241
|
+
const scroll = async () => {
|
|
16242
|
+
const root = tree();
|
|
16243
|
+
if (status === "running" || !root) return;
|
|
16244
|
+
setStatus("running");
|
|
16245
|
+
root.scrollTop = 0;
|
|
16246
|
+
await settled();
|
|
16247
|
+
let from = 0;
|
|
16248
|
+
/* A capture listener on the window runs before React's own at the root, so
|
|
16249
|
+
the clock starts as the scroll event is dispatched. */
|
|
16250
|
+
const start = () => {
|
|
16251
|
+
from = performance.now();
|
|
16252
|
+
};
|
|
16253
|
+
window.addEventListener("scroll", start, { capture: true });
|
|
16254
|
+
let total = 0;
|
|
16255
|
+
for (let i = 0; i < SCROLLS; i++) {
|
|
16256
|
+
/* A step that moves nothing fires no event; the run goes on after a
|
|
16257
|
+
moment instead of waiting for one that never comes. */
|
|
16258
|
+
const fired = new Promise<void>((resolve) => {
|
|
16259
|
+
root.addEventListener("scroll", () => resolve(), { once: true });
|
|
16260
|
+
setTimeout(resolve, 500);
|
|
16261
|
+
});
|
|
16262
|
+
from = performance.now();
|
|
16263
|
+
root.scrollTop += SCROLL_ROWS * ROW;
|
|
16264
|
+
await fired;
|
|
16265
|
+
await settled();
|
|
16266
|
+
total += performance.now() - from;
|
|
16267
|
+
}
|
|
16268
|
+
window.removeEventListener("scroll", start, { capture: true });
|
|
16269
|
+
setFigures((f) => ({ ...f, perScroll: total / SCROLLS }));
|
|
16270
|
+
setStatus("done");
|
|
16271
|
+
};
|
|
16272
|
+
|
|
16273
|
+
return (
|
|
16274
|
+
<>
|
|
16275
|
+
<div style={{ display: "flex", flexWrap: "wrap", gap: "0.5rem" }}>
|
|
16276
|
+
{SIZES.map((n) => (
|
|
16277
|
+
<Button key={n} size="sm" data-role={`size-${n}`} aria-pressed={n === size} onClick={() => choose(n)}>
|
|
16278
|
+
{n.toLocaleString("en-US")} nodes
|
|
16279
|
+
</Button>
|
|
16280
|
+
))}
|
|
16281
|
+
<Button size="sm" data-role="walk" onClick={walk}>
|
|
16282
|
+
Walk {KEYS} keys
|
|
16283
|
+
</Button>
|
|
16284
|
+
<Button size="sm" data-role="scroll" onClick={scroll}>
|
|
16285
|
+
Scroll {SCROLLS} steps
|
|
16286
|
+
</Button>
|
|
16287
|
+
</div>
|
|
16288
|
+
<dl style={{ display: "flex", flexWrap: "wrap", gap: "1.5rem", margin: 0 }}>
|
|
16289
|
+
<div>
|
|
16290
|
+
<Text as="dt">Status</Text>
|
|
16291
|
+
<Text as="dd" mono style={{ margin: 0 }} data-role="status">{status}</Text>
|
|
16292
|
+
</div>
|
|
16293
|
+
<div>
|
|
16294
|
+
<Text as="dt">Nodes</Text>
|
|
16295
|
+
<Text as="dd" mono style={{ margin: 0 }} data-role="nodes">{size}</Text>
|
|
16296
|
+
</div>
|
|
16297
|
+
<div>
|
|
16298
|
+
<Text as="dt">First render (ms)</Text>
|
|
16299
|
+
<Text as="dd" mono style={{ margin: 0 }} data-role="first-render">{show(figures.firstRender)}</Text>
|
|
16300
|
+
</div>
|
|
16301
|
+
<div>
|
|
16302
|
+
<Text as="dt">Per key (ms)</Text>
|
|
16303
|
+
<Text as="dd" mono style={{ margin: 0 }} data-role="per-key">{show(figures.perKey)}</Text>
|
|
16304
|
+
</div>
|
|
16305
|
+
<div>
|
|
16306
|
+
<Text as="dt">Per scroll event (ms)</Text>
|
|
16307
|
+
<Text as="dd" mono style={{ margin: 0 }} data-role="per-scroll">{show(figures.perScroll)}</Text>
|
|
16308
|
+
</div>
|
|
16309
|
+
</dl>
|
|
16310
|
+
<div ref={host}>
|
|
16311
|
+
<Body key={run} built={built} onShown={onShown} />
|
|
16312
|
+
</div>
|
|
16313
|
+
</>
|
|
16314
|
+
);
|
|
16315
|
+
}
|
|
16316
|
+
```
|
|
16317
|
+
|
|
16318
|
+
#### Keyboard
|
|
16319
|
+
|
|
16320
|
+
The keys of [TreeView](#/treeview/keyboard-treeview) apply here.
|
|
16321
|
+
|
|
16322
|
+
#### Props on this page
|
|
16323
|
+
|
|
16324
|
+
From `TextProps` — the full table stands on [Typography](#/typography/type-TextProps).
|
|
16325
|
+
|
|
16326
|
+
| Prop | Type | Default | Description |
|
|
16327
|
+
|---|---|---|---|
|
|
16328
|
+
| [`as`](#/typography/TextProps-as) | `ElementType` | `"p"` | Element to render as. |
|
|
16329
|
+
| [`mono`](#/typography/TextProps-mono) | `boolean` | `false` | Geist Mono with tabular figures – for numbers and identifiers. |
|
|
16330
|
+
|
|
16331
|
+
From `ButtonProps` — the full table stands on [Button](#/button/type-ButtonProps).
|
|
16332
|
+
|
|
16333
|
+
| Prop | Type | Default | Description |
|
|
16334
|
+
|---|---|---|---|
|
|
16335
|
+
| [`size`](#/button/ButtonProps-size) | [`ButtonSize`](#/button/type-ButtonSize)<br>`"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for buttons in header bars and table rows, `md` otherwise. |
|
|
16336
|
+
|
|
16337
|
+
From `IconButtonProps` — the full table stands on [IconButton](#/iconbutton/type-IconButtonProps).
|
|
16338
|
+
|
|
16339
|
+
| Prop | Type | Default | Description |
|
|
16340
|
+
|---|---|---|---|
|
|
16341
|
+
| [`size`](#/iconbutton/IconButtonProps-size) | [`ButtonSize`](#/iconbutton/type-ButtonSize)<br>`"sm" \| "md"` | the size of a `ControlSizeProvider` around it, else `"md"` | `sm` for buttons in header bars and table rows, `md` otherwise. From `ButtonProps`. |
|
|
16342
|
+
|
|
16343
|
+
From `TreeViewProps` — the full table stands on [TreeView](#/treeview/type-TreeViewProps).
|
|
16344
|
+
|
|
16345
|
+
| Prop | Type | Default | Description |
|
|
16346
|
+
|---|---|---|---|
|
|
16347
|
+
| [`tree`](#/treeview/TreeViewProps-tree) *required* | [`Tree`](#/treeview/type-Tree)`<K, S>` | — | The tree from `useTree`. It is the whole state: flattening, active node, checks, anchor. The view holds nothing beside it. |
|
|
16348
|
+
| [`children`](#/treeview/TreeViewProps-children) *required* | `(entry: `[`FlatteningEntry`](#/treeview/type-FlatteningEntry)`<K, S>) => ReactNode` | — | What the node says. |
|
|
16349
|
+
|
|
16350
|
+
###### Accessibility
|
|
16351
|
+
|
|
16352
|
+
| Prop | Type | Default | Description |
|
|
16353
|
+
|---|---|---|---|
|
|
16354
|
+
| [`ariaLabel`](#/treeview/TreeViewProps-ariaLabel) *required* | `string` | — | Required: the tree is a structure of its own and needs a name. |
|
|
16355
|
+
|
|
16498
16356
|
## Data display
|
|
16499
16357
|
|
|
16500
16358
|
Single values and labels, read at a glance.
|
|
@@ -16667,8 +16525,9 @@ The keys of [Button](#/button/keyboard-button) apply here.
|
|
|
16667
16525
|
|
|
16668
16526
|
| Prop | Type | Default | Description |
|
|
16669
16527
|
|---|---|---|---|
|
|
16670
|
-
| `tone` | [`BadgeTone`](#type-BadgeTone)<br>`"neutral" \| "accent" \| "success" \| "warning" \| "danger"` | `"neutral"` | What the badge stands for. There is always a word beside it: a colour on its own is not a statement.<br>Shown in: [Configurator](#/badge/configurator-badge), [Tones](#/badge/tones), [Counters](#/badge/counters) and
|
|
16528
|
+
| `tone` | [`BadgeTone`](#type-BadgeTone)<br>`"neutral" \| "accent" \| "success" \| "warning" \| "danger"` | `"neutral"` | What the badge stands for. There is always a word beside it: a colour on its own is not a statement.<br>Shown in: [Configurator](#/badge/configurator-badge), [Tones](#/badge/tones), [Counters](#/badge/counters) and 19 more |
|
|
16671
16529
|
| `pill` | `boolean` | `false` | Fully rounded pill shape - for counters and key figures. The default is the slightly rounded badge shape for status labels.<br>Shown in: [Configurator](#/badge/configurator-badge), [Counters](#/badge/counters), [Fold the body (Card)](#/card/fold-the-body) and 1 more |
|
|
16530
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
16672
16531
|
|
|
16673
16532
|
Also takes every attribute of `<span>`.
|
|
16674
16533
|
|
|
@@ -16918,6 +16777,7 @@ export default function AFilterBar() {
|
|
|
16918
16777
|
| `children` *required* | `ReactNode` | — | The text of the label – short enough to stand on one line.<br>Shown in: [Configurator](#/tag/configurator-tag), [A tag](#/tag/a-tag), [Tones](#/tag/tones) and 5 more |
|
|
16919
16778
|
| `removeLabel` | `string` | — | Label of the remove key. Needed as soon as the content is not text – no sentence can be formed out of a node.<br>Shown in: [Remove tags from a group](#/tag/removable) |
|
|
16920
16779
|
| `disabled` | `boolean` | `false` | Takes the remove key away from the tag without hiding it: disabled is a statement about the key and not about the label.<br>Shown in: [Configurator](#/tag/configurator-tag), [Remove tags from a group](#/tag/removable) |
|
|
16780
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
16921
16781
|
|
|
16922
16782
|
###### Events
|
|
16923
16783
|
|
|
@@ -16929,6 +16789,10 @@ Also takes every attribute of `<span>` – without `onRemove`.
|
|
|
16929
16789
|
|
|
16930
16790
|
##### `TagGroupProps`
|
|
16931
16791
|
|
|
16792
|
+
| Prop | Type | Default | Description |
|
|
16793
|
+
|---|---|---|---|
|
|
16794
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
16795
|
+
|
|
16932
16796
|
###### Accessibility
|
|
16933
16797
|
|
|
16934
16798
|
| Prop | Type | Default | Description |
|
|
@@ -17721,6 +17585,7 @@ It announces nothing: a value that changes or a verdict that turns is read when
|
|
|
17721
17585
|
| `history` | `readonly number[]` | — | Values in chronological order; yields the history line, across the tile beneath the figures, or beside them in a tile of 380 px and more.<br>Shown in: [Add a history](#/stat/history), [Give the history room](#/stat/give-the-history-room), [Watch a kiln zone](#/stat/a-kiln-zone) and 4 more |
|
|
17722
17586
|
| `asOf` | `Date \| number \| null` | — | When the value was true – not when it was fetched.<br>Shown in: [Show how fresh a value is](#/stat/freshness), [Watch the services that page at night](#/stat/a-service-overview), [Watch a kiln line over a shift (Scenarios)](#/scenarios/watch-a-kiln-line) |
|
|
17723
17587
|
| `ages` | [`FreshnessAges`](#type-FreshnessAges) | — | Without ages there is no freshness display and no cadence.<br>Shown in: [Show how fresh a value is](#/stat/freshness), [Watch the services that page at night](#/stat/a-service-overview), [Watch a kiln line over a shift (Scenarios)](#/scenarios/watch-a-kiln-line) |
|
|
17588
|
+
| `ref` | `Ref<HTMLDivElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
17724
17589
|
|
|
17725
17590
|
Also takes every attribute of `<div>` – without `children`.
|
|
17726
17591
|
|
|
@@ -17731,8 +17596,7 @@ Also takes every attribute of `<div>` – without `children`.
|
|
|
17731
17596
|
The set a value is read against.
|
|
17732
17597
|
|
|
17733
17598
|
The target stands beside the limits and is not one: it is missed, never
|
|
17734
|
-
violated, and it is never the edge of a region.
|
|
17735
|
-
tile turns red for being above target.
|
|
17599
|
+
violated, and it is never the edge of a region.
|
|
17736
17600
|
|
|
17737
17601
|
| Prop | Type | Default | Description |
|
|
17738
17602
|
|---|---|---|---|
|
|
@@ -17759,8 +17623,7 @@ A bound: a value, a side, a severity.
|
|
|
17759
17623
|
|
|
17760
17624
|
No tolerance band as input. A band is derived - two limits of equal
|
|
17761
17625
|
severity on opposite sides enclose one - and as an input type it would
|
|
17762
|
-
force a `null` on one edge in the one-sided case.
|
|
17763
|
-
case, not the exception.
|
|
17626
|
+
force a `null` on one edge in the one-sided case.
|
|
17764
17627
|
|
|
17765
17628
|
| Prop | Type | Default | Description |
|
|
17766
17629
|
|---|---|---|---|
|
|
@@ -17779,8 +17642,7 @@ type Side = "upper" | "lower";
|
|
|
17779
17642
|
###### `Severity`
|
|
17780
17643
|
|
|
17781
17644
|
How seriously a violation weighs: one severity that advises and one that
|
|
17782
|
-
calls for action. Exactly two
|
|
17783
|
-
the screen, and five colours are noise. For a third distinction one sets a
|
|
17645
|
+
calls for action. Exactly two; for a third distinction one sets a
|
|
17784
17646
|
second limit.
|
|
17785
17647
|
|
|
17786
17648
|
```ts
|
|
@@ -17946,6 +17808,7 @@ It is no live region: a new value is read when a reader reaches the bar. Under f
|
|
|
17946
17808
|
| `tone` | [`MeterTone`](#type-MeterTone)<br>`"neutral" \| "accent" \| "success" \| "warning" \| "danger"` | `"accent"` | The colour of the bar. It comes from an assessment and not from taste: beside the bar there is always the number or a word, so that the colour is never the only statement.<br>Shown in: [Configurator](#/meter/configurator-meter), [Tones](#/meter/tones), [Compare a team's capacity](#/meter/team-capacity) and 2 more |
|
|
17947
17809
|
| `showLabel` | `boolean` | `true` | The percentage to the right of the bar (Geist Mono).<br>Shown in: [Configurator](#/meter/configurator-meter), [A share](#/meter/a-share), [Compare a team's capacity](#/meter/team-capacity) and 2 more |
|
|
17948
17810
|
| `label` | `string` | the wording's "Fill level" | What is being measured, e.g. "Utilisation". A role of `meter` needs a name from the author - the visible percentage inside it does not count for that, and neither does the column heading beside it. Whoever knows what the bar measures says it better than the general term.<br>Shown in: [A share](#/meter/a-share), [Tones](#/meter/tones), [Compare a team's capacity](#/meter/team-capacity) and 2 more |
|
|
17811
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
17949
17812
|
|
|
17950
17813
|
Also takes every attribute of `<span>`.
|
|
17951
17814
|
|
|
@@ -18215,6 +18078,7 @@ export default function InATable() {
|
|
|
18215
18078
|
| `width` | `number \| "fill"` | `96` | Width in pixels; the default is a row width, not a chart width. `"fill"` takes the width of its container, as a tile's history does; the line keeps its stroke and the end point stays round.<br>Shown in: [Configurator](#/sparkline/configurator-sparkline), [Size and tone](#/sparkline/size-and-tone), [One above the other (Splitter)](#/splitter/one-above-the-other) and 1 more |
|
|
18216
18079
|
| `height` | `number` | `28` | Height in pixels; the default is as high as a table row. With `width` `"fill"` a stylesheet may set the height instead: the drawing follows its box.<br>Shown in: [Configurator](#/sparkline/configurator-sparkline), [Size and tone](#/sparkline/size-and-tone), [One above the other (Splitter)](#/splitter/one-above-the-other) and 1 more |
|
|
18217
18080
|
| `tone` | `"ink" \| "accent"` | `"ink"` | The line is ink, not meaning: `accent` only where exactly one line among several is to be emphasised.<br>Shown in: [Configurator](#/sparkline/configurator-sparkline), [Size and tone](#/sparkline/size-and-tone) |
|
|
18081
|
+
| `ref` | `Ref<HTMLSpanElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
18218
18082
|
|
|
18219
18083
|
Also takes every attribute of `<span>`.
|
|
18220
18084
|
|
|
@@ -18260,7 +18124,7 @@ The chevron that expands and collapses a branch. Drawn pointing right;
|
|
|
18260
18124
|
rotate it by 90 degrees for an open branch.
|
|
18261
18125
|
|
|
18262
18126
|
```ts
|
|
18263
|
-
|
|
18127
|
+
function AngleGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
18264
18128
|
```
|
|
18265
18129
|
|
|
18266
18130
|
Used on [CommandPalette](#/commandpalette).
|
|
@@ -18281,7 +18145,7 @@ Used on [Scenarios](#/) and [Breadcrumb](#/breadcrumb).
|
|
|
18281
18145
|
|
|
18282
18146
|
[Button](#/button) – Starts one action when pressed: save, send, deploy, delete. Its variant says how much weight the action carries beside its neighbours, and while the action runs it shows that it is busy and cannot be pressed twice.
|
|
18283
18147
|
|
|
18284
|
-
Used on [Scenarios](#/), [Installation](#/installation), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Language](#/language), [Stack and Grid](#/stack-and-grid), [Divider](#/divider), [Card](#/card), [Splitter](#/splitter), [VisuallyHidden](#/visuallyhidden), [Button](#/button), [IconButton](#/iconbutton), [ButtonGroup](#/buttongroup), [Input](#/input), [FormField](#/formfield), [Textarea](#/textarea), [FileInput](#/fileinput), [Combobox](#/combobox), [Spinner](#/spinner), [ProgressBar](#/progressbar), [Skeleton](#/skeleton), [Alert](#/alert), [Toast](#/toast), [EmptyState](#/emptystate), [Tooltip](#/tooltip), [Popover](#/popover), [Menu](#/menu), [Modal](#/modal), [Drawer](#/drawer), [ConfirmDialog](#/confirmdialog), [CommandPalette](#/commandpalette), [Breadcrumb](#/breadcrumb), [Accordion](#/accordion), [Stepper](#/stepper), [TreeView](#/treeview), [Badge](#/badge) and [Tag](#/tag).
|
|
18148
|
+
Used on [Scenarios](#/), [Installation](#/installation), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Language](#/language), [Stack and Grid](#/stack-and-grid), [Divider](#/divider), [Card](#/card), [Splitter](#/splitter), [VisuallyHidden](#/visuallyhidden), [Button](#/button), [IconButton](#/iconbutton), [ButtonGroup](#/buttongroup), [Input](#/input), [FormField](#/formfield), [Textarea](#/textarea), [FileInput](#/fileinput), [Combobox](#/combobox), [Spinner](#/spinner), [ProgressBar](#/progressbar), [Skeleton](#/skeleton), [Alert](#/alert), [Toast](#/toast), [EmptyState](#/emptystate), [Tooltip](#/tooltip), [Popover](#/popover), [Menu](#/menu), [Modal](#/modal), [Drawer](#/drawer), [ConfirmDialog](#/confirmdialog), [CommandPalette](#/commandpalette), [Breadcrumb](#/breadcrumb), [Accordion](#/accordion), [Stepper](#/stepper), [TreeView](#/treeview), [Benchmark](#/benchmark), [Badge](#/badge) and [Tag](#/tag).
|
|
18285
18149
|
|
|
18286
18150
|
##### `ButtonGroup`
|
|
18287
18151
|
|
|
@@ -18295,9 +18159,9 @@ A calendar leaf: a sheet with its header and two rings. With `range`, a
|
|
|
18295
18159
|
bar across the sheet stands for the span a range picker chooses.
|
|
18296
18160
|
|
|
18297
18161
|
```ts
|
|
18298
|
-
|
|
18162
|
+
function CalendarGlyph({ ref, size, range, ...rest }: GlyphProps & {
|
|
18299
18163
|
range?: boolean;
|
|
18300
|
-
}
|
|
18164
|
+
}): import("react").JSX.Element;
|
|
18301
18165
|
```
|
|
18302
18166
|
|
|
18303
18167
|
##### `Card`
|
|
@@ -18331,7 +18195,7 @@ Used on [Scenarios](#/), [Theming](#/theming), [Sizes](#/sizes), [ButtonGroup](#
|
|
|
18331
18195
|
A clock face at a quarter past - the time pickers' character.
|
|
18332
18196
|
|
|
18333
18197
|
```ts
|
|
18334
|
-
|
|
18198
|
+
function ClockGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
18335
18199
|
```
|
|
18336
18200
|
|
|
18337
18201
|
##### `Combobox`
|
|
@@ -18372,10 +18236,10 @@ The cross that clears a field, removes a tag or a chip, and closes a
|
|
|
18372
18236
|
dialog, a toast or an alert - one drawing at the size of its place.
|
|
18373
18237
|
|
|
18374
18238
|
```ts
|
|
18375
|
-
|
|
18239
|
+
function CrossGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
18376
18240
|
```
|
|
18377
18241
|
|
|
18378
|
-
Used on [
|
|
18242
|
+
Used on [IconButton](#/iconbutton).
|
|
18379
18243
|
|
|
18380
18244
|
##### `DatePicker`
|
|
18381
18245
|
|
|
@@ -18407,12 +18271,6 @@ Used on [Sizes](#/sizes) and [DateTimeRangePicker](#/datetimerangepicker).
|
|
|
18407
18271
|
|
|
18408
18272
|
Used on [Stack and Grid](#/stack-and-grid), [Divider](#/divider), [Switch](#/switch), [ProgressBar](#/progressbar) and [CommandPalette](#/commandpalette).
|
|
18409
18273
|
|
|
18410
|
-
##### `Dock`
|
|
18411
|
-
|
|
18412
|
-
[Dock](#/dock) – A strip of tools that floats above one surface, a chart or a map, and rests at the edge the user moves it to (also called a floating toolbar). Reach for it when the tools act on that surface and must not take room from it.
|
|
18413
|
-
|
|
18414
|
-
Used on [Dock](#/dock).
|
|
18415
|
-
|
|
18416
18274
|
##### `Drawer`
|
|
18417
18275
|
|
|
18418
18276
|
[Drawer](#/drawer) – A modal window that slides in from the left or right edge of the screen (also called a side sheet or side panel). Reach for it for the detail of something picked from a list, while the list stays in sight behind it.
|
|
@@ -18456,7 +18314,7 @@ function FormFieldBoundary({ children }: {
|
|
|
18456
18314
|
[Stack and Grid](#/stack-and-grid) – Children in a grid: a fixed number of columns, a list of column widths,
|
|
18457
18315
|
or as many columns as fit at `minItemWidth`.
|
|
18458
18316
|
|
|
18459
|
-
Used on [Scenarios](#/), [Theming](#/theming), [Sizes](#/sizes), [Language](#/language), [Stack and Grid](#/stack-and-grid), [Card](#/card), [Splitter](#/splitter), [
|
|
18317
|
+
Used on [Scenarios](#/), [Theming](#/theming), [Sizes](#/sizes), [Language](#/language), [Stack and Grid](#/stack-and-grid), [Card](#/card), [Splitter](#/splitter), [Typography](#/typography), [Input](#/input), [FormField](#/formfield), [Textarea](#/textarea), [NumberInput](#/numberinput), [Slider](#/slider), [Checkbox](#/checkbox), [Switch](#/switch), [RadioGroup](#/radiogroup), [FileInput](#/fileinput), [Select](#/select), [Combobox](#/combobox), [MultiSelect](#/multiselect), [DatePicker](#/datepicker), [DateTimePicker](#/datetimepicker), [DateRangePicker](#/daterangepicker), [DateTimeRangePicker](#/datetimerangepicker), [Modal](#/modal), [Drawer](#/drawer), [CommandPalette](#/commandpalette), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [TreeView](#/treeview), [Stat](#/stat) and [Meter](#/meter).
|
|
18460
18318
|
|
|
18461
18319
|
##### `GridGlyph`
|
|
18462
18320
|
|
|
@@ -18464,25 +18322,18 @@ The grid laid over an area. Two by two lines; the frame is missing on
|
|
|
18464
18322
|
purpose, otherwise it would be a window.
|
|
18465
18323
|
|
|
18466
18324
|
```ts
|
|
18467
|
-
|
|
18325
|
+
function GridGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
18468
18326
|
```
|
|
18469
18327
|
|
|
18470
|
-
Used on [
|
|
18328
|
+
Used on [CommandPalette](#/commandpalette).
|
|
18471
18329
|
|
|
18472
18330
|
##### `GripGlyph`
|
|
18473
18331
|
|
|
18474
|
-
The grip a
|
|
18475
|
-
would be the obvious form and is wrong here - dots are fill, and point 4 of
|
|
18332
|
+
The grip a drag is taken by: two grooves. Dots are fill, and point 4 of
|
|
18476
18333
|
the specification draws with the stroke.
|
|
18477
18334
|
|
|
18478
|
-
The grooves stand the same way in both orientations of the dock. Turning
|
|
18479
|
-
them with it would be prettier and would need a `rotate()` in a component
|
|
18480
|
-
whose acceptance ([ADR-0014](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0014-a-turn-that-cannot-be-a-transition.md), ticket 04) rules exactly that out - a glyph
|
|
18481
|
-
that has to be rotated to be right is one that would be rotated along at
|
|
18482
|
-
the change.
|
|
18483
|
-
|
|
18484
18335
|
```ts
|
|
18485
|
-
|
|
18336
|
+
function GripGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
18486
18337
|
```
|
|
18487
18338
|
|
|
18488
18339
|
##### `Heading`
|
|
@@ -18524,15 +18375,13 @@ Used on [Scenarios](#/), [Theming](#/theming), [Typography](#/typography) and [M
|
|
|
18524
18375
|
|
|
18525
18376
|
##### `MeasureGlyph`
|
|
18526
18377
|
|
|
18527
|
-
Measuring: a line with two end marks. Not a ruler with a scale
|
|
18378
|
+
Measuring: a line with two end marks. Not a ruler with a scale: the teeth
|
|
18528
18379
|
would be a grey stripe at ten nominal units.
|
|
18529
18380
|
|
|
18530
18381
|
```ts
|
|
18531
|
-
|
|
18382
|
+
function MeasureGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
18532
18383
|
```
|
|
18533
18384
|
|
|
18534
|
-
Used on [Dock](#/dock).
|
|
18535
|
-
|
|
18536
18385
|
##### `Menu`
|
|
18537
18386
|
|
|
18538
18387
|
[Menu](#/menu) – A list of actions that opens under a button (also called a dropdown menu). Reach for it when a place has more actions than room for buttons, or for the actions of each row in a list.
|
|
@@ -18551,7 +18400,7 @@ Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [IconButton](#/icon
|
|
|
18551
18400
|
Fine dividing line between groups of menu entries.
|
|
18552
18401
|
|
|
18553
18402
|
```ts
|
|
18554
|
-
|
|
18403
|
+
function MenuSeparator({ ref, className, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): import("react").JSX.Element;
|
|
18555
18404
|
```
|
|
18556
18405
|
|
|
18557
18406
|
Used on [Scenarios](#/), [IconButton](#/iconbutton), [ButtonGroup](#/buttongroup), [Menu](#/menu) and [ContextMenu](#/contextmenu).
|
|
@@ -18567,10 +18416,10 @@ Used on [Scenarios](#/), [Drawer](#/drawer) and [Meter](#/meter).
|
|
|
18567
18416
|
The minus of `NumberInput`'s step buttons.
|
|
18568
18417
|
|
|
18569
18418
|
```ts
|
|
18570
|
-
|
|
18419
|
+
function MinusGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
18571
18420
|
```
|
|
18572
18421
|
|
|
18573
|
-
Used on [
|
|
18422
|
+
Used on [IconButton](#/iconbutton).
|
|
18574
18423
|
|
|
18575
18424
|
##### `Modal`
|
|
18576
18425
|
|
|
@@ -18584,7 +18433,7 @@ The content of a `Modal` or `Drawer` - the part that scrolls while head and
|
|
|
18584
18433
|
foot stand fast.
|
|
18585
18434
|
|
|
18586
18435
|
```ts
|
|
18587
|
-
|
|
18436
|
+
function ModalBody({ ref, className, children, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): import("react").JSX.Element;
|
|
18588
18437
|
```
|
|
18589
18438
|
|
|
18590
18439
|
Used on [Scenarios](#/), [Sizes](#/sizes), [Modal](#/modal) and [Drawer](#/drawer).
|
|
@@ -18594,7 +18443,7 @@ Used on [Scenarios](#/), [Sizes](#/sizes), [Modal](#/modal) and [Drawer](#/drawe
|
|
|
18594
18443
|
The foot of a `Modal` or `Drawer`, for its buttons; they stand at the end.
|
|
18595
18444
|
|
|
18596
18445
|
```ts
|
|
18597
|
-
|
|
18446
|
+
function ModalFooter({ ref, className, children, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): import("react").JSX.Element;
|
|
18598
18447
|
```
|
|
18599
18448
|
|
|
18600
18449
|
Used on [Scenarios](#/), [Sizes](#/sizes), [Modal](#/modal) and [Drawer](#/drawer).
|
|
@@ -18623,10 +18472,10 @@ Used on [Scenarios](#/), [Sizes](#/sizes), [Language](#/language), [FormField](#
|
|
|
18623
18472
|
The plus of `NumberInput`'s step buttons.
|
|
18624
18473
|
|
|
18625
18474
|
```ts
|
|
18626
|
-
|
|
18475
|
+
function PlusGlyph({ ref, size, ...rest }: GlyphProps): import("react").JSX.Element;
|
|
18627
18476
|
```
|
|
18628
18477
|
|
|
18629
|
-
Used on [
|
|
18478
|
+
Used on [IconButton](#/iconbutton).
|
|
18630
18479
|
|
|
18631
18480
|
##### `Popover`
|
|
18632
18481
|
|
|
@@ -18701,7 +18550,7 @@ Used on [Splitter](#/splitter) and [CommandPalette](#/commandpalette).
|
|
|
18701
18550
|
[Stack and Grid](#/stack-and-grid) – Children below or beside one another, spaced by a step of the spacing
|
|
18702
18551
|
scale.
|
|
18703
18552
|
|
|
18704
|
-
Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Language](#/language), [Stack and Grid](#/stack-and-grid), [Divider](#/divider), [Card](#/card), [Splitter](#/splitter), [
|
|
18553
|
+
Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Language](#/language), [Stack and Grid](#/stack-and-grid), [Divider](#/divider), [Card](#/card), [Splitter](#/splitter), [Typography](#/typography), [VisuallyHidden](#/visuallyhidden), [Button](#/button), [IconButton](#/iconbutton), [ButtonGroup](#/buttongroup), [Input](#/input), [FormField](#/formfield), [Textarea](#/textarea), [NumberInput](#/numberinput), [Slider](#/slider), [Checkbox](#/checkbox), [Switch](#/switch), [SegmentedControl](#/segmentedcontrol), [FileInput](#/fileinput), [Select](#/select), [Combobox](#/combobox), [MultiSelect](#/multiselect), [DatePicker](#/datepicker), [DateTimePicker](#/datetimepicker), [DateRangePicker](#/daterangepicker), [DateTimeRangePicker](#/datetimerangepicker), [Spinner](#/spinner), [ProgressBar](#/progressbar), [Skeleton](#/skeleton), [Alert](#/alert), [Toast](#/toast), [EmptyState](#/emptystate), [Tooltip](#/tooltip), [Popover](#/popover), [Menu](#/menu), [ContextMenu](#/contextmenu), [Modal](#/modal), [Drawer](#/drawer), [ConfirmDialog](#/confirmdialog), [CommandPalette](#/commandpalette), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [Accordion](#/accordion), [Stepper](#/stepper), [TreeView](#/treeview), [Badge](#/badge), [Tag](#/tag), [Stat](#/stat), [Meter](#/meter) and [Sparkline](#/sparkline).
|
|
18705
18554
|
|
|
18706
18555
|
##### `Stat`
|
|
18707
18556
|
|
|
@@ -18726,7 +18575,7 @@ Used on [Scenarios](#/), [Theming](#/theming), [Sizes](#/sizes), [Switch](#/swit
|
|
|
18726
18575
|
[Tabs](#/tabs) – One tab of a `TabList`; choosing it shows the `TabPanel` of the same
|
|
18727
18576
|
`value`.
|
|
18728
18577
|
|
|
18729
|
-
Used on [Scenarios](#/), [Card](#/card), [
|
|
18578
|
+
Used on [Scenarios](#/), [Card](#/card), [Typography](#/typography), [VisuallyHidden](#/visuallyhidden), [Button](#/button), [IconButton](#/iconbutton), [ButtonGroup](#/buttongroup), [Input](#/input), [Textarea](#/textarea), [RadioGroup](#/radiogroup), [SegmentedControl](#/segmentedcontrol), [Select](#/select), [Alert](#/alert), [Toast](#/toast), [Tooltip](#/tooltip), [Menu](#/menu), [Modal](#/modal), [Drawer](#/drawer), [ConfirmDialog](#/confirmdialog), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [Accordion](#/accordion) and [Tag](#/tag).
|
|
18730
18579
|
|
|
18731
18580
|
##### `TabList`
|
|
18732
18581
|
|
|
@@ -18734,7 +18583,7 @@ The row of `Tab`s inside `Tabs`. The arrow keys, Home and End move
|
|
|
18734
18583
|
between the tabs and choose them.
|
|
18735
18584
|
|
|
18736
18585
|
```ts
|
|
18737
|
-
|
|
18586
|
+
function TabList({ ref, className, children, onKeyDown, ...rest }: HTMLAttributes<HTMLDivElement> & RefProp<HTMLDivElement>): import("react").JSX.Element;
|
|
18738
18587
|
```
|
|
18739
18588
|
|
|
18740
18589
|
Used on [Scenarios](#/) and [Tabs](#/tabs).
|
|
@@ -18770,7 +18619,7 @@ Used on [Scenarios](#/), [EmptyState](#/emptystate) and [Tag](#/tag).
|
|
|
18770
18619
|
[Typography](#/typography) – Body text from the token set; `as` chooses the element, independent of the
|
|
18771
18620
|
size.
|
|
18772
18621
|
|
|
18773
|
-
Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Language](#/language), [Stack and Grid](#/stack-and-grid), [Divider](#/divider), [Card](#/card), [Splitter](#/splitter), [
|
|
18622
|
+
Used on [Scenarios](#/), [UmrissProvider](#/umrissprovider), [Theming](#/theming), [Sizes](#/sizes), [Language](#/language), [Stack and Grid](#/stack-and-grid), [Divider](#/divider), [Card](#/card), [Splitter](#/splitter), [Typography](#/typography), [VisuallyHidden](#/visuallyhidden), [Button](#/button), [IconButton](#/iconbutton), [ButtonGroup](#/buttongroup), [Input](#/input), [FormField](#/formfield), [Textarea](#/textarea), [NumberInput](#/numberinput), [Slider](#/slider), [Switch](#/switch), [SegmentedControl](#/segmentedcontrol), [FileInput](#/fileinput), [Select](#/select), [Combobox](#/combobox), [MultiSelect](#/multiselect), [DatePicker](#/datepicker), [DateTimePicker](#/datetimepicker), [DateRangePicker](#/daterangepicker), [DateTimeRangePicker](#/datetimerangepicker), [Spinner](#/spinner), [ProgressBar](#/progressbar), [Skeleton](#/skeleton), [Toast](#/toast), [EmptyState](#/emptystate), [Tooltip](#/tooltip), [Popover](#/popover), [Menu](#/menu), [ContextMenu](#/contextmenu), [Modal](#/modal), [Drawer](#/drawer), [ConfirmDialog](#/confirmdialog), [CommandPalette](#/commandpalette), [Breadcrumb](#/breadcrumb), [Tabs](#/tabs), [Accordion](#/accordion), [Stepper](#/stepper), [TreeView](#/treeview), [Benchmark](#/benchmark), [Badge](#/badge), [Tag](#/tag), [Stat](#/stat), [Meter](#/meter) and [Sparkline](#/sparkline).
|
|
18774
18623
|
|
|
18775
18624
|
##### `Textarea`
|
|
18776
18625
|
|
|
@@ -18809,7 +18658,7 @@ Used on [TreeView](#/treeview).
|
|
|
18809
18658
|
|
|
18810
18659
|
[TreeView](#/treeview) – A hierarchy the user expands, walks with the keys and optionally ticks (also called a tree or outline). Reach for it for folders, teams and cost-centre structures; large trees stay quick because only the visible rows are drawn.
|
|
18811
18660
|
|
|
18812
|
-
Used on [Scenarios](#/)
|
|
18661
|
+
Used on [Scenarios](#/), [TreeView](#/treeview) and [Benchmark](#/benchmark).
|
|
18813
18662
|
|
|
18814
18663
|
##### `UmrissProvider`
|
|
18815
18664
|
|
|
@@ -18851,8 +18700,7 @@ const useDensity: () => Density;
|
|
|
18851
18700
|
A component's `density`: its own value, else the density the provider
|
|
18852
18701
|
explicitly configured, else its own default.
|
|
18853
18702
|
|
|
18854
|
-
"comfortable" means "regular" here. A compact set of tokens does not exist
|
|
18855
|
-
that is work package B.13; here only what exists is wired up.
|
|
18703
|
+
"comfortable" means "regular" here. A compact set of tokens does not exist.
|
|
18856
18704
|
|
|
18857
18705
|
```ts
|
|
18858
18706
|
function useDensityFor(own: "regular" | "compact" | undefined, fallback: "regular" | "compact"): "regular" | "compact";
|
|
@@ -18948,7 +18796,7 @@ restored from a link.
|
|
|
18948
18796
|
function useTree<K, S extends Key = string>(roots: readonly K[], options: TreeOptions<K, S>): Tree<K, S>;
|
|
18949
18797
|
```
|
|
18950
18798
|
|
|
18951
|
-
Used on [Scenarios](#/)
|
|
18799
|
+
Used on [Scenarios](#/), [TreeView](#/treeview) and [Benchmark](#/benchmark).
|
|
18952
18800
|
|
|
18953
18801
|
##### `useUmriss`
|
|
18954
18802
|
|
|
@@ -18964,14 +18812,15 @@ Holds the scroll position and the measured heights and derives the window
|
|
|
18964
18812
|
from them.
|
|
18965
18813
|
|
|
18966
18814
|
It is measured on the first rendered row rather than taken from the caller's
|
|
18967
|
-
value: row height depends on density, font size and zoom, and
|
|
18968
|
-
|
|
18969
|
-
forty thousand pixels.
|
|
18815
|
+
value: row height depends on density, font size and zoom, and a small error
|
|
18816
|
+
adds up over many rows to a scrollbar that lies.
|
|
18970
18817
|
|
|
18971
18818
|
```ts
|
|
18972
18819
|
function useVirtual(count: number, options: VirtualOptions): VirtualRows;
|
|
18973
18820
|
```
|
|
18974
18821
|
|
|
18822
|
+
Used on [Benchmark](#/benchmark).
|
|
18823
|
+
|
|
18975
18824
|
##### `useWording`
|
|
18976
18825
|
|
|
18977
18826
|
Only the wording.
|
|
@@ -19044,9 +18893,7 @@ severe ones the one with the greatest excess. A warning must not hide an
|
|
|
19044
18893
|
alarm, even where the value lies further beyond the warning.
|
|
19045
18894
|
|
|
19046
18895
|
No hysteresis: that would need the previous state, and a function of a
|
|
19047
|
-
single value has none.
|
|
19048
|
-
duplicate; the trailing of an alarm belongs to its lifecycle and not to a
|
|
19049
|
-
bound.
|
|
18896
|
+
single value has none.
|
|
19050
18897
|
|
|
19051
18898
|
```ts
|
|
19052
18899
|
function assess(value: number | null | undefined, set?: LimitSet): Assessment;
|
|
@@ -19070,50 +18917,16 @@ is then enough.
|
|
|
19070
18917
|
function cadence(ages: FreshnessAges): number;
|
|
19071
18918
|
```
|
|
19072
18919
|
|
|
19073
|
-
##### `clampedHeight`
|
|
19074
|
-
|
|
19075
|
-
The height the field is allowed to take on. Without an upper bound it
|
|
19076
|
-
grows with its content; with one, up to that many rows and then no
|
|
19077
|
-
further.
|
|
19078
|
-
|
|
19079
|
-
A line height of 0 is treated as "not measurable yet" (the font has not
|
|
19080
|
-
been loaded), because otherwise the field visibly collapsed while
|
|
19081
|
-
loading.
|
|
19082
|
-
|
|
19083
|
-
```ts
|
|
19084
|
-
const clampedHeight: (measured: number, lineHeight: number, maxRows: number | undefined) => number;
|
|
19085
|
-
```
|
|
19086
|
-
|
|
19087
|
-
##### `collapse`
|
|
19088
|
-
|
|
19089
|
-
Closes a branch. Returns the same snapshot where it is closed already.
|
|
19090
|
-
|
|
19091
|
-
```ts
|
|
19092
|
-
function collapse<S extends Key>(snapshot: TreeSnapshot<S>, key: S): TreeSnapshot<S>;
|
|
19093
|
-
```
|
|
19094
|
-
|
|
19095
|
-
Used on [Scenarios](#/), [Meter](#/meter) and [Sparkline](#/sparkline).
|
|
19096
|
-
|
|
19097
18920
|
##### `duplicateKey`
|
|
19098
18921
|
|
|
19099
18922
|
The first key that occurs twice, otherwise null. Two nodes with the same
|
|
19100
|
-
key break the cascade and the active node silently -
|
|
18923
|
+
key break the cascade and the active node silently - [`useTree`](#/api/useTree) reports
|
|
19101
18924
|
that during development.
|
|
19102
18925
|
|
|
19103
18926
|
```ts
|
|
19104
18927
|
function duplicateKey<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>): S | null;
|
|
19105
18928
|
```
|
|
19106
18929
|
|
|
19107
|
-
##### `expand`
|
|
19108
|
-
|
|
19109
|
-
Opens a branch. Returns the same snapshot where it is open already.
|
|
19110
|
-
|
|
19111
|
-
```ts
|
|
19112
|
-
function expand<S extends Key>(snapshot: TreeSnapshot<S>, key: S): TreeSnapshot<S>;
|
|
19113
|
-
```
|
|
19114
|
-
|
|
19115
|
-
Used on [TreeView](#/treeview).
|
|
19116
|
-
|
|
19117
18930
|
##### `freshness`
|
|
19118
18931
|
|
|
19119
18932
|
The freshness of a value: its as-of time, measured against a reference time,
|
|
@@ -19134,50 +18947,14 @@ function freshness(asOf: Instant, now: Instant, ages: FreshnessAges): Freshness;
|
|
|
19134
18947
|
|
|
19135
18948
|
Used on [Scenarios](#/) and [Stat](#/stat).
|
|
19136
18949
|
|
|
19137
|
-
##### `keysBetween`
|
|
19138
|
-
|
|
19139
|
-
The checkable keys between two visible nodes, both ends included and
|
|
19140
|
-
independent of their order. Whatever may not be checked drops out: the
|
|
19141
|
-
gesture does what it can instead of nothing.
|
|
19142
|
-
|
|
19143
|
-
```ts
|
|
19144
|
-
function keysBetween<K, S extends Key = string>(flattening: readonly FlatteningEntry<K, S>[], from: S, to: S): S[];
|
|
19145
|
-
```
|
|
19146
|
-
|
|
19147
18950
|
##### `mergeLanguage`
|
|
19148
18951
|
|
|
19149
18952
|
Builds a complete instance from the default and a partial value.
|
|
19150
18953
|
|
|
19151
18954
|
```ts
|
|
19152
|
-
function mergeLanguage(
|
|
19153
|
-
```
|
|
19154
|
-
|
|
19155
|
-
##### `move`
|
|
19156
|
-
|
|
19157
|
-
Move the active node.
|
|
19158
|
-
|
|
19159
|
-
`in` and `out` have two meanings each, and that is intended: one key goes
|
|
19160
|
-
deeper, no matter whether something has to be opened for it first. Doing
|
|
19161
|
-
both at once - opening *and* stepping inside - makes the tree impossible to
|
|
19162
|
-
inspect without expanding it.
|
|
19163
|
-
|
|
19164
|
-
```ts
|
|
19165
|
-
function move<K, S extends Key = string>(flattening: readonly FlatteningEntry<K, S>[], snapshot: TreeSnapshot<S>, direction: Direction): TreeSnapshot<S>;
|
|
19166
|
-
```
|
|
19167
|
-
|
|
19168
|
-
Used on [Scenarios](#/), [Alert](#/alert) and [Stat](#/stat).
|
|
19169
|
-
|
|
19170
|
-
##### `pathTo`
|
|
19171
|
-
|
|
19172
|
-
The keys from the root down to the target, the target included; null if
|
|
19173
|
-
the key does not exist in the data.
|
|
19174
|
-
|
|
19175
|
-
```ts
|
|
19176
|
-
function pathTo<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, key: S): S[] | null;
|
|
18955
|
+
function mergeLanguage(options: LanguageOptions | undefined): Language;
|
|
19177
18956
|
```
|
|
19178
18957
|
|
|
19179
|
-
Used on [Breadcrumb](#/breadcrumb).
|
|
19180
|
-
|
|
19181
18958
|
##### `rangeDays`
|
|
19182
18959
|
|
|
19183
18960
|
The number of days in the range, both ends included. It is calculated on day
|
|
@@ -19190,46 +18967,12 @@ const rangeDays: (from: Date, to: Date) => number;
|
|
|
19190
18967
|
|
|
19191
18968
|
Used on [DateRangePicker](#/daterangepicker).
|
|
19192
18969
|
|
|
19193
|
-
##### `remainingChars`
|
|
19194
|
-
|
|
19195
|
-
How many characters still fit. Without a limit there is nothing to
|
|
19196
|
-
report. Counts the way the browser counts (UTF-16 units, an emoji is
|
|
19197
|
-
two), so that the display and `maxLength` say the same thing.
|
|
19198
|
-
|
|
19199
|
-
Negative is allowed and intended: a value set from outside does not know
|
|
19200
|
-
`maxLength`, and then the display is meant to show that.
|
|
19201
|
-
|
|
19202
|
-
```ts
|
|
19203
|
-
const remainingChars: (value: string, maxLength: number | undefined) => number | undefined;
|
|
19204
|
-
```
|
|
19205
|
-
|
|
19206
|
-
##### `revealPath`
|
|
19207
|
-
|
|
19208
|
-
Expands along a path as far as the data reaches, and reports the deepest
|
|
19209
|
-
key it got to.
|
|
19210
|
-
|
|
19211
|
-
The path is handed over and not searched for: a deep link knows it, the
|
|
19212
|
-
data does not know it yet. If the run gets stuck at an unloaded branch,
|
|
19213
|
-
that branch's key is the answer - and because it is expanded in the
|
|
19214
|
-
process, it triggers the loading at the same time. The caller loads and
|
|
19215
|
-
calls again; the same loop it already has for expanding anyway.
|
|
19216
|
-
|
|
19217
|
-
The target itself is not expanded: it is meant to be shown, not opened.
|
|
19218
|
-
|
|
19219
|
-
```ts
|
|
19220
|
-
function revealPath<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>, path: readonly S[]): {
|
|
19221
|
-
snapshot: TreeSnapshot<S>;
|
|
19222
|
-
reached: S | null;
|
|
19223
|
-
};
|
|
19224
|
-
```
|
|
19225
|
-
|
|
19226
18970
|
##### `scrollForRow`
|
|
19227
18971
|
|
|
19228
18972
|
The scroll position at which a row is visible - or null where it already is.
|
|
19229
18973
|
|
|
19230
|
-
This is the arithmetic the keyboard handling hangs on
|
|
19231
|
-
moves into a row that is not rendered
|
|
19232
|
-
virtualised table that cannot do this is worse than a paged one.
|
|
18974
|
+
This is the arithmetic the keyboard handling hangs on: without it the focus
|
|
18975
|
+
moves into a row that is not rendered.
|
|
19233
18976
|
|
|
19234
18977
|
The sticky header counts against the upper edge: a row standing exactly at
|
|
19235
18978
|
`scrollTop` lies behind it.
|
|
@@ -19243,71 +18986,14 @@ function scrollForRow(index: number, { rowHeight, scrollTop, viewportHeight, hea
|
|
|
19243
18986
|
The separators a set of formats writes, read off the formats themselves.
|
|
19244
18987
|
|
|
19245
18988
|
A field that formats a number must be able to read its own output back, and
|
|
19246
|
-
an application may have replaced `number` with anything
|
|
19247
|
-
|
|
19248
|
-
|
|
19249
|
-
decimal place, digits struck out, and what remains is the notation's own
|
|
19250
|
-
punctuation.
|
|
18989
|
+
an application may have replaced `number` with anything. So the
|
|
18990
|
+
separators are measured: one number with one decimal place, digits struck
|
|
18991
|
+
out, and what remains is the notation's own punctuation.
|
|
19251
18992
|
|
|
19252
18993
|
```ts
|
|
19253
18994
|
function separatorsOf(formats: Formats): Separators;
|
|
19254
18995
|
```
|
|
19255
18996
|
|
|
19256
|
-
##### `setActive`
|
|
19257
|
-
|
|
19258
|
-
Sets the active node; `null` for none. Returns the same snapshot where
|
|
19259
|
-
nothing changes.
|
|
19260
|
-
|
|
19261
|
-
```ts
|
|
19262
|
-
function setActive<S extends Key>(snapshot: TreeSnapshot<S>, key: S | null): TreeSnapshot<S>;
|
|
19263
|
-
```
|
|
19264
|
-
|
|
19265
|
-
##### `setAnchor`
|
|
19266
|
-
|
|
19267
|
-
Sets the node a range selection spans from; `null` for none. Returns the
|
|
19268
|
-
same snapshot where nothing changes.
|
|
19269
|
-
|
|
19270
|
-
```ts
|
|
19271
|
-
function setAnchor<S extends Key>(snapshot: TreeSnapshot<S>, key: S | null): TreeSnapshot<S>;
|
|
19272
|
-
```
|
|
19273
|
-
|
|
19274
|
-
##### `setChecked`
|
|
19275
|
-
|
|
19276
|
-
Sets a set of nodes to checked or unchecked - and does not toggle.
|
|
19277
|
-
|
|
19278
|
-
That is the decision which separates a range from a sequence of single
|
|
19279
|
-
clicks: if it contains a branch *and* one of its children, a sequence of
|
|
19280
|
-
toggles would touch the child twice and uncheck it again. Every target is
|
|
19281
|
-
set together with its descendants; afterwards all ancestors of the targets
|
|
19282
|
-
are reconciled, from the bottom up - and only those.
|
|
19283
|
-
|
|
19284
|
-
```ts
|
|
19285
|
-
function setChecked<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>, targets: readonly S[], on: boolean): TreeSnapshot<S>;
|
|
19286
|
-
```
|
|
19287
|
-
|
|
19288
|
-
Used on [TreeView](#/treeview).
|
|
19289
|
-
|
|
19290
|
-
##### `toggleAll`
|
|
19291
|
-
|
|
19292
|
-
Everything checkable on - or empty, if everything is on already.
|
|
19293
|
-
|
|
19294
|
-
```ts
|
|
19295
|
-
function toggleAll<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>): TreeSnapshot<S>;
|
|
19296
|
-
```
|
|
19297
|
-
|
|
19298
|
-
##### `toggleCheck`
|
|
19299
|
-
|
|
19300
|
-
Toggle a check: cascade downwards, reconcile upwards.
|
|
19301
|
-
|
|
19302
|
-
A single check is a range of one target - which is why the arithmetic
|
|
19303
|
-
stands there only once, and the direction comes from the same definition of
|
|
19304
|
-
"full" as in toggleAll. If the node is not checkable or does not exist, the
|
|
19305
|
-
snapshot stays unchanged.
|
|
19306
|
-
|
|
19307
|
-
```ts
|
|
19308
|
-
function toggleCheck<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>, key: S): TreeSnapshot<S>;
|
|
19309
|
-
```
|
|
19310
|
-
|
|
19311
18997
|
##### `treeModel`
|
|
19312
18998
|
|
|
19313
18999
|
The visible nodes in reading order.
|
|
@@ -19324,23 +19010,6 @@ actually expanded.
|
|
|
19324
19010
|
function treeModel<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>): readonly FlatteningEntry<K, S>[];
|
|
19325
19011
|
```
|
|
19326
19012
|
|
|
19327
|
-
##### `typeaheadTarget`
|
|
19328
|
-
|
|
19329
|
-
The next visible node whose label starts like this - or null.
|
|
19330
|
-
|
|
19331
|
-
A single letter searches **behind** the active node, so that the same
|
|
19332
|
-
letter pressed twice jumps onwards instead of finding the same node again.
|
|
19333
|
-
Several letters search **from** the active node, so that refining does not
|
|
19334
|
-
jump onwards. Both are intended and are the reason why the length of the
|
|
19335
|
-
prefix matters here.
|
|
19336
|
-
|
|
19337
|
-
At the end it wraps around. Disabled and unloaded nodes are valid targets:
|
|
19338
|
-
typeahead moves only the focus, and both are navigable.
|
|
19339
|
-
|
|
19340
|
-
```ts
|
|
19341
|
-
function typeaheadTarget<K, S extends Key = string>(flattening: readonly FlatteningEntry<K, S>[], prefix: string, active: S | null): S | null;
|
|
19342
|
-
```
|
|
19343
|
-
|
|
19344
19013
|
##### `verdictWeight`
|
|
19345
19014
|
|
|
19346
19015
|
How heavily a verdict weighs - for sorting and comparing, as when a matrix
|
|
@@ -19452,7 +19121,7 @@ The verdict and what led to it.
|
|
|
19452
19121
|
| `verdict` *required* | [`Verdict`](#type-Verdict)<br>`"ok" \| "unknown" \| "warning" \| "alarm"` | — | |
|
|
19453
19122
|
| `limit` | [`Limit`](#type-Limit) | — | The violated limit - the same object the caller passed in. Absent where none is violated. |
|
|
19454
19123
|
| `excess` | `number` | — | The amount beyond the bound, always positive. Absent where none is violated. |
|
|
19455
|
-
| `deviation` | `number` | — | The signed distance from the target. Absent where none is set: no target means no deviation, not a deviation of zero.
|
|
19124
|
+
| `deviation` | `number` | — | The signed distance from the target. Absent where none is set: no target means no deviation, not a deviation of zero. |
|
|
19456
19125
|
|
|
19457
19126
|
##### `BadgeProps`
|
|
19458
19127
|
|
|
@@ -19614,27 +19283,6 @@ type Direction = "up" | "down" | "in" | "out" | "start" | "end";
|
|
|
19614
19283
|
|
|
19615
19284
|
Its table stands on [Divider](#/divider/type-DividerProps).
|
|
19616
19285
|
|
|
19617
|
-
##### `DockPlace`
|
|
19618
|
-
|
|
19619
|
-
The outside of the resting place: one of the four edges of the host.
|
|
19620
|
-
There is no fifth and no corner.
|
|
19621
|
-
|
|
19622
|
-
```ts
|
|
19623
|
-
type DockPlace = "top" | "right" | "bottom" | "left";
|
|
19624
|
-
```
|
|
19625
|
-
|
|
19626
|
-
Used on [Dock](#/dock).
|
|
19627
|
-
|
|
19628
|
-
##### `DockProps`
|
|
19629
|
-
|
|
19630
|
-
Its table stands on [Dock](#/dock/type-DockProps).
|
|
19631
|
-
|
|
19632
|
-
##### `DockTool`
|
|
19633
|
-
|
|
19634
|
-
Its table stands on [Dock](#/dock/type-DockTool).
|
|
19635
|
-
|
|
19636
|
-
Used on [Dock](#/dock).
|
|
19637
|
-
|
|
19638
19286
|
##### `DrawerProps`
|
|
19639
19287
|
|
|
19640
19288
|
Its table stands on [Drawer](#/drawer/type-DrawerProps).
|
|
@@ -19655,7 +19303,7 @@ among its siblings.
|
|
|
19655
19303
|
|
|
19656
19304
|
| Prop | Type | Default | Description |
|
|
19657
19305
|
|---|---|---|---|
|
|
19658
|
-
| `node` *required* | `K` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and
|
|
19306
|
+
| `node` *required* | `K` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and 5 more |
|
|
19659
19307
|
| `key` *required* | `S` | — | |
|
|
19660
19308
|
| `level` *required* | `number` | — | Roots stand at 0. Drives the indentation and what is read out. |
|
|
19661
19309
|
| `label` *required* | `string` | — | The node's text; here, so that typeahead can be a pure function over the flattening and needs no reader. |
|
|
@@ -19738,7 +19386,8 @@ The props of a glyph: an SVG's attributes and its edge length.
|
|
|
19738
19386
|
|
|
19739
19387
|
| Prop | Type | Default | Description |
|
|
19740
19388
|
|---|---|---|---|
|
|
19741
|
-
| `size` | `number` | `12` | Edge length in pixels. The default is the size the glyph is
|
|
19389
|
+
| `size` | `number` | `12` | Edge length in pixels. The default is the size the glyph is drawn at in the components. |
|
|
19390
|
+
| `ref` | `Ref<SVGSVGElement>` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
19742
19391
|
|
|
19743
19392
|
Also takes every attribute of `<svg>` – without `children`, `viewBox`.
|
|
19744
19393
|
|
|
@@ -19807,8 +19456,7 @@ A bound: a value, a side, a severity.
|
|
|
19807
19456
|
|
|
19808
19457
|
No tolerance band as input. A band is derived - two limits of equal
|
|
19809
19458
|
severity on opposite sides enclose one - and as an input type it would
|
|
19810
|
-
force a `null` on one edge in the one-sided case.
|
|
19811
|
-
case, not the exception.
|
|
19459
|
+
force a `null` on one edge in the one-sided case.
|
|
19812
19460
|
|
|
19813
19461
|
| Prop | Type | Default | Description |
|
|
19814
19462
|
|---|---|---|---|
|
|
@@ -19821,8 +19469,7 @@ case, not the exception.
|
|
|
19821
19469
|
The set a value is read against.
|
|
19822
19470
|
|
|
19823
19471
|
The target stands beside the limits and is not one: it is missed, never
|
|
19824
|
-
violated, and it is never the edge of a region.
|
|
19825
|
-
tile turns red for being above target.
|
|
19472
|
+
violated, and it is never the edge of a region.
|
|
19826
19473
|
|
|
19827
19474
|
| Prop | Type | Default | Description |
|
|
19828
19475
|
|---|---|---|---|
|
|
@@ -19892,14 +19539,14 @@ thereby stays entirely the caller's.
|
|
|
19892
19539
|
|
|
19893
19540
|
| Prop | Type | Default | Description |
|
|
19894
19541
|
|---|---|---|---|
|
|
19895
|
-
| `key` *required* | `(node: K) => S` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and
|
|
19896
|
-
| `children` *required* | `(node: K) => readonly K[] \| undefined` | — | `undefined` means leaf, an empty list means empty branch - the difference is visible and intended.<br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and
|
|
19897
|
-
| `label` *required* | `(node: K) => string` | — | Text the search checks against.<br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and
|
|
19542
|
+
| `key` *required* | `(node: K) => S` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and 5 more |
|
|
19543
|
+
| `children` *required* | `(node: K) => readonly K[] \| undefined` | — | `undefined` means leaf, an empty list means empty branch - the difference is visible and intended.<br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and 5 more |
|
|
19544
|
+
| `label` *required* | `(node: K) => string` | — | Text the search checks against.<br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and 5 more |
|
|
19898
19545
|
| `disabled` | `(node: K) => boolean` | — | May this node be checked? Without an answer: everyone may. Disabled is a statement about the checkbox, not about the node - it stays navigable ([ADR-0005](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0005-what-cannot-be-checked.md)).<br>Shown in: [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal) |
|
|
19899
|
-
| `unloaded` | `(node: K) => boolean` | — | Can this branch have children that are not present? Without an answer: no
|
|
19546
|
+
| `unloaded` | `(node: K) => boolean` | — | Can this branch have children that are not present? Without an answer: no.<br>Shown in: [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand), [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal) |
|
|
19900
19547
|
| `matches` | `(node: K) => boolean` | — | Does this node match? Given, it filters instead of the search text, which is then not read - a table matches by its columns and filters, not by one label. The path rule stays the same. |
|
|
19901
19548
|
|
|
19902
|
-
Used on [Scenarios](#/)
|
|
19549
|
+
Used on [Scenarios](#/), [TreeView](#/treeview) and [Benchmark](#/benchmark).
|
|
19903
19550
|
|
|
19904
19551
|
##### `NumberInputProps`
|
|
19905
19552
|
|
|
@@ -19946,6 +19593,14 @@ the moment of the click.
|
|
|
19946
19593
|
| `label` *required* | `string` | — | <br>Shown in: [Presets (DateRangePicker)](#/daterangepicker/presets) |
|
|
19947
19594
|
| `range` *required* | `() => `[`DateRange`](#type-DateRange) | — | <br>Shown in: [Presets (DateRangePicker)](#/daterangepicker/presets) |
|
|
19948
19595
|
|
|
19596
|
+
##### `RefProp<E extends Element>`
|
|
19597
|
+
|
|
19598
|
+
The `ref` of a component: the element it renders at its root.
|
|
19599
|
+
|
|
19600
|
+
| Prop | Type | Default | Description |
|
|
19601
|
+
|---|---|---|---|
|
|
19602
|
+
| `ref` | `Ref<E>` | — | Receives the component's root element.<br>Shown in: [A row that holds still (Sizes)](#/sizes/a-row-that-holds-still), [An anchored surface (Popover)](#/popover/anchored-surface), [Take the width of the trigger (Popover)](#/popover/width-from-anchor) and 2 more |
|
|
19603
|
+
|
|
19949
19604
|
##### `RowPlacement`
|
|
19950
19605
|
|
|
19951
19606
|
What `scrollForRow` needs to know about a scroll area.
|
|
@@ -19993,8 +19648,7 @@ The two characters a notation separates with.
|
|
|
19993
19648
|
##### `Severity`
|
|
19994
19649
|
|
|
19995
19650
|
How seriously a violation weighs: one severity that advises and one that
|
|
19996
|
-
calls for action. Exactly two
|
|
19997
|
-
the screen, and five colours are noise. For a third distinction one sets a
|
|
19651
|
+
calls for action. Exactly two; for a third distinction one sets a
|
|
19998
19652
|
second limit.
|
|
19999
19653
|
|
|
20000
19654
|
```ts
|
|
@@ -20228,16 +19882,16 @@ either uncontrolled (`default…`) or controlled with its `on…` handler.
|
|
|
20228
19882
|
|
|
20229
19883
|
| Prop | Type | Default | Description |
|
|
20230
19884
|
|---|---|---|---|
|
|
20231
|
-
| `reader` *required* | [`NodeReader`](#type-NodeReader)`<K, S>` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and
|
|
20232
|
-
| `defaultExpanded` | `Iterable<S>` | — | Initial values, where the tree holds its own state.<br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [With an error (TreeView)](#/treeview/with-an-error) and
|
|
19885
|
+
| `reader` *required* | [`NodeReader`](#type-NodeReader)`<K, S>` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [Load branches on demand (TreeView)](#/treeview/load-branches-on-demand) and 5 more |
|
|
19886
|
+
| `defaultExpanded` | `Iterable<S>` | — | Initial values, where the tree holds its own state.<br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Tick a selection (TreeView)](#/treeview/tick-a-selection), [With an error (TreeView)](#/treeview/with-an-error) and 3 more |
|
|
20233
19887
|
| `expanded` | `ReadonlySet<S>` | — | Controlled from outside; where set, it wins over the tree's own state. |
|
|
20234
19888
|
| `defaultChecked` | `Iterable<S>` | — | |
|
|
20235
19889
|
| `checked` | `ReadonlySet<S>` | — | <br>Shown in: [Tick a selection (TreeView)](#/treeview/tick-a-selection), [With an error (TreeView)](#/treeview/with-an-error), [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal) |
|
|
20236
|
-
| `defaultActive` | `S \| null` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal) |
|
|
19890
|
+
| `defaultActive` | `S \| null` | — | <br>Shown in: [A tree (TreeView)](#/treeview/a-tree), [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal), [Measure a large tree (Benchmark)](#/benchmark/benchmark) |
|
|
20237
19891
|
| `active` | `S \| null` | — | <br>Shown in: [Dispatch a tour (Scenarios)](#/scenarios/dispatch-a-tour) |
|
|
20238
19892
|
| `anchor` | `S \| null` | — | Where a range gesture spans from. Steerable from outside like the other four values, so that a range is repeatable. |
|
|
20239
19893
|
| `search` | `string` | — | <br>Shown in: [Search with the path (TreeView)](#/treeview/search-with-the-path), [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal) |
|
|
20240
|
-
| `virtual` | [`VirtualOptions`](#type-VirtualOptions) | — | Render only what stands in the scroll area.
|
|
19894
|
+
| `virtual` | [`VirtualOptions`](#type-VirtualOptions) | — | Render only what stands in the scroll area. Optional: without it every row is rendered and no row height is needed.<br>Shown in: [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal), [Measure a large tree (Benchmark)](#/benchmark/benchmark) |
|
|
20241
19895
|
|
|
20242
19896
|
###### Events
|
|
20243
19897
|
|
|
@@ -20295,9 +19949,8 @@ Used on [UmrissProvider](#/umrissprovider).
|
|
|
20295
19949
|
What a value is. Four outcomes, ordered by severity, `unknown` between
|
|
20296
19950
|
`ok` and `warning`: a value nobody has is a reason to look.
|
|
20297
19951
|
|
|
20298
|
-
The fourth outcome is not a `null
|
|
20299
|
-
call site
|
|
20300
|
-
against: a dead data source would look like a healthy service.
|
|
19952
|
+
The fourth outcome is not a `null`, which would invite `?? "ok"` at the
|
|
19953
|
+
call site: a dead data source would look like a healthy service.
|
|
20301
19954
|
|
|
20302
19955
|
```ts
|
|
20303
19956
|
type Verdict = "ok" | "unknown" | "warning" | "alarm";
|
|
@@ -20309,7 +19962,7 @@ The options of `useVirtual`.
|
|
|
20309
19962
|
|
|
20310
19963
|
| Prop | Type | Default | Description |
|
|
20311
19964
|
|---|---|---|---|
|
|
20312
|
-
| `rowHeight` *required* | `number` | — | Expected row height in pixels. It is re-measured on a real row after the first render; the value given is the starting point, so that the first window is not empty.<br>Shown in: [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal) |
|
|
19965
|
+
| `rowHeight` *required* | `number` | — | Expected row height in pixels. It is re-measured on a real row after the first render; the value given is the starting point, so that the first window is not empty.<br>Shown in: [Search, check and reveal in a large tree (TreeView)](#/treeview/search-check-and-reveal), [Measure a large tree (Benchmark)](#/benchmark/benchmark) |
|
|
20313
19966
|
| `overscan` | `number` | `4` | Rows above and below the visible area. |
|
|
20314
19967
|
|
|
20315
19968
|
##### `VirtualRows`
|
|
@@ -20390,11 +20043,6 @@ Everything the library puts out as text.
|
|
|
20390
20043
|
| `paletteHintChoose` *required* | `string` | — | |
|
|
20391
20044
|
| `paletteHintClose` *required* | `string` | — | |
|
|
20392
20045
|
| `paletteKeyEsc` *required* | `string` | — | The legend on the Escape key. The arrows and the return key are glyphs and therefore do not stand here; "Esc" is a word and is called something else elsewhere. |
|
|
20393
|
-
| `dockTools` *required* | `string` | — | Accessible name of a dock's tools. |
|
|
20394
|
-
| `dockGrip` *required* | `string` | — | Accessible name of the grip - it says what it does, not what it is. |
|
|
20395
|
-
| `dockPlace` *required* | `(place: "top" \| "right" \| "bottom" \| "left") => string` | — | The four resting places, named. The keys are the `DockPlace` type's, and a register translates them: the German one answers "oben" where the English one answers "top". |
|
|
20396
|
-
| `dockPlaced` *required* | `(place: string) => string` | — | What the screen reader hears once the dock has taken a place. |
|
|
20397
|
-
| `dockNoPlace` *required* | `(place: string) => string` | — | And what it hears when a place has refused. A refusal is not a fault: a wide, flat host with no room for a standing dock is not a mistake anyone made. |
|
|
20398
20046
|
| `datePlaceholder` *required* | `string` | — | |
|
|
20399
20047
|
| `datePanel` *required* | `string` | — | Accessible name of the panel. Deliberately kept apart from the placeholder: whoever labels the field differently does not thereby rename the dialog. |
|
|
20400
20048
|
| `dateClear` *required* | `string` | — | |
|
|
@@ -20551,42 +20199,6 @@ Everything the library puts out as text.
|
|
|
20551
20199
|
| `freshnessStale` *required* | `string` | — | |
|
|
20552
20200
|
| `freshnessDisconnected` *required* | `string` | — | |
|
|
20553
20201
|
| `asOfAgo` *required* | `(duration: string) => string` | — | "As of: 3 minutes ago", where the duration comes from the formats. |
|
|
20554
|
-
| `asOfUnknown` *required* | `string` | — | |
|
|
20555
|
-
| `alarms` *required* | `string` | — | |
|
|
20556
|
-
| `noAlarms` *required* | `string` | — | |
|
|
20557
|
-
| `noAlarmsDisconnected` *required* | `string` | — | Empty, but the line is down - that is something other than quiet. |
|
|
20558
|
-
| `acknowledgeAlarm` *required* | `string` | — | |
|
|
20559
|
-
| `acknowledgeAlarms` *required* | `(count: number) => string` | — | Bulk acknowledgement; the number stands in the text on purpose. |
|
|
20560
|
-
| `snoozeAlarm` *required* | `string` | — | The alarm list's snooze menu, beside "Acknowledge": the word on its button, and the sentence with the number of alarms it acts on. |
|
|
20561
|
-
| `snoozeAlarms` *required* | `(count: number) => string` | — | |
|
|
20562
|
-
| `snoozeDuration` *required* | `string` | — | The labels in the panel that opens with `snoozeReason`: the duration to choose and the reason to give. The panel's own button is `snoozeAlarm`. |
|
|
20563
|
-
| `snoozeReason` *required* | `string` | — | |
|
|
20564
|
-
| `unsnoozeAlarm` *required* | `string` | — | Ends the snooze of the ticked alarms before its time. |
|
|
20565
|
-
| `unsnoozeAlarms` *required* | `(count: number) => string` | — | |
|
|
20566
|
-
| `priorityHigh` *required* | `string` | — | |
|
|
20567
|
-
| `priorityMedium` *required* | `string` | — | |
|
|
20568
|
-
| `priorityLow` *required* | `string` | — | |
|
|
20569
|
-
| `lifecycleActiveUnacknowledged` *required* | `string` | — | The four lifecycle states, written out. |
|
|
20570
|
-
| `lifecycleActiveAcknowledged` *required* | `string` | — | |
|
|
20571
|
-
| `lifecycleResolvedUnacknowledged` *required* | `string` | — | |
|
|
20572
|
-
| `lifecycleResolvedAcknowledged` *required* | `string` | — | |
|
|
20573
|
-
| `floodHint` *required* | `(count: number) => string` | — | "Alarm flood: 12 in quick succession" - a flood is marked, never suppressed. |
|
|
20574
|
-
| `chatterHint` *required* | `(count: number) => string` | — | "40×" on a chattering alarm type. |
|
|
20575
|
-
| `activeUnacknowledged` *required* | `(count: number) => string` | — | The text of the live region: the number of active unacknowledged alarms. |
|
|
20576
|
-
| `columnAlarm` *required* | `string` | — | |
|
|
20577
|
-
| `columnLifecycleState` *required* | `string` | — | |
|
|
20578
|
-
| `columnPriority` *required* | `string` | — | |
|
|
20579
|
-
| `columnRaised` *required* | `string` | — | |
|
|
20580
|
-
| `columnDuration` *required* | `string` | — | |
|
|
20581
|
-
| `columnFrequency` *required* | `string` | — | |
|
|
20582
|
-
| `columnAcknowledgement` *required* | `string` | — | The two columns of the alarm model the list does not show, but which do land in the column menu and the CSV header (`alarmColumns`). |
|
|
20583
|
-
| `columnAge` *required* | `string` | — | |
|
|
20584
|
-
| `availabilitySnoozed` *required* | `(until: string, by: string, reason?: string) => string` | — | The availability of an alarm (ISA-18.2's special states), written out. A snooze names its end and who snoozed it - a snooze is tracked, not anonymous; the time comes from the formats. The reason, when the snooze has one, comes last and is optional: a wording of two parameters fits. |
|
|
20585
|
-
| `availabilitySnoozedShort` *required* | `string` | — | A snooze as one word - the alarm list's badge; the sentence above stands in its tooltip and in what is spoken. |
|
|
20586
|
-
| `availabilitySuppressed` *required* | `string` | — | |
|
|
20587
|
-
| `availabilityDisabled` *required* | `string` | — | |
|
|
20588
|
-
| `hiddenAlarms` *required* | `(count: number) => string` | — | "Hidden: 3" - the count of the view of snoozed, suppressed and disabled alarms, and its name where the list offers the view as a switch. |
|
|
20589
|
-
| `columnAvailability` *required* | `string` | — | The availability column of the alarm model: the column menu and the CSV header, like the two above. |
|
|
20590
20202
|
| `close` *required* | `string` | — | |
|
|
20591
20203
|
| `closeToast` *required* | `string` | — | |
|
|
20592
20204
|
| `toastDeckCount` *required* | `(count: number) => string` | — | The count on the front toast of a closed deck; pressing it shows them all. |
|