@umriss-ui/core 0.42.0 → 0.44.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 +40 -0
- package/README.md +38 -23
- package/dist/core.css +1 -1
- package/dist/core.js +2845 -2725
- package/dist/de.d.ts +23 -0
- package/dist/formats-BccAYWgq.js +80 -0
- package/dist/index.d.ts +162 -25
- package/dist/wording/de.js +9 -1
- package/docs/llms-full.md +640 -173
- package/package.json +1 -1
- package/dist/formats-BdlPZDzb.js +0 -63
package/docs/llms-full.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @umriss-ui/core 0.
|
|
1
|
+
# @umriss-ui/core 0.44.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
|
|
|
@@ -367,7 +367,7 @@ function Content() {
|
|
|
367
367
|
<Card data-callout="3">
|
|
368
368
|
<CardHeader title="p95 latency since 08:00" />
|
|
369
369
|
<CardBody>
|
|
370
|
-
<Chart height={200}
|
|
370
|
+
<Chart height={200} aria-label={`${SERVICE.name}, p95 latency since 08:00`}>
|
|
371
371
|
<XAxis value="t" time />
|
|
372
372
|
<YAxis domain={[0, 700]} label="ms" />
|
|
373
373
|
<LimitLine value={SERVICE.latencySlo} severity="alarm" label="Objective" />
|
|
@@ -385,7 +385,7 @@ function Content() {
|
|
|
385
385
|
<TabPanel value="alerts">
|
|
386
386
|
<div data-callout="4">
|
|
387
387
|
<Stack gap={2}>
|
|
388
|
-
<Table selectable
|
|
388
|
+
<Table selectable aria-label="Alerts of the incident">
|
|
389
389
|
<Column value="raised" label="Raised">
|
|
390
390
|
{(raised) => time(raised)}
|
|
391
391
|
</Column>
|
|
@@ -762,7 +762,7 @@ function Content() {
|
|
|
762
762
|
<CardHeader title="Fleet" />
|
|
763
763
|
<CardBody>
|
|
764
764
|
<div data-callout="1">
|
|
765
|
-
<TreeView tree={tree}
|
|
765
|
+
<TreeView tree={tree} aria-label="Depots and vehicles">
|
|
766
766
|
{(entry) => entry.node.name}
|
|
767
767
|
</TreeView>
|
|
768
768
|
</div>
|
|
@@ -2223,7 +2223,7 @@ export default function ControlRoom() {
|
|
|
2223
2223
|
</Region>
|
|
2224
2224
|
|
|
2225
2225
|
<Region id="room-trend" title="Kiln trend" callout="3">
|
|
2226
|
-
<kilnTrend.Chart height={240}
|
|
2226
|
+
<kilnTrend.Chart height={240} aria-label="Kiln K1, zone 3, over the shift">
|
|
2227
2227
|
<kilnTrend.XAxis value="t" domain={[at(0), at(LAST)]} time />
|
|
2228
2228
|
<kilnTrend.YAxis domain={[1170, 1250]} label="°C" />
|
|
2229
2229
|
<LimitBand from={KILN.tolerance[0]} to={KILN.tolerance[1]} severity="warning" label="Tolerance" />
|
|
@@ -2236,7 +2236,7 @@ export default function ControlRoom() {
|
|
|
2236
2236
|
|
|
2237
2237
|
<Region id="room-alarms" title="Alarms" quiet callout="4">
|
|
2238
2238
|
<Stack gap={2}>
|
|
2239
|
-
<Table selectable
|
|
2239
|
+
<Table selectable aria-label="Alarms">
|
|
2240
2240
|
<Column value="raised" label="Raised">
|
|
2241
2241
|
{(raised) => clock(raised)}
|
|
2242
2242
|
</Column>
|
|
@@ -2275,7 +2275,7 @@ export default function ControlRoom() {
|
|
|
2275
2275
|
}
|
|
2276
2276
|
>
|
|
2277
2277
|
<Schedule
|
|
2278
|
-
|
|
2278
|
+
aria-label="Plan of the early shift: press, dryer and kiln"
|
|
2279
2279
|
height={196}
|
|
2280
2280
|
now={now}
|
|
2281
2281
|
selectedTask={batch}
|
|
@@ -2291,7 +2291,7 @@ export default function ControlRoom() {
|
|
|
2291
2291
|
|
|
2292
2292
|
<Grid columns={2} gap={4}>
|
|
2293
2293
|
<Region id="room-quality" title="Tile length">
|
|
2294
|
-
<tileLength.Chart
|
|
2294
|
+
<tileLength.Chart aria-label="Tile length after firing, individuals chart">
|
|
2295
2295
|
<tileLength.XAxis value="t" domain={[at(0), at(LAST)]} time />
|
|
2296
2296
|
<tileLength.YAxis domain={[597, 602]} label="mm" />
|
|
2297
2297
|
<LimitLine value={601.5} severity="alarm" label="USL" />
|
|
@@ -2371,6 +2371,271 @@ function BatchDetails({ batch, minute, onClose }: { batch: Batch; minute: number
|
|
|
2371
2371
|
}
|
|
2372
2372
|
```
|
|
2373
2373
|
|
|
2374
|
+
### Trace a batch through the shift
|
|
2375
|
+
|
|
2376
|
+
A line lead looks into one batch: choose it in the list, in the plan or in the kiln's trend, and the other two show the same batch.
|
|
2377
|
+
|
|
2378
|
+
1. Enter on a batch's name chooses it, as a click anywhere on its row does. The table marks the row it was told is current and keeps nothing itself.
|
|
2379
|
+
2. The plan selects the same batch. Choosing a bar there moves the table's mark and the band in the trend.
|
|
2380
|
+
3. The trend draws the batch's stretch as a band of its own; choosing a point of the trend (a click, or Enter on the Active point) chooses the batch that ran at that instant.
|
|
2381
|
+
4. The batch is one value in this scenario's state. Each view takes it by a prop it has and hands it back by a handler it has; no view knows the others.
|
|
2382
|
+
|
|
2383
|
+
Built from: Table, Schedule, Line, LimitLine, LimitBand.
|
|
2384
|
+
|
|
2385
|
+
```tsx
|
|
2386
|
+
import { useState } from "react";
|
|
2387
|
+
import { Card, CardBody, CardHeader, Stack, Text } from "@umriss-ui/core";
|
|
2388
|
+
import { LimitBand, LimitLine, Tooltip, useChart } from "@umriss-ui/charts";
|
|
2389
|
+
import { useTable } from "@umriss-ui/table";
|
|
2390
|
+
import { useSchedule } from "@umriss-ui/schedule";
|
|
2391
|
+
import type { Subtask, Task } from "@umriss-ui/schedule";
|
|
2392
|
+
|
|
2393
|
+
/* Data from the plant world, written out here so the example runs on its own. */
|
|
2394
|
+
|
|
2395
|
+
/** The early shift begins at 06:00 on a day of its own, so the page is the same on every run. */
|
|
2396
|
+
const START = new Date(2026, 2, 17, 6, 0).getTime();
|
|
2397
|
+
const MIN = 60_000;
|
|
2398
|
+
const at = (minute: number) => START + minute * MIN;
|
|
2399
|
+
const SHIFT_MINUTES = 480;
|
|
2400
|
+
|
|
2401
|
+
/** A batch of tiles through the kiln. */
|
|
2402
|
+
export interface Batch {
|
|
2403
|
+
id: string;
|
|
2404
|
+
name: string;
|
|
2405
|
+
product: string;
|
|
2406
|
+
tiles: number;
|
|
2407
|
+
/** Instants, in milliseconds. */
|
|
2408
|
+
from: number;
|
|
2409
|
+
to: number;
|
|
2410
|
+
}
|
|
2411
|
+
|
|
2412
|
+
const BATCHES: readonly Batch[] = [
|
|
2413
|
+
{ id: "b-4121", name: "B-4121", product: "Floor tile, grey", tiles: 280, from: at(0), to: at(75) },
|
|
2414
|
+
{ id: "b-4122", name: "B-4122", product: "Floor tile, sand", tiles: 300, from: at(80), to: at(150) },
|
|
2415
|
+
{ id: "b-4123", name: "B-4123", product: "Wall tile, white", tiles: 320, from: at(155), to: at(235) },
|
|
2416
|
+
{ id: "b-4124", name: "B-4124", product: "Floor tile, grey", tiles: 260, from: at(245), to: at(310) },
|
|
2417
|
+
{ id: "b-4125", name: "B-4125", product: "Wall tile, white", tiles: 320, from: at(315), to: at(395) },
|
|
2418
|
+
{ id: "b-4126", name: "B-4126", product: "Floor tile, sand", tiles: 300, from: at(400), to: at(475) },
|
|
2419
|
+
];
|
|
2420
|
+
|
|
2421
|
+
/** The batch that ran at the instant: both ends belong to it, a gap between two batches to none. */
|
|
2422
|
+
export function batchAt(batches: readonly Batch[], instant: number): Batch | undefined {
|
|
2423
|
+
return batches.find((batch) => batch.from <= instant && instant <= batch.to);
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2426
|
+
const clock = (instant: number) => new Date(instant).toLocaleTimeString("en-GB", { hour: "2-digit", minute: "2-digit" });
|
|
2427
|
+
|
|
2428
|
+
/** Zone 3 of the kiln every five minutes, in °C: it holds near 1200 while a batch is in and cools between batches. */
|
|
2429
|
+
const TREND = Array.from({ length: SHIFT_MINUTES / 5 }, (_, i) => {
|
|
2430
|
+
const t = at(i * 5);
|
|
2431
|
+
const loaded = batchAt(BATCHES, t) !== undefined;
|
|
2432
|
+
return { t, kiln: Math.round((loaded ? 1200 + 9 * Math.sin(i / 3) : 1176 + 4 * Math.sin(i / 2)) * 10) / 10 };
|
|
2433
|
+
});
|
|
2434
|
+
|
|
2435
|
+
const TASKS: readonly Task[] = BATCHES.map((batch) => ({ id: batch.id, name: batch.name, color: "var(--u-color-text-secondary)" }));
|
|
2436
|
+
const STEPS: readonly Subtask[] = BATCHES.map((batch) => ({ id: `${batch.id}-kiln`, task: batch.id, lane: "kiln", from: batch.from, to: batch.to }));
|
|
2437
|
+
|
|
2438
|
+
/* The key is the batch id, and only this state holds it. */
|
|
2439
|
+
export default function TraceABatch() {
|
|
2440
|
+
const [batch, setBatch] = useState<string | null>(null);
|
|
2441
|
+
const chosen = BATCHES.find((one) => one.id === batch);
|
|
2442
|
+
|
|
2443
|
+
const { Table, Column } = useTable(BATCHES, { rowKey: (b) => b.id });
|
|
2444
|
+
const { Schedule, Lane, Subtasks } = useSchedule({ initialView: { domain: [at(-10), at(SHIFT_MINUTES + 10)] } });
|
|
2445
|
+
const trend = useChart(TREND, {
|
|
2446
|
+
onSelect: (hit) => {
|
|
2447
|
+
const found = batchAt(BATCHES, hit.xValue);
|
|
2448
|
+
if (found !== undefined) setBatch(found.id);
|
|
2449
|
+
},
|
|
2450
|
+
});
|
|
2451
|
+
|
|
2452
|
+
return (
|
|
2453
|
+
<Stack gap={4}>
|
|
2454
|
+
<Text data-callout="4">{chosen === undefined ? "No batch chosen" : `Batch ${chosen.name}, ${clock(chosen.from)} to ${clock(chosen.to)}`}</Text>
|
|
2455
|
+
|
|
2456
|
+
<Card data-callout="1">
|
|
2457
|
+
<CardHeader title="Batches of the shift" />
|
|
2458
|
+
<CardBody>
|
|
2459
|
+
<Table aria-label="Batches of the early shift" currentRow={batch} onCurrentRowChange={(key) => setBatch(key)}>
|
|
2460
|
+
<Column value="name" label="Batch" rowHeader />
|
|
2461
|
+
<Column value="product" label="Product" />
|
|
2462
|
+
<Column value="tiles" label="Tiles" numeric />
|
|
2463
|
+
<Column id="kiln" label="In the kiln" value={(b) => b.from}>
|
|
2464
|
+
{(_, b) => `${clock(b.from)} - ${clock(b.to)}`}
|
|
2465
|
+
</Column>
|
|
2466
|
+
</Table>
|
|
2467
|
+
</CardBody>
|
|
2468
|
+
</Card>
|
|
2469
|
+
|
|
2470
|
+
<Card data-callout="2">
|
|
2471
|
+
<CardHeader title="Plan" />
|
|
2472
|
+
<CardBody>
|
|
2473
|
+
<Schedule
|
|
2474
|
+
aria-label="Plan of the early shift: the kiln"
|
|
2475
|
+
height={120}
|
|
2476
|
+
selectedTask={batch}
|
|
2477
|
+
onSelectedTaskChange={(task) => setBatch(task)}
|
|
2478
|
+
label={(subtask) => BATCHES.find((one) => one.id === subtask.task)?.name ?? subtask.task}
|
|
2479
|
+
>
|
|
2480
|
+
<Lane id="kiln" label="Kiln K1" />
|
|
2481
|
+
<Subtasks data={STEPS} tasks={TASKS} />
|
|
2482
|
+
</Schedule>
|
|
2483
|
+
</CardBody>
|
|
2484
|
+
</Card>
|
|
2485
|
+
|
|
2486
|
+
<Card data-callout="3">
|
|
2487
|
+
<CardHeader title="Kiln trend" />
|
|
2488
|
+
<CardBody>
|
|
2489
|
+
<trend.Chart height={240} aria-label="Kiln K1, zone 3, over the shift">
|
|
2490
|
+
<trend.XAxis value="t" domain={[at(0), at(SHIFT_MINUTES)]} time />
|
|
2491
|
+
<trend.YAxis domain={[1160, 1220]} label="°C" />
|
|
2492
|
+
<LimitLine value={1200} severity="warning" label="Target" />
|
|
2493
|
+
{chosen !== undefined && <LimitBand orientation="x" from={chosen.from} to={chosen.to} label={chosen.name} />}
|
|
2494
|
+
<trend.Line value="kiln" name="Zone 3" format={(v) => `${v.toFixed(1)} °C`} />
|
|
2495
|
+
<Tooltip mode="x" />
|
|
2496
|
+
</trend.Chart>
|
|
2497
|
+
</CardBody>
|
|
2498
|
+
</Card>
|
|
2499
|
+
</Stack>
|
|
2500
|
+
);
|
|
2501
|
+
}
|
|
2502
|
+
```
|
|
2503
|
+
|
|
2504
|
+
### Mark a stretch of the shift
|
|
2505
|
+
|
|
2506
|
+
A line lead looks at the kiln's trend over the shift, marks the stretch where it ran hot, and the table below shows the alarms of that stretch.
|
|
2507
|
+
|
|
2508
|
+
1. A drag over the trend marks a stretch, and so do Space, a walk with the arrow keys and Space again once the trend has focus. The chart reports the stretch once, when the reader lets go.
|
|
2509
|
+
2. The table shows only the alarms raised inside the stretch, both ends included.
|
|
2510
|
+
3. The count says how many of the shift's alarms the stretch holds and from when to when.
|
|
2511
|
+
4. Clear the stretch brings every alarm back. The chart and the table know nothing of each other: the stretch is one value in this scenario's state, and the band in the trend is drawn from it.
|
|
2512
|
+
|
|
2513
|
+
Built from: Line, LimitBand, Table.
|
|
2514
|
+
|
|
2515
|
+
```tsx
|
|
2516
|
+
import { useState } from "react";
|
|
2517
|
+
import { Badge, Button, Card, CardBody, CardHeader, Stack, Text } from "@umriss-ui/core";
|
|
2518
|
+
import { LimitBand, LimitLine, Tooltip, useChart } from "@umriss-ui/charts";
|
|
2519
|
+
import type { ChartRange } from "@umriss-ui/charts";
|
|
2520
|
+
import { rowFilter, useTable } from "@umriss-ui/table";
|
|
2521
|
+
|
|
2522
|
+
/* Data from the plant world, written out here so the example runs on its own. */
|
|
2523
|
+
|
|
2524
|
+
/** The early shift begins at 06:00 on a day of its own, so the page is the same on every run. */
|
|
2525
|
+
const START = new Date(2026, 2, 17, 6, 0).getTime();
|
|
2526
|
+
const MIN = 60_000;
|
|
2527
|
+
const at = (minute: number) => START + minute * MIN;
|
|
2528
|
+
const SHIFT_MINUTES = 480;
|
|
2529
|
+
|
|
2530
|
+
/** One alarm of the shift. */
|
|
2531
|
+
export interface Alarm {
|
|
2532
|
+
id: string;
|
|
2533
|
+
/** The instant it was raised, in milliseconds. */
|
|
2534
|
+
raised: number;
|
|
2535
|
+
priority: "high" | "medium" | "low";
|
|
2536
|
+
message: string;
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
const ALARMS: readonly Alarm[] = [
|
|
2540
|
+
{ id: "a-1", raised: at(12), priority: "low", message: "Dryer D1 · fan vibration high" },
|
|
2541
|
+
{ id: "a-2", raised: at(48), priority: "medium", message: "Kiln K1 · belt empty" },
|
|
2542
|
+
{ id: "a-3", raised: at(95), priority: "medium", message: "Kiln K1 · exit pyrometer sends nothing" },
|
|
2543
|
+
{ id: "a-4", raised: at(150), priority: "high", message: "Kiln K1 · zone 3 above alarm limit" },
|
|
2544
|
+
{ id: "a-5", raised: at(172), priority: "medium", message: "Kiln K1 · belt empty" },
|
|
2545
|
+
{ id: "a-6", raised: at(205), priority: "low", message: "Dryer D1 · fan vibration high" },
|
|
2546
|
+
{ id: "a-7", raised: at(250), priority: "high", message: "Kiln K1 · zone 3 above alarm limit" },
|
|
2547
|
+
{ id: "a-8", raised: at(288), priority: "medium", message: "Kiln K1 · exit pyrometer sends nothing" },
|
|
2548
|
+
{ id: "a-9", raised: at(340), priority: "low", message: "Dryer D1 · fan vibration high" },
|
|
2549
|
+
{ id: "a-10", raised: at(401), priority: "medium", message: "Kiln K1 · belt empty" },
|
|
2550
|
+
{ id: "a-11", raised: at(455), priority: "high", message: "Kiln K1 · zone 3 above alarm limit" },
|
|
2551
|
+
];
|
|
2552
|
+
|
|
2553
|
+
/** Zone 3 of the kiln every five minutes, in °C; it runs hot around the high alarms of the shift. */
|
|
2554
|
+
const TREND = Array.from({ length: SHIFT_MINUTES / 5 + 1 }, (_, i) => {
|
|
2555
|
+
const near = ALARMS.some((alarm) => alarm.priority === "high" && Math.abs(alarm.raised - at(i * 5)) <= 15 * MIN);
|
|
2556
|
+
return { t: at(i * 5), kiln: Math.round((1200 + 6 * Math.sin(i / 3) + (near ? 24 : 0)) * 10) / 10 };
|
|
2557
|
+
});
|
|
2558
|
+
|
|
2559
|
+
/** A stretch of the shift, in milliseconds. */
|
|
2560
|
+
export type Stretch = Pick<ChartRange<number>, "from" | "to">;
|
|
2561
|
+
|
|
2562
|
+
/** Whether the instant lies in the stretch; both ends belong to it. */
|
|
2563
|
+
export function within(instant: number, stretch: Stretch): boolean {
|
|
2564
|
+
return stretch.from <= instant && instant <= stretch.to;
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
/** The alarms the stretch holds; no stretch holds them all. */
|
|
2568
|
+
export function alarmsIn(alarms: readonly Alarm[], stretch: Stretch | null): readonly Alarm[] {
|
|
2569
|
+
return stretch === null ? alarms : alarms.filter((alarm) => within(alarm.raised, stretch));
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
/* A condition from outside the table: the table keeps the stretch like a
|
|
2573
|
+
filter of its own and shows only the rows it admits. */
|
|
2574
|
+
const IN_STRETCH = rowFilter<Alarm, Stretch>({
|
|
2575
|
+
id: "stretch",
|
|
2576
|
+
label: "Stretch",
|
|
2577
|
+
matches: (alarm, stretch) => within(alarm.raised, stretch),
|
|
2578
|
+
});
|
|
2579
|
+
|
|
2580
|
+
const clock = (instant: number) => new Date(instant).toLocaleTimeString("en-GB", { hour: "2-digit", minute: "2-digit" });
|
|
2581
|
+
|
|
2582
|
+
export default function MarkAStretch() {
|
|
2583
|
+
const [stretch, setStretch] = useState<Stretch | null>(null);
|
|
2584
|
+
const t = useTable(ALARMS, { rowKey: (a) => a.id, rowFilters: [IN_STRETCH] });
|
|
2585
|
+
const { Table, Column } = t;
|
|
2586
|
+
|
|
2587
|
+
const mark = (next: Stretch | null) => {
|
|
2588
|
+
setStretch(next);
|
|
2589
|
+
t.setFilter(IN_STRETCH, next);
|
|
2590
|
+
};
|
|
2591
|
+
const trend = useChart(TREND, { onRange: ({ from, to }) => mark({ from, to }) });
|
|
2592
|
+
|
|
2593
|
+
return (
|
|
2594
|
+
<Stack gap={4}>
|
|
2595
|
+
<Stack direction="row" gap={4} align="center" wrap>
|
|
2596
|
+
<Text data-callout="3">
|
|
2597
|
+
{stretch === null
|
|
2598
|
+
? `All ${ALARMS.length} alarms of the shift`
|
|
2599
|
+
: `${alarmsIn(ALARMS, stretch).length} of ${ALARMS.length} alarms between ${clock(stretch.from)} and ${clock(stretch.to)}`}
|
|
2600
|
+
</Text>
|
|
2601
|
+
<Button size="sm" data-callout="4" disabled={stretch === null} onClick={() => mark(null)}>
|
|
2602
|
+
Clear the stretch
|
|
2603
|
+
</Button>
|
|
2604
|
+
</Stack>
|
|
2605
|
+
|
|
2606
|
+
<Card data-callout="1">
|
|
2607
|
+
<CardHeader title="Kiln trend" />
|
|
2608
|
+
<CardBody>
|
|
2609
|
+
<trend.Chart height={240} aria-label="Kiln K1, zone 3, over the shift">
|
|
2610
|
+
<trend.XAxis value="t" domain={[at(0), at(SHIFT_MINUTES)]} time />
|
|
2611
|
+
<trend.YAxis domain={[1180, 1250]} label="°C" />
|
|
2612
|
+
<LimitLine value={1215} severity="warning" label="Warning limit" />
|
|
2613
|
+
{stretch !== null && <LimitBand orientation="x" from={stretch.from} to={stretch.to} label="Stretch" />}
|
|
2614
|
+
<trend.Line value="kiln" name="Zone 3" format={(v) => `${v.toFixed(1)} °C`} />
|
|
2615
|
+
<Tooltip mode="x" />
|
|
2616
|
+
</trend.Chart>
|
|
2617
|
+
</CardBody>
|
|
2618
|
+
</Card>
|
|
2619
|
+
|
|
2620
|
+
<Card data-callout="2">
|
|
2621
|
+
<CardHeader title="Alarms" />
|
|
2622
|
+
<CardBody>
|
|
2623
|
+
<Table aria-label="Alarms of the early shift">
|
|
2624
|
+
<Column value="raised" label="Raised" numeric>
|
|
2625
|
+
{(raised) => clock(raised)}
|
|
2626
|
+
</Column>
|
|
2627
|
+
<Column value="priority" label="Priority">
|
|
2628
|
+
{(priority) => <Badge tone={priority === "high" ? "danger" : priority === "medium" ? "warning" : "neutral"}>{priority}</Badge>}
|
|
2629
|
+
</Column>
|
|
2630
|
+
<Column value="message" label="Alarm" rowHeader />
|
|
2631
|
+
</Table>
|
|
2632
|
+
</CardBody>
|
|
2633
|
+
</Card>
|
|
2634
|
+
</Stack>
|
|
2635
|
+
);
|
|
2636
|
+
}
|
|
2637
|
+
```
|
|
2638
|
+
|
|
2374
2639
|
## Getting started
|
|
2375
2640
|
|
|
2376
2641
|
What an application sets up once, before the first component.
|
|
@@ -2418,7 +2683,7 @@ From `ButtonProps` — the full table stands on [Button](#button).
|
|
|
2418
2683
|
- No font is loaded or bundled.
|
|
2419
2684
|
- Chrome 123, Firefox 120 and Safari 17.5 or newer; an older browser discards the tokens and shows the components unstyled.
|
|
2420
2685
|
|
|
2421
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
2686
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
2422
2687
|
|
|
2423
2688
|
### UmrissProvider
|
|
2424
2689
|
|
|
@@ -2629,7 +2894,7 @@ type ToastPosition = "top-start" | "top-center" | "top-end" | "bottom-start" | "
|
|
|
2629
2894
|
|
|
2630
2895
|
- No theme and no default variants for components: a component is configured by its own props.
|
|
2631
2896
|
|
|
2632
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
2897
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
2633
2898
|
|
|
2634
2899
|
## Customising
|
|
2635
2900
|
|
|
@@ -2910,7 +3175,7 @@ One look for every component. A soft glow would read as a second, shadowy border
|
|
|
2910
3175
|
|
|
2911
3176
|
##### Toast
|
|
2912
3177
|
|
|
2913
|
-
How far the toasts stand from the window's top and bottom edge and from its sides - set it to keep them clear of a fixed header, a toolbar at the bottom or a navigation rail at the side - and how wide a toast is. The region hangs in `body`, so set them on `:root`; a media query of your own may set another value per width. The center positions stand in the middle of the window whatever the side tokens are.
|
|
3178
|
+
How far the toasts stand from the window's top and bottom edge and from its sides - set it to keep them clear of a fixed header, a toolbar at the bottom or a navigation rail at the side - and how wide a toast is. The region hangs in `body`, so set them on `:root`; a media query of your own may set another value per width. The center positions stand in the middle of the window whatever the side tokens are. Each is the room from the visible edge: under `viewport-fit=cover` the hardware's safe area of that edge is added to it, so the token never reaches under a notch or a home indicator.
|
|
2914
3179
|
|
|
2915
3180
|
| Token | Light | Dark | Description |
|
|
2916
3181
|
|---|---|---|---|
|
|
@@ -3102,7 +3367,7 @@ From `BadgeProps` — the full table stands on [Badge](#badge).
|
|
|
3102
3367
|
- A token that names another resolves where it is declared: set `--u-color-accent` on a region, and `--u-focus-ring`, which names it on `:root`, still draws the application's accent there. Set the naming token in the region too.
|
|
3103
3368
|
- A panel opened in a portal - a popover, a tooltip, a toast - takes the tokens and the `color-scheme` of the place it lands, not of the region it was opened from; inside a dialog the toasts take the tokens of the dialog's place. Give [UmrissProvider](#umrissprovider) a `portalTarget` inside the region, or override on `:root` - as for the toasts' distance from the window's edge and its sides, `--u-toast-inset-top`, `--u-toast-inset-bottom`, `--u-toast-inset-start` and `--u-toast-inset-end`.
|
|
3104
3369
|
|
|
3105
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
3370
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
3106
3371
|
|
|
3107
3372
|
### Sizes
|
|
3108
3373
|
|
|
@@ -3231,7 +3496,7 @@ export default function ARowThatHoldsStill() {
|
|
|
3231
3496
|
const [search, setSearch] = useState("");
|
|
3232
3497
|
const [carriers, setCarriers] = useState<string[]>(["DHL", "UPS", "GLS"]);
|
|
3233
3498
|
const [period, setPeriod] = useState<DateRange | null>(null);
|
|
3234
|
-
const carriersRef = useRef<
|
|
3499
|
+
const carriersRef = useRef<HTMLButtonElement>(null);
|
|
3235
3500
|
const statusRef = useRef<HTMLSelectElement>(null);
|
|
3236
3501
|
const carriersWidth = useWidth(carriersRef);
|
|
3237
3502
|
const statusWidth = useWidth(statusRef);
|
|
@@ -3520,7 +3785,7 @@ type ControlSize = "sm" | "md";
|
|
|
3520
3785
|
- A field does not grow to fill a row: give it room with the row's own layout (`flex: 1` on its FormField, or a grid).
|
|
3521
3786
|
- A place that sizes itself by its content and has no width to stop at - an `auto` grid track, an inline block, a row that does not wrap - gives a field at least its natural width, as it gives a native input its own; on a narrow screen let such a row wrap, or size the track with `minmax(0, auto)`.
|
|
3522
3787
|
|
|
3523
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
3788
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
3524
3789
|
|
|
3525
3790
|
### Language
|
|
3526
3791
|
|
|
@@ -3920,7 +4185,10 @@ Every entry of `Wording`: the English of `DEFAULT_WORDING` beside the German of
|
|
|
3920
4185
|
| `unpinHint` | Unpin | Fixierung lösen | — |
|
|
3921
4186
|
| `exportLabel` | Export | Exportieren | The export button. |
|
|
3922
4187
|
| `exportPageLabel` | Export page | Seite exportieren | The export button of a table in server mode, which holds and writes one page. |
|
|
4188
|
+
| `exporting` | Preparing the export | Export wird vorbereitet | The status while the application prepares an export of every match. |
|
|
4189
|
+
| `exportFailed` | The export failed | Der Export ist fehlgeschlagen | The alert beside the export button when preparing the export failed without a message. |
|
|
3923
4190
|
| `exportFileName` | table.csv | tabelle.csv | The export's file name, where the application names none. |
|
|
4191
|
+
| `exportSheetName` | Table | Tabelle | The name of the sheet an XLSX export holds. |
|
|
3924
4192
|
| `tableSearchPlaceholder` | Search … | Suchen … | Placeholder and accessible name of the search field. |
|
|
3925
4193
|
| `tableSearchLabel` | Search table | Tabelle durchsuchen | — |
|
|
3926
4194
|
| `filterColumn(column)` | `` `Filter ${column}` `` | `` `${column} filtern` `` | The filter button of a column: "Filter Region". |
|
|
@@ -3968,10 +4236,14 @@ Every entry of `Wording`: the English of `DEFAULT_WORDING` beside the German of
|
|
|
3968
4236
|
| `levelColumn` | Level | Ebene | The first column of a tree's export. |
|
|
3969
4237
|
| `pathRow` | on the path to a match | auf dem Weg zu einem Treffer | A row shown only because a descendant matches the search or a filter. |
|
|
3970
4238
|
| `footerTopLevel` | Top level only | Nur oberste Ebene | The footer of a tree: it sums the top level, since a parent holds its children. |
|
|
4239
|
+
| `footerOfMatches` | All matches | Alle Treffer | The footer of a server-mode table: its sums come from the server and cover every match, not the page. Read out only. |
|
|
3971
4240
|
| `selectGroup(name)` | `` `Select ${name}` `` | `` `${name} auswählen` `` | The box that selects every row of a group. |
|
|
3972
4241
|
| `calendarWeek(week, year)` | `` `Week ${week}, ${year}` `` | `` `KW ${week}/${year}` `` | A group of the week key: "Week 42, 2026". |
|
|
3973
4242
|
| `entries(count, formatted)` | `` (count === 1 ? "1 entry" : `${formatted} entries`) `` | `` (count === 1 ? "1 Eintrag" : `${formatted} Einträge`) `` | "128 entries" in the pagination bar; the plural belongs to the language. |
|
|
3974
4243
|
| `selectedCount(count, formatted)` | `` `${formatted} selected` `` | `` `${formatted} ausgewählt` `` | "3 selected" in the pagination bar and the table toolbar. |
|
|
4244
|
+
| `selectedOnPage(count, formatted)` | `` `All ${formatted} on this page are selected.` `` | `` (count === 1 ? "Die 1 Zeile dieser Seite ist ausgewählt." : `Alle ${formatted} Zeilen dieser Seite sind ausgewählt.`) `` | The first sentence of the offer in a server-mode table, once the page is ticked: "All 50 on this page are selected." |
|
|
4245
|
+
| `selectAllMatching(count, formatted)` | `` `Select all ${formatted} that match` `` | `` `Alle ${formatted} Treffer auswählen` `` | The button after it, for the rows the server holds: "Select all 12,400 that match". |
|
|
4246
|
+
| `allMatchingSelected(count, formatted)` | `` `All ${formatted} that match are selected.` `` | `` `Alle ${formatted} Treffer sind ausgewählt.` `` | The line once they are selected: "All 12,400 that match are selected." |
|
|
3975
4247
|
| `copiedRows(count, formatted)` | `` (count === 1 ? "1 row copied" : `${formatted} rows copied`) `` | `` (count === 1 ? "1 Zeile kopiert" : `${formatted} Zeilen kopiert`) `` | Said to a screen reader after Ctrl+C copied rows: "3 rows copied". |
|
|
3976
4248
|
| `copiedCell` | Cell copied | Zelle kopiert | Said after Ctrl+C copied the active cell of a grid. |
|
|
3977
4249
|
| `copyFailed` | Could not copy | Kopieren nicht möglich | Said when the clipboard refused or is not there. |
|
|
@@ -3990,6 +4262,7 @@ Every entry of `Wording`: the English of `DEFAULT_WORDING` beside the German of
|
|
|
3990
4262
|
| `rangeTo(to)` | `` `to ${to}` `` | `` `bis ${to}` `` | — |
|
|
3991
4263
|
| `rangeInvalid` | “From” lies after “To”. | „Von“ liegt hinter „Bis“. | When "From" lies behind "To". The condition stays the last valid one. |
|
|
3992
4264
|
| `resetAll` | Reset | Zurücksetzen | Clears search and conditions - in the table toolbar and in the empty body. |
|
|
4265
|
+
| `tryAgain` | Try again | Erneut versuchen | The button under a server-mode table's error that sends the request once more. |
|
|
3993
4266
|
| `filteredOfTotal(matches, total)` | `` `${matches} of ${total}` `` | `` `${matches} von ${total}` `` | "43 of 1.204" - the numbers come from the formats. |
|
|
3994
4267
|
|
|
3995
4268
|
##### Stat, verdict, freshness
|
|
@@ -4164,6 +4437,9 @@ Every entry of `ChartsWording` from `@umriss-ui/charts`, which a chart takes thr
|
|
|
4164
4437
|
| `percent(value)` | `` `${value}%` `` | `` `${value} %` `` | A share in a normalised stack, its number already formatted. |
|
|
4165
4438
|
| `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. |
|
|
4166
4439
|
| `selectHelp` | Enter chooses the point. | Enter wählt den Punkt. | The key that reports the Active point - only where `onSelect` is given. |
|
|
4440
|
+
| `rangeStarted(from)` | `` `Range from ${from} started.` `` | `` `Bereich ab ${from} begonnen.` `` | Said when the keyboard sets the start of a range; the x value is written in the axis' format. |
|
|
4441
|
+
| `rangeMade(from, to)` | `` `Range from ${from} to ${to}.` `` | `` `Bereich von ${from} bis ${to}.` `` | Said when the keyboard sets the end of a range. |
|
|
4442
|
+
| `rangeHelp` | Space sets the start and the end of a range, Escape cancels it. | Leertaste setzt Anfang und Ende eines Bereichs, Escape bricht ab. | The key that marks a range - only where `onRange` is given and a tooltip stands. |
|
|
4167
4443
|
| `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. |
|
|
4168
4444
|
| `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. |
|
|
4169
4445
|
| `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. |
|
|
@@ -4187,7 +4463,7 @@ Every entry of `ChartsWording` from `@umriss-ui/charts`, which a chart takes thr
|
|
|
4187
4463
|
|
|
4188
4464
|
#### Formats
|
|
4189
4465
|
|
|
4190
|
-
Every entry of `Formats`: `DEFAULT_FORMATS` beside `GERMAN_FORMATS`. Each set as it writes Tuesday, 17 March 2026 at 09:05:03 in Berlin (the time without seconds), the number 1204.5 to one decimal, the count 1204, the share 0.74, three minutes ago, and `Zebra`, `Émile` and `Apple` in order.
|
|
4466
|
+
Every entry of `Formats`: `DEFAULT_FORMATS` beside `GERMAN_FORMATS`. Each set as it writes Tuesday, 17 March 2026 at 09:05:03 in Berlin (the time without seconds), the number 1204.5 to one decimal, the same in euros, the count 1204, the share 0.74, three minutes ago, and `Zebra`, `Émile` and `Apple` in order.
|
|
4191
4467
|
|
|
4192
4468
|
| Key | English | German | Description |
|
|
4193
4469
|
|---|---|---|---|
|
|
@@ -4199,6 +4475,7 @@ Every entry of `Formats`: `DEFAULT_FORMATS` beside `GERMAN_FORMATS`. Each set as
|
|
|
4199
4475
|
| `dateTime(d, withSeconds)` | 17/03/2026, 09:05 | 17.03.2026, 09:05 | Date and time together: 17/03/2026, 09:05 |
|
|
4200
4476
|
| `offset(d)` | GMT+1 | GMT+1 | Short form of the UTC offset: GMT+2 |
|
|
4201
4477
|
| `number(n, decimals)` | 1,204.5 | 1.204,5 | A number in the set's notation. Without a digit count the value stands to the tenth decimal place, and a non-zero value that would read 0 there is written in scientific notation; with one it is padded and rounded to exactly that many places. |
|
|
4478
|
+
| `numberWith(n, options)` | €1,204.50 | 1.204,50 € | A number written with Intl's own options in the set's locale: a currency, a year without grouping, scientific notation. Pure Intl options - the `decimals` shorthand is expanded by `writeNumber` before it. Like the others it writes no negative zero unless the options set `signDisplay`. |
|
|
4202
4479
|
| `count(n)` | 1,204 | 1.204 | A count. Kept apart from `number` because it makes a different promise: a count is whole, and Intl's own rounding (at most three decimal places) is right for it and wrong for a measurement. |
|
|
4203
4480
|
| `percent(share)` | 74% | 74 % | A share from 0 to 1 as whole per cent: 74 % |
|
|
4204
4481
|
| `compareText(a, b)` | Apple, Émile, Zebra | Apple, Émile, Zebra | The ordering of two texts by the set's collation. |
|
|
@@ -4237,6 +4514,7 @@ Everything the library knows about formatting.
|
|
|
4237
4514
|
| `dateTime` *required* | `(d: Date, withSeconds: boolean) => string` | — | Date and time together: 17/03/2026, 09:05<br>Shown in: [Use the language in your own components](#language), [Pick a day (DatePicker)](#datepicker), [Set an instant (DateTimePicker)](#datetimepicker) and 1 more |
|
|
4238
4515
|
| `offset` *required* | `(d: Date) => string` | — | Short form of the UTC offset: GMT+2<br>Shown in: [Set an instant (DateTimePicker)](#datetimepicker) |
|
|
4239
4516
|
| `number` *required* | `(n: number, decimals?: number) => string` | — | A number in the set's notation. Without a digit count the value stands to the tenth decimal place, and a non-zero value that would read 0 there is written in scientific notation; with one it is padded and rounded to exactly that many places.<br>Shown in: [Write numbers in your own notation](#language), [Price an invoice line (NumberInput)](#numberinput), [Split a budget (Slider)](#slider) |
|
|
4517
|
+
| `numberWith` *required* | `(n: number, options: Intl.NumberFormatOptions) => string` | — | A number written with Intl's own options in the set's locale: a currency, a year without grouping, scientific notation. Pure Intl options - the `decimals` shorthand is expanded by `writeNumber` before it. Like the others it writes no negative zero unless the options set `signDisplay`. |
|
|
4240
4518
|
| `count` *required* | `(n: number) => string` | — | A count. Kept apart from `number` because it makes a different promise: a count is whole, and Intl's own rounding (at most three decimal places) is right for it and wrong for a measurement.<br>Shown in: [Write numbers in your own notation](#language), [Use the language in your own components](#language) |
|
|
4241
4519
|
| `percent` *required* | `(share: number) => string` | — | A share from 0 to 1 as whole per cent: 74 % |
|
|
4242
4520
|
| `compareText` *required* | `(a: string, b: string) => number` | — | The ordering of two texts by the set's collation. |
|
|
@@ -4355,7 +4633,10 @@ Everything the library puts out as text.
|
|
|
4355
4633
|
| `unpinHint` *required* | `string` | — | |
|
|
4356
4634
|
| `exportLabel` *required* | `string` | — | The export button. |
|
|
4357
4635
|
| `exportPageLabel` *required* | `string` | — | The export button of a table in server mode, which holds and writes one page. |
|
|
4636
|
+
| `exporting` *required* | `string` | — | The status while the application prepares an export of every match. |
|
|
4637
|
+
| `exportFailed` *required* | `string` | — | The alert beside the export button when preparing the export failed without a message. |
|
|
4358
4638
|
| `exportFileName` *required* | `string` | — | The export's file name, where the application names none. |
|
|
4639
|
+
| `exportSheetName` *required* | `string` | — | The name of the sheet an XLSX export holds. |
|
|
4359
4640
|
| `tableSearchPlaceholder` *required* | `string` | — | Placeholder and accessible name of the search field. |
|
|
4360
4641
|
| `tableSearchLabel` *required* | `string` | — | |
|
|
4361
4642
|
| `filterColumn` *required* | `(column: string) => string` | — | The filter button of a column: "Filter Region". |
|
|
@@ -4403,10 +4684,14 @@ Everything the library puts out as text.
|
|
|
4403
4684
|
| `levelColumn` *required* | `string` | — | The first column of a tree's export. |
|
|
4404
4685
|
| `pathRow` *required* | `string` | — | A row shown only because a descendant matches the search or a filter. |
|
|
4405
4686
|
| `footerTopLevel` *required* | `string` | — | The footer of a tree: it sums the top level, since a parent holds its children. |
|
|
4687
|
+
| `footerOfMatches` *required* | `string` | — | The footer of a server-mode table: its sums come from the server and cover every match, not the page. Read out only. |
|
|
4406
4688
|
| `selectGroup` *required* | `(name: string) => string` | — | The box that selects every row of a group. |
|
|
4407
4689
|
| `calendarWeek` *required* | `(week: number, year: number) => string` | — | A group of the week key: "Week 42, 2026". |
|
|
4408
4690
|
| `entries` *required* | `(count: number, formatted: string) => string` | — | "128 entries" in the pagination bar; the plural belongs to the language. |
|
|
4409
4691
|
| `selectedCount` *required* | `(count: number, formatted: string) => string` | — | "3 selected" in the pagination bar and the table toolbar. |
|
|
4692
|
+
| `selectedOnPage` *required* | `(count: number, formatted: string) => string` | — | The first sentence of the offer in a server-mode table, once the page is ticked: "All 50 on this page are selected." |
|
|
4693
|
+
| `selectAllMatching` *required* | `(count: number, formatted: string) => string` | — | The button after it, for the rows the server holds: "Select all 12,400 that match". |
|
|
4694
|
+
| `allMatchingSelected` *required* | `(count: number, formatted: string) => string` | — | The line once they are selected: "All 12,400 that match are selected." |
|
|
4410
4695
|
| `copiedRows` *required* | `(count: number, formatted: string) => string` | — | Said to a screen reader after Ctrl+C copied rows: "3 rows copied". |
|
|
4411
4696
|
| `copiedCell` *required* | `string` | — | Said after Ctrl+C copied the active cell of a grid. |
|
|
4412
4697
|
| `copyFailed` *required* | `string` | — | Said when the clipboard refused or is not there. |
|
|
@@ -4425,6 +4710,7 @@ Everything the library puts out as text.
|
|
|
4425
4710
|
| `rangeTo` *required* | `(to: string) => string` | — | |
|
|
4426
4711
|
| `rangeInvalid` *required* | `string` | — | When "From" lies behind "To". The condition stays the last valid one. |
|
|
4427
4712
|
| `resetAll` *required* | `string` | — | Clears search and conditions - in the table toolbar and in the empty body. |
|
|
4713
|
+
| `tryAgain` *required* | `string` | — | The button under a server-mode table's error that sends the request once more. |
|
|
4428
4714
|
| `filteredOfTotal` *required* | `(matches: string, total: string) => string` | — | "43 of 1.204" - the numbers come from the formats. |
|
|
4429
4715
|
| `verdictOk` *required* | `string` | — | The four outcomes of an assessment, as a word beside the value. Colour alone carries no meaning - the word stands here for that reason.<br>Shown in: [Replace single entries](#language) |
|
|
4430
4716
|
| `verdictWarning` *required* | `string` | — | <br>Shown in: [Replace single entries](#language) |
|
|
@@ -4553,10 +4839,10 @@ Everything the library puts out as text.
|
|
|
4553
4839
|
|
|
4554
4840
|
#### Known limits
|
|
4555
4841
|
|
|
4556
|
-
- Two languages ship; a third is a `Wording` object of your own. No right-to-left ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
4842
|
+
- Two languages ship; a third is a `Wording` object of your own. No right-to-left ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md)).
|
|
4557
4843
|
- It holds only what the components say themselves; your labels, titles and data are yours to translate.
|
|
4558
4844
|
|
|
4559
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
4845
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
4560
4846
|
|
|
4561
4847
|
## Layout
|
|
4562
4848
|
|
|
@@ -4858,11 +5144,11 @@ The keys of [Button](#button) apply here.
|
|
|
4858
5144
|
|
|
4859
5145
|
| Prop | Type | Default | Description |
|
|
4860
5146
|
|---|---|---|---|
|
|
4861
|
-
| `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), [Gaps](#stack-and-grid), [Wrapping](#stack-and-grid) and
|
|
4862
|
-
| `gap` | `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 row](#stack-and-grid), [Gaps](#stack-and-grid) and
|
|
4863
|
-
| `align` | `CSSProperties["alignItems"]` | — | Alignment across the direction – `alignItems` unchanged.<br>Shown in: [A row](#stack-and-grid), [Gaps](#stack-and-grid), [A tour summary](#stack-and-grid) and
|
|
5147
|
+
| `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), [Gaps](#stack-and-grid), [Wrapping](#stack-and-grid) and 70 more |
|
|
5148
|
+
| `gap` | `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 row](#stack-and-grid), [Gaps](#stack-and-grid) and 166 more |
|
|
5149
|
+
| `align` | `CSSProperties["alignItems"]` | — | Alignment across the direction – `alignItems` unchanged.<br>Shown in: [A row](#stack-and-grid), [Gaps](#stack-and-grid), [A tour summary](#stack-and-grid) and 79 more |
|
|
4864
5150
|
| `justify` | `CSSProperties["justifyContent"]` | — | Distribution along the direction – `justifyContent` unchanged.<br>Shown in: [A row](#stack-and-grid), [A tour summary](#stack-and-grid), [Name the same action in every row (VisuallyHidden)](#visuallyhidden) and 9 more |
|
|
4865
|
-
| `wrap` | `boolean` | `false` | Lets the children wrap when the line does not suffice.<br>Shown in: [Gaps](#stack-and-grid), [Wrapping](#stack-and-grid), [Sized to the value (Sizes)](#sizes) and
|
|
5151
|
+
| `wrap` | `boolean` | `false` | Lets the children wrap when the line does not suffice.<br>Shown in: [Gaps](#stack-and-grid), [Wrapping](#stack-and-grid), [Sized to the value (Sizes)](#sizes) and 33 more |
|
|
4866
5152
|
| `ref` | `Ref<HTMLDivElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [An anchored surface (Popover)](#popover), [Take the width of the trigger (Popover)](#popover) and 2 more |
|
|
4867
5153
|
|
|
4868
5154
|
Also takes every attribute of `<div>`.
|
|
@@ -4903,7 +5189,7 @@ type GridColumnWidth = number | "fill";
|
|
|
4903
5189
|
- No breakpoints and no responsive props: a grid follows the width through `minItemWidth`, anything else is your stylesheet's.
|
|
4904
5190
|
- Tiles are not arranged by the user: for a dashboard the reader arranges, see `@umriss-ui/dashboard` ([ADR-0064](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0064-a-dashboard-a-user-arranges-is-a-sequence-on-fixed-columns.md)).
|
|
4905
5191
|
|
|
4906
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
5192
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
4907
5193
|
|
|
4908
5194
|
### Divider
|
|
4909
5195
|
|
|
@@ -5283,7 +5569,7 @@ Also takes every attribute of the rendered element.
|
|
|
5283
5569
|
|
|
5284
5570
|
| Prop | Type | Default | Description |
|
|
5285
5571
|
|---|---|---|---|
|
|
5286
|
-
| `title` *required* | `ReactNode` | — | The heading of the card. A node and not merely text, so that an identifier with markup can stand in it too.<br>Shown in: [Head and body](#card), [Eyebrow and actions](#card), [A flush body](#card) and
|
|
5572
|
+
| `title` *required* | `ReactNode` | — | The heading of the card. A node and not merely text, so that an identifier with markup can stand in it too.<br>Shown in: [Head and body](#card), [Eyebrow and actions](#card), [A flush body](#card) and 29 more |
|
|
5287
5573
|
| `eyebrow` | `ReactNode` | — | Small all-caps label above the title, e.g. a category.<br>Shown in: [Eyebrow and actions](#card), [A flush body](#card), [Fold the body](#card) and 17 more |
|
|
5288
5574
|
| `actions` | `ReactNode` | — | Right-aligned area, e.g. buttons or badges.<br>Shown in: [Eyebrow and actions](#card), [Fold the body](#card), [Cards on a dashboard](#card) and 13 more |
|
|
5289
5575
|
| `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) |
|
|
@@ -5728,7 +6014,7 @@ Also takes every attribute of `<div>` – without `children`, `defaultValue`, `o
|
|
|
5728
6014
|
- Two panes per splitter, no more. Tiles are not arranged by the user: for a dashboard the reader arranges, see `@umriss-ui/dashboard` ([ADR-0064](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0064-a-dashboard-a-user-arranges-is-a-sequence-on-fixed-columns.md)).
|
|
5729
6015
|
- It does not remember the share beyond its own life; keep it in the user's settings through `value` and `onChange`.
|
|
5730
6016
|
|
|
5731
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
6017
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
5732
6018
|
|
|
5733
6019
|
## Typography
|
|
5734
6020
|
|
|
@@ -6086,9 +6372,9 @@ export default function IncidentSummary() {
|
|
|
6086
6372
|
| Prop | Type | Default | Description |
|
|
6087
6373
|
|---|---|---|---|
|
|
6088
6374
|
| `as` | `ElementType` | `"p"` | Element to render as.<br>Shown in: [Tones and weights](#typography-2), [Set an incident summary](#typography-2), [Use the language in your own components (Language)](#language) and 17 more |
|
|
6089
|
-
| `size` | `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-2), [Sizes](#typography-2), [Tones and weights](#typography-2) and
|
|
6375
|
+
| `size` | `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-2), [Sizes](#typography-2), [Tones and weights](#typography-2) and 130 more |
|
|
6090
6376
|
| `weight` | `TextWeight`<br>`"regular" \| "medium" \| "semibold"` | `"regular"` | Font weight from the token set.<br>Shown in: [Configurator](#typography-2), [Tones and weights](#typography-2), [Tracking and leading](#typography-2) and 15 more |
|
|
6091
|
-
| `tone` | `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-2), [Tones and weights](#typography-2), [Tracking and leading](#typography-2) and
|
|
6377
|
+
| `tone` | `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-2), [Tones and weights](#typography-2), [Tracking and leading](#typography-2) and 95 more |
|
|
6092
6378
|
| `mono` | `boolean` | `false` | Geist Mono with tabular figures – for numbers and identifiers.<br>Shown in: [Configurator](#typography-2), [Numbers and identifiers](#typography-2), [Handle long values](#typography-2) and 31 more |
|
|
6093
6379
|
| `tracking` | `TextTracking`<br>`"normal" \| "tight" \| "display" \| "caps"` | `"normal"` | Letter spacing from the token set. `caps` belongs with letterspaced capitals.<br>Shown in: [Configurator](#typography-2), [Tracking and leading](#typography-2), [Set an incident summary](#typography-2) |
|
|
6094
6380
|
| `leading` | `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-2), [Tracking and leading](#typography-2) |
|
|
@@ -6164,10 +6450,10 @@ type TextLeading = "normal" | "tight";
|
|
|
6164
6450
|
#### Known limits
|
|
6165
6451
|
|
|
6166
6452
|
- No truncation and no line length: both depend on the column, which only the application knows.
|
|
6167
|
-
- No prose styles for lists, quotes or rich text ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
6453
|
+
- No prose styles for lists, quotes or rich text ([ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md)).
|
|
6168
6454
|
- `Link` renders a plain `a` and knows no router; pass it the address your router resolves.
|
|
6169
6455
|
|
|
6170
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
6456
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
6171
6457
|
|
|
6172
6458
|
### VisuallyHidden
|
|
6173
6459
|
|
|
@@ -6291,7 +6577,7 @@ Also takes every attribute of the chosen element – without `as`, `ref`.
|
|
|
6291
6577
|
|
|
6292
6578
|
- It hides from the eye only; to hide something from everyone, do not render it.
|
|
6293
6579
|
|
|
6294
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
6580
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
6295
6581
|
|
|
6296
6582
|
## Actions
|
|
6297
6583
|
|
|
@@ -6578,7 +6864,7 @@ Under forced colours every variant keeps an outline where its edge would lie, an
|
|
|
6578
6864
|
| Prop | Type | Default | Description |
|
|
6579
6865
|
|---|---|---|---|
|
|
6580
6866
|
| `variant` | `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), [Variants](#button), [Sizes](#button) and 52 more |
|
|
6581
|
-
| `size` | `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), [Sizes](#button), [Add an icon](#button) and
|
|
6867
|
+
| `size` | `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), [Sizes](#button), [Add an icon](#button) and 58 more |
|
|
6582
6868
|
| `loading` | `boolean` | `false` | Shows a loading indicator and locks the button.<br>Shown in: [Configurator](#button), [Loading and disabled](#button), [Submit a form](#button) and 4 more |
|
|
6583
6869
|
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [An anchored surface (Popover)](#popover), [Take the width of the trigger (Popover)](#popover) and 2 more |
|
|
6584
6870
|
|
|
@@ -6620,7 +6906,7 @@ type ControlSize = "sm" | "md";
|
|
|
6620
6906
|
- The label stays on one line; keep it short rather than let it wrap.
|
|
6621
6907
|
- No icon slot: an icon goes among the children, before the label, and the button sets its size.
|
|
6622
6908
|
|
|
6623
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
6909
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
6624
6910
|
|
|
6625
6911
|
### IconButton
|
|
6626
6912
|
|
|
@@ -6929,7 +7215,7 @@ export default function Toolbar() {
|
|
|
6929
7215
|
|---|---|---|---|
|
|
6930
7216
|
| `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), [Name the icon](#iconbutton), [Variants](#iconbutton) and 5 more |
|
|
6931
7217
|
| `variant` | `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), [Variants](#iconbutton), [Sizes](#iconbutton) and 3 more |
|
|
6932
|
-
| `size` | `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), [Sizes](#iconbutton), [Build a toolbar](#iconbutton) and
|
|
7218
|
+
| `size` | `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), [Sizes](#iconbutton), [Build a toolbar](#iconbutton) and 58 more |
|
|
6933
7219
|
| `loading` | `boolean` | `false` | Shows a loading indicator and locks the button. From `ButtonProps`.<br>Shown in: [Configurator](#iconbutton), [Loading and disabled](#iconbutton), [Configurator (Button)](#button) and 4 more |
|
|
6934
7220
|
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [An anchored surface (Popover)](#popover), [Take the width of the trigger (Popover)](#popover) and 2 more |
|
|
6935
7221
|
|
|
@@ -6977,7 +7263,7 @@ type ControlSize = "sm" | "md";
|
|
|
6977
7263
|
- The tooltip always shows the name; a hint that says more than the name is a `Tooltip` around a `Button`.
|
|
6978
7264
|
- A touch screen shows no tooltip: choose icons whose meaning is common, or a `Button` with a label.
|
|
6979
7265
|
|
|
6980
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
7266
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
6981
7267
|
|
|
6982
7268
|
### ButtonGroup
|
|
6983
7269
|
|
|
@@ -7337,7 +7623,7 @@ type ControlSize = "sm" | "md";
|
|
|
7337
7623
|
|
|
7338
7624
|
- No toggle or segmented state; a choice that stays is a radio group.
|
|
7339
7625
|
|
|
7340
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
7626
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
7341
7627
|
|
|
7342
7628
|
## Forms
|
|
7343
7629
|
|
|
@@ -7621,7 +7907,7 @@ Also takes every attribute of `<input>` – without `size`.
|
|
|
7621
7907
|
- No input masks or formatting while typing; check the value on leave or on submit.
|
|
7622
7908
|
- No validation of its own: the error is the application's, handed to the `FormField`.
|
|
7623
7909
|
|
|
7624
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
7910
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
7625
7911
|
|
|
7626
7912
|
### FormField
|
|
7627
7913
|
|
|
@@ -7798,7 +8084,7 @@ The keys of [Input](#input), [NumberInput](#numberinput), [Checkbox](#checkbox),
|
|
|
7798
8084
|
|
|
7799
8085
|
| Prop | Type | Default | Description |
|
|
7800
8086
|
|---|---|---|---|
|
|
7801
|
-
| `label` *required* | `ReactNode` | — | The label of the field. It is mandatory: a field without a name is a field without a question for a screen reader.<br>Shown in: [Configurator](#formfield), [Label and hint](#formfield), [Show an error](#formfield) and
|
|
8087
|
+
| `label` *required* | `ReactNode` | — | The label of the field. It is mandatory: a field without a name is a field without a question for a screen reader.<br>Shown in: [Configurator](#formfield), [Label and hint](#formfield), [Show an error](#formfield) and 78 more |
|
|
7802
8088
|
| `hint` | `ReactNode` | — | Help text below the field. Replaced by `error`.<br>Shown in: [Configurator](#formfield), [Label and hint](#formfield), [Show an error](#formfield) and 33 more |
|
|
7803
8089
|
| `error` | `ReactNode` | — | Error message; it marks the field as invalid at the same time.<br>Shown in: [Configurator](#formfield), [Show an error](#formfield), [Check an invoice on submit](#formfield) and 22 more |
|
|
7804
8090
|
| `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), [Mark a field as required](#formfield), [Check an invoice on submit](#formfield) and 9 more |
|
|
@@ -7812,7 +8098,7 @@ Also takes every attribute of `<div>`.
|
|
|
7812
8098
|
- No validation: the caller's form library decides; pass `error` ([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)). No form state and no submit handling either.
|
|
7813
8099
|
- One field per `FormField`; a group of fields that share one label is a fieldset of your own.
|
|
7814
8100
|
|
|
7815
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
8101
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
7816
8102
|
|
|
7817
8103
|
### Textarea
|
|
7818
8104
|
|
|
@@ -8000,7 +8286,7 @@ Also takes every attribute of `<textarea>` – without `cols`.
|
|
|
8000
8286
|
|
|
8001
8287
|
- Plain text only: no formatting, mentions or rich text.
|
|
8002
8288
|
|
|
8003
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
8289
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
8004
8290
|
|
|
8005
8291
|
### NumberInput
|
|
8006
8292
|
|
|
@@ -8199,6 +8485,25 @@ export default function PriceAnInvoiceLine() {
|
|
|
8199
8485
|
}
|
|
8200
8486
|
```
|
|
8201
8487
|
|
|
8488
|
+
##### A year without grouping
|
|
8489
|
+
|
|
8490
|
+
`grouping={false}` writes no group separators, so a year reads 2024 where the formats would write 2.024; the field still reads what it writes.
|
|
8491
|
+
|
|
8492
|
+
```tsx
|
|
8493
|
+
import { useState } from "react";
|
|
8494
|
+
import { FormField, NumberInput } from "@umriss-ui/core";
|
|
8495
|
+
|
|
8496
|
+
export default function YearWithoutGrouping() {
|
|
8497
|
+
const [year, setYear] = useState<number | null>(2024);
|
|
8498
|
+
|
|
8499
|
+
return (
|
|
8500
|
+
<FormField label="Model year" style={{ maxWidth: 240 }}>
|
|
8501
|
+
<NumberInput value={year} onChange={setYear} min={1900} max={2100} decimals={0} grouping={false} />
|
|
8502
|
+
</FormField>
|
|
8503
|
+
);
|
|
8504
|
+
}
|
|
8505
|
+
```
|
|
8506
|
+
|
|
8202
8507
|
#### When to use something else
|
|
8203
8508
|
|
|
8204
8509
|
- A value set roughly, where the position between two bounds matters more than the exact figure → Slider
|
|
@@ -8217,11 +8522,12 @@ export default function PriceAnInvoiceLine() {
|
|
|
8217
8522
|
|
|
8218
8523
|
| Prop | Type | Default | Description |
|
|
8219
8524
|
|---|---|---|---|
|
|
8220
|
-
| `value` *required* | `number \| null` | — | The number, or `null` for "not stated". An empty field is not zero: a quantity that was not measured is not a quantity of zero.<br>Shown in: [Configurator](#numberinput), [Number field](#numberinput), [Units and decimals](#numberinput) and
|
|
8221
|
-
| `min` | `number` | — | Lower bound. Every reported value is clamped; the text in the field follows on leaving.<br>Shown in: [Configurator](#numberinput), [Number field](#numberinput), [Units and decimals](#numberinput) and
|
|
8222
|
-
| `max` | `number` | — | Upper bound. Every reported value is clamped; the text in the field follows on leaving.<br>Shown in: [Configurator](#numberinput), [Units and decimals](#numberinput), [Keep a value in range](#numberinput) and
|
|
8525
|
+
| `value` *required* | `number \| null` | — | The number, or `null` for "not stated". An empty field is not zero: a quantity that was not measured is not a quantity of zero.<br>Shown in: [Configurator](#numberinput), [Number field](#numberinput), [Units and decimals](#numberinput) and 14 more |
|
|
8526
|
+
| `min` | `number` | — | Lower bound. Every reported value is clamped; the text in the field follows on leaving.<br>Shown in: [Configurator](#numberinput), [Number field](#numberinput), [Units and decimals](#numberinput) and 12 more |
|
|
8527
|
+
| `max` | `number` | — | Upper bound. Every reported value is clamped; the text in the field follows on leaving.<br>Shown in: [Configurator](#numberinput), [Units and decimals](#numberinput), [Keep a value in range](#numberinput) and 6 more |
|
|
8223
8528
|
| `step` | `number` | `1` | Step size for the arrow keys; Shift multiplies it by ten.<br>Shown in: [Configurator](#numberinput), [Units and decimals](#numberinput), [Keep a value in range](#numberinput) and 3 more |
|
|
8224
|
-
| `decimals` | `number` | — | Fixed decimal places; 0 = whole numbers, undefined = free.<br>Shown in: [Configurator](#numberinput), [Number field](#numberinput), [Units and decimals](#numberinput) and
|
|
8529
|
+
| `decimals` | `number` | — | Fixed decimal places; 0 = whole numbers, undefined = free.<br>Shown in: [Configurator](#numberinput), [Number field](#numberinput), [Units and decimals](#numberinput) and 12 more |
|
|
8530
|
+
| `grouping` | `boolean` | `true` | Group separators in the text: `false` writes none ("2024"), and the field still reads what it writes.<br>Shown in: [A year without grouping](#numberinput) |
|
|
8225
8531
|
| `prefix` | `ReactNode` | — | Adornment before the number, e.g. "±".<br>Shown in: [Units and decimals](#numberinput) |
|
|
8226
8532
|
| `suffix` | `ReactNode` | — | Adornment after the number, e.g. "€" or "%".<br>Shown in: [Number field](#numberinput), [Units and decimals](#numberinput), [States](#numberinput) and 9 more |
|
|
8227
8533
|
| `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), [States](#numberinput), [Set up a team (Scenarios)](#set-up-a-team) |
|
|
@@ -8233,7 +8539,7 @@ export default function PriceAnInvoiceLine() {
|
|
|
8233
8539
|
|
|
8234
8540
|
| Prop | Type | Default | Description |
|
|
8235
8541
|
|---|---|---|---|
|
|
8236
|
-
| `onChange` *required* | `(value: number \| null) => void` | — | Runs on every valid input, with `null` for the emptied field – and always clamped: what goes out lies between `min` and `max`, by every route, while typing included. Only the text in the field may still stand outside while typing; on leaving it is set to the clamped value.<br>Shown in: [Configurator](#numberinput), [Number field](#numberinput), [Units and decimals](#numberinput) and
|
|
8542
|
+
| `onChange` *required* | `(value: number \| null) => void` | — | Runs on every valid input, with `null` for the emptied field – and always clamped: what goes out lies between `min` and `max`, by every route, while typing included. Only the text in the field may still stand outside while typing; on leaving it is set to the clamped value.<br>Shown in: [Configurator](#numberinput), [Number field](#numberinput), [Units and decimals](#numberinput) and 14 more |
|
|
8237
8543
|
|
|
8238
8544
|
Also takes every attribute of `<input>` – without `onChange`, `prefix`, `size`, `type`, `value`.
|
|
8239
8545
|
|
|
@@ -8242,7 +8548,7 @@ Also takes every attribute of `<input>` – without `onChange`, `prefix`, `size`
|
|
|
8242
8548
|
- No expressions: “12*4” is not calculated.
|
|
8243
8549
|
- No currency conversion; the unit is a label.
|
|
8244
8550
|
|
|
8245
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
8551
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
8246
8552
|
|
|
8247
8553
|
### Slider
|
|
8248
8554
|
|
|
@@ -8435,7 +8741,7 @@ type SliderMark = number | { value: number; label?: ReactNode };
|
|
|
8435
8741
|
- One thumb: no range with two ends.
|
|
8436
8742
|
- Marks show values; they do not catch the thumb.
|
|
8437
8743
|
|
|
8438
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
8744
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
8439
8745
|
|
|
8440
8746
|
### Checkbox
|
|
8441
8747
|
|
|
@@ -8763,7 +9069,7 @@ Also takes every attribute of `<input>` – without `role`, `size`, `type`.
|
|
|
8763
9069
|
|
|
8764
9070
|
- No pending or loading state; while your application applies the change, disable the switch or say so beside it.
|
|
8765
9071
|
|
|
8766
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
9072
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
8767
9073
|
|
|
8768
9074
|
### RadioGroup
|
|
8769
9075
|
|
|
@@ -9227,7 +9533,7 @@ Also takes every attribute of `<div>` – without `defaultValue`, `onChange`.
|
|
|
9227
9533
|
- Two to four short possibilities: a word that does not fit its place ends in an ellipsis.
|
|
9228
9534
|
- No icons and no line of explanation in a segment; several chosen at once is not this control.
|
|
9229
9535
|
|
|
9230
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
9536
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
9231
9537
|
|
|
9232
9538
|
### FileInput
|
|
9233
9539
|
|
|
@@ -9476,7 +9782,7 @@ Also takes every attribute of `<input>` – without `defaultValue`, `onChange`,
|
|
|
9476
9782
|
|
|
9477
9783
|
- No upload, no progress and no size limit of its own; those belong to the application sending the files.
|
|
9478
9784
|
|
|
9479
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
9785
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
9480
9786
|
|
|
9481
9787
|
## Choosing
|
|
9482
9788
|
|
|
@@ -9672,7 +9978,7 @@ Also takes every attribute of `<select>` – without `size`.
|
|
|
9672
9978
|
|
|
9673
9979
|
- The list shows the options' text: no icons, descriptions or search inside it - the Combobox searches.
|
|
9674
9980
|
|
|
9675
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
9981
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
9676
9982
|
|
|
9677
9983
|
### Combobox
|
|
9678
9984
|
|
|
@@ -9915,7 +10221,7 @@ export default function AssignAnIncident() {
|
|
|
9915
10221
|
| `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), [With an error](#combobox) |
|
|
9916
10222
|
| `emptyText` | `string` | — | Text shown for an empty search result.<br>Shown in: [States](#combobox) |
|
|
9917
10223
|
| `clearable` | `boolean` | `false` | Shows a cross on selection or input that clears field and selection.<br>Shown in: [Configurator](#combobox), [Combobox](#combobox), [Assign an incident](#combobox) and 2 more |
|
|
9918
|
-
| `ref` | `Ref<
|
|
10224
|
+
| `ref` | `Ref<HTMLInputElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [An anchored surface (Popover)](#popover), [Take the width of the trigger (Popover)](#popover) and 2 more |
|
|
9919
10225
|
|
|
9920
10226
|
###### Events
|
|
9921
10227
|
|
|
@@ -9923,7 +10229,7 @@ export default function AssignAnIncident() {
|
|
|
9923
10229
|
|---|---|---|---|
|
|
9924
10230
|
| `onChange` *required* | `(value: T \| null) => void` | — | Runs on choosing and on clearing (`null`). Not while typing: what is typed is a search term and not yet a value.<br>Shown in: [Configurator](#combobox), [Combobox](#combobox), [States](#combobox) and 5 more |
|
|
9925
10231
|
|
|
9926
|
-
Also takes every attribute of `<
|
|
10232
|
+
Also takes every attribute of `<input>` – without `defaultValue`, `onChange`.
|
|
9927
10233
|
|
|
9928
10234
|
##### `ComboboxOption<T extends string = string>`
|
|
9929
10235
|
|
|
@@ -9938,7 +10244,7 @@ Also takes every attribute of `<div>` – without `defaultValue`, `onChange`.
|
|
|
9938
10244
|
- No free text as a value: only an option can be chosen.
|
|
9939
10245
|
- No loading of options from a server; filter your own list and pass it in.
|
|
9940
10246
|
|
|
9941
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
10247
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
9942
10248
|
|
|
9943
10249
|
### MultiSelect
|
|
9944
10250
|
|
|
@@ -10194,7 +10500,7 @@ export default function FilterIncidentsByService() {
|
|
|
10194
10500
|
| `disabled` | `boolean` | `false` | Locks field and panel.<br>Shown in: [Configurator](#multiselect), [States](#multiselect), [Dispatch a tour (Scenarios)](#dispatch-a-tour) |
|
|
10195
10501
|
| `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), [With an error](#multiselect) |
|
|
10196
10502
|
| `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), [Filter incidents by service](#multiselect), [A row that holds still (Sizes)](#sizes) |
|
|
10197
|
-
| `ref` | `Ref<
|
|
10503
|
+
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [An anchored surface (Popover)](#popover), [Take the width of the trigger (Popover)](#popover) and 2 more |
|
|
10198
10504
|
|
|
10199
10505
|
###### Events
|
|
10200
10506
|
|
|
@@ -10202,7 +10508,7 @@ export default function FilterIncidentsByService() {
|
|
|
10202
10508
|
|---|---|---|---|
|
|
10203
10509
|
| `onChange` *required* | `(value: T[]) => void` | — | Runs on every change of the selection, with the complete new list – not with the one value that moved.<br>Shown in: [Configurator](#multiselect), [Chips in the field](#multiselect), [States](#multiselect) and 5 more |
|
|
10204
10510
|
|
|
10205
|
-
Also takes every attribute of `<
|
|
10511
|
+
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
10206
10512
|
|
|
10207
10513
|
##### `MultiSelectOption<T extends string = string>`
|
|
10208
10514
|
|
|
@@ -10378,7 +10684,7 @@ export default function CheckADueDate() {
|
|
|
10378
10684
|
| `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), [States](#datepicker) |
|
|
10379
10685
|
| `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) |
|
|
10380
10686
|
| `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), [Pick a day](#datepicker), [States](#datepicker) and 4 more |
|
|
10381
|
-
| `ref` | `Ref<
|
|
10687
|
+
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [An anchored surface (Popover)](#popover), [Take the width of the trigger (Popover)](#popover) and 2 more |
|
|
10382
10688
|
|
|
10383
10689
|
###### Events
|
|
10384
10690
|
|
|
@@ -10386,14 +10692,14 @@ export default function CheckADueDate() {
|
|
|
10386
10692
|
|---|---|---|---|
|
|
10387
10693
|
| `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), [Pick a day](#datepicker), [States](#datepicker) and 8 more |
|
|
10388
10694
|
|
|
10389
|
-
Also takes every attribute of `<
|
|
10695
|
+
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
10390
10696
|
|
|
10391
10697
|
#### Known limits
|
|
10392
10698
|
|
|
10393
10699
|
- No typing of a date into the field.
|
|
10394
10700
|
- umriss shows the reader's time ([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)).
|
|
10395
10701
|
|
|
10396
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
10702
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
10397
10703
|
|
|
10398
10704
|
### DateTimePicker
|
|
10399
10705
|
|
|
@@ -10548,7 +10854,7 @@ export default function WithAnError() {
|
|
|
10548
10854
|
| `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) |
|
|
10549
10855
|
| `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), [With an error](#datetimepicker) |
|
|
10550
10856
|
| `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), [Set an instant](#datetimepicker), [States](#datetimepicker) |
|
|
10551
|
-
| `ref` | `Ref<
|
|
10857
|
+
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [An anchored surface (Popover)](#popover), [Take the width of the trigger (Popover)](#popover) and 2 more |
|
|
10552
10858
|
|
|
10553
10859
|
###### Events
|
|
10554
10860
|
|
|
@@ -10556,13 +10862,13 @@ export default function WithAnError() {
|
|
|
10556
10862
|
|---|---|---|---|
|
|
10557
10863
|
| `onChange` *required* | `(date: Date \| null) => void` | — | Runs only on completion - "Apply", "Now" or "Clear" - and not already on the click on a day: a day without a time would be a half-set value here, and a half value is no value.<br>Shown in: [Configurator](#datetimepicker), [Set an instant](#datetimepicker), [With seconds](#datetimepicker) and 3 more |
|
|
10558
10864
|
|
|
10559
|
-
Also takes every attribute of `<
|
|
10865
|
+
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
10560
10866
|
|
|
10561
10867
|
#### Known limits
|
|
10562
10868
|
|
|
10563
10869
|
- umriss shows the reader's time ([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)).
|
|
10564
10870
|
|
|
10565
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
10871
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
10566
10872
|
|
|
10567
10873
|
### DateRangePicker
|
|
10568
10874
|
|
|
@@ -10743,7 +11049,7 @@ export default function WithAnError() {
|
|
|
10743
11049
|
| `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) |
|
|
10744
11050
|
| `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), [A span of days](#daterangepicker), [Presets](#daterangepicker) and 2 more |
|
|
10745
11051
|
| `presets` | `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) |
|
|
10746
|
-
| `ref` | `Ref<
|
|
11052
|
+
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [An anchored surface (Popover)](#popover), [Take the width of the trigger (Popover)](#popover) and 2 more |
|
|
10747
11053
|
|
|
10748
11054
|
###### Events
|
|
10749
11055
|
|
|
@@ -10751,7 +11057,7 @@ export default function WithAnError() {
|
|
|
10751
11057
|
|---|---|---|---|
|
|
10752
11058
|
| `onChange` *required* | `(range: ``DateRange`` \| null) => void` | — | Runs as soon as both ends are settled - after the second click, on a preset and on clearing (`null`). Ends dragged backwards swap silently; there is no error state to handle.<br>Shown in: [Configurator](#daterangepicker), [A span of days](#daterangepicker), [Presets](#daterangepicker) and 3 more |
|
|
10753
11059
|
|
|
10754
|
-
Also takes every attribute of `<
|
|
11060
|
+
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
10755
11061
|
|
|
10756
11062
|
##### Types on this page
|
|
10757
11063
|
|
|
@@ -10780,7 +11086,7 @@ the moment of the click.
|
|
|
10780
11086
|
|
|
10781
11087
|
- One span; no list of separate days.
|
|
10782
11088
|
|
|
10783
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
11089
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
10784
11090
|
|
|
10785
11091
|
### DateTimeRangePicker
|
|
10786
11092
|
|
|
@@ -10956,7 +11262,7 @@ export default function WithAnError() {
|
|
|
10956
11262
|
| `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) |
|
|
10957
11263
|
| `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), [A downtime window](#datetimerangepicker), [States](#datetimerangepicker) |
|
|
10958
11264
|
| `presets` | `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) |
|
|
10959
|
-
| `ref` | `Ref<
|
|
11265
|
+
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [An anchored surface (Popover)](#popover), [Take the width of the trigger (Popover)](#popover) and 2 more |
|
|
10960
11266
|
|
|
10961
11267
|
###### Events
|
|
10962
11268
|
|
|
@@ -10964,7 +11270,7 @@ export default function WithAnError() {
|
|
|
10964
11270
|
|---|---|---|---|
|
|
10965
11271
|
| `onChange` *required* | `(range: ``DateRange`` \| null) => void` | — | Runs only on "Apply" and on clearing (`null`), never between the two clicks. If the end lies before the start, both swap on applying - there is no error state.<br>Shown in: [Configurator](#datetimerangepicker), [A downtime window](#datetimerangepicker), [With seconds](#datetimerangepicker) and 3 more |
|
|
10966
11272
|
|
|
10967
|
-
Also takes every attribute of `<
|
|
11273
|
+
Also takes every attribute of `<button>` – without `defaultValue`, `onChange`.
|
|
10968
11274
|
|
|
10969
11275
|
##### Types on this page
|
|
10970
11276
|
|
|
@@ -10994,7 +11300,7 @@ the moment of the click.
|
|
|
10994
11300
|
- umriss shows the reader's time ([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)).
|
|
10995
11301
|
- No recurring windows.
|
|
10996
11302
|
|
|
10997
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
11303
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
10998
11304
|
|
|
10999
11305
|
## Feedback
|
|
11000
11306
|
|
|
@@ -11144,7 +11450,7 @@ Also takes every attribute of `<svg>`.
|
|
|
11144
11450
|
|
|
11145
11451
|
- One shape and no figure: for how far a job has come, use a [ProgressBar](#progressbar).
|
|
11146
11452
|
|
|
11147
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
11453
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
11148
11454
|
|
|
11149
11455
|
### ProgressBar
|
|
11150
11456
|
|
|
@@ -11327,7 +11633,7 @@ Also takes every attribute of `<div>`.
|
|
|
11327
11633
|
|
|
11328
11634
|
- No colour of verdict and no steps of its own; for a job in steps, stack one bar per step.
|
|
11329
11635
|
|
|
11330
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
11636
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
11331
11637
|
|
|
11332
11638
|
### Skeleton
|
|
11333
11639
|
|
|
@@ -11484,7 +11790,7 @@ Also takes every attribute of `<span>`.
|
|
|
11484
11790
|
|
|
11485
11791
|
- It draws a shape and nothing else; the rows, cards and layout it stands in for are yours.
|
|
11486
11792
|
|
|
11487
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
11793
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
11488
11794
|
|
|
11489
11795
|
### Alert
|
|
11490
11796
|
|
|
@@ -11702,7 +12008,7 @@ type AlertTone = "neutral" | "accent" | "success" | "warning" | "danger";
|
|
|
11702
12008
|
- No timer: an alert stays until you remove it. A message that goes by itself is a toast.
|
|
11703
12009
|
- No stack or queue of messages; place each alert where its matter is.
|
|
11704
12010
|
|
|
11705
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
12011
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
11706
12012
|
|
|
11707
12013
|
### Toast
|
|
11708
12014
|
|
|
@@ -12260,7 +12566,7 @@ type ToastCloseReason = "timeout" | "dismiss" | "action";
|
|
|
12260
12566
|
- No queue: a toast over the limit pushes the oldest timed one out rather than waiting. Lasting and `loading` toasts are not capped: the deck holds every one of them beside the timed ones.
|
|
12261
12567
|
- Without the Popover API the deck moves with a dialog that transforms itself: inside a dialog the toasts stand in the top layer only where the browser has it, and elsewhere they are a fixed box in the dialog.
|
|
12262
12568
|
|
|
12263
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
12569
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
12264
12570
|
|
|
12265
12571
|
### EmptyState
|
|
12266
12572
|
|
|
@@ -12568,7 +12874,7 @@ export default function ACalculation() {
|
|
|
12568
12874
|
- No interactive content and no rich layout inside: it is read, never used.
|
|
12569
12875
|
- No placement option: it stands above its element and flips below where there is no room.
|
|
12570
12876
|
|
|
12571
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
12877
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
12572
12878
|
|
|
12573
12879
|
### Popover
|
|
12574
12880
|
|
|
@@ -12603,7 +12909,7 @@ export default function AnchoredSurface() {
|
|
|
12603
12909
|
<Button ref={anchor} onClick={() => setOpen((o) => !o)} aria-expanded={open}>
|
|
12604
12910
|
Sprint 14
|
|
12605
12911
|
</Button>
|
|
12606
|
-
<Popover open={open} onOpenChange={setOpen} anchorRef={anchor} role="dialog"
|
|
12912
|
+
<Popover open={open} onOpenChange={setOpen} anchorRef={anchor} role="dialog" aria-label="Sprint 14" restoreFocus width={280}>
|
|
12607
12913
|
<Stack gap={2} style={{ padding: "var(--u-space-4)" }}>
|
|
12608
12914
|
<Text size="sm" weight="medium">
|
|
12609
12915
|
Member portal sign-in and profile
|
|
@@ -12640,7 +12946,7 @@ export default function WidthFromAnchor() {
|
|
|
12640
12946
|
onOpenChange={setOpen}
|
|
12641
12947
|
anchorRef={anchor}
|
|
12642
12948
|
role="dialog"
|
|
12643
|
-
|
|
12949
|
+
aria-label="Vehicles at Riverside depot"
|
|
12644
12950
|
width="anchor"
|
|
12645
12951
|
minWidth={180}
|
|
12646
12952
|
restoreFocus
|
|
@@ -12693,7 +12999,7 @@ export default function AFilterPanel() {
|
|
|
12693
12999
|
>
|
|
12694
13000
|
Depots: {applied.length === DEPOTS.length ? "all" : applied.length}
|
|
12695
13001
|
</Button>
|
|
12696
|
-
<Popover open={open} onOpenChange={setOpen} anchorRef={anchor} role="dialog"
|
|
13002
|
+
<Popover open={open} onOpenChange={setOpen} anchorRef={anchor} role="dialog" aria-label="Filter by depot" restoreFocus width={260}>
|
|
12697
13003
|
<Stack gap={3} style={{ padding: "var(--u-space-4)" }}>
|
|
12698
13004
|
{DEPOTS.map((depot) => (
|
|
12699
13005
|
<Checkbox key={depot} label={depot} checked={draft.includes(depot)} onChange={() => toggle(depot)} />
|
|
@@ -12745,7 +13051,7 @@ export default function ACardAtTheEdge() {
|
|
|
12745
13051
|
<Button ref={anchor} size="sm" variant="ghost" onClick={() => setOpen((o) => !o)} aria-expanded={open}>
|
|
12746
13052
|
Maya Lindgren
|
|
12747
13053
|
</Button>
|
|
12748
|
-
<Popover open={open} onOpenChange={setOpen} anchorRef={anchor} align="end" offset={8} hideOnScroll role="dialog"
|
|
13054
|
+
<Popover open={open} onOpenChange={setOpen} anchorRef={anchor} align="end" offset={8} hideOnScroll role="dialog" aria-label="Maya Lindgren" width={260}>
|
|
12749
13055
|
<Stack gap={1} style={{ padding: "var(--u-space-4)" }}>
|
|
12750
13056
|
<Text size="sm" weight="medium">
|
|
12751
13057
|
Maya Lindgren
|
|
@@ -12800,7 +13106,7 @@ export default function ACardAtTheEdge() {
|
|
|
12800
13106
|
| Prop | Type | Default | Description |
|
|
12801
13107
|
|---|---|---|---|
|
|
12802
13108
|
| `role` | `"dialog" \| "listbox" \| "menu" \| "tooltip"` | — | Role of the surface. Omit where an inner element carries it.<br>Shown in: [An anchored surface](#popover), [Take the width of the trigger](#popover), [Filter a list from a panel](#popover) and 1 more |
|
|
12803
|
-
| `
|
|
13109
|
+
| `aria-label` | `string` | — | Accessible name of the surface. Needed as soon as it carries a `role`: a named role without a name is a riddle for a screen reader.<br>Shown in: [An anchored surface](#popover), [Take the width of the trigger](#popover), [Filter a list from a panel](#popover) and 1 more |
|
|
12804
13110
|
|
|
12805
13111
|
###### Styling
|
|
12806
13112
|
|
|
@@ -12823,7 +13129,7 @@ type Align = "start" | "end" | "center";
|
|
|
12823
13129
|
- No padding and no inner layout: it brings the overlay's surface - ground, corners, shadow - and the rest is yours. A `className` restates the surface where one needs another.
|
|
12824
13130
|
- It does not trap focus; a surface the user must answer is a [Modal](#modal).
|
|
12825
13131
|
|
|
12826
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
13132
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
12827
13133
|
|
|
12828
13134
|
### Menu
|
|
12829
13135
|
|
|
@@ -13024,45 +13330,42 @@ Also takes every attribute of `<button>` – without `onSelect`.
|
|
|
13024
13330
|
|
|
13025
13331
|
- No submenus, no checkable entries and no type-ahead.
|
|
13026
13332
|
|
|
13027
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
13333
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
13028
13334
|
|
|
13029
13335
|
### ContextMenu
|
|
13030
13336
|
|
|
13031
13337
|
A menu that opens at a point, for a right-click on something that is not a button: a row, a canvas, a bar in a schedule (also called a right-click menu). The entries and the keyboard are those of the menu.
|
|
13032
13338
|
|
|
13033
13339
|
```ts
|
|
13034
|
-
import { ContextMenu, MenuItem, MenuSeparator } from "@umriss-ui/core";
|
|
13340
|
+
import { ContextMenu, MenuItem, MenuSeparator, useContextMenuTrigger } from "@umriss-ui/core";
|
|
13035
13341
|
```
|
|
13036
13342
|
|
|
13037
|
-
It is controlled:
|
|
13343
|
+
It is controlled: spread [`useContextMenuTrigger`](#api-index-1) on the target and keep the point it hands you - a right-click, the menu key and a long press with a finger (the only way on iOS) all give one - and open it there. `onOpenChange` reports the wish to close. Focus goes to the first entry and back to where it was on closing.
|
|
13038
13344
|
|
|
13039
|
-
A right-click
|
|
13345
|
+
A right-click and a long press are invisible to a keyboard; the hook also opens it on Shift+F10 or the menu key at the focused element. Keep the actions reachable some other way too.
|
|
13040
13346
|
|
|
13041
13347
|
#### Examples
|
|
13042
13348
|
|
|
13043
13349
|
##### Open it at the pointer
|
|
13044
13350
|
|
|
13045
|
-
|
|
13351
|
+
Spread [`useContextMenuTrigger`](#api-index-1) on the target and keep the point it gives you as `position`: it opens on a right-click, the context-menu key and a long press with a finger, which is the only way on iOS. `aria-label` names what the menu acts on.
|
|
13046
13352
|
|
|
13047
13353
|
```tsx
|
|
13048
13354
|
import { useState } from "react";
|
|
13049
|
-
import
|
|
13050
|
-
import { ContextMenu, MenuItem, MenuSeparator, Stack, Text } from "@umriss-ui/core";
|
|
13355
|
+
import { ContextMenu, MenuItem, MenuSeparator, Stack, Text, useContextMenuTrigger } from "@umriss-ui/core";
|
|
13051
13356
|
|
|
13052
13357
|
export default function AtThePointer() {
|
|
13053
13358
|
const [at, setAt] = useState<{ x: number; y: number } | null>(null);
|
|
13054
13359
|
const [last, setLast] = useState("-");
|
|
13055
13360
|
|
|
13056
|
-
const
|
|
13057
|
-
event.preventDefault();
|
|
13058
|
-
setAt({ x: event.clientX, y: event.clientY });
|
|
13059
|
-
};
|
|
13361
|
+
const trigger = useContextMenuTrigger(setAt);
|
|
13060
13362
|
|
|
13061
13363
|
return (
|
|
13062
13364
|
<Stack gap={3} align="flex-start">
|
|
13063
13365
|
<div
|
|
13064
|
-
|
|
13366
|
+
{...trigger}
|
|
13065
13367
|
style={{
|
|
13368
|
+
...trigger.style,
|
|
13066
13369
|
width: "100%",
|
|
13067
13370
|
maxWidth: 320,
|
|
13068
13371
|
height: 120,
|
|
@@ -13073,7 +13376,7 @@ export default function AtThePointer() {
|
|
|
13073
13376
|
}}
|
|
13074
13377
|
>
|
|
13075
13378
|
<Text size="sm" tone="muted">
|
|
13076
|
-
Right-click anywhere in here
|
|
13379
|
+
Right-click or hold anywhere in here
|
|
13077
13380
|
</Text>
|
|
13078
13381
|
</div>
|
|
13079
13382
|
<ContextMenu
|
|
@@ -13082,7 +13385,7 @@ export default function AtThePointer() {
|
|
|
13082
13385
|
onOpenChange={(open) => {
|
|
13083
13386
|
if (!open) setAt(null);
|
|
13084
13387
|
}}
|
|
13085
|
-
|
|
13388
|
+
aria-label="Actions for the surface"
|
|
13086
13389
|
>
|
|
13087
13390
|
<MenuItem onSelect={() => setLast("Split")}>Split here</MenuItem>
|
|
13088
13391
|
<MenuItem onSelect={() => setLast("Note added")}>Add a note</MenuItem>
|
|
@@ -13099,14 +13402,13 @@ export default function AtThePointer() {
|
|
|
13099
13402
|
}
|
|
13100
13403
|
```
|
|
13101
13404
|
|
|
13102
|
-
##### Open it on a row, by pointer or keyboard
|
|
13405
|
+
##### Open it on a row, by pointer, finger or keyboard
|
|
13103
13406
|
|
|
13104
|
-
|
|
13407
|
+
[`useContextMenuTrigger`](#api-index-1) per row: a right-click opens it at the pointer, a long press at the finger, Shift+F10 or the menu key at the focused row, so no reader is left out.
|
|
13105
13408
|
|
|
13106
13409
|
```tsx
|
|
13107
13410
|
import { useState } from "react";
|
|
13108
|
-
import
|
|
13109
|
-
import { ContextMenu, MenuItem, MenuSeparator, Stack, Text } from "@umriss-ui/core";
|
|
13411
|
+
import { ContextMenu, MenuItem, MenuSeparator, Stack, Text, useContextMenuTrigger } from "@umriss-ui/core";
|
|
13110
13412
|
|
|
13111
13413
|
const SHIPMENTS = [
|
|
13112
13414
|
{ id: "SH-1042", customer: "Harlow Bakery", window: "09:00–11:00" },
|
|
@@ -13122,22 +13424,40 @@ const STYLE = `
|
|
|
13122
13424
|
}
|
|
13123
13425
|
`;
|
|
13124
13426
|
|
|
13427
|
+
function Row({ shipment, active, onOpen }: { shipment: (typeof SHIPMENTS)[number]; active: boolean; onOpen: (at: { x: number; y: number }) => void }) {
|
|
13428
|
+
const trigger = useContextMenuTrigger(onOpen);
|
|
13429
|
+
return (
|
|
13430
|
+
<div
|
|
13431
|
+
role="listitem"
|
|
13432
|
+
tabIndex={0}
|
|
13433
|
+
className="shipment-row"
|
|
13434
|
+
{...trigger}
|
|
13435
|
+
style={{
|
|
13436
|
+
...trigger.style,
|
|
13437
|
+
display: "flex",
|
|
13438
|
+
gap: "var(--u-space-3)",
|
|
13439
|
+
padding: "var(--u-space-2) var(--u-space-3)",
|
|
13440
|
+
borderBottom: "1px solid var(--u-edge-color)",
|
|
13441
|
+
background: active ? "var(--u-color-accent-subtle)" : undefined,
|
|
13442
|
+
}}
|
|
13443
|
+
>
|
|
13444
|
+
<Text as="span" size="sm" mono>
|
|
13445
|
+
{shipment.id}
|
|
13446
|
+
</Text>
|
|
13447
|
+
<Text as="span" size="sm" style={{ flex: 1 }}>
|
|
13448
|
+
{shipment.customer}
|
|
13449
|
+
</Text>
|
|
13450
|
+
<Text as="span" size="sm" tone="muted" mono>
|
|
13451
|
+
{shipment.window}
|
|
13452
|
+
</Text>
|
|
13453
|
+
</div>
|
|
13454
|
+
);
|
|
13455
|
+
}
|
|
13456
|
+
|
|
13125
13457
|
export default function OnARow() {
|
|
13126
13458
|
const [menu, setMenu] = useState<{ id: string; x: number; y: number } | null>(null);
|
|
13127
13459
|
const [last, setLast] = useState("-");
|
|
13128
13460
|
|
|
13129
|
-
const byPointer = (id: string) => (event: MouseEvent) => {
|
|
13130
|
-
event.preventDefault();
|
|
13131
|
-
setMenu({ id, x: event.clientX, y: event.clientY });
|
|
13132
|
-
};
|
|
13133
|
-
|
|
13134
|
-
const byKey = (id: string) => (event: KeyboardEvent<HTMLElement>) => {
|
|
13135
|
-
if (event.key !== "ContextMenu" && !(event.shiftKey && event.key === "F10")) return;
|
|
13136
|
-
event.preventDefault();
|
|
13137
|
-
const box = event.currentTarget.getBoundingClientRect();
|
|
13138
|
-
setMenu({ id, x: box.left + 16, y: box.bottom });
|
|
13139
|
-
};
|
|
13140
|
-
|
|
13141
13461
|
const run = (what: string) => () => setLast(`${what} ${menu?.id ?? ""}`);
|
|
13142
13462
|
|
|
13143
13463
|
return (
|
|
@@ -13145,31 +13465,7 @@ export default function OnARow() {
|
|
|
13145
13465
|
<style>{STYLE}</style>
|
|
13146
13466
|
<div role="list" aria-label="Shipments">
|
|
13147
13467
|
{SHIPMENTS.map((shipment) => (
|
|
13148
|
-
<
|
|
13149
|
-
key={shipment.id}
|
|
13150
|
-
role="listitem"
|
|
13151
|
-
tabIndex={0}
|
|
13152
|
-
className="shipment-row"
|
|
13153
|
-
onContextMenu={byPointer(shipment.id)}
|
|
13154
|
-
onKeyDown={byKey(shipment.id)}
|
|
13155
|
-
style={{
|
|
13156
|
-
display: "flex",
|
|
13157
|
-
gap: "var(--u-space-3)",
|
|
13158
|
-
padding: "var(--u-space-2) var(--u-space-3)",
|
|
13159
|
-
borderBottom: "1px solid var(--u-edge-color)",
|
|
13160
|
-
background: menu?.id === shipment.id ? "var(--u-color-accent-subtle)" : undefined,
|
|
13161
|
-
}}
|
|
13162
|
-
>
|
|
13163
|
-
<Text as="span" size="sm" mono>
|
|
13164
|
-
{shipment.id}
|
|
13165
|
-
</Text>
|
|
13166
|
-
<Text as="span" size="sm" style={{ flex: 1 }}>
|
|
13167
|
-
{shipment.customer}
|
|
13168
|
-
</Text>
|
|
13169
|
-
<Text as="span" size="sm" tone="muted" mono>
|
|
13170
|
-
{shipment.window}
|
|
13171
|
-
</Text>
|
|
13172
|
-
</div>
|
|
13468
|
+
<Row key={shipment.id} shipment={shipment} active={menu?.id === shipment.id} onOpen={(at) => setMenu({ id: shipment.id, ...at })} />
|
|
13173
13469
|
))}
|
|
13174
13470
|
</div>
|
|
13175
13471
|
<ContextMenu
|
|
@@ -13178,7 +13474,7 @@ export default function OnARow() {
|
|
|
13178
13474
|
onOpenChange={(open) => {
|
|
13179
13475
|
if (!open) setMenu(null);
|
|
13180
13476
|
}}
|
|
13181
|
-
|
|
13477
|
+
aria-label={`Actions for shipment ${menu?.id ?? ""}`}
|
|
13182
13478
|
>
|
|
13183
13479
|
<MenuItem onSelect={run("Tracked")}>Track the shipment</MenuItem>
|
|
13184
13480
|
<MenuItem onSelect={run("Rescheduled")}>Move to tomorrow</MenuItem>
|
|
@@ -13207,7 +13503,7 @@ export default function OnARow() {
|
|
|
13207
13503
|
| `Home / End` | Moves to the first or last entry. |
|
|
13208
13504
|
| `Escape` | Closes the menu and returns focus to where it was. |
|
|
13209
13505
|
| `Enter or Space` | Runs the focused entry and closes the menu. |
|
|
13210
|
-
| `Shift+F10 or the menu key` | Opens the menu
|
|
13506
|
+
| `Shift+F10 or the menu key` | Opens the menu at the focused element, which [`useContextMenuTrigger`](#api-index-1) listens for. |
|
|
13211
13507
|
|
|
13212
13508
|
#### API
|
|
13213
13509
|
|
|
@@ -13215,23 +13511,43 @@ export default function OnARow() {
|
|
|
13215
13511
|
|
|
13216
13512
|
| Prop | Type | Default | Description |
|
|
13217
13513
|
|---|---|---|---|
|
|
13218
|
-
| `open` *required* | `boolean` | — | Whether the menu stands. Controlled, like `Popover`: a right-click opens it only because the caller says so.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer or keyboard](#contextmenu) |
|
|
13219
|
-
| `onOpenChange` *required* | `(open: boolean) => void` | — | Reports every wish to change the state – an entry chosen, Escape, an outside click.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer or keyboard](#contextmenu) |
|
|
13220
|
-
| `position` *required* | `{ x: number; y: number }` | — | Where the menu opens, in client coordinates –
|
|
13221
|
-
| `children` *required* | `ReactNode` | — | The entries – `MenuItem` and `MenuSeparator`, as in `Menu`.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer or keyboard](#contextmenu) |
|
|
13514
|
+
| `open` *required* | `boolean` | — | Whether the menu stands. Controlled, like `Popover`: a right-click opens it only because the caller says so.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer, finger or keyboard](#contextmenu) |
|
|
13515
|
+
| `onOpenChange` *required* | `(open: boolean) => void` | — | Reports every wish to change the state – an entry chosen, Escape, an outside click.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer, finger or keyboard](#contextmenu) |
|
|
13516
|
+
| `position` *required* | `{ x: number; y: number }` | — | Where the menu opens, in client coordinates – the point that `useContextMenuTrigger` hands to its callback (right-click, context-menu key or long press), or any `clientX` and `clientY` of your own. At a window edge the panel flips and clamps as every popover does.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer, finger or keyboard](#contextmenu) |
|
|
13517
|
+
| `children` *required* | `ReactNode` | — | The entries – `MenuItem` and `MenuSeparator`, as in `Menu`.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer, finger or keyboard](#contextmenu) |
|
|
13222
13518
|
|
|
13223
13519
|
###### Accessibility
|
|
13224
13520
|
|
|
13225
13521
|
| Prop | Type | Default | Description |
|
|
13226
13522
|
|---|---|---|---|
|
|
13227
|
-
| `
|
|
13523
|
+
| `aria-label` | `string` | — | Accessible name of the menu: what it acts on. A context menu has no trigger whose label could name it.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer, finger or keyboard](#contextmenu) |
|
|
13524
|
+
|
|
13525
|
+
##### `ContextMenuTriggerProps`
|
|
13526
|
+
|
|
13527
|
+
###### Events
|
|
13528
|
+
|
|
13529
|
+
| Prop | Type | Default | Description |
|
|
13530
|
+
|---|---|---|---|
|
|
13531
|
+
| `onContextMenu` *required* | `(event: ReactMouseEvent<HTMLElement>) => void` | — | Opens at the pointer on a right-click; a finger's own `contextmenu` is held back.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer, finger or keyboard](#contextmenu) |
|
|
13532
|
+
| `onKeyDown` *required* | `(event: ReactKeyboardEvent<HTMLElement>) => void` | — | Opens at the target's box on the context-menu key or Shift+F10.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer, finger or keyboard](#contextmenu) |
|
|
13533
|
+
| `onPointerDown` *required* | `(event: ReactPointerEvent<HTMLElement>) => void` | — | From `LongPressHandlers`.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer, finger or keyboard](#contextmenu) |
|
|
13534
|
+
| `onPointerMove` *required* | `(event: ReactPointerEvent<HTMLElement>) => void` | — | From `LongPressHandlers`.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer, finger or keyboard](#contextmenu) |
|
|
13535
|
+
| `onPointerUp` *required* | `(event: ReactPointerEvent<HTMLElement>) => void` | — | From `LongPressHandlers`.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer, finger or keyboard](#contextmenu) |
|
|
13536
|
+
| `onPointerCancel` *required* | `(event: ReactPointerEvent<HTMLElement>) => void` | — | From `LongPressHandlers`.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer, finger or keyboard](#contextmenu) |
|
|
13537
|
+
| `onClickCapture` *required* | `(event: ReactMouseEvent<HTMLElement>) => void` | — | From `LongPressHandlers`.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer, finger or keyboard](#contextmenu) |
|
|
13538
|
+
|
|
13539
|
+
###### Styling
|
|
13540
|
+
|
|
13541
|
+
| Prop | Type | Default | Description |
|
|
13542
|
+
|---|---|---|---|
|
|
13543
|
+
| `style` *required* | `CSSProperties` | — | Keeps the system from selecting text or showing its callout under the held finger.<br>Shown in: [Open it at the pointer](#contextmenu), [Open it on a row, by pointer, finger or keyboard](#contextmenu) |
|
|
13228
13544
|
|
|
13229
13545
|
#### Known limits
|
|
13230
13546
|
|
|
13231
|
-
- It listens to no right-click itself: the element
|
|
13547
|
+
- It listens to no right-click itself: the element and the point are yours, through the hook.
|
|
13232
13548
|
- No submenus, no checkable entries and no type-ahead, as in the menu.
|
|
13233
13549
|
|
|
13234
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
13550
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
13235
13551
|
|
|
13236
13552
|
### Modal
|
|
13237
13553
|
|
|
@@ -13561,7 +13877,7 @@ type ModalSize = "sm" | "md" | "lg";
|
|
|
13561
13877
|
|
|
13562
13878
|
- No non-modal window and no dragging or resizing: a panel that leaves the page usable is layout – a [Splitter](#splitter).
|
|
13563
13879
|
|
|
13564
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
13880
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
13565
13881
|
|
|
13566
13882
|
### Drawer
|
|
13567
13883
|
|
|
@@ -13876,7 +14192,7 @@ Also takes every attribute of `<dialog>` – without `onClose`.
|
|
|
13876
14192
|
- Modal on purpose, with no non-modal mode: a panel beside a page the user keeps working in is layout, not an overlay.
|
|
13877
14193
|
- Only the left and right edges; nothing slides in from the top or bottom.
|
|
13878
14194
|
|
|
13879
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
14195
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
13880
14196
|
|
|
13881
14197
|
### ConfirmDialog
|
|
13882
14198
|
|
|
@@ -14053,7 +14369,7 @@ Also takes every attribute of `<dialog>` – without `children`, `onClose`, `ope
|
|
|
14053
14369
|
|
|
14054
14370
|
- A title, a description and two buttons, nothing more: fields belong in a [Modal](#modal).
|
|
14055
14371
|
|
|
14056
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
14372
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
14057
14373
|
|
|
14058
14374
|
### CommandPalette
|
|
14059
14375
|
|
|
@@ -14353,7 +14669,7 @@ Also takes every attribute of `<dialog>` – without `children`, `onClose`, `ope
|
|
|
14353
14669
|
- No memory of past choices and no ranking of its own beyond the match: recency and frequency are weights you keep.
|
|
14354
14670
|
- No nested steps or arguments: a command that needs input opens your own form after it is chosen.
|
|
14355
14671
|
|
|
14356
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
14672
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
14357
14673
|
|
|
14358
14674
|
## Navigation
|
|
14359
14675
|
|
|
@@ -14673,7 +14989,7 @@ Also takes every attribute of the rendered element.
|
|
|
14673
14989
|
|
|
14674
14990
|
- It neither routes nor reads the address: the trail is what you pass.
|
|
14675
14991
|
|
|
14676
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
14992
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
14677
14993
|
|
|
14678
14994
|
### Tabs
|
|
14679
14995
|
|
|
@@ -14959,6 +15275,37 @@ export default function AnInvoiceInTabs() {
|
|
|
14959
15275
|
}
|
|
14960
15276
|
```
|
|
14961
15277
|
|
|
15278
|
+
##### More tabs than room
|
|
15279
|
+
|
|
15280
|
+
A `TabList` wider than its place scrolls sideways within it and keeps the chosen tab in view.
|
|
15281
|
+
|
|
15282
|
+
```tsx
|
|
15283
|
+
import { Tab, TabList, TabPanel, Tabs, Text } from "@umriss-ui/core";
|
|
15284
|
+
|
|
15285
|
+
const REGIONS = ["Nordics", "Benelux", "Iberia", "DACH", "Baltics", "Balkans", "Central Europe", "Mediterranean", "British Isles", "Eastern Europe"];
|
|
15286
|
+
|
|
15287
|
+
export default function MoreTabsThanRoom() {
|
|
15288
|
+
return (
|
|
15289
|
+
<Tabs defaultValue="Nordics">
|
|
15290
|
+
<TabList aria-label="Regions">
|
|
15291
|
+
{REGIONS.map((region) => (
|
|
15292
|
+
<Tab key={region} value={region}>
|
|
15293
|
+
{region}
|
|
15294
|
+
</Tab>
|
|
15295
|
+
))}
|
|
15296
|
+
</TabList>
|
|
15297
|
+
{REGIONS.map((region) => (
|
|
15298
|
+
<TabPanel key={region} value={region}>
|
|
15299
|
+
<Text size="sm" tone="secondary">
|
|
15300
|
+
Open orders in {region}.
|
|
15301
|
+
</Text>
|
|
15302
|
+
</TabPanel>
|
|
15303
|
+
))}
|
|
15304
|
+
</Tabs>
|
|
15305
|
+
);
|
|
15306
|
+
}
|
|
15307
|
+
```
|
|
15308
|
+
|
|
14962
15309
|
#### When to use something else
|
|
14963
15310
|
|
|
14964
15311
|
- Sections a reader may open several of at once → Accordion
|
|
@@ -14978,7 +15325,7 @@ export default function AnInvoiceInTabs() {
|
|
|
14978
15325
|
|
|
14979
15326
|
| Prop | Type | Default | Description |
|
|
14980
15327
|
|---|---|---|---|
|
|
14981
|
-
| `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), [Loading and empty panels](#tabs), [An invoice in tabs](#tabs) and
|
|
15328
|
+
| `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), [Loading and empty panels](#tabs), [An invoice in tabs](#tabs) and 2 more |
|
|
14982
15329
|
| `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) |
|
|
14983
15330
|
| `ref` | `Ref<HTMLDivElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [An anchored surface (Popover)](#popover), [Take the width of the trigger (Popover)](#popover) and 2 more |
|
|
14984
15331
|
|
|
@@ -14994,7 +15341,7 @@ Also takes every attribute of `<div>` – without `defaultValue`, `onChange`.
|
|
|
14994
15341
|
|
|
14995
15342
|
| Prop | Type | Default | Description |
|
|
14996
15343
|
|---|---|---|---|
|
|
14997
|
-
| `value` *required* | `string` | — | The value this tab reports – and under which its panel stands.<br>Shown in: [One view at a time](#tabs), [Keep the tab in the address](#tabs), [Loading and empty panels](#tabs) and
|
|
15344
|
+
| `value` *required* | `string` | — | The value this tab reports – and under which its panel stands.<br>Shown in: [One view at a time](#tabs), [Keep the tab in the address](#tabs), [Loading and empty panels](#tabs) and 3 more |
|
|
14998
15345
|
| `ref` | `Ref<HTMLButtonElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [An anchored surface (Popover)](#popover), [Take the width of the trigger (Popover)](#popover) and 2 more |
|
|
14999
15346
|
|
|
15000
15347
|
Also takes every attribute of `<button>`.
|
|
@@ -15003,16 +15350,16 @@ Also takes every attribute of `<button>`.
|
|
|
15003
15350
|
|
|
15004
15351
|
| Prop | Type | Default | Description |
|
|
15005
15352
|
|---|---|---|---|
|
|
15006
|
-
| `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), [Keep the tab in the address](#tabs), [Loading and empty panels](#tabs) and
|
|
15353
|
+
| `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), [Keep the tab in the address](#tabs), [Loading and empty panels](#tabs) and 3 more |
|
|
15007
15354
|
| `ref` | `Ref<HTMLDivElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [An anchored surface (Popover)](#popover), [Take the width of the trigger (Popover)](#popover) and 2 more |
|
|
15008
15355
|
|
|
15009
15356
|
Also takes every attribute of `<div>`.
|
|
15010
15357
|
|
|
15011
15358
|
#### Known limits
|
|
15012
15359
|
|
|
15013
|
-
-
|
|
15360
|
+
- More tabs than fit scroll sideways within the list; there is no overflow menu, and no closing or reordering of tabs.
|
|
15014
15361
|
|
|
15015
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
15362
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
15016
15363
|
|
|
15017
15364
|
### Accordion
|
|
15018
15365
|
|
|
@@ -15261,7 +15608,7 @@ Also takes every attribute of `<div>` – without `title`.
|
|
|
15261
15608
|
|
|
15262
15609
|
- A folded section's content stays rendered; for heavy content, render it only while its section is open.
|
|
15263
15610
|
|
|
15264
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
15611
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
15265
15612
|
|
|
15266
15613
|
### Stepper
|
|
15267
15614
|
|
|
@@ -15471,7 +15818,7 @@ Also takes every attribute of the rendered element.
|
|
|
15471
15818
|
- The steps are read, not navigated: no keys, no clicks, and no next or back of its own. Moving on is your application's decision.
|
|
15472
15819
|
- No branching or optional steps; pass the steps that apply.
|
|
15473
15820
|
|
|
15474
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
15821
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
15475
15822
|
|
|
15476
15823
|
### TreeView
|
|
15477
15824
|
|
|
@@ -15533,7 +15880,7 @@ export default function ATree() {
|
|
|
15533
15880
|
const tree = useTree(COMPANY, { reader: READER, defaultExpanded: ["commercial"], defaultActive: "CC-1200" });
|
|
15534
15881
|
|
|
15535
15882
|
return (
|
|
15536
|
-
<TreeView tree={tree}
|
|
15883
|
+
<TreeView tree={tree} aria-label="Cost centres">
|
|
15537
15884
|
{(entry) => entry.node.name}
|
|
15538
15885
|
</TreeView>
|
|
15539
15886
|
);
|
|
@@ -15583,7 +15930,7 @@ export default function TickASelection() {
|
|
|
15583
15930
|
|
|
15584
15931
|
return (
|
|
15585
15932
|
<Stack gap={2}>
|
|
15586
|
-
<TreeView tree={tree}
|
|
15933
|
+
<TreeView tree={tree} aria-label="People for sprint 15" checkable>
|
|
15587
15934
|
{(entry) => entry.node.name}
|
|
15588
15935
|
</TreeView>
|
|
15589
15936
|
<Text size="xs" tone="muted">
|
|
@@ -15646,7 +15993,7 @@ export default function LoadBranchesOnDemand() {
|
|
|
15646
15993
|
const tree = useTree(depots, { reader: READER, onLoadChildren: load });
|
|
15647
15994
|
|
|
15648
15995
|
return (
|
|
15649
|
-
<TreeView tree={tree}
|
|
15996
|
+
<TreeView tree={tree} aria-label="Today's tours by depot">
|
|
15650
15997
|
{(entry) => entry.node.name}
|
|
15651
15998
|
</TreeView>
|
|
15652
15999
|
);
|
|
@@ -15707,7 +16054,7 @@ export default function SearchWithThePath() {
|
|
|
15707
16054
|
return (
|
|
15708
16055
|
<Stack gap={2} style={{ maxWidth: 320 }}>
|
|
15709
16056
|
<TreeSearch tree={tree} aria-label="Search the services" size="sm" />
|
|
15710
|
-
<TreeView tree={tree}
|
|
16057
|
+
<TreeView tree={tree} aria-label="Services by team">
|
|
15711
16058
|
{(entry) => entry.node.name}
|
|
15712
16059
|
</TreeView>
|
|
15713
16060
|
</Stack>
|
|
@@ -15773,7 +16120,7 @@ export default function WithAnError() {
|
|
|
15773
16120
|
</Text>
|
|
15774
16121
|
)}
|
|
15775
16122
|
</Stack>
|
|
15776
|
-
<TreeView tree={tree}
|
|
16123
|
+
<TreeView tree={tree} aria-label="Services by team" checkable>
|
|
15777
16124
|
{(entry) => entry.node.name}
|
|
15778
16125
|
</TreeView>
|
|
15779
16126
|
</Stack>
|
|
@@ -15939,7 +16286,7 @@ export default function SearchCheckAndReveal() {
|
|
|
15939
16286
|
With checks and a search
|
|
15940
16287
|
</Text>
|
|
15941
16288
|
<TreeSearch tree={withChecks} aria-label="Search the filing" size="sm" />
|
|
15942
|
-
<TreeView tree={withChecks}
|
|
16289
|
+
<TreeView tree={withChecks} aria-label="Filing with a selection" checkable>
|
|
15943
16290
|
{(e) => e.node.name}
|
|
15944
16291
|
</TreeView>
|
|
15945
16292
|
<Text size="xs" tone="muted">
|
|
@@ -15952,7 +16299,7 @@ export default function SearchCheckAndReveal() {
|
|
|
15952
16299
|
A search with the path
|
|
15953
16300
|
</Text>
|
|
15954
16301
|
<TreeSearch tree={searched} aria-label="Search the filing" size="sm" />
|
|
15955
|
-
<TreeView tree={searched}
|
|
16302
|
+
<TreeView tree={searched} aria-label="Filing, searched">
|
|
15956
16303
|
{(e) => e.node.name}
|
|
15957
16304
|
</TreeView>
|
|
15958
16305
|
</Stack>
|
|
@@ -15977,7 +16324,7 @@ export default function SearchCheckAndReveal() {
|
|
|
15977
16324
|
Reveal sheet 33.2
|
|
15978
16325
|
</Button>
|
|
15979
16326
|
</Stack>
|
|
15980
|
-
<TreeView tree={large}
|
|
16327
|
+
<TreeView tree={large} aria-label="Large body" style={{ height: 240 }}>
|
|
15981
16328
|
{(e) => e.node.name}
|
|
15982
16329
|
</TreeView>
|
|
15983
16330
|
<Text size="xs" tone="muted">
|
|
@@ -15989,7 +16336,7 @@ export default function SearchCheckAndReveal() {
|
|
|
15989
16336
|
<Text size="xs" tone="muted">
|
|
15990
16337
|
Active node only
|
|
15991
16338
|
</Text>
|
|
15992
|
-
<TreeView tree={activeOnly}
|
|
16339
|
+
<TreeView tree={activeOnly} aria-label="Filing for navigation">
|
|
15993
16340
|
{(e) => e.node.name}
|
|
15994
16341
|
</TreeView>
|
|
15995
16342
|
<Text size="xs" tone="muted">
|
|
@@ -16037,7 +16384,7 @@ export default function SearchCheckAndReveal() {
|
|
|
16037
16384
|
|
|
16038
16385
|
| Prop | Type | Default | Description |
|
|
16039
16386
|
|---|---|---|---|
|
|
16040
|
-
| `
|
|
16387
|
+
| `aria-label` *required* | `string` | — | Accessible name of the tree.<br>Shown in: [A tree](#treeview), [Tick a selection](#treeview), [Load branches on demand](#treeview) and 5 more |
|
|
16041
16388
|
|
|
16042
16389
|
Also takes every attribute of `<div>` – without `children`.
|
|
16043
16390
|
|
|
@@ -16149,7 +16496,7 @@ to render and the heights of the filler rows around it.
|
|
|
16149
16496
|
- No dragging nodes to rearrange them.
|
|
16150
16497
|
- It fetches nothing and handles no loading errors: retries and messages stay in your application ([ADR-0005](https://github.com/romanhaendler/umriss-ui/blob/main/docs/adr/0005-what-cannot-be-checked.md)).
|
|
16151
16498
|
|
|
16152
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
16499
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
16153
16500
|
|
|
16154
16501
|
### Benchmark
|
|
16155
16502
|
|
|
@@ -16254,7 +16601,7 @@ function Body({ built, onShown }: { built: { roots: Unit[]; open: string[] }; on
|
|
|
16254
16601
|
});
|
|
16255
16602
|
useEffect(onShown, [onShown]);
|
|
16256
16603
|
return (
|
|
16257
|
-
<TreeView tree={tree}
|
|
16604
|
+
<TreeView tree={tree} aria-label="Benchmark tree" style={{ height: 320 }}>
|
|
16258
16605
|
{(entry) => entry.node.name}
|
|
16259
16606
|
</TreeView>
|
|
16260
16607
|
);
|
|
@@ -16432,7 +16779,7 @@ From `TreeViewProps` — the full table stands on [TreeView](#treeview).
|
|
|
16432
16779
|
|
|
16433
16780
|
| Prop | Type | Default | Description |
|
|
16434
16781
|
|---|---|---|---|
|
|
16435
|
-
| [`
|
|
16782
|
+
| [`aria-label`](#treeview) *required* | `string` | — | Accessible name of the tree. |
|
|
16436
16783
|
|
|
16437
16784
|
## Data display
|
|
16438
16785
|
|
|
@@ -16604,7 +16951,7 @@ The keys of [Button](#button) apply here.
|
|
|
16604
16951
|
|
|
16605
16952
|
| Prop | Type | Default | Description |
|
|
16606
16953
|
|---|---|---|---|
|
|
16607
|
-
| `tone` | `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), [Tones](#badge), [Counters](#badge) and
|
|
16954
|
+
| `tone` | `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), [Tones](#badge), [Counters](#badge) and 20 more |
|
|
16608
16955
|
| `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), [Counters](#badge), [Fold the body (Card)](#card) and 1 more |
|
|
16609
16956
|
| `ref` | `Ref<HTMLSpanElement> \| undefined` | — | Receives the component's root element. From `RefProp`.<br>Shown in: [A row that holds still (Sizes)](#sizes), [An anchored surface (Popover)](#popover), [Take the width of the trigger (Popover)](#popover) and 2 more |
|
|
16610
16957
|
|
|
@@ -16626,7 +16973,7 @@ type BadgeTone = "neutral" | "accent" | "success" | "warning" | "danger";
|
|
|
16626
16973
|
- It cannot be clicked or removed; a label the user acts on is a [Tag](#tag).
|
|
16627
16974
|
- It counts nothing itself: capping at “99+” is yours.
|
|
16628
16975
|
|
|
16629
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
16976
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
16630
16977
|
|
|
16631
16978
|
### Tag
|
|
16632
16979
|
|
|
@@ -16893,7 +17240,7 @@ type TagTone = "neutral" | "accent" | "success" | "warning" | "danger";
|
|
|
16893
17240
|
- No field for typing new tags: a tag input is a [MultiSelect](#multiselect).
|
|
16894
17241
|
- Tags are not toggles: a set of choices to switch on and off is a group of [Checkbox](#checkbox) or a [ButtonGroup](#buttongroup).
|
|
16895
17242
|
|
|
16896
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
17243
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
16897
17244
|
|
|
16898
17245
|
### Stat
|
|
16899
17246
|
|
|
@@ -17729,7 +18076,7 @@ type Severity = "warning" | "alarm";
|
|
|
17729
18076
|
- No trend arrow: a direction from two noisy points is read as information it does not carry; the history line shows the shape.
|
|
17730
18077
|
- It fetches and polls nothing: freshness is judged from the `asOf` you give it.
|
|
17731
18078
|
|
|
17732
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
18079
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
17733
18080
|
|
|
17734
18081
|
### Meter
|
|
17735
18082
|
|
|
@@ -17899,7 +18246,7 @@ type MeterTone = "neutral" | "accent" | "success" | "warning" | "danger";
|
|
|
17899
18246
|
|
|
17900
18247
|
- No limit marks, target tick or scale on the bar; for a value against limits use a [Stat](#stat).
|
|
17901
18248
|
|
|
17902
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
18249
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
17903
18250
|
|
|
17904
18251
|
### Sparkline
|
|
17905
18252
|
|
|
@@ -18157,7 +18504,7 @@ Also takes every attribute of `<span>`.
|
|
|
18157
18504
|
|
|
18158
18505
|
- No axes, labels, tooltip or points to hover: the value stands beside it.
|
|
18159
18506
|
|
|
18160
|
-
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.
|
|
18507
|
+
What umriss deliberately does not build, and why: [ADR-0032](https://github.com/romanhaendler/umriss-ui/blob/core-v0.44.0/docs/adr/0032-what-umriss-is-not.md).
|
|
18161
18508
|
|
|
18162
18509
|
## API index
|
|
18163
18510
|
|
|
@@ -18755,6 +19102,26 @@ function useCommandPaletteShortcut(onOpen: () => void): void;
|
|
|
18755
19102
|
|
|
18756
19103
|
Used on [CommandPalette](#commandpalette).
|
|
18757
19104
|
|
|
19105
|
+
##### `useContextMenuTrigger`
|
|
19106
|
+
|
|
19107
|
+
Opens a `ContextMenu` the same way on every device: on a right-click (at the
|
|
19108
|
+
pointer), on the context-menu key or Shift+F10 (at the target's box) and on
|
|
19109
|
+
a long press with a finger (at the finger), which is the only way on iOS.
|
|
19110
|
+
`open` receives the point to pass on as the menu's `position`.
|
|
19111
|
+
|
|
19112
|
+
Spread the result on the target. It sets `style`, so a caller with a style
|
|
19113
|
+
of their own merges it: `style={{ ...trigger.style, ...mine }}`. The click
|
|
19114
|
+
and the `contextmenu` that end a long press do not reach the target.
|
|
19115
|
+
|
|
19116
|
+
```ts
|
|
19117
|
+
function useContextMenuTrigger(open: (position: {
|
|
19118
|
+
x: number;
|
|
19119
|
+
y: number;
|
|
19120
|
+
}) => void): ContextMenuTriggerProps;
|
|
19121
|
+
```
|
|
19122
|
+
|
|
19123
|
+
Used on [ContextMenu](#contextmenu).
|
|
19124
|
+
|
|
18758
19125
|
##### `useDensity`
|
|
18759
19126
|
|
|
18760
19127
|
The configured density; without a provider, "comfortable".
|
|
@@ -18985,6 +19352,18 @@ is then enough.
|
|
|
18985
19352
|
function cadence(ages: FreshnessAges): number;
|
|
18986
19353
|
```
|
|
18987
19354
|
|
|
19355
|
+
##### `createLongPress`
|
|
19356
|
+
|
|
19357
|
+
The one long-press detector, a plain function over pointer events so that
|
|
19358
|
+
code outside React can use it. `onPress` fires once, with the finger's point
|
|
19359
|
+
in client coordinates, when a touch pointer has been held 500 ms within 10 px;
|
|
19360
|
+
`onEnd` fires when a press that has fired is lifted or cancelled. A move
|
|
19361
|
+
beyond 10 px, a lift and `pointercancel` before the hold cancel it silently.
|
|
19362
|
+
|
|
19363
|
+
```ts
|
|
19364
|
+
function createLongPress(onPress: (at: PressPoint) => void, onEnd?: () => void): LongPress;
|
|
19365
|
+
```
|
|
19366
|
+
|
|
18988
19367
|
##### `duplicateKey`
|
|
18989
19368
|
|
|
18990
19369
|
The first key that occurs twice, otherwise null. Two nodes with the same
|
|
@@ -19100,6 +19479,17 @@ because the rendered set changed.
|
|
|
19100
19479
|
function visibleWindow({ count, rowHeight, scrollTop, viewportHeight, overscan, }: WindowInput): RowWindow;
|
|
19101
19480
|
```
|
|
19102
19481
|
|
|
19482
|
+
##### `writeNumber`
|
|
19483
|
+
|
|
19484
|
+
A number as its format says, through the set's own functions - so an
|
|
19485
|
+
application's replaced `number`, `percent` or `count` is the one called.
|
|
19486
|
+
No format, or an object with only `decimals`, is `number`; every other
|
|
19487
|
+
object is `numberWith`.
|
|
19488
|
+
|
|
19489
|
+
```ts
|
|
19490
|
+
function writeNumber(formats: Formats, n: number, format?: NumberFormat): string;
|
|
19491
|
+
```
|
|
19492
|
+
|
|
19103
19493
|
#### Constants
|
|
19104
19494
|
|
|
19105
19495
|
##### `DEFAULT_FORMATS`
|
|
@@ -19286,6 +19676,10 @@ Its table stands on [ConfirmDialog](#confirmdialog).
|
|
|
19286
19676
|
|
|
19287
19677
|
Its table stands on [ContextMenu](#contextmenu).
|
|
19288
19678
|
|
|
19679
|
+
##### `ContextMenuTriggerProps`
|
|
19680
|
+
|
|
19681
|
+
Its table stands on [ContextMenu](#contextmenu).
|
|
19682
|
+
|
|
19289
19683
|
##### `ControlSize`
|
|
19290
19684
|
|
|
19291
19685
|
The two heights of a control: `sm` for a toolbar and dense forms, `md`
|
|
@@ -19402,6 +19796,7 @@ Everything the library knows about formatting.
|
|
|
19402
19796
|
| `dateTime` *required* | `(d: Date, withSeconds: boolean) => string` | — | Date and time together: 17/03/2026, 09:05<br>Shown in: [Use the language in your own components (Language)](#language), [Pick a day (DatePicker)](#datepicker), [Set an instant (DateTimePicker)](#datetimepicker) and 1 more |
|
|
19403
19797
|
| `offset` *required* | `(d: Date) => string` | — | Short form of the UTC offset: GMT+2<br>Shown in: [Set an instant (DateTimePicker)](#datetimepicker) |
|
|
19404
19798
|
| `number` *required* | `(n: number, decimals?: number) => string` | — | A number in the set's notation. Without a digit count the value stands to the tenth decimal place, and a non-zero value that would read 0 there is written in scientific notation; with one it is padded and rounded to exactly that many places.<br>Shown in: [Write numbers in your own notation (Language)](#language), [Price an invoice line (NumberInput)](#numberinput), [Split a budget (Slider)](#slider) |
|
|
19799
|
+
| `numberWith` *required* | `(n: number, options: Intl.NumberFormatOptions) => string` | — | A number written with Intl's own options in the set's locale: a currency, a year without grouping, scientific notation. Pure Intl options - the `decimals` shorthand is expanded by `writeNumber` before it. Like the others it writes no negative zero unless the options set `signDisplay`. |
|
|
19405
19800
|
| `count` *required* | `(n: number) => string` | — | A count. Kept apart from `number` because it makes a different promise: a count is whole, and Intl's own rounding (at most three decimal places) is right for it and wrong for a measurement.<br>Shown in: [Write numbers in your own notation (Language)](#language), [Use the language in your own components (Language)](#language) |
|
|
19406
19801
|
| `percent` *required* | `(share: number) => string` | — | A share from 0 to 1 as whole per cent: 74 % |
|
|
19407
19802
|
| `compareText` *required* | `(a: string, b: string) => number` | — | The ordering of two texts by the set's collation. |
|
|
@@ -19572,6 +19967,32 @@ Used on [Scenarios](#scenarios), [Language](#language), [Drawer](#drawer) and [S
|
|
|
19572
19967
|
|
|
19573
19968
|
Its table stands on [Typography](#typography-2).
|
|
19574
19969
|
|
|
19970
|
+
##### `LongPress`
|
|
19971
|
+
|
|
19972
|
+
A press detector over pointer events; see `createLongPress`.
|
|
19973
|
+
|
|
19974
|
+
```ts
|
|
19975
|
+
interface LongPress {
|
|
19976
|
+
/** Arms the press when the pointer is a finger; a mouse and a pen never press. */
|
|
19977
|
+
pointerDown(event: PressPointer): void;
|
|
19978
|
+
/** Cancels a press that is not yet held once the finger has left its 10 px. */
|
|
19979
|
+
pointerMove(event: PressPointer): void;
|
|
19980
|
+
/** Ends a press: a held one calls `onEnd`, and its click is then swallowed. */
|
|
19981
|
+
pointerUp(): void;
|
|
19982
|
+
/** As `pointerUp`, for `pointercancel`. */
|
|
19983
|
+
pointerCancel(): void;
|
|
19984
|
+
/** Whether this click belongs to a press and must not reach the target: true
|
|
19985
|
+
once for the click that ends a held press. Call `preventDefault` and
|
|
19986
|
+
`stopPropagation` on the event when it is. */
|
|
19987
|
+
swallows(): boolean;
|
|
19988
|
+
/** Whether the last pointer was a finger - the `contextmenu` of such a
|
|
19989
|
+
pointer is the press's, not a right-click. */
|
|
19990
|
+
touching(): boolean;
|
|
19991
|
+
/** Drops the timer. Call it when the target goes away. */
|
|
19992
|
+
dispose(): void;
|
|
19993
|
+
}
|
|
19994
|
+
```
|
|
19995
|
+
|
|
19575
19996
|
##### `MenuItemProps`
|
|
19576
19997
|
|
|
19577
19998
|
Its table stands on [Menu](#menu).
|
|
@@ -19638,10 +20059,29 @@ thereby stays entirely the caller's.
|
|
|
19638
20059
|
|
|
19639
20060
|
Used on [Scenarios](#scenarios), [TreeView](#treeview) and [Benchmark](#benchmark).
|
|
19640
20061
|
|
|
20062
|
+
##### `NumberFormat`
|
|
20063
|
+
|
|
20064
|
+
How a number is written: a share, a count, or Intl's options.
|
|
20065
|
+
|
|
20066
|
+
```ts
|
|
20067
|
+
type NumberFormat = "percent" | "count" | NumberOptions;
|
|
20068
|
+
```
|
|
20069
|
+
|
|
20070
|
+
Used on [Scenarios](#scenarios) and [Language](#language).
|
|
20071
|
+
|
|
19641
20072
|
##### `NumberInputProps`
|
|
19642
20073
|
|
|
19643
20074
|
Its table stands on [NumberInput](#numberinput).
|
|
19644
20075
|
|
|
20076
|
+
##### `NumberOptions`
|
|
20077
|
+
|
|
20078
|
+
Intl's number options, plus `decimals`: the shorthand for the minimum and the
|
|
20079
|
+
maximum fraction digits. An Intl digit option given beside it wins.
|
|
20080
|
+
|
|
20081
|
+
```ts
|
|
20082
|
+
type NumberOptions = Intl.NumberFormatOptions & { decimals?: number };
|
|
20083
|
+
```
|
|
20084
|
+
|
|
19645
20085
|
##### `PopoverProps`
|
|
19646
20086
|
|
|
19647
20087
|
Its table stands on [Popover](#popover).
|
|
@@ -19660,6 +20100,25 @@ type PortalTarget = HTMLElement | (() => HTMLElement | null) | null;
|
|
|
19660
20100
|
|
|
19661
20101
|
Used on [UmrissProvider](#umrissprovider).
|
|
19662
20102
|
|
|
20103
|
+
##### `PressPoint`
|
|
20104
|
+
|
|
20105
|
+
Where the finger stands, in client coordinates.
|
|
20106
|
+
|
|
20107
|
+
| Prop | Type | Default | Description |
|
|
20108
|
+
|---|---|---|---|
|
|
20109
|
+
| `x` *required* | `number` | — | |
|
|
20110
|
+
| `y` *required* | `number` | — | |
|
|
20111
|
+
|
|
20112
|
+
##### `PressPointer`
|
|
20113
|
+
|
|
20114
|
+
What the detector reads of a pointer event - a DOM or a React one fits.
|
|
20115
|
+
|
|
20116
|
+
| Prop | Type | Default | Description |
|
|
20117
|
+
|---|---|---|---|
|
|
20118
|
+
| `pointerType` *required* | `string` | — | |
|
|
20119
|
+
| `clientX` *required* | `number` | — | |
|
|
20120
|
+
| `clientY` *required* | `number` | — | |
|
|
20121
|
+
|
|
19663
20122
|
##### `ProgressBarProps`
|
|
19664
20123
|
|
|
19665
20124
|
Its table stands on [ProgressBar](#progressbar).
|
|
@@ -20224,7 +20683,10 @@ Everything the library puts out as text.
|
|
|
20224
20683
|
| `unpinHint` *required* | `string` | — | |
|
|
20225
20684
|
| `exportLabel` *required* | `string` | — | The export button. |
|
|
20226
20685
|
| `exportPageLabel` *required* | `string` | — | The export button of a table in server mode, which holds and writes one page. |
|
|
20686
|
+
| `exporting` *required* | `string` | — | The status while the application prepares an export of every match. |
|
|
20687
|
+
| `exportFailed` *required* | `string` | — | The alert beside the export button when preparing the export failed without a message. |
|
|
20227
20688
|
| `exportFileName` *required* | `string` | — | The export's file name, where the application names none. |
|
|
20689
|
+
| `exportSheetName` *required* | `string` | — | The name of the sheet an XLSX export holds. |
|
|
20228
20690
|
| `tableSearchPlaceholder` *required* | `string` | — | Placeholder and accessible name of the search field. |
|
|
20229
20691
|
| `tableSearchLabel` *required* | `string` | — | |
|
|
20230
20692
|
| `filterColumn` *required* | `(column: string) => string` | — | The filter button of a column: "Filter Region". |
|
|
@@ -20272,10 +20734,14 @@ Everything the library puts out as text.
|
|
|
20272
20734
|
| `levelColumn` *required* | `string` | — | The first column of a tree's export. |
|
|
20273
20735
|
| `pathRow` *required* | `string` | — | A row shown only because a descendant matches the search or a filter. |
|
|
20274
20736
|
| `footerTopLevel` *required* | `string` | — | The footer of a tree: it sums the top level, since a parent holds its children. |
|
|
20737
|
+
| `footerOfMatches` *required* | `string` | — | The footer of a server-mode table: its sums come from the server and cover every match, not the page. Read out only. |
|
|
20275
20738
|
| `selectGroup` *required* | `(name: string) => string` | — | The box that selects every row of a group. |
|
|
20276
20739
|
| `calendarWeek` *required* | `(week: number, year: number) => string` | — | A group of the week key: "Week 42, 2026". |
|
|
20277
20740
|
| `entries` *required* | `(count: number, formatted: string) => string` | — | "128 entries" in the pagination bar; the plural belongs to the language. |
|
|
20278
20741
|
| `selectedCount` *required* | `(count: number, formatted: string) => string` | — | "3 selected" in the pagination bar and the table toolbar. |
|
|
20742
|
+
| `selectedOnPage` *required* | `(count: number, formatted: string) => string` | — | The first sentence of the offer in a server-mode table, once the page is ticked: "All 50 on this page are selected." |
|
|
20743
|
+
| `selectAllMatching` *required* | `(count: number, formatted: string) => string` | — | The button after it, for the rows the server holds: "Select all 12,400 that match". |
|
|
20744
|
+
| `allMatchingSelected` *required* | `(count: number, formatted: string) => string` | — | The line once they are selected: "All 12,400 that match are selected." |
|
|
20279
20745
|
| `copiedRows` *required* | `(count: number, formatted: string) => string` | — | Said to a screen reader after Ctrl+C copied rows: "3 rows copied". |
|
|
20280
20746
|
| `copiedCell` *required* | `string` | — | Said after Ctrl+C copied the active cell of a grid. |
|
|
20281
20747
|
| `copyFailed` *required* | `string` | — | Said when the clipboard refused or is not there. |
|
|
@@ -20294,6 +20760,7 @@ Everything the library puts out as text.
|
|
|
20294
20760
|
| `rangeTo` *required* | `(to: string) => string` | — | |
|
|
20295
20761
|
| `rangeInvalid` *required* | `string` | — | When "From" lies behind "To". The condition stays the last valid one. |
|
|
20296
20762
|
| `resetAll` *required* | `string` | — | Clears search and conditions - in the table toolbar and in the empty body. |
|
|
20763
|
+
| `tryAgain` *required* | `string` | — | The button under a server-mode table's error that sends the request once more. |
|
|
20297
20764
|
| `filteredOfTotal` *required* | `(matches: string, total: string) => string` | — | "43 of 1.204" - the numbers come from the formats. |
|
|
20298
20765
|
| `verdictOk` *required* | `string` | — | The four outcomes of an assessment, as a word beside the value. Colour alone carries no meaning - the word stands here for that reason.<br>Shown in: [Replace single entries (Language)](#language) |
|
|
20299
20766
|
| `verdictWarning` *required* | `string` | — | <br>Shown in: [Replace single entries (Language)](#language) |
|