@aiquants/console-ui 0.4.2 → 0.5.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/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { ConsoleUiLocale, ConsoleUiLabels, ColumnWidth, TypeToken, ResourceFailure, SpaceToken, FgRole, ResourceOutcome, KeysetPage, NextPage, PagedState, PagedContent, ResourceState } from "./core.cjs";
2
- export { AccentRole, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, ColorScheme, ColorToken, ColumnWidthSource, CommandOutcome, ConsoleUiTokens, ContrastRole, HTTP_FORBIDDEN, LATTICE_PX, MasterDetailOptions, MasterDetailPlan, MotionToken, PageFailure, PagedValue, ROW_WITH_CONTROL_PX, RadiusToken, ReloadCause, SchemeColor, SizeToken, Srgb, StrokeToken, SurfaceRole, TARGET_PX, TOKENS, TileGridPlan, TileGridStep, TokenName, WeightToken, ZonedTimeError, ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, contrastRatio, cssVar, flatMapOutcome, formatCount, formatInstant, hexToSrgb, keepLastGood, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, tableMinInlinePx, textWidthEm, tileGridPlan, toOffsetIso, toWallTime } from "./core.cjs";
1
+ import { ConsoleUiLocale, ConsoleUiLabels, ColumnWidth, FgRole, TypeToken, SpaceToken, ResourceFailure, TextFace, ResourceOutcome, KeysetPage, NextPage, PagedState, PagedContent, ResourceState } from "./core.cjs";
2
+ export { AccentRole, COMPACT_ROW_PX, CONSOLE_UI_LABEL_CATALOGS, CONTRAST_MINIMUM, CONTRAST_PAIRS, CellContent, ColorScheme, ColorToken, ColumnHeaderText, ColumnWidthSource, CommandOutcome, ConsoleUiTokens, ContrastRole, FIGURE_RING_REACH_PX, FLEXIBLE_COLUMN_MIN_PX, FigureBoxLines, FigureBoxPlan, FigureDiscLabelPlan, HTTP_FORBIDDEN, LATTICE_PX, MasterDetailOptions, MasterDetailPlan, MotionToken, PageFailure, PagedValue, ROW_WITH_CONTROL_PX, RadiusToken, ReloadCause, SchemeColor, SizeToken, Srgb, StrokeToken, SurfaceRole, TARGET_PX, TOKENS, TileGridPlan, TileGridStep, TokenName, WeightToken, ZonedTimeError, ZonedTimeErrorReason, beginPage, beginPagedReload, beginReload, ceil8, ceilToLattice, cellContentInlinePx, comparisonAttributePx, contrastRatio, countSampleText, cssVar, figureBoxPlan, figureDiscLabelPlan, fixedColumnPx, flatMapOutcome, formatCount, formatInstant, hexToSrgb, instantSampleText, isReadableText, keepLastGood, mapOutcome, mapPagedList, masterDetailPlan, monoTextWidthEm, readDecimalText, readIntegerText, reasonAside, resolveConsoleUiLabels, settleFirstPage, settlePage, spacedTextWidthEm, tableFrameMinInlinePx, tableMinInlinePx, textWidthEm, tileGridPlan, tileMinInlinePx, toOffsetIso, toWallTime } from "./core.cjs";
3
3
  import * as react from "react";
4
- import { ReactNode, MouseEvent, Ref, RefObject, RefCallback, KeyboardEvent } from "react";
4
+ import { ReactNode, MouseEvent, Ref, DOMAttributes, RefObject, RefCallback, KeyboardEvent } from "react";
5
5
  type BreadcrumbItem = {
6
6
  readonly id: string;
7
7
  readonly label: string;
@@ -15,6 +15,13 @@ type BreadcrumbProps = {
15
15
  };
16
16
  declare const Breadcrumb: ({ items, current, onNavigate, testId }: BreadcrumbProps) => react.JSX.Element;
17
17
  type DataAttributes = Readonly<Record<`data-${string}`, string | number | boolean>>;
18
+ type Unavailable = {
19
+ readonly reason: string;
20
+ readonly reasonId?: undefined;
21
+ } | {
22
+ readonly reasonId: string;
23
+ readonly reason?: undefined;
24
+ };
18
25
  type ButtonVariant = "primary" | "secondary" | "danger" | "link";
19
26
  type ButtonProps = {
20
27
  readonly variant: ButtonVariant;
@@ -22,9 +29,8 @@ type ButtonProps = {
22
29
  readonly testId: string;
23
30
  readonly type?: "button" | "submit";
24
31
  readonly onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
25
- readonly unavailable?: {
26
- readonly reason: string;
27
- };
32
+ readonly unavailable?: Unavailable;
33
+ readonly describedBy?: string;
28
34
  readonly expanded?: boolean;
29
35
  readonly controls?: string;
30
36
  readonly ref?: Ref<HTMLButtonElement>;
@@ -34,9 +40,9 @@ type ButtonProps = {
34
40
  readonly busyLabel?: undefined;
35
41
  } | {
36
42
  readonly busy: boolean;
37
- readonly busyLabel: string;
43
+ readonly busyLabel: ReactNode;
38
44
  });
39
- declare const Button: ({ variant, children, testId, type, onClick, unavailable, expanded, controls, ref, dataAttributes, busy, busyLabel }: ButtonProps) => react.JSX.Element;
45
+ declare const Button: ({ variant, children, testId, type, onClick, unavailable, describedBy, expanded, controls, ref, dataAttributes, busy, busyLabel }: ButtonProps) => react.JSX.Element;
40
46
  type LinkProps = {
41
47
  readonly onNavigate: () => void;
42
48
  readonly children: ReactNode;
@@ -44,30 +50,45 @@ type LinkProps = {
44
50
  readonly ref?: Ref<HTMLButtonElement>;
45
51
  };
46
52
  declare const Link: ({ onNavigate, children, testId, ref }: LinkProps) => react.JSX.Element;
53
+ type FragmentLinkProps = {
54
+ readonly targetId: string;
55
+ readonly children: ReactNode;
56
+ readonly testId: string;
57
+ readonly onFollow?: () => void;
58
+ readonly dataAttributes?: DataAttributes;
59
+ };
60
+ declare const FragmentLink: ({ targetId, children, testId, onFollow, dataAttributes }: FragmentLinkProps) => react.JSX.Element;
47
61
  type CardProps = {
48
62
  readonly id?: string;
49
63
  readonly title: string;
50
64
  readonly description?: ReactNode;
51
65
  readonly actions?: ReactNode;
66
+ readonly onEscape?: () => void;
52
67
  readonly testId: string;
53
68
  readonly headingRef?: Ref<HTMLHeadingElement>;
54
69
  readonly ref?: Ref<HTMLElement>;
55
70
  readonly dataAttributes?: DataAttributes;
56
71
  readonly children: ReactNode;
57
72
  };
58
- declare const Card: ({ id, title, description, actions, testId, headingRef, ref, dataAttributes, children }: CardProps) => react.JSX.Element;
73
+ declare const Card: ({ id, title, description, actions, onEscape, testId, headingRef, ref, dataAttributes, children }: CardProps) => react.JSX.Element;
59
74
  type CardSectionProps = {
60
75
  readonly id?: string;
61
76
  readonly title: string;
62
77
  readonly subtitle?: ReactNode;
63
- readonly region?: boolean;
78
+ readonly level?: 3 | 4;
64
79
  readonly testId: string;
65
80
  readonly headingRef?: Ref<HTMLHeadingElement>;
66
81
  readonly ref?: Ref<HTMLElement>;
67
82
  readonly dataAttributes?: DataAttributes;
68
83
  readonly children: ReactNode;
69
- };
70
- declare const CardSection: ({ id, title, subtitle, region, testId, headingRef, ref, dataAttributes, children }: CardSectionProps) => react.JSX.Element;
84
+ } & ({
85
+ readonly region?: false;
86
+ readonly onEscape?: never;
87
+ } | {
88
+ readonly region: true;
89
+ readonly onEscape?: () => void;
90
+ });
91
+ declare const CardSection: ({ id, title, subtitle, level, region, onEscape, testId, headingRef, ref, dataAttributes, children }: CardSectionProps) => react.JSX.Element;
71
92
  type CodeBlockProps = {
72
93
  readonly label: string;
73
94
  readonly code: string;
@@ -114,9 +135,21 @@ declare const useAnnounce: () => ((text: string) => void);
114
135
  type ColumnDef<T> = {
115
136
  readonly key: string;
116
137
  readonly header: string;
138
+ readonly note?: ReactNode;
117
139
  readonly width: ColumnWidth;
118
140
  readonly align: "start" | "end";
119
141
  readonly cell: (row: T) => ReactNode;
142
+ } & ({
143
+ readonly rowHeader?: never;
144
+ readonly rowHeaderNote?: never;
145
+ } | {
146
+ readonly rowHeader: true;
147
+ readonly rowHeaderNote?: (row: T) => ReactNode;
148
+ });
149
+ type DataTableRowDetail<T> = {
150
+ readonly open: (row: T) => boolean;
151
+ readonly id: (row: T) => string;
152
+ readonly render: (row: T) => ReactNode;
120
153
  };
121
154
  type DataTableProps<T> = {
122
155
  readonly caption: string;
@@ -126,12 +159,17 @@ type DataTableProps<T> = {
126
159
  readonly rowKey: (row: T) => string;
127
160
  readonly rowTestId: string;
128
161
  readonly rowData?: (row: T) => DataAttributes;
129
- readonly rowSize: "row" | "row-control";
130
162
  readonly empty: string;
131
163
  readonly testId: string;
132
164
  readonly ref?: Ref<HTMLDivElement>;
133
- };
134
- declare const DataTable: <T>({ caption, captionHidden, columns, rows, rowKey, rowTestId, rowData, rowSize, empty, testId, ref }: DataTableProps<T>) => react.JSX.Element;
165
+ } & ({
166
+ readonly rowSize: "row" | "row-control";
167
+ readonly rowDetail?: DataTableRowDetail<T>;
168
+ } | {
169
+ readonly rowSize: "row-compact";
170
+ readonly rowDetail?: never;
171
+ });
172
+ declare const DataTable: <T>({ caption, captionHidden, columns, rows, rowKey, rowTestId, rowData, rowSize, rowDetail, empty, testId, ref }: DataTableProps<T>) => react.JSX.Element;
135
173
  type DescriptionItem = {
136
174
  readonly key: string;
137
175
  readonly term: string;
@@ -144,14 +182,15 @@ type DescriptionListProps = {
144
182
  declare const DescriptionList: ({ items, testId }: DescriptionListProps) => react.JSX.Element;
145
183
  type DialogProps = {
146
184
  readonly title: string;
185
+ readonly description?: ReactNode;
147
186
  readonly open: boolean;
148
187
  readonly onClose: () => void;
149
188
  readonly testId: string;
150
189
  readonly children: ReactNode;
151
190
  };
152
- declare const Dialog: ({ title, open, onClose, testId, children }: DialogProps) => react.JSX.Element;
191
+ declare const Dialog: ({ title, description, open, onClose, testId, children }: DialogProps) => react.JSX.Element;
153
192
  type DisclosureProps = {
154
- readonly summary: string;
193
+ readonly summary: ReactNode;
155
194
  readonly open: boolean;
156
195
  readonly onOpenChange: (open: boolean) => void;
157
196
  readonly testId: string;
@@ -163,7 +202,10 @@ type FieldControl = {
163
202
  readonly "aria-describedby": string | undefined;
164
203
  readonly "aria-invalid": true | undefined;
165
204
  };
166
- type FieldTexts = {
205
+ type FieldErrorId = {
206
+ readonly errorId?: string;
207
+ };
208
+ type FieldTexts = FieldErrorId & {
167
209
  readonly label: string;
168
210
  readonly description?: string;
169
211
  readonly error?: string;
@@ -172,17 +214,30 @@ type FieldProps = FieldTexts & {
172
214
  readonly testId: string;
173
215
  readonly children: (control: FieldControl) => ReactNode;
174
216
  };
175
- declare const Field: ({ label, description, error, testId, children }: FieldProps) => react.JSX.Element;
217
+ declare const Field: ({ label, description, error, errorId: namedErrorId, testId, children }: FieldProps) => react.JSX.Element;
176
218
  type TextInputProps = FieldTexts & {
177
219
  readonly value: string;
178
220
  readonly onValueChange: (value: string) => void;
179
221
  readonly type: "text" | "search" | "datetime-local";
222
+ readonly inputMode?: "numeric" | "decimal";
223
+ readonly prefix?: string;
224
+ readonly labelHidden?: boolean;
180
225
  readonly list?: string;
181
226
  readonly required?: boolean;
182
227
  readonly testId: string;
183
228
  readonly ref?: Ref<HTMLInputElement>;
184
229
  };
185
- declare const TextInput: ({ label, description, error, value, onValueChange, type, list, required, testId, ref }: TextInputProps) => react.JSX.Element;
230
+ type PasswordInputProps = FieldTexts & {
231
+ readonly value: string;
232
+ readonly onValueChange: (value: string) => void;
233
+ readonly autoComplete: "new-password" | "current-password";
234
+ readonly required?: boolean;
235
+ readonly labelHidden?: boolean;
236
+ readonly testId: string;
237
+ readonly ref?: Ref<HTMLInputElement>;
238
+ };
239
+ declare const TextInput: (props: TextInputProps) => react.JSX.Element;
240
+ declare const PasswordInput: (props: PasswordInputProps) => react.JSX.Element;
186
241
  type TextAreaProps = FieldTexts & {
187
242
  readonly value: string;
188
243
  readonly onValueChange: (value: string) => void;
@@ -190,7 +245,7 @@ type TextAreaProps = FieldTexts & {
190
245
  readonly testId: string;
191
246
  readonly ref?: Ref<HTMLTextAreaElement>;
192
247
  };
193
- declare const TextArea: ({ label, description, error, value, onValueChange, required, testId, ref }: TextAreaProps) => react.JSX.Element;
248
+ declare const TextArea: ({ label, description, error, errorId: namedErrorId, value, onValueChange, required, testId, ref }: TextAreaProps) => react.JSX.Element;
194
249
  type FieldOption = {
195
250
  readonly value: string;
196
251
  readonly label: string;
@@ -199,11 +254,13 @@ type SelectProps = FieldTexts & {
199
254
  readonly value: string;
200
255
  readonly options: readonly FieldOption[];
201
256
  readonly onValueChange: (value: string) => void;
257
+ readonly labelHidden?: boolean;
258
+ readonly unavailable?: Unavailable;
202
259
  readonly testId: string;
203
260
  readonly ref?: Ref<HTMLSelectElement>;
204
261
  };
205
- declare const Select: ({ label, description, error, value, options, onValueChange, testId, ref }: SelectProps) => react.JSX.Element;
206
- type RadioGroupProps = {
262
+ declare const Select: ({ label, description, error, errorId: namedErrorId, value, options, onValueChange, labelHidden, unavailable, testId, ref }: SelectProps) => react.JSX.Element;
263
+ type RadioGroupProps = FieldErrorId & {
207
264
  readonly legend: string;
208
265
  readonly description?: string;
209
266
  readonly error?: string;
@@ -213,16 +270,18 @@ type RadioGroupProps = {
213
270
  readonly testId: string;
214
271
  readonly ref?: Ref<HTMLInputElement>;
215
272
  };
216
- declare const RadioGroup: ({ legend, description, error, value, options, onValueChange, testId, ref }: RadioGroupProps) => react.JSX.Element;
217
- type HeadingType = Extract<TypeToken, "title" | "heading" | "display" | "display-lg">;
218
- type HeadingProps = {
219
- readonly level: 1 | 2 | 3;
220
- readonly type: HeadingType;
273
+ declare const RadioGroup: ({ legend, description, error, errorId: namedErrorId, value, options, onValueChange, testId, ref }: RadioGroupProps) => react.JSX.Element;
274
+ type CheckboxGroupProps = FieldErrorId & {
275
+ readonly legend: string;
276
+ readonly description?: string;
277
+ readonly error?: string;
278
+ readonly values: readonly string[];
279
+ readonly options: readonly FieldOption[];
280
+ readonly onValuesChange: (values: readonly string[]) => void;
221
281
  readonly testId: string;
222
- readonly headingRef?: Ref<HTMLHeadingElement>;
223
- readonly children: ReactNode;
282
+ readonly ref?: Ref<HTMLInputElement>;
224
283
  };
225
- declare const Heading: ({ level, type, testId, headingRef, children }: HeadingProps) => react.JSX.Element;
284
+ declare const CheckboxGroup: ({ legend, description, error, errorId: namedErrorId, values, options, onValuesChange, testId, ref }: CheckboxGroupProps) => react.JSX.Element;
226
285
  type PillTone = "neutral" | "info" | "success" | "warning" | "danger";
227
286
  type PillProps = {
228
287
  readonly tone: PillTone;
@@ -232,6 +291,102 @@ type PillProps = {
232
291
  readonly children: ReactNode;
233
292
  };
234
293
  declare const Pill: ({ tone, variant, testId, dataAttributes, children }: PillProps) => react.JSX.Element;
294
+ type FigurePointer = {
295
+ readonly cursor: "grab" | "grabbing" | "pointer";
296
+ readonly handlers: Pick<DOMAttributes<SVGSVGElement>, "onPointerDown" | "onPointerMove" | "onPointerUp" | "onPointerCancel" | "onPointerLeave" | "onWheel">;
297
+ };
298
+ type FigureProps = {
299
+ readonly kind: "group";
300
+ readonly label: string;
301
+ readonly widthPx: number;
302
+ readonly heightPx: number;
303
+ readonly onEscape?: () => void;
304
+ readonly testId: string;
305
+ readonly dataAttributes?: DataAttributes;
306
+ readonly children: ReactNode;
307
+ } | {
308
+ readonly kind: "decorative";
309
+ readonly widthPx: number;
310
+ readonly heightPx: number;
311
+ readonly viewBox?: string;
312
+ readonly pointer?: FigurePointer;
313
+ readonly svgRef?: Ref<SVGSVGElement>;
314
+ readonly testId: string;
315
+ readonly dataAttributes?: DataAttributes;
316
+ readonly children: ReactNode;
317
+ };
318
+ type FigureNodeNote = {
319
+ readonly text: string;
320
+ readonly fg: FgRole;
321
+ };
322
+ type FigureNodePress = {
323
+ readonly label: string;
324
+ readonly description?: string;
325
+ readonly expanded: boolean;
326
+ readonly controls?: string;
327
+ readonly onPress: () => void;
328
+ };
329
+ type FigureNodeShape = {
330
+ readonly kind: "box";
331
+ readonly widthPx: number;
332
+ } | {
333
+ readonly kind: "disc";
334
+ readonly radiusPx: number;
335
+ };
336
+ type FigureNodeCommonProps = {
337
+ readonly x: number;
338
+ readonly y: number;
339
+ readonly tone: PillTone;
340
+ readonly outline: "solid" | "dashed";
341
+ readonly selected: boolean;
342
+ readonly title?: string;
343
+ readonly press?: FigureNodePress;
344
+ readonly testId: string;
345
+ readonly dataAttributes?: DataAttributes;
346
+ };
347
+ type FigureNodeProps = FigureNodeCommonProps & ({
348
+ readonly shape: {
349
+ readonly kind: "box";
350
+ readonly widthPx: number;
351
+ };
352
+ readonly name: string;
353
+ readonly notes?: readonly FigureNodeNote[];
354
+ } | {
355
+ readonly shape: {
356
+ readonly kind: "disc";
357
+ readonly radiusPx: number;
358
+ };
359
+ readonly name: string | null;
360
+ readonly notes?: never;
361
+ });
362
+ type FigureEdgeProps = {
363
+ readonly d: string;
364
+ readonly emphasis: "normal" | "high";
365
+ readonly weight: 1 | 2 | 3 | 4;
366
+ readonly arrow: boolean;
367
+ readonly title?: string;
368
+ readonly testId: string;
369
+ readonly dataAttributes?: DataAttributes;
370
+ };
371
+ declare const Figure: (props: FigureProps) => react.JSX.Element;
372
+ declare const FigureNode: (props: FigureNodeProps) => react.JSX.Element;
373
+ declare const FigureEdge: ({ d, emphasis, weight, arrow, title, testId, dataAttributes }: FigureEdgeProps) => react.JSX.Element;
374
+ type HeadingType = Extract<TypeToken, "title" | "heading" | "display" | "display-lg">;
375
+ type HeadingProps = {
376
+ readonly level: 1 | 2 | 3;
377
+ readonly type: HeadingType;
378
+ readonly testId: string;
379
+ readonly headingRef?: Ref<HTMLHeadingElement>;
380
+ readonly children: ReactNode;
381
+ };
382
+ declare const Heading: ({ level, type, testId, headingRef, children }: HeadingProps) => react.JSX.Element;
383
+ type InlineChangeKind = "removed" | "added";
384
+ type InlineChangeProps = {
385
+ readonly kind: InlineChangeKind;
386
+ readonly testId: string;
387
+ readonly children: string;
388
+ };
389
+ declare const InlineChange: ({ kind, testId, children }: InlineChangeProps) => react.JSX.Element;
235
390
  type ProgressBarProps = {
236
391
  readonly label: string;
237
392
  readonly valueText: string;
@@ -258,6 +413,29 @@ type JobCardProps = {
258
413
  readonly children?: ReactNode;
259
414
  };
260
415
  declare const JobCard: ({ title, status, progress, cancel, testId, children }: JobCardProps) => react.JSX.Element;
416
+ type ListTextType = Extract<TypeToken, "body" | "prose">;
417
+ type ListMarking = {
418
+ readonly marker: "bullet" | "number";
419
+ readonly type: ListTextType;
420
+ } | {
421
+ readonly marker: "none";
422
+ readonly ordered: boolean;
423
+ };
424
+ type ListProps = ListMarking & {
425
+ readonly gap: SpaceToken;
426
+ readonly label?: string;
427
+ readonly id?: string;
428
+ readonly hidden?: boolean;
429
+ readonly testId: string;
430
+ readonly children: ReactNode;
431
+ };
432
+ declare const List: (props: ListProps) => react.JSX.Element;
433
+ type ListItemProps = {
434
+ readonly testId: string;
435
+ readonly dataAttributes?: DataAttributes;
436
+ readonly children: ReactNode;
437
+ };
438
+ declare const ListItem: ({ testId, dataAttributes, children }: ListItemProps) => react.JSX.Element;
261
439
  type LoadMoreProps = {
262
440
  readonly onLoad: () => void;
263
441
  readonly busy: boolean;
@@ -282,12 +460,21 @@ type MasterDetailProps = {
282
460
  readonly testId: string;
283
461
  };
284
462
  declare const MasterDetail: ({ master, detail, masterMinPx, detailMinPx, testId }: MasterDetailProps) => react.JSX.Element;
463
+ type MeasuredKeep = "whole" | "wrap";
285
464
  type MeasuredProps = {
286
465
  readonly value: number | null;
287
466
  readonly unit?: string;
467
+ readonly text?: never;
468
+ readonly keep?: never;
469
+ readonly testId: string;
470
+ } | {
471
+ readonly text: string | null;
472
+ readonly keep: MeasuredKeep;
473
+ readonly value?: never;
474
+ readonly unit?: never;
288
475
  readonly testId: string;
289
476
  };
290
- declare const Measured: ({ value, unit, testId }: MeasuredProps) => react.JSX.Element;
477
+ declare const Measured: (props: MeasuredProps) => react.JSX.Element;
291
478
  type MeterProps = {
292
479
  readonly label: string;
293
480
  readonly value: number;
@@ -309,6 +496,20 @@ type AlertMessageProps = {
309
496
  readonly children: ReactNode;
310
497
  };
311
498
  declare const AlertMessage: ({ occurrence, testId, children }: AlertMessageProps) => react.JSX.Element;
499
+ type PanelTab = {
500
+ readonly id: string;
501
+ readonly label: string;
502
+ };
503
+ type PanelTabsProps = {
504
+ readonly label: string;
505
+ readonly items: readonly PanelTab[];
506
+ readonly value: string;
507
+ readonly onValueChange: (id: string) => void;
508
+ readonly testId: string;
509
+ readonly panelDescribedBy?: string;
510
+ readonly children: ReactNode;
511
+ };
512
+ declare const PanelTabs: ({ label, items, value, onValueChange, testId, panelDescribedBy, children }: PanelTabsProps) => react.JSX.Element;
312
513
  type ResourceFailedProps = {
313
514
  readonly failure: ResourceFailure;
314
515
  readonly onReload: () => void;
@@ -372,7 +573,10 @@ type StackProps = {
372
573
  readonly children: ReactNode;
373
574
  };
374
575
  declare const Stack: ({ gap, testId, children }: StackProps) => react.JSX.Element;
375
- declare const Cluster: ({ gap, testId, children }: StackProps) => react.JSX.Element;
576
+ type ClusterProps = StackProps & {
577
+ readonly as?: "div" | "span";
578
+ };
579
+ declare const Cluster: ({ gap, as: Element, testId, children }: ClusterProps) => react.JSX.Element;
376
580
  type StepState = "done" | "current" | "pending";
377
581
  type StepperItem = {
378
582
  readonly id: string;
@@ -386,12 +590,16 @@ type StepperProps = {
386
590
  };
387
591
  declare const Stepper: ({ label, steps, testId }: StepperProps) => react.JSX.Element;
388
592
  type SwitchProps = {
389
- readonly label: string;
593
+ readonly label: ReactNode;
594
+ readonly labelHidden?: boolean;
390
595
  readonly checked: boolean;
391
596
  readonly onCheckedChange: (checked: boolean) => void;
597
+ readonly unavailable?: Unavailable;
392
598
  readonly testId: string;
599
+ readonly ref?: Ref<HTMLButtonElement>;
600
+ readonly dataAttributes?: DataAttributes;
393
601
  };
394
- declare const Switch: ({ label, checked, onCheckedChange, testId }: SwitchProps) => react.JSX.Element;
602
+ declare const Switch: ({ label, labelHidden, checked, onCheckedChange, unavailable, testId, ref, dataAttributes }: SwitchProps) => react.JSX.Element;
395
603
  type TabItem = {
396
604
  readonly id: string;
397
605
  readonly label: string;
@@ -405,29 +613,37 @@ type TabsProps = {
405
613
  readonly testId: string;
406
614
  };
407
615
  declare const Tabs: ({ label, items, currentId, onNavigate, testId }: TabsProps) => react.JSX.Element;
408
- type TextFace = "sans" | "mono";
409
616
  type TextProps = {
410
617
  readonly fg: FgRole;
411
618
  readonly type: TypeToken;
412
619
  readonly face?: TextFace;
413
620
  readonly as?: "span" | "p" | "div";
621
+ readonly space?: "preserve";
414
622
  readonly testId?: string;
415
623
  readonly id?: string;
416
624
  readonly tabIndex?: -1;
417
625
  readonly ref?: Ref<HTMLElement>;
418
626
  readonly children: ReactNode;
419
627
  };
420
- declare const Text: ({ fg, type, face, as: Element, testId, id, tabIndex, ref, children }: TextProps) => react.JSX.Element;
628
+ declare const Text: ({ fg, type, face, as: Element, space, testId, id, tabIndex, ref, children }: TextProps) => react.JSX.Element;
421
629
  type MetricTileTone = "neutral" | "danger" | "warning" | "success";
630
+ type MetricTileValue = {
631
+ readonly value: number | null;
632
+ readonly unit?: string;
633
+ readonly text?: never;
634
+ } | {
635
+ readonly text: string | null;
636
+ readonly value?: never;
637
+ readonly unit?: never;
638
+ };
422
639
  type MetricTileProps = {
423
640
  readonly label: string;
424
641
  readonly sublabel: string;
425
- readonly value: number | null;
426
642
  readonly tone: MetricTileTone;
427
643
  readonly testId: string;
428
644
  readonly dataAttributes?: DataAttributes;
429
- };
430
- declare const MetricTile: ({ label, sublabel, value, tone, testId, dataAttributes }: MetricTileProps) => react.JSX.Element;
645
+ } & MetricTileValue;
646
+ declare const MetricTile: (props: MetricTileProps) => react.JSX.Element;
431
647
  type TileGridProps = {
432
648
  readonly count: number;
433
649
  readonly minInlinePx: number;
@@ -455,6 +671,11 @@ type UsePagedResourceResult<K, T, C, M> = {
455
671
  readonly updateList: (key: K, map: (content: PagedContent<T, M>) => PagedContent<T, M>) => void;
456
672
  };
457
673
  declare const usePagedResource: <K extends string | number, T, C extends string | number, M>(key: K | null, loaders: PagedLoaders<T, C, M>, revision: number) => UsePagedResourceResult<K, T, C, M>;
674
+ type PendingPress = {
675
+ readonly pendingKey: string | null;
676
+ readonly press: (key: string, action: () => unknown) => void;
677
+ };
678
+ declare const usePendingPress: () => PendingPress;
458
679
  type UseResourceResult<K, T> = {
459
680
  readonly state: ResourceState<T>;
460
681
  readonly reload: () => void;
@@ -467,4 +688,4 @@ type VisuallyHiddenProps = {
467
688
  readonly children: ReactNode;
468
689
  };
469
690
  declare const VisuallyHidden: ({ testId, children }: VisuallyHiddenProps) => react.JSX.Element;
470
- export { ANNOUNCE_SETTLE_MS, AlertMessage, type AlertMessageProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, type ButtonVariant, Card, type CardProps, CardSection, type CardSectionProps, Cluster, CodeBlock, type CodeBlockProps, type ColumnDef, ColumnWidth, type ComparisonAttribute, type ComparisonColumn, ComparisonGrid, type ComparisonGridProps, type ComparisonLayout, type ConsoleUiContextValue, ConsoleUiLabels, ConsoleUiLocale, ConsoleUiRoot, type ConsoleUiRootProps, type DataAttributes, DataTable, type DataTableProps, type DescriptionItem, DescriptionList, type DescriptionListProps, Dialog, type DialogProps, Disclosure, type DisclosureProps, FgRole, Field, type FieldControl, type FieldOption, type FieldProps, Heading, type HeadingProps, type HeadingType, type JobCancel, JobCard, type JobCardProps, KeysetPage, Link, type LinkProps, LoadMore, type LoadMoreProps, MasterDetail, type MasterDetailProps, Measured, type MeasuredProps, Meter, type MeterProps, MetricTile, type MetricTileProps, type MetricTileTone, NextPage, Notice, type NoticeProps, PagedContent, type PagedLoaders, PagedState, Pill, type PillProps, type PillTone, ProgressBar, type ProgressBarProps, RadioGroup, type RadioGroupProps, ResourceFailed, type ResourceFailedProps, ResourceFailure, ResourceOutcome, ResourceState, RowButton, type RowButtonProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Select, type SelectProps, SelectableList, type SelectableListProps, Slider, type SliderProps, SpaceToken, Stack, type StackProps, type StepState, Stepper, type StepperItem, type StepperProps, Switch, type SwitchProps, type TabItem, Tabs, type TabsProps, Text, TextArea, type TextAreaProps, type TextFace, TextInput, type TextInputProps, type TextProps, TileGrid, type TileGridProps, Toolbar, type ToolbarProps, TypeToken, type UsePagedResourceResult, type UseResourceResult, VisuallyHidden, type VisuallyHiddenProps, useAnnounce, useConsoleUi, useEscapeToClose, useFocusRescue, usePagedResource, useResource };
691
+ export { ANNOUNCE_SETTLE_MS, AlertMessage, type AlertMessageProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, type ButtonVariant, Card, type CardProps, CardSection, type CardSectionProps, CheckboxGroup, type CheckboxGroupProps, Cluster, type ClusterProps, CodeBlock, type CodeBlockProps, type ColumnDef, ColumnWidth, type ComparisonAttribute, type ComparisonColumn, ComparisonGrid, type ComparisonGridProps, type ComparisonLayout, type ConsoleUiContextValue, ConsoleUiLabels, ConsoleUiLocale, ConsoleUiRoot, type ConsoleUiRootProps, type DataAttributes, DataTable, type DataTableProps, type DataTableRowDetail, type DescriptionItem, DescriptionList, type DescriptionListProps, Dialog, type DialogProps, Disclosure, type DisclosureProps, FgRole, Field, type FieldControl, type FieldOption, type FieldProps, Figure, FigureEdge, type FigureEdgeProps, FigureNode, type FigureNodeNote, type FigureNodePress, type FigureNodeProps, type FigureNodeShape, type FigurePointer, type FigureProps, FragmentLink, type FragmentLinkProps, Heading, type HeadingProps, type HeadingType, InlineChange, type InlineChangeKind, type InlineChangeProps, type JobCancel, JobCard, type JobCardProps, KeysetPage, Link, type LinkProps, List, ListItem, type ListItemProps, type ListMarking, type ListProps, type ListTextType, LoadMore, type LoadMoreProps, MasterDetail, type MasterDetailProps, Measured, type MeasuredKeep, type MeasuredProps, Meter, type MeterProps, MetricTile, type MetricTileProps, type MetricTileTone, NextPage, Notice, type NoticeProps, PagedContent, type PagedLoaders, PagedState, type PanelTab, PanelTabs, type PanelTabsProps, PasswordInput, type PasswordInputProps, type PendingPress, Pill, type PillProps, type PillTone, ProgressBar, type ProgressBarProps, RadioGroup, type RadioGroupProps, ResourceFailed, type ResourceFailedProps, ResourceFailure, ResourceOutcome, ResourceState, RowButton, type RowButtonProps, SegmentedControl, type SegmentedControlProps, type SegmentedOption, Select, type SelectProps, SelectableList, type SelectableListProps, Slider, type SliderProps, SpaceToken, Stack, type StackProps, type StepState, Stepper, type StepperItem, type StepperProps, Switch, type SwitchProps, type TabItem, Tabs, type TabsProps, Text, TextArea, type TextAreaProps, TextFace, TextInput, type TextInputProps, type TextProps, TileGrid, type TileGridProps, Toolbar, type ToolbarProps, TypeToken, type Unavailable, type UsePagedResourceResult, type UseResourceResult, VisuallyHidden, type VisuallyHiddenProps, useAnnounce, useConsoleUi, useEscapeToClose, useFocusRescue, usePagedResource, usePendingPress, useResource };