@umriss-ui/core 0.33.0 → 0.34.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 +28 -6
- package/README.md +5 -9
- package/dist/core.css +1 -1
- package/dist/core.js +3909 -4245
- package/dist/de.d.ts +0 -74
- package/dist/index.d.ts +35 -310
- package/dist/wording/de.js +1 -42
- package/docs/llms-full.md +189 -934
- package/package.json +3 -2
package/dist/de.d.ts
CHANGED
|
@@ -115,20 +115,6 @@ declare interface Wording {
|
|
|
115
115
|
therefore do not stand here; "Esc" is a word and is called something else
|
|
116
116
|
elsewhere. */
|
|
117
117
|
paletteKeyEsc: string;
|
|
118
|
-
/** Accessible name of a dock's tools. */
|
|
119
|
-
dockTools: string;
|
|
120
|
-
/** Accessible name of the grip - it says what it does, not what it is. */
|
|
121
|
-
dockGrip: string;
|
|
122
|
-
/** The four resting places, named. The keys are the `DockPlace` type's, and a
|
|
123
|
-
register translates them: the German one answers "oben" where the
|
|
124
|
-
English one answers "top". */
|
|
125
|
-
dockPlace: (place: "top" | "right" | "bottom" | "left") => string;
|
|
126
|
-
/** What the screen reader hears once the dock has taken a place. */
|
|
127
|
-
dockPlaced: (place: string) => string;
|
|
128
|
-
/** And what it hears when a place has refused. A refusal is not a fault: a
|
|
129
|
-
wide, flat host with no room for a standing dock is not a mistake anyone
|
|
130
|
-
made. */
|
|
131
|
-
dockNoPlace: (place: string) => string;
|
|
132
118
|
datePlaceholder: string;
|
|
133
119
|
/** Accessible name of the panel. Deliberately kept apart from the
|
|
134
120
|
placeholder: whoever labels the field differently does not thereby rename
|
|
@@ -392,66 +378,6 @@ declare interface Wording {
|
|
|
392
378
|
freshnessDisconnected: string;
|
|
393
379
|
/** "As of: 3 minutes ago", where the duration comes from the formats. */
|
|
394
380
|
asOfAgo: (duration: string) => string;
|
|
395
|
-
asOfUnknown: string;
|
|
396
|
-
alarms: string;
|
|
397
|
-
noAlarms: string;
|
|
398
|
-
/** Empty, but the line is down - that is something other than quiet. */
|
|
399
|
-
noAlarmsDisconnected: string;
|
|
400
|
-
acknowledgeAlarm: string;
|
|
401
|
-
/** Bulk acknowledgement; the number stands in the text on purpose. */
|
|
402
|
-
acknowledgeAlarms: (count: number) => string;
|
|
403
|
-
/** The alarm list's snooze menu, beside "Acknowledge": the word on its
|
|
404
|
-
button, and the sentence with the number of alarms it acts on. */
|
|
405
|
-
snoozeAlarm: string;
|
|
406
|
-
snoozeAlarms: (count: number) => string;
|
|
407
|
-
/** The labels in the panel that opens with `snoozeReason`: the duration to
|
|
408
|
-
choose and the reason to give. The panel's own button is `snoozeAlarm`. */
|
|
409
|
-
snoozeDuration: string;
|
|
410
|
-
snoozeReason: string;
|
|
411
|
-
/** Ends the snooze of the ticked alarms before its time. */
|
|
412
|
-
unsnoozeAlarm: string;
|
|
413
|
-
unsnoozeAlarms: (count: number) => string;
|
|
414
|
-
priorityHigh: string;
|
|
415
|
-
priorityMedium: string;
|
|
416
|
-
priorityLow: string;
|
|
417
|
-
/** The four lifecycle states, written out. */
|
|
418
|
-
lifecycleActiveUnacknowledged: string;
|
|
419
|
-
lifecycleActiveAcknowledged: string;
|
|
420
|
-
lifecycleResolvedUnacknowledged: string;
|
|
421
|
-
lifecycleResolvedAcknowledged: string;
|
|
422
|
-
/** "Alarm flood: 12 in quick succession" - a flood is marked, never
|
|
423
|
-
suppressed. */
|
|
424
|
-
floodHint: (count: number) => string;
|
|
425
|
-
/** "40×" on a chattering alarm type. */
|
|
426
|
-
chatterHint: (count: number) => string;
|
|
427
|
-
/** The text of the live region: the number of active unacknowledged alarms. */
|
|
428
|
-
activeUnacknowledged: (count: number) => string;
|
|
429
|
-
columnAlarm: string;
|
|
430
|
-
columnLifecycleState: string;
|
|
431
|
-
columnPriority: string;
|
|
432
|
-
columnRaised: string;
|
|
433
|
-
columnDuration: string;
|
|
434
|
-
columnFrequency: string;
|
|
435
|
-
/** The two columns of the alarm model the list does not show, but which do
|
|
436
|
-
land in the column menu and the CSV header (`alarmColumns`). */
|
|
437
|
-
columnAcknowledgement: string;
|
|
438
|
-
columnAge: string;
|
|
439
|
-
/** The availability of an alarm (ISA-18.2's special states), written out.
|
|
440
|
-
A snooze names its end and who snoozed it - a snooze is tracked, not
|
|
441
|
-
anonymous; the time comes from the formats. The reason, when the snooze
|
|
442
|
-
has one, comes last and is optional: a wording of two parameters fits. */
|
|
443
|
-
availabilitySnoozed: (until: string, by: string, reason?: string) => string;
|
|
444
|
-
/** A snooze as one word - the alarm list's badge; the sentence above stands
|
|
445
|
-
in its tooltip and in what is spoken. */
|
|
446
|
-
availabilitySnoozedShort: string;
|
|
447
|
-
availabilitySuppressed: string;
|
|
448
|
-
availabilityDisabled: string;
|
|
449
|
-
/** "Hidden: 3" - the count of the view of snoozed, suppressed and disabled
|
|
450
|
-
alarms, and its name where the list offers the view as a switch. */
|
|
451
|
-
hiddenAlarms: (count: number) => string;
|
|
452
|
-
/** The availability column of the alarm model: the column menu and the CSV
|
|
453
|
-
header, like the two above. */
|
|
454
|
-
columnAvailability: string;
|
|
455
381
|
close: string;
|
|
456
382
|
closeToast: string;
|
|
457
383
|
/** The count on the front toast of a closed deck; pressing it shows them all. */
|
package/dist/index.d.ts
CHANGED
|
@@ -131,9 +131,7 @@ export declare function announce(text: string, at?: Element | null): void;
|
|
|
131
131
|
* alarm, even where the value lies further beyond the warning.
|
|
132
132
|
*
|
|
133
133
|
* No hysteresis: that would need the previous state, and a function of a
|
|
134
|
-
* single value has none.
|
|
135
|
-
* duplicate; the trailing of an alarm belongs to its lifecycle and not to a
|
|
136
|
-
* bound.
|
|
134
|
+
* single value has none.
|
|
137
135
|
*/
|
|
138
136
|
export declare function assess(value: number | null | undefined, set?: LimitSet): Assessment;
|
|
139
137
|
|
|
@@ -148,10 +146,7 @@ export declare interface Assessment {
|
|
|
148
146
|
excess?: number;
|
|
149
147
|
/** The signed distance from the target. Absent where none is set: no target
|
|
150
148
|
means no deviation, not a deviation of zero.
|
|
151
|
-
|
|
152
|
-
Two fields, because they are two numbers. A single one meaning the one
|
|
153
|
-
thing when a bound is violated and the other otherwise reads well and is
|
|
154
|
-
wrong at three in the morning. */
|
|
149
|
+
*/
|
|
155
150
|
deviation?: number;
|
|
156
151
|
}
|
|
157
152
|
|
|
@@ -322,23 +317,9 @@ export declare interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInpu
|
|
|
322
317
|
indeterminate?: boolean;
|
|
323
318
|
}
|
|
324
319
|
|
|
325
|
-
/**
|
|
326
|
-
* The height the field is allowed to take on. Without an upper bound it
|
|
327
|
-
* grows with its content; with one, up to that many rows and then no
|
|
328
|
-
* further.
|
|
329
|
-
*
|
|
330
|
-
* A line height of 0 is treated as "not measurable yet" (the font has not
|
|
331
|
-
* been loaded), because otherwise the field visibly collapsed while
|
|
332
|
-
* loading.
|
|
333
|
-
*/
|
|
334
|
-
export declare const clampedHeight: (measured: number, lineHeight: number, maxRows: number | undefined) => number;
|
|
335
|
-
|
|
336
320
|
/** A clock face at a quarter past - the time pickers' character. */
|
|
337
321
|
export declare const ClockGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
338
322
|
|
|
339
|
-
/** Closes a branch. Returns the same snapshot where it is closed already. */
|
|
340
|
-
export declare function collapse<S extends Key>(snapshot: TreeSnapshot<S>, key: S): TreeSnapshot<S>;
|
|
341
|
-
|
|
342
323
|
/** A searchable select field (the combobox pattern with a listbox panel). */
|
|
343
324
|
export declare const Combobox: <T extends string = string>(props: ComboboxProps<T> & {
|
|
344
325
|
ref?: ForwardedRef<HTMLDivElement>;
|
|
@@ -563,8 +544,8 @@ export declare const DatePicker: ForwardRefExoticComponent<DatePickerProps & Ref
|
|
|
563
544
|
export declare interface DatePickerProps extends Omit<HTMLAttributes<HTMLSpanElement>, "onChange" | "defaultValue"> {
|
|
564
545
|
/** The day, as a `Date` on local midnight; `null` means none. */
|
|
565
546
|
value: Date | null;
|
|
566
|
-
/** Runs as soon as a day is settled - on a click in the grid, on "Today"
|
|
567
|
-
clearing (`null`)
|
|
547
|
+
/** Runs as soon as a day is settled - on a click in the grid, on "Today" and
|
|
548
|
+
on clearing (`null`). Every one of these ways hands out
|
|
568
549
|
local midnight; there is none that delivers a time along with it. */
|
|
569
550
|
onChange: (date: Date | null) => void;
|
|
570
551
|
/** What stands in the empty field. */
|
|
@@ -783,9 +764,8 @@ export declare const DEFAULT_WORDING: Wording;
|
|
|
783
764
|
|
|
784
765
|
/** How densely the library builds. A component with a density of its own
|
|
785
766
|
takes it through `useDensityFor` as the default for its `density` - in
|
|
786
|
-
@umriss-ui/table the table
|
|
787
|
-
the calculation; a compact set of tokens
|
|
788
|
-
B.13. */
|
|
767
|
+
@umriss-ui/table the table, in @umriss-ui/calculation
|
|
768
|
+
the calculation; a compact set of tokens does not exist. */
|
|
789
769
|
export declare type Density = "comfortable" | "compact";
|
|
790
770
|
|
|
791
771
|
/** Where the active node moves: up and down the visible rows, in and out of a
|
|
@@ -805,72 +785,6 @@ export declare interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
805
785
|
label?: ReactNode;
|
|
806
786
|
}
|
|
807
787
|
|
|
808
|
-
/** A strip of tools that lies at an edge of one surface and carries the
|
|
809
|
-
actions for it. It moves to another edge by pointer or keyboard and reports
|
|
810
|
-
the place through `onPlaceChange`; at a side edge it stands upright, where
|
|
811
|
-
there is room. */
|
|
812
|
-
export declare const Dock: ForwardRefExoticComponent<DockProps & RefAttributes<HTMLDivElement>>;
|
|
813
|
-
|
|
814
|
-
/** The outside of the resting place: one of the four edges of the host.
|
|
815
|
-
There is no fifth and no corner. */
|
|
816
|
-
export declare type DockPlace = "top" | "right" | "bottom" | "left";
|
|
817
|
-
|
|
818
|
-
/** The props of `Dock`. */
|
|
819
|
-
export declare interface DockProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> {
|
|
820
|
-
/**
|
|
821
|
-
* The tools - a property and expressly not children.
|
|
822
|
-
*
|
|
823
|
-
* Children would read more flexibly and would cost exactly the one number
|
|
824
|
-
* that is needed: the dock must know how many tools it has in order to answer
|
|
825
|
-
* whether it would have room at a side edge at all - and to answer that
|
|
826
|
-
* before it is there.
|
|
827
|
-
*/
|
|
828
|
-
tools: readonly DockTool[];
|
|
829
|
-
/** Controlled: the dock reports and waits, it does not move itself. */
|
|
830
|
-
place?: DockPlace;
|
|
831
|
-
/** Uncontrolled: the resting place it starts with. */
|
|
832
|
-
defaultPlace?: DockPlace;
|
|
833
|
-
/** Reports the desired resting place. Controlled, the dock moves only once
|
|
834
|
-
`place` follows; uncontrolled it is merely a message. */
|
|
835
|
-
onPlaceChange?: (place: DockPlace) => void;
|
|
836
|
-
/**
|
|
837
|
-
* The mode - the tool the dock stands in. At most one, and without a value
|
|
838
|
-
* NONE is marked: a dock whose tools simply fire has no mode. None is
|
|
839
|
-
* invented either, and none is preset to the first tool - that would be a
|
|
840
|
-
* statement about the state of the application which this component cannot
|
|
841
|
-
* make.
|
|
842
|
-
*/
|
|
843
|
-
mode?: string;
|
|
844
|
-
/**
|
|
845
|
-
* Reported is only what is a CHANGE, and only as long as there is a mode at
|
|
846
|
-
* all: without `mode` there is no change of mode to report, and the taking
|
|
847
|
-
* itself reports `onUse`.
|
|
848
|
-
*/
|
|
849
|
-
onModeChange?: (id: string) => void;
|
|
850
|
-
/** A tool was taken. */
|
|
851
|
-
onUse?: (id: string) => void;
|
|
852
|
-
/** The accessible name of the dock.
|
|
853
|
-
@default the wording's "Tools" */
|
|
854
|
-
label?: string;
|
|
855
|
-
}
|
|
856
|
-
|
|
857
|
-
/** A tool: something one TAKES. That distinguishes it from the candidate of the
|
|
858
|
-
command palette, which one FINDS (CONTEXT.md, "Reaching for a tool"). */
|
|
859
|
-
export declare interface DockTool {
|
|
860
|
-
/** What is reported on taking. */
|
|
861
|
-
id: string;
|
|
862
|
-
/** The name. It reaches the eye through the tooltip and the screen reader
|
|
863
|
-
through the accessible name - it never stands written, because a standing
|
|
864
|
-
dock has no room for text. */
|
|
865
|
-
label: string;
|
|
866
|
-
/** The glyph. Drawn according to `packages/core/docs/glyphs.md`: only `currentColor`. */
|
|
867
|
-
icon: ReactNode;
|
|
868
|
-
/** Shows the tool but does not let it be taken. It stays standing in the
|
|
869
|
-
strip: a dock whose tools come and go grows and shrinks under the hand
|
|
870
|
-
reaching for them. */
|
|
871
|
-
disabled?: boolean;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
788
|
/** A `Modal` that stands at an edge of the window and enters from it - the
|
|
875
789
|
same dialog with the same head, body and foot. Its width is the token
|
|
876
790
|
`--u-drawer-width`. */
|
|
@@ -883,7 +797,7 @@ export declare interface DrawerProps extends Omit<ModalProps, "size"> {
|
|
|
883
797
|
}
|
|
884
798
|
|
|
885
799
|
/** The first key that occurs twice, otherwise null. Two nodes with the same
|
|
886
|
-
key break the cascade and the active node silently -
|
|
800
|
+
key break the cascade and the active node silently - `useTree` reports
|
|
887
801
|
that during development. */
|
|
888
802
|
export declare function duplicateKey<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>): S | null;
|
|
889
803
|
|
|
@@ -903,9 +817,6 @@ export declare interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElem
|
|
|
903
817
|
icon?: ReactNode;
|
|
904
818
|
}
|
|
905
819
|
|
|
906
|
-
/** Opens a branch. Returns the same snapshot where it is open already. */
|
|
907
|
-
export declare function expand<S extends Key>(snapshot: TreeSnapshot<S>, key: S): TreeSnapshot<S>;
|
|
908
|
-
|
|
909
820
|
/** A file field with a drop zone: choose or drop files, and remove them from
|
|
910
821
|
the list again. Nothing is uploaded - that is the application's. */
|
|
911
822
|
export declare const FileInput: ForwardRefExoticComponent<FileInputProps & RefAttributes<HTMLInputElement>>;
|
|
@@ -1096,8 +1007,8 @@ export declare interface FreshnessReading {
|
|
|
1096
1007
|
/** The props of a glyph: an SVG's attributes and its edge length. */
|
|
1097
1008
|
export declare interface GlyphProps extends Omit<SVGProps<SVGSVGElement>, "viewBox" | "children"> {
|
|
1098
1009
|
/**
|
|
1099
|
-
* Edge length in pixels. The default is the size the glyph is
|
|
1100
|
-
*
|
|
1010
|
+
* Edge length in pixels. The default is the size the glyph is drawn at in
|
|
1011
|
+
* the components.
|
|
1101
1012
|
*/
|
|
1102
1013
|
size?: number;
|
|
1103
1014
|
}
|
|
@@ -1128,15 +1039,8 @@ export declare interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
1128
1039
|
gap?: SpaceStep;
|
|
1129
1040
|
}
|
|
1130
1041
|
|
|
1131
|
-
/** The grip a
|
|
1132
|
-
|
|
1133
|
-
the specification draws with the stroke.
|
|
1134
|
-
|
|
1135
|
-
The grooves stand the same way in both orientations of the dock. Turning
|
|
1136
|
-
them with it would be prettier and would need a `rotate()` in a component
|
|
1137
|
-
whose acceptance (ADR-0014, ticket 04) rules exactly that out - a glyph
|
|
1138
|
-
that has to be rotated to be right is one that would be rotated along at
|
|
1139
|
-
the change. */
|
|
1042
|
+
/** The grip a drag is taken by: two grooves. Dots are fill, and point 4 of
|
|
1043
|
+
the specification draws with the stroke. */
|
|
1140
1044
|
export declare const GripGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
1141
1045
|
|
|
1142
1046
|
/** A heading whose level and size are independent: a small heading can still
|
|
@@ -1211,11 +1115,6 @@ declare type Instant = Date | number | null | undefined;
|
|
|
1211
1115
|
/** A node's key, as `reader.key` returns it. */
|
|
1212
1116
|
export declare type Key = string | number;
|
|
1213
1117
|
|
|
1214
|
-
/** The checkable keys between two visible nodes, both ends included and
|
|
1215
|
-
independent of their order. Whatever may not be checked drops out: the
|
|
1216
|
-
gesture does what it can instead of nothing. */
|
|
1217
|
-
export declare function keysBetween<K, S extends Key = string>(flattening: readonly FlatteningEntry<K, S>[], from: S, to: S): S[];
|
|
1218
|
-
|
|
1219
1118
|
/** A complete language: the formats for numbers and dates, and the wording. */
|
|
1220
1119
|
export declare interface Language {
|
|
1221
1120
|
formats: Formats;
|
|
@@ -1251,8 +1150,7 @@ export declare interface LanguageProviderProps extends LanguageOptions {
|
|
|
1251
1150
|
|
|
1252
1151
|
No tolerance band as input. A band is derived - two limits of equal
|
|
1253
1152
|
severity on opposite sides enclose one - and as an input type it would
|
|
1254
|
-
force a `null` on one edge in the one-sided case.
|
|
1255
|
-
case, not the exception. */
|
|
1153
|
+
force a `null` on one edge in the one-sided case. */
|
|
1256
1154
|
export declare interface Limit {
|
|
1257
1155
|
value: number;
|
|
1258
1156
|
side: Side;
|
|
@@ -1262,8 +1160,7 @@ export declare interface Limit {
|
|
|
1262
1160
|
/** The set a value is read against.
|
|
1263
1161
|
|
|
1264
1162
|
The target stands beside the limits and is not one: it is missed, never
|
|
1265
|
-
violated, and it is never the edge of a region.
|
|
1266
|
-
tile turns red for being above target. */
|
|
1163
|
+
violated, and it is never the edge of a region. */
|
|
1267
1164
|
export declare interface LimitSet {
|
|
1268
1165
|
/** In any order; none, one or several. */
|
|
1269
1166
|
limits?: readonly Limit[];
|
|
@@ -1282,7 +1179,7 @@ export declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElemen
|
|
|
1282
1179
|
external?: boolean;
|
|
1283
1180
|
}
|
|
1284
1181
|
|
|
1285
|
-
/** Measuring: a line with two end marks. Not a ruler with a scale
|
|
1182
|
+
/** Measuring: a line with two end marks. Not a ruler with a scale: the teeth
|
|
1286
1183
|
would be a grey stripe at ten nominal units. */
|
|
1287
1184
|
export declare const MeasureGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
1288
1185
|
|
|
@@ -1320,7 +1217,7 @@ export declare interface MenuProps {
|
|
|
1320
1217
|
export declare const MenuSeparator: ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
|
|
1321
1218
|
|
|
1322
1219
|
/** Builds a complete instance from the default and a partial value. */
|
|
1323
|
-
export declare function mergeLanguage(
|
|
1220
|
+
export declare function mergeLanguage(options: LanguageOptions | undefined): Language;
|
|
1324
1221
|
|
|
1325
1222
|
/** A narrow fill-level bar, e.g. for utilisation in table cells. */
|
|
1326
1223
|
export declare const Meter: ForwardRefExoticComponent<MeterProps & RefAttributes<HTMLSpanElement>>;
|
|
@@ -1401,16 +1298,6 @@ export declare interface ModalProps extends Omit<DialogHTMLAttributes<HTMLDialog
|
|
|
1401
1298
|
/** The width of a `Modal`. */
|
|
1402
1299
|
export declare type ModalSize = "sm" | "md" | "lg";
|
|
1403
1300
|
|
|
1404
|
-
/**
|
|
1405
|
-
* Move the active node.
|
|
1406
|
-
*
|
|
1407
|
-
* `in` and `out` have two meanings each, and that is intended: one key goes
|
|
1408
|
-
* deeper, no matter whether something has to be opened for it first. Doing
|
|
1409
|
-
* both at once - opening *and* stepping inside - makes the tree impossible to
|
|
1410
|
-
* inspect without expanding it.
|
|
1411
|
-
*/
|
|
1412
|
-
export declare function move<K, S extends Key = string>(flattening: readonly FlatteningEntry<K, S>[], snapshot: TreeSnapshot<S>, direction: Direction): TreeSnapshot<S>;
|
|
1413
|
-
|
|
1414
1301
|
/**
|
|
1415
1302
|
* Multiple selection. The trigger always stays on one line and measures the
|
|
1416
1303
|
* room: as many chips as fit, the rest as a "+N" counter. Chips are removed by
|
|
@@ -1462,8 +1349,8 @@ export declare interface MultiSelectProps<T extends string = string> extends Omi
|
|
|
1462
1349
|
padding and chevron. Given, the field is that wide wherever it stands,
|
|
1463
1350
|
and never wider than its place. Without it the field fills its place,
|
|
1464
1351
|
and is 20 characters wide where the place asks - in a toolbar or a row,
|
|
1465
|
-
room for two short chips and the counter. Either way, choosing and removing
|
|
1466
|
-
do not fit stand as "+N". */
|
|
1352
|
+
room for two short chips and the counter. Either way, choosing and removing
|
|
1353
|
+
values never moves it: the chips that do not fit stand as "+N". */
|
|
1467
1354
|
chars?: number;
|
|
1468
1355
|
/** Locks field and panel. */
|
|
1469
1356
|
disabled?: boolean;
|
|
@@ -1490,9 +1377,7 @@ export declare interface NodeReader<K, S extends Key = string> {
|
|
|
1490
1377
|
it stays navigable (ADR-0005). */
|
|
1491
1378
|
disabled?: (node: K) => boolean;
|
|
1492
1379
|
/** Can this branch have children that are not present? Without an answer:
|
|
1493
|
-
no.
|
|
1494
|
-
against `undefined` would be the kind of distinction that is got wrong
|
|
1495
|
-
more often than right. */
|
|
1380
|
+
no. */
|
|
1496
1381
|
unloaded?: (node: K) => boolean;
|
|
1497
1382
|
/** Does this node match? Given, it filters instead of the search text,
|
|
1498
1383
|
which is then not read - a table matches by its columns and filters,
|
|
@@ -1552,10 +1437,6 @@ export declare interface NumberInputProps extends Omit<InputHTMLAttributes<HTMLI
|
|
|
1552
1437
|
invalid?: boolean;
|
|
1553
1438
|
}
|
|
1554
1439
|
|
|
1555
|
-
/** The keys from the root down to the target, the target included; null if
|
|
1556
|
-
the key does not exist in the data. */
|
|
1557
|
-
export declare function pathTo<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, key: S): S[] | null;
|
|
1558
|
-
|
|
1559
1440
|
/** The plus of `NumberInput`'s step buttons. */
|
|
1560
1441
|
export declare const PlusGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
1561
1442
|
|
|
@@ -1565,15 +1446,14 @@ export declare const PlusGlyph: ForwardRefExoticComponent<Omit<GlyphProps, "ref"
|
|
|
1565
1446
|
* return, travelling along on scroll, stacking order, entrance from its motion
|
|
1566
1447
|
* origin and exit.
|
|
1567
1448
|
*
|
|
1568
|
-
* Two things it takes off the callers' hands
|
|
1569
|
-
* itself before:
|
|
1449
|
+
* Two things it takes off the callers' hands:
|
|
1570
1450
|
*
|
|
1571
1451
|
* - It portals into the nearest <dialog> ancestor of the anchor, otherwise
|
|
1572
|
-
* into the body. A menu in a modal
|
|
1452
|
+
* into the body. A menu in a modal would land behind the dialog otherwise,
|
|
1573
1453
|
* because a portal at the body does not reach the top layer.
|
|
1574
1454
|
* - It resets the FormField context inside the panel. Without that, form
|
|
1575
1455
|
* elements in the panel inherit the field id of the trigger, and a click on
|
|
1576
|
-
* their label closes the panel
|
|
1456
|
+
* their label closes the panel.
|
|
1577
1457
|
*/
|
|
1578
1458
|
export declare function Popover({ open, onOpenChange, anchorRef, focusRef, insideRefs, align, offset, width, minWidth, restoreFocus, hideOnScroll, role, ariaLabel, id, className, children, }: PopoverProps): ReactPortal | null;
|
|
1579
1459
|
|
|
@@ -1715,33 +1595,6 @@ export declare interface RangePreset {
|
|
|
1715
1595
|
range: () => DateRange;
|
|
1716
1596
|
}
|
|
1717
1597
|
|
|
1718
|
-
/**
|
|
1719
|
-
* How many characters still fit. Without a limit there is nothing to
|
|
1720
|
-
* report. Counts the way the browser counts (UTF-16 units, an emoji is
|
|
1721
|
-
* two), so that the display and `maxLength` say the same thing.
|
|
1722
|
-
*
|
|
1723
|
-
* Negative is allowed and intended: a value set from outside does not know
|
|
1724
|
-
* `maxLength`, and then the display is meant to show that.
|
|
1725
|
-
*/
|
|
1726
|
-
export declare const remainingChars: (value: string, maxLength: number | undefined) => number | undefined;
|
|
1727
|
-
|
|
1728
|
-
/**
|
|
1729
|
-
* Expands along a path as far as the data reaches, and reports the deepest
|
|
1730
|
-
* key it got to.
|
|
1731
|
-
*
|
|
1732
|
-
* The path is handed over and not searched for: a deep link knows it, the
|
|
1733
|
-
* data does not know it yet. If the run gets stuck at an unloaded branch,
|
|
1734
|
-
* that branch's key is the answer - and because it is expanded in the
|
|
1735
|
-
* process, it triggers the loading at the same time. The caller loads and
|
|
1736
|
-
* calls again; the same loop it already has for expanding anyway.
|
|
1737
|
-
*
|
|
1738
|
-
* The target itself is not expanded: it is meant to be shown, not opened.
|
|
1739
|
-
*/
|
|
1740
|
-
export declare function revealPath<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>, path: readonly S[]): {
|
|
1741
|
-
snapshot: TreeSnapshot<S>;
|
|
1742
|
-
reached: S | null;
|
|
1743
|
-
};
|
|
1744
|
-
|
|
1745
1598
|
/** What `scrollForRow` needs to know about a scroll area. */
|
|
1746
1599
|
export declare interface RowPlacement {
|
|
1747
1600
|
rowHeight: number;
|
|
@@ -1767,9 +1620,8 @@ export declare interface RowWindow {
|
|
|
1767
1620
|
/**
|
|
1768
1621
|
* The scroll position at which a row is visible - or null where it already is.
|
|
1769
1622
|
*
|
|
1770
|
-
* This is the arithmetic the keyboard handling hangs on
|
|
1771
|
-
* moves into a row that is not rendered
|
|
1772
|
-
* virtualised table that cannot do this is worse than a paged one.
|
|
1623
|
+
* This is the arithmetic the keyboard handling hangs on: without it the focus
|
|
1624
|
+
* moves into a row that is not rendered.
|
|
1773
1625
|
*
|
|
1774
1626
|
* The sticky header counts against the upper edge: a row standing exactly at
|
|
1775
1627
|
* `scrollTop` lies behind it.
|
|
@@ -1875,35 +1727,13 @@ export declare interface Separators {
|
|
|
1875
1727
|
/** The separators a set of formats writes, read off the formats themselves.
|
|
1876
1728
|
|
|
1877
1729
|
A field that formats a number must be able to read its own output back, and
|
|
1878
|
-
an application may have replaced `number` with anything
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
decimal place, digits struck out, and what remains is the notation's own
|
|
1882
|
-
punctuation. */
|
|
1730
|
+
an application may have replaced `number` with anything. So the
|
|
1731
|
+
separators are measured: one number with one decimal place, digits struck
|
|
1732
|
+
out, and what remains is the notation's own punctuation. */
|
|
1883
1733
|
export declare function separatorsOf(formats: Formats): Separators;
|
|
1884
1734
|
|
|
1885
|
-
/** Sets the active node; `null` for none. Returns the same snapshot where
|
|
1886
|
-
nothing changes. */
|
|
1887
|
-
export declare function setActive<S extends Key>(snapshot: TreeSnapshot<S>, key: S | null): TreeSnapshot<S>;
|
|
1888
|
-
|
|
1889
|
-
/** Sets the node a range selection spans from; `null` for none. Returns the
|
|
1890
|
-
same snapshot where nothing changes. */
|
|
1891
|
-
export declare function setAnchor<S extends Key>(snapshot: TreeSnapshot<S>, key: S | null): TreeSnapshot<S>;
|
|
1892
|
-
|
|
1893
|
-
/**
|
|
1894
|
-
* Sets a set of nodes to checked or unchecked - and does not toggle.
|
|
1895
|
-
*
|
|
1896
|
-
* That is the decision which separates a range from a sequence of single
|
|
1897
|
-
* clicks: if it contains a branch *and* one of its children, a sequence of
|
|
1898
|
-
* toggles would touch the child twice and uncheck it again. Every target is
|
|
1899
|
-
* set together with its descendants; afterwards all ancestors of the targets
|
|
1900
|
-
* are reconciled, from the bottom up - and only those.
|
|
1901
|
-
*/
|
|
1902
|
-
export declare function setChecked<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>, targets: readonly S[], on: boolean): TreeSnapshot<S>;
|
|
1903
|
-
|
|
1904
1735
|
/** How seriously a violation weighs: one severity that advises and one that
|
|
1905
|
-
calls for action. Exactly two
|
|
1906
|
-
the screen, and five colours are noise. For a third distinction one sets a
|
|
1736
|
+
calls for action. Exactly two; for a third distinction one sets a
|
|
1907
1737
|
second limit. */
|
|
1908
1738
|
export declare type Severity = "warning" | "alarm";
|
|
1909
1739
|
|
|
@@ -2373,19 +2203,6 @@ export declare function ToastProvider({ children }: {
|
|
|
2373
2203
|
/** How the message turns out; `loading` is a toast still at work. */
|
|
2374
2204
|
export declare type ToastTone = "neutral" | "success" | "warning" | "danger" | "loading";
|
|
2375
2205
|
|
|
2376
|
-
/** Everything checkable on - or empty, if everything is on already. */
|
|
2377
|
-
export declare function toggleAll<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>): TreeSnapshot<S>;
|
|
2378
|
-
|
|
2379
|
-
/**
|
|
2380
|
-
* Toggle a check: cascade downwards, reconcile upwards.
|
|
2381
|
-
*
|
|
2382
|
-
* A single check is a range of one target - which is why the arithmetic
|
|
2383
|
-
* stands there only once, and the direction comes from the same definition of
|
|
2384
|
-
* "full" as in toggleAll. If the node is not checkable or does not exist, the
|
|
2385
|
-
* snapshot stays unchanged.
|
|
2386
|
-
*/
|
|
2387
|
-
export declare function toggleCheck<K, S extends Key = string>(roots: readonly K[], reader: NodeReader<K, S>, snapshot: TreeSnapshot<S>, key: S): TreeSnapshot<S>;
|
|
2388
|
-
|
|
2389
2206
|
/** Appears on hover and keyboard focus; purely descriptive (role="tooltip"). */
|
|
2390
2207
|
export declare function Tooltip({ content, children, delay }: TooltipProps): JSX.Element;
|
|
2391
2208
|
|
|
@@ -2494,9 +2311,8 @@ export declare interface TreeOptions<K, S extends Key = string> {
|
|
|
2494
2311
|
*/
|
|
2495
2312
|
onLoadChildren?: (node: K) => void;
|
|
2496
2313
|
/**
|
|
2497
|
-
* Render only what stands in the scroll area.
|
|
2498
|
-
*
|
|
2499
|
-
* whoever has not ordered it should not have to think about row heights.
|
|
2314
|
+
* Render only what stands in the scroll area. Optional: without it every
|
|
2315
|
+
* row is rendered and no row height is needed.
|
|
2500
2316
|
*/
|
|
2501
2317
|
virtual?: VirtualOptions;
|
|
2502
2318
|
}
|
|
@@ -2550,20 +2366,6 @@ export declare interface TreeViewProps<K, S extends Key = string> extends Omit<H
|
|
|
2550
2366
|
children: (entry: FlatteningEntry<K, S>) => ReactNode;
|
|
2551
2367
|
}
|
|
2552
2368
|
|
|
2553
|
-
/**
|
|
2554
|
-
* The next visible node whose label starts like this - or null.
|
|
2555
|
-
*
|
|
2556
|
-
* A single letter searches **behind** the active node, so that the same
|
|
2557
|
-
* letter pressed twice jumps onwards instead of finding the same node again.
|
|
2558
|
-
* Several letters search **from** the active node, so that refining does not
|
|
2559
|
-
* jump onwards. Both are intended and are the reason why the length of the
|
|
2560
|
-
* prefix matters here.
|
|
2561
|
-
*
|
|
2562
|
-
* At the end it wraps around. Disabled and unloaded nodes are valid targets:
|
|
2563
|
-
* typeahead moves only the focus, and both are navigable.
|
|
2564
|
-
*/
|
|
2565
|
-
export declare function typeaheadTarget<K, S extends Key = string>(flattening: readonly FlatteningEntry<K, S>[], prefix: string, active: S | null): S | null;
|
|
2566
|
-
|
|
2567
2369
|
/** The settings of `UmrissProvider` as the components read them, every value
|
|
2568
2370
|
filled in. */
|
|
2569
2371
|
export declare interface UmrissConfig {
|
|
@@ -2585,7 +2387,7 @@ export declare function UmrissProvider({ density, portalTarget, toast, language,
|
|
|
2585
2387
|
export declare interface UmrissProviderProps {
|
|
2586
2388
|
/**
|
|
2587
2389
|
* The default for the `density` of every component that reads it with
|
|
2588
|
-
* `useDensityFor` - in `@umriss-ui/table` `Table
|
|
2390
|
+
* `useDensityFor` - in `@umriss-ui/table` `Table`, in
|
|
2589
2391
|
* `@umriss-ui/calculation` `Calculation` ("comfortable" means "regular").
|
|
2590
2392
|
*
|
|
2591
2393
|
* @default none - a component keeps its own density
|
|
@@ -2627,8 +2429,7 @@ export declare const useDensity: () => Density;
|
|
|
2627
2429
|
* A component's `density`: its own value, else the density the provider
|
|
2628
2430
|
* explicitly configured, else its own default.
|
|
2629
2431
|
*
|
|
2630
|
-
* "comfortable" means "regular" here. A compact set of tokens does not exist
|
|
2631
|
-
* that is work package B.13; here only what exists is wired up.
|
|
2432
|
+
* "comfortable" means "regular" here. A compact set of tokens does not exist.
|
|
2632
2433
|
*/
|
|
2633
2434
|
export declare function useDensityFor(own: "regular" | "compact" | undefined, fallback: "regular" | "compact"): "regular" | "compact";
|
|
2634
2435
|
|
|
@@ -2686,9 +2487,8 @@ export declare const useUmriss: () => UmrissConfig;
|
|
|
2686
2487
|
* from them.
|
|
2687
2488
|
*
|
|
2688
2489
|
* It is measured on the first rendered row rather than taken from the caller's
|
|
2689
|
-
* value: row height depends on density, font size and zoom, and
|
|
2690
|
-
*
|
|
2691
|
-
* forty thousand pixels.
|
|
2490
|
+
* value: row height depends on density, font size and zoom, and a small error
|
|
2491
|
+
* adds up over many rows to a scrollbar that lies.
|
|
2692
2492
|
*/
|
|
2693
2493
|
export declare function useVirtual(count: number, options: VirtualOptions): VirtualRows;
|
|
2694
2494
|
|
|
@@ -2698,9 +2498,8 @@ export declare const useWording: () => Wording;
|
|
|
2698
2498
|
/** What a value is. Four outcomes, ordered by severity, `unknown` between
|
|
2699
2499
|
`ok` and `warning`: a value nobody has is a reason to look.
|
|
2700
2500
|
|
|
2701
|
-
The fourth outcome is not a `null
|
|
2702
|
-
call site
|
|
2703
|
-
against: a dead data source would look like a healthy service. */
|
|
2501
|
+
The fourth outcome is not a `null`, which would invite `?? "ok"` at the
|
|
2502
|
+
call site: a dead data source would look like a healthy service. */
|
|
2704
2503
|
export declare type Verdict = "ok" | "unknown" | "warning" | "alarm";
|
|
2705
2504
|
|
|
2706
2505
|
/** How heavily a verdict weighs - for sorting and comparing, as when a matrix
|
|
@@ -2858,20 +2657,6 @@ export declare interface Wording {
|
|
|
2858
2657
|
therefore do not stand here; "Esc" is a word and is called something else
|
|
2859
2658
|
elsewhere. */
|
|
2860
2659
|
paletteKeyEsc: string;
|
|
2861
|
-
/** Accessible name of a dock's tools. */
|
|
2862
|
-
dockTools: string;
|
|
2863
|
-
/** Accessible name of the grip - it says what it does, not what it is. */
|
|
2864
|
-
dockGrip: string;
|
|
2865
|
-
/** The four resting places, named. The keys are the `DockPlace` type's, and a
|
|
2866
|
-
register translates them: the German one answers "oben" where the
|
|
2867
|
-
English one answers "top". */
|
|
2868
|
-
dockPlace: (place: "top" | "right" | "bottom" | "left") => string;
|
|
2869
|
-
/** What the screen reader hears once the dock has taken a place. */
|
|
2870
|
-
dockPlaced: (place: string) => string;
|
|
2871
|
-
/** And what it hears when a place has refused. A refusal is not a fault: a
|
|
2872
|
-
wide, flat host with no room for a standing dock is not a mistake anyone
|
|
2873
|
-
made. */
|
|
2874
|
-
dockNoPlace: (place: string) => string;
|
|
2875
2660
|
datePlaceholder: string;
|
|
2876
2661
|
/** Accessible name of the panel. Deliberately kept apart from the
|
|
2877
2662
|
placeholder: whoever labels the field differently does not thereby rename
|
|
@@ -3135,66 +2920,6 @@ export declare interface Wording {
|
|
|
3135
2920
|
freshnessDisconnected: string;
|
|
3136
2921
|
/** "As of: 3 minutes ago", where the duration comes from the formats. */
|
|
3137
2922
|
asOfAgo: (duration: string) => string;
|
|
3138
|
-
asOfUnknown: string;
|
|
3139
|
-
alarms: string;
|
|
3140
|
-
noAlarms: string;
|
|
3141
|
-
/** Empty, but the line is down - that is something other than quiet. */
|
|
3142
|
-
noAlarmsDisconnected: string;
|
|
3143
|
-
acknowledgeAlarm: string;
|
|
3144
|
-
/** Bulk acknowledgement; the number stands in the text on purpose. */
|
|
3145
|
-
acknowledgeAlarms: (count: number) => string;
|
|
3146
|
-
/** The alarm list's snooze menu, beside "Acknowledge": the word on its
|
|
3147
|
-
button, and the sentence with the number of alarms it acts on. */
|
|
3148
|
-
snoozeAlarm: string;
|
|
3149
|
-
snoozeAlarms: (count: number) => string;
|
|
3150
|
-
/** The labels in the panel that opens with `snoozeReason`: the duration to
|
|
3151
|
-
choose and the reason to give. The panel's own button is `snoozeAlarm`. */
|
|
3152
|
-
snoozeDuration: string;
|
|
3153
|
-
snoozeReason: string;
|
|
3154
|
-
/** Ends the snooze of the ticked alarms before its time. */
|
|
3155
|
-
unsnoozeAlarm: string;
|
|
3156
|
-
unsnoozeAlarms: (count: number) => string;
|
|
3157
|
-
priorityHigh: string;
|
|
3158
|
-
priorityMedium: string;
|
|
3159
|
-
priorityLow: string;
|
|
3160
|
-
/** The four lifecycle states, written out. */
|
|
3161
|
-
lifecycleActiveUnacknowledged: string;
|
|
3162
|
-
lifecycleActiveAcknowledged: string;
|
|
3163
|
-
lifecycleResolvedUnacknowledged: string;
|
|
3164
|
-
lifecycleResolvedAcknowledged: string;
|
|
3165
|
-
/** "Alarm flood: 12 in quick succession" - a flood is marked, never
|
|
3166
|
-
suppressed. */
|
|
3167
|
-
floodHint: (count: number) => string;
|
|
3168
|
-
/** "40×" on a chattering alarm type. */
|
|
3169
|
-
chatterHint: (count: number) => string;
|
|
3170
|
-
/** The text of the live region: the number of active unacknowledged alarms. */
|
|
3171
|
-
activeUnacknowledged: (count: number) => string;
|
|
3172
|
-
columnAlarm: string;
|
|
3173
|
-
columnLifecycleState: string;
|
|
3174
|
-
columnPriority: string;
|
|
3175
|
-
columnRaised: string;
|
|
3176
|
-
columnDuration: string;
|
|
3177
|
-
columnFrequency: string;
|
|
3178
|
-
/** The two columns of the alarm model the list does not show, but which do
|
|
3179
|
-
land in the column menu and the CSV header (`alarmColumns`). */
|
|
3180
|
-
columnAcknowledgement: string;
|
|
3181
|
-
columnAge: string;
|
|
3182
|
-
/** The availability of an alarm (ISA-18.2's special states), written out.
|
|
3183
|
-
A snooze names its end and who snoozed it - a snooze is tracked, not
|
|
3184
|
-
anonymous; the time comes from the formats. The reason, when the snooze
|
|
3185
|
-
has one, comes last and is optional: a wording of two parameters fits. */
|
|
3186
|
-
availabilitySnoozed: (until: string, by: string, reason?: string) => string;
|
|
3187
|
-
/** A snooze as one word - the alarm list's badge; the sentence above stands
|
|
3188
|
-
in its tooltip and in what is spoken. */
|
|
3189
|
-
availabilitySnoozedShort: string;
|
|
3190
|
-
availabilitySuppressed: string;
|
|
3191
|
-
availabilityDisabled: string;
|
|
3192
|
-
/** "Hidden: 3" - the count of the view of snoozed, suppressed and disabled
|
|
3193
|
-
alarms, and its name where the list offers the view as a switch. */
|
|
3194
|
-
hiddenAlarms: (count: number) => string;
|
|
3195
|
-
/** The availability column of the alarm model: the column menu and the CSV
|
|
3196
|
-
header, like the two above. */
|
|
3197
|
-
columnAvailability: string;
|
|
3198
2923
|
close: string;
|
|
3199
2924
|
closeToast: string;
|
|
3200
2925
|
/** The count on the front toast of a closed deck; pressing it shows them all. */
|