@tensor_1/react 2.31.0 → 2.33.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/README.md +367 -0
- package/dist/SchedulingCalendar-C4XVbqZr.d.ts +339 -0
- package/dist/attachment-labels.d.ts +16 -0
- package/dist/attachment-labels.js +9 -0
- package/dist/calendar-model.d.ts +141 -1
- package/dist/calendar-model.js +200 -11
- package/dist/chart-preset.cjs +127 -7
- package/dist/chart-preset.d.cts +2 -2
- package/dist/chart-preset.d.ts +1 -0
- package/dist/chart-preset.js +6 -1
- package/dist/chart-theme-Cl0IrkKQ.d.cts +112 -0
- package/dist/chart-theme.d.ts +51 -0
- package/dist/chart-theme.js +99 -0
- package/dist/chart.cjs +127 -7
- package/dist/chart.d.cts +2 -2
- package/dist/chart.d.ts +1 -0
- package/dist/chart.js +6 -2
- package/dist/components/Alert.d.ts +17 -1
- package/dist/components/Alert.js +9 -4
- package/dist/components/AlertDismiss.d.ts +14 -0
- package/dist/components/AlertDismiss.js +11 -0
- package/dist/components/Attachment.d.ts +15 -12
- package/dist/components/Attachment.js +17 -17
- package/dist/components/AttachmentParts.d.ts +24 -0
- package/dist/components/AttachmentParts.js +20 -0
- package/dist/components/Chart.d.ts +1 -0
- package/dist/components/Chart.js +6 -1
- package/dist/components/ChartCore.d.ts +6 -1
- package/dist/components/ChartCore.js +23 -5
- package/dist/components/Chip.d.ts +17 -2
- package/dist/components/Chip.js +35 -11
- package/dist/components/ChipRemove.d.ts +17 -0
- package/dist/components/ChipRemove.js +13 -0
- package/dist/components/CollapsibleParts.d.ts +29 -0
- package/dist/components/CollapsibleParts.js +20 -0
- package/dist/components/CollapsibleSection.d.ts +30 -3
- package/dist/components/CollapsibleSection.js +7 -11
- package/dist/components/CollapsibleSectionState.d.ts +1 -1
- package/dist/components/CollapsibleSectionState.js +54 -27
- package/dist/components/DashboardGrid.d.ts +60 -0
- package/dist/components/DashboardGrid.js +40 -0
- package/dist/components/DateRangePicker.d.ts +7 -1
- package/dist/components/DateRangePicker.js +5 -1
- package/dist/components/DescriptionList.d.ts +12 -1
- package/dist/components/DescriptionList.js +5 -5
- package/dist/components/Dialogs.d.ts +24 -3
- package/dist/components/Dialogs.js +74 -16
- package/dist/components/FileUpload.d.ts +10 -2
- package/dist/components/FileUpload.js +10 -4
- package/dist/components/FilterEditor.d.ts +4 -0
- package/dist/components/FilterEditor.js +13 -2
- package/dist/components/Heartbeat.d.ts +31 -0
- package/dist/components/Heartbeat.js +28 -0
- package/dist/components/Menu.d.ts +53 -5
- package/dist/components/Menu.js +104 -4
- package/dist/components/Meter.d.ts +7 -3
- package/dist/components/Meter.js +2 -1
- package/dist/components/Popover.d.ts +21 -2
- package/dist/components/Popover.js +94 -17
- package/dist/components/Prose.d.ts +6 -2
- package/dist/components/Prose.js +1 -1
- package/dist/components/RuleBuilder.d.ts +52 -4
- package/dist/components/RuleBuilder.js +109 -24
- package/dist/components/SchedulingCalendar.d.ts +4 -110
- package/dist/components/SchedulingCalendar.js +299 -63
- package/dist/components/SchedulingTimeGrid.d.ts +4 -0
- package/dist/components/SchedulingTimeGrid.js +521 -0
- package/dist/components/SchedulingTimeline.d.ts +2 -1
- package/dist/components/Segmented.d.ts +17 -3
- package/dist/components/Segmented.js +59 -5
- package/dist/components/Select.d.ts +66 -2
- package/dist/components/Select.js +800 -10
- package/dist/components/Spinner.d.ts +2 -1
- package/dist/components/Spinner.js +1 -1
- package/dist/components/StatusPill.d.ts +8 -2
- package/dist/components/StatusPill.js +2 -2
- package/dist/components/Steps.d.ts +28 -4
- package/dist/components/Steps.js +46 -16
- package/dist/components/TableControls.js +4 -3
- package/dist/components/Tabs.d.ts +7 -2
- package/dist/components/Tabs.js +14 -1
- package/dist/components/TextDiff.d.ts +49 -0
- package/dist/components/TextDiff.js +124 -0
- package/dist/{emoji-image-6mPZ15Zy.d.cts → emoji-image-DjCKpdwE.d.cts} +1 -1
- package/dist/emoji.cjs +169 -27
- package/dist/emoji.d.cts +3 -3
- package/dist/file-model.d.ts +22 -3
- package/dist/file-model.js +6 -4
- package/dist/filter-model.d.ts +26 -2
- package/dist/filter-model.js +13 -1
- package/dist/hooks/useAnchoredPosition.d.ts +24 -1
- package/dist/hooks/useAnchoredPosition.js +58 -8
- package/dist/hooks/useVirtualRows.d.ts +17 -2
- package/dist/hooks/useVirtualRows.js +6 -5
- package/dist/icons/Icon.d.ts +14 -14
- package/dist/index.cjs +4888 -1714
- package/dist/index.d.cts +1871 -658
- package/dist/index.d.ts +16 -9
- package/dist/index.js +67 -4
- package/dist/labels-context.d.ts +29 -1
- package/dist/{overlay-position-Cjv5E7mn.d.cts → overlay-position-2Afke51l.d.cts} +20 -0
- package/dist/overlay-position.d.ts +20 -0
- package/dist/overlay-position.js +17 -2
- package/dist/rich-text.cjs +169 -27
- package/dist/rich-text.d.cts +3 -3
- package/dist/rule-builder-model.d.ts +34 -2
- package/dist/rule-builder-model.js +48 -12
- package/dist/scheduling-calendar-model.d.ts +169 -0
- package/dist/scheduling-calendar-model.js +176 -0
- package/dist/select-model.d.ts +80 -0
- package/dist/select-model.js +109 -0
- package/dist/table-engine.d.ts +7 -0
- package/dist/table-engine.js +2 -1
- package/dist/text-diff-model.d.ts +71 -0
- package/dist/text-diff-model.js +261 -0
- package/package.json +1 -1
- package/dist/ChartCore-DzWe10bN.d.cts +0 -59
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { RefObject, AnchorHTMLAttributes, ReactNode, ButtonHTMLAttributes, HTMLAttributes, InputHTMLAttributes, AriaAttributes, Ref, TextareaHTMLAttributes,
|
|
3
|
-
import { P as Placement } from './overlay-position-
|
|
4
|
-
export { A as Align, a as PositionOptions, b as PositionResult, R as Rect, S as Side, c as Size, d as computePosition } from './overlay-position-
|
|
2
|
+
import { RefObject, AnchorHTMLAttributes, ReactNode, ButtonHTMLAttributes, HTMLAttributes, SelectHTMLAttributes, InputHTMLAttributes, AriaAttributes, Ref, TextareaHTMLAttributes, MouseEvent, DetailsHTMLAttributes, LiHTMLAttributes, TdHTMLAttributes, TableHTMLAttributes, ThHTMLAttributes, ReactElement } from 'react';
|
|
3
|
+
import { P as Placement } from './overlay-position-2Afke51l.cjs';
|
|
4
|
+
export { A as Align, a as PositionOptions, b as PositionResult, R as Rect, S as Side, c as Size, d as computePosition } from './overlay-position-2Afke51l.cjs';
|
|
5
5
|
|
|
6
6
|
declare function cx(...args: (string | false | null | undefined | 0)[]): string;
|
|
7
7
|
|
|
@@ -80,8 +80,15 @@ interface VirtualWindow {
|
|
|
80
80
|
* [start, end) plus `overscan` rows on each side; padTop/padBottom are spacer
|
|
81
81
|
* heights (px) so the scrollbar stays correct. Below `threshold` rows, callers
|
|
82
82
|
* should skip virtualization (render all) — see shouldVirtualize.
|
|
83
|
+
*
|
|
84
|
+
* `scrollTop` is clamped to what a list of `count` rows can scroll to. A scroll position left
|
|
85
|
+
* over from a longer list (5,000 rows filtered down to 150 while scrolled far down) then gives
|
|
86
|
+
* the last rows and a spacer no taller than the list, in the same pass — not an empty window
|
|
87
|
+
* under a spacer taller than everything, which the browser only corrects scroll by scroll
|
|
88
|
+
* (HAR-1616).
|
|
83
89
|
*/
|
|
84
90
|
declare function virtualWindow(scrollTop: number, viewportH: number, rowH: number, count: number, overscan?: number): VirtualWindow;
|
|
91
|
+
/** `count > threshold`: a list of exactly `threshold` rows is still rendered whole. */
|
|
85
92
|
declare function shouldVirtualize(count: number, threshold?: number): boolean;
|
|
86
93
|
/** Clamp a dragged column width to a sane minimum (and optional maximum). */
|
|
87
94
|
declare function clampWidth(width: number, min?: number, max?: number): number;
|
|
@@ -152,8 +159,21 @@ interface UseVirtualRowsOptions {
|
|
|
152
159
|
rowHeight: number;
|
|
153
160
|
/** Rows rendered beyond each viewport edge. Default: 6. */
|
|
154
161
|
overscan?: number;
|
|
155
|
-
/**
|
|
162
|
+
/**
|
|
163
|
+
* Render all rows at or below this count: rows are windowed only when
|
|
164
|
+
* `rows.length > threshold` (so exactly `threshold` rows are still rendered whole).
|
|
165
|
+
* Default: 100.
|
|
166
|
+
*/
|
|
156
167
|
threshold?: number;
|
|
168
|
+
/**
|
|
169
|
+
* Viewport height in pixels to assume until the scroll element has been measured, and
|
|
170
|
+
* whenever it measures 0 (first render, a hidden tab, a test without layout). With it, a
|
|
171
|
+
* 5,000-row table mounts with one window of rows; without it every row is rendered until
|
|
172
|
+
* the first measurement, as before (HAR-1616).
|
|
173
|
+
*/
|
|
174
|
+
estimatedViewportHeight?: number;
|
|
175
|
+
/** `false` renders every row with no spacers, whatever the count. Default: `true`. */
|
|
176
|
+
enabled?: boolean;
|
|
157
177
|
}
|
|
158
178
|
interface UseVirtualRowsResult<T> {
|
|
159
179
|
/** Attach to the scrolling TableWrap. */
|
|
@@ -168,8 +188,10 @@ interface UseVirtualRowsResult<T> {
|
|
|
168
188
|
/**
|
|
169
189
|
* Owns scroll/resize observation and exposes the small visible row window.
|
|
170
190
|
* Consumers render padTop/padBottom spacer rows inside their existing tbody.
|
|
191
|
+
* When the row count shrinks under a large scroll position the window is clamped to the new
|
|
192
|
+
* count in the same render, so `padTop` never exceeds the list (HAR-1616).
|
|
171
193
|
*/
|
|
172
|
-
declare function useVirtualRows<T>(rows: readonly T[], { rowHeight, overscan, threshold }: UseVirtualRowsOptions): UseVirtualRowsResult<T>;
|
|
194
|
+
declare function useVirtualRows<T>(rows: readonly T[], { rowHeight, overscan, threshold, estimatedViewportHeight, enabled }: UseVirtualRowsOptions): UseVirtualRowsResult<T>;
|
|
173
195
|
|
|
174
196
|
interface UseAnchoredPositionOptions {
|
|
175
197
|
/** Reposition while true, and (re)attach scroll/resize listeners. */
|
|
@@ -177,6 +199,25 @@ interface UseAnchoredPositionOptions {
|
|
|
177
199
|
placement?: Placement;
|
|
178
200
|
offset?: number;
|
|
179
201
|
padding?: number;
|
|
202
|
+
/**
|
|
203
|
+
* Keep the element inside the viewport on the side it hangs off as well: when it fits neither
|
|
204
|
+
* above nor below (or left nor right) it slides over the anchor instead of leaving the
|
|
205
|
+
* viewport. Once the anchor itself has left the viewport the element follows it out; pair
|
|
206
|
+
* that with `onAnchorHidden` to close it. Default true.
|
|
207
|
+
*/
|
|
208
|
+
shiftMainAxis?: boolean;
|
|
209
|
+
/**
|
|
210
|
+
* Cap the element's height to the viewport minus the padding on both edges, and let it scroll
|
|
211
|
+
* (`overflow-y: auto`, unless its own CSS already sets an overflow). A `max-height` from the
|
|
212
|
+
* element's own CSS still applies when it is smaller. Default false.
|
|
213
|
+
*/
|
|
214
|
+
capHeight?: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* Called when the anchor has scrolled completely out of view (outside the viewport or a
|
|
217
|
+
* clipping ancestor) while `open`. Close the overlay here; `Popover closeWhenAnchorHidden`
|
|
218
|
+
* is built on it.
|
|
219
|
+
*/
|
|
220
|
+
onAnchorHidden?: () => void;
|
|
180
221
|
}
|
|
181
222
|
/**
|
|
182
223
|
* Position a floating element (a native-popover overlay) against an anchor with
|
|
@@ -189,10 +230,14 @@ interface UseAnchoredPositionOptions {
|
|
|
189
230
|
* `position: fixed` + left/top and follows scroll/resize from JS. While `open`, the side
|
|
190
231
|
* chosen at open is kept until it no longer fits and the other side does, scrolls inside
|
|
191
232
|
* the overlay itself are ignored, and a size change of either element re-places it.
|
|
233
|
+
* An element that fits on neither side is kept inside the viewport (it covers the anchor).
|
|
234
|
+
* While it is held there, or within `ANCHOR_BAND` of the limit, it is written as fixed
|
|
235
|
+
* coordinates even where anchor positioning exists: those cannot drift while the page scrolls,
|
|
236
|
+
* so it is inside on every frame, not one frame later (HAR-1613).
|
|
192
237
|
* Returns a `reposition` fn for callers that want to nudge it manually (e.g. right when a
|
|
193
238
|
* native popover's `toggle` fires).
|
|
194
239
|
*/
|
|
195
|
-
declare function useAnchoredPosition(anchor: RefObject<HTMLElement | null> | HTMLElement | null | undefined, floatingRef: RefObject<HTMLElement | null>, { open, placement, offset, padding }: UseAnchoredPositionOptions): () => void;
|
|
240
|
+
declare function useAnchoredPosition(anchor: RefObject<HTMLElement | null> | HTMLElement | null | undefined, floatingRef: RefObject<HTMLElement | null>, { open, placement, offset, padding, shiftMainAxis, capHeight, onAnchorHidden }: UseAnchoredPositionOptions): () => void;
|
|
196
241
|
|
|
197
242
|
/**
|
|
198
243
|
* What a `renderLink` callback receives (HAR-1348). Spread it onto your router's link
|
|
@@ -312,9 +357,149 @@ declare function startOfMonth(value: string): string;
|
|
|
312
357
|
/** A weekday in `Date.getUTCDay()` numbering: 0 = Sunday … 6 = Saturday. */
|
|
313
358
|
type CalendarWeekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
314
359
|
declare function buildMonthGrid(month: string, weekStartsOn?: CalendarWeekday): CalendarDay[];
|
|
360
|
+
/**
|
|
361
|
+
* A shared `Intl.DateTimeFormat` for `locale` and `options`. Formatters are expensive to
|
|
362
|
+
* build, so one instance is kept per locale and options shape (key order does not matter);
|
|
363
|
+
* the cache holds up to 64 shapes and drops the oldest past that.
|
|
364
|
+
*/
|
|
365
|
+
declare function cachedDateTimeFormat(locale: string | readonly string[] | undefined, options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat;
|
|
366
|
+
/** The calendar date (`YYYY-MM-DD`) of an instant in `timeZone`. */
|
|
315
367
|
declare function zonedDateKey(instant: string | Date, timeZone: string): string;
|
|
368
|
+
/**
|
|
369
|
+
* The 24-hour wall-clock time (`HH:MM`) of an instant in `timeZone`. It reads the same
|
|
370
|
+
* cached formatter as the zone math, so it adds no `Intl.DateTimeFormat` instance.
|
|
371
|
+
*/
|
|
372
|
+
declare function zonedTimeOfDay(instant: string | number | Date, timeZone: string): string;
|
|
373
|
+
interface ZonedDayBounds {
|
|
374
|
+
/** The first instant of the day in the zone (local 00:00, or the first existing time after a gap). */
|
|
375
|
+
start: Date;
|
|
376
|
+
/** The first instant of the next day: `end` of D equals `start` of D + 1. */
|
|
377
|
+
end: Date;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* The half-open interval `[start, end)` of a calendar day in `timeZone`. DST days are 23 or
|
|
381
|
+
* 25 hours long; a day whose midnight does not exist starts at its first existing instant.
|
|
382
|
+
*/
|
|
383
|
+
declare function zonedDayBounds(dateKey: string, timeZone: string): ZonedDayBounds;
|
|
384
|
+
interface ZonedHourSlot {
|
|
385
|
+
/** The real instant the local hour starts. */
|
|
386
|
+
instant: Date;
|
|
387
|
+
/** The local hour, two digits (`'00'` … `'23'`). */
|
|
388
|
+
label: string;
|
|
389
|
+
/**
|
|
390
|
+
* The UTC offset (`'+02:00'`) when this local hour occurs twice in the day (clocks went
|
|
391
|
+
* back), set on both occurrences; otherwise `null`.
|
|
392
|
+
*/
|
|
393
|
+
offsetLabel: string | null;
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* One entry per real hour start in the day `[start, end)` in `timeZone`: 24 on most days,
|
|
397
|
+
* 23 when clocks go forward (no slot for the skipped hour) and 25 when they go back (the
|
|
398
|
+
* repeated hour twice, each with an `offsetLabel`).
|
|
399
|
+
*/
|
|
400
|
+
declare function zonedHourSlots(dateKey: string, timeZone: string): ZonedHourSlot[];
|
|
401
|
+
interface ZonedDayShift {
|
|
402
|
+
instant: Date;
|
|
403
|
+
/** `'gap_forward'` when the target wall-clock time did not exist and moved forward past the gap. */
|
|
404
|
+
adjusted: 'gap_forward' | null;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Moves an instant by `days` calendar days in `timeZone`, keeping its wall-clock time
|
|
408
|
+
* ("+1 day" is the same local time on the next day, whether that day has 23, 24 or 25
|
|
409
|
+
* hours). A wall time that occurs twice keeps the source's offset when it can (else the
|
|
410
|
+
* earlier one). A wall time that does not exist moves forward by the gap, once, and the
|
|
411
|
+
* result says so (`adjusted: 'gap_forward'`).
|
|
412
|
+
*/
|
|
413
|
+
declare function addZonedDays(instant: string | Date, days: number, timeZone: string): ZonedDayShift;
|
|
414
|
+
/**
|
|
415
|
+
* Calendar days `[start, end)` as date keys: `end` is the first day NOT covered.
|
|
416
|
+
* Produced by `zonedDaySpan`, read by `enumerateDateKeys`.
|
|
417
|
+
*/
|
|
418
|
+
interface ZonedDaySpan {
|
|
419
|
+
start: string;
|
|
420
|
+
end: string;
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* The calendar days an instant interval `[start, end)` touches in `timeZone`, end-exclusive:
|
|
424
|
+
* an entry ending exactly at local 00:00 occupies only the day before. Throws a `RangeError`
|
|
425
|
+
* when `end` is not after `start`; it never swaps the ends.
|
|
426
|
+
*/
|
|
427
|
+
declare function zonedDaySpan(start: string | Date, end: string | Date, timeZone: string): ZonedDaySpan;
|
|
428
|
+
/**
|
|
429
|
+
* The date keys of a `ZonedDaySpan` (`[start, end)`), at most `limit` of them (default
|
|
430
|
+
* 370; `Infinity` for no limit). `truncated` is true when the span has more days than were
|
|
431
|
+
* returned, so a long span is never cut silently. Throws a `RangeError` on an inverted span.
|
|
432
|
+
*/
|
|
433
|
+
declare function enumerateDateKeys(span: ZonedDaySpan, options?: {
|
|
434
|
+
limit?: number;
|
|
435
|
+
}): {
|
|
436
|
+
dates: string[];
|
|
437
|
+
truncated: boolean;
|
|
438
|
+
};
|
|
439
|
+
/**
|
|
440
|
+
* Inclusive date keys of an instant interval, with inverted ends swapped.
|
|
441
|
+
* @deprecated Use `zonedDaySpan`, which is end-exclusive (an entry ending at local 00:00
|
|
442
|
+
* does not paint the next day) and throws on an inverted interval instead of swapping.
|
|
443
|
+
* The behaviour here is unchanged in 2.x; changing it follows the contract-change process (E13).
|
|
444
|
+
*/
|
|
316
445
|
declare function zonedDateSpan(start: string, end: string, timeZone: string): ZonedDateSpan;
|
|
446
|
+
/**
|
|
447
|
+
* Date keys of an inclusive span, stopping silently after `limit` (370).
|
|
448
|
+
* @deprecated Use `enumerateDateKeys`, which reads an end-exclusive `ZonedDaySpan` and
|
|
449
|
+
* reports `truncated` instead of stopping silently. The behaviour here is unchanged in 2.x (E13).
|
|
450
|
+
*/
|
|
317
451
|
declare function enumerateDateSpan(span: ZonedDateSpan, limit?: number): string[];
|
|
452
|
+
interface LaneInterval {
|
|
453
|
+
id: string;
|
|
454
|
+
/** Half-open `[start, end)`: ISO string, epoch ms or Date. */
|
|
455
|
+
start: string | number | Date;
|
|
456
|
+
end: string | number | Date;
|
|
457
|
+
}
|
|
458
|
+
interface LanePlacement {
|
|
459
|
+
/** 0-based lane, or `null` when the interval did not fit in `maxLanes`. */
|
|
460
|
+
lane: number | null;
|
|
461
|
+
/** Index into `PackedLanes.clusters`. */
|
|
462
|
+
cluster: number;
|
|
463
|
+
}
|
|
464
|
+
interface LaneCluster {
|
|
465
|
+
/** Ids of one run of transitively overlapping intervals, by start, then end, then id. */
|
|
466
|
+
ids: string[];
|
|
467
|
+
/** Lanes the cluster uses (≤ `maxLanes`); a renderer divides the width by this. */
|
|
468
|
+
laneCount: number;
|
|
469
|
+
/** Intervals of the cluster that got no lane. */
|
|
470
|
+
overflow: number;
|
|
471
|
+
}
|
|
472
|
+
interface PackedLanes {
|
|
473
|
+
lanes: Record<string, LanePlacement>;
|
|
474
|
+
clusters: LaneCluster[];
|
|
475
|
+
/** Intervals that got no lane, over all clusters. */
|
|
476
|
+
overflow: number;
|
|
477
|
+
}
|
|
478
|
+
interface PackLanesOptions {
|
|
479
|
+
/**
|
|
480
|
+
* `'start'` (default): greedy first-fit by start, then end, then id, so the result does
|
|
481
|
+
* not depend on input order. `'given'`: first-fit in input order, so the consumer's
|
|
482
|
+
* ranking decides which intervals get a lane when there are not enough.
|
|
483
|
+
*/
|
|
484
|
+
order?: 'start' | 'given';
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Assigns half-open intervals to at most `maxLanes` lanes, first-fit. Two intervals that
|
|
488
|
+
* overlap never share a lane; two that only touch (`a.end === b.start`) may. Intervals
|
|
489
|
+
* that do not fit get `lane: null` and count towards their cluster's `overflow`. A
|
|
490
|
+
* zero-length interval occupies its start instant. Throws on `end < start` (it never
|
|
491
|
+
* swaps) and on a duplicate id.
|
|
492
|
+
*/
|
|
493
|
+
declare function packLanes(intervals: readonly LaneInterval[], maxLanes: number, options?: PackLanesOptions): PackedLanes;
|
|
494
|
+
/**
|
|
495
|
+
* Sorts a copy of `items` with `compare` (stable) and cuts it after `n`. `hidden` is the
|
|
496
|
+
* number of items not shown, so it is a true total only when `items` is complete; a
|
|
497
|
+
* consumer that knows a larger total shows that instead.
|
|
498
|
+
*/
|
|
499
|
+
declare function rankOverflow<T>(items: readonly T[], compare: (a: T, b: T) => number, n: number): {
|
|
500
|
+
visible: T[];
|
|
501
|
+
hidden: number;
|
|
502
|
+
};
|
|
318
503
|
declare function selectRangeDate(current: DateRangeValue, date: string): DateRangeValue;
|
|
319
504
|
declare function isDateInRange(date: string, value: DateRangeValue): boolean;
|
|
320
505
|
declare function isDateUnavailable(date: string, options: {
|
|
@@ -323,30 +508,271 @@ declare function isDateUnavailable(date: string, options: {
|
|
|
323
508
|
isDisabled?: (date: string) => boolean;
|
|
324
509
|
}): boolean;
|
|
325
510
|
|
|
326
|
-
|
|
511
|
+
/** Which lane group a span is drawn in: windows sit above multi-day items, and neither takes a chip slot. */
|
|
512
|
+
type MonthSpanGroup = 'window' | 'item';
|
|
513
|
+
interface MonthSpanInput {
|
|
514
|
+
id: string;
|
|
515
|
+
/** Half-open `[start, end)` instants (ISO 8601, epoch ms or Date). */
|
|
516
|
+
start: string | number | Date;
|
|
517
|
+
end: string | number | Date;
|
|
518
|
+
/** Defaults to `'item'`. */
|
|
519
|
+
group?: MonthSpanGroup;
|
|
520
|
+
}
|
|
521
|
+
interface PlacedMonthSpan {
|
|
522
|
+
id: string;
|
|
523
|
+
group: MonthSpanGroup;
|
|
524
|
+
/** 0-based week row of the grid `days` the layout was computed for. */
|
|
525
|
+
weekRow: number;
|
|
526
|
+
/** 0-based lane inside its group. */
|
|
527
|
+
lane: number;
|
|
528
|
+
/** First and last column (0–6, inclusive) the span covers in this row. */
|
|
529
|
+
startCol: number;
|
|
530
|
+
endCol: number;
|
|
531
|
+
/** The span started in an earlier row (or before the grid). */
|
|
532
|
+
continuesBefore: boolean;
|
|
533
|
+
/** The span goes on in a later row (or past the grid). */
|
|
534
|
+
continuesAfter: boolean;
|
|
535
|
+
}
|
|
536
|
+
interface MonthSpanLayout {
|
|
537
|
+
/** One entry per span per week row it got a lane in. Render exactly these; never re-pack. */
|
|
538
|
+
placed: PlacedMonthSpan[];
|
|
539
|
+
/** Per week row, the ids that got no lane, in input order (windows first). An id may name a window and an item. */
|
|
540
|
+
hiddenByRow: Record<number, string[]>;
|
|
541
|
+
/** Per week row with a hidden span, the first day (`YYYY-MM-DD`) a hidden span covers. */
|
|
542
|
+
firstHiddenDayByRow: Record<number, string>;
|
|
543
|
+
}
|
|
544
|
+
interface LayoutMonthSpansOptions {
|
|
545
|
+
/** The display zone that decides which days a span covers. */
|
|
546
|
+
timeZone: string;
|
|
547
|
+
/** When set, `days[0]` must fall on this weekday (a guard against a grid built for another week start). */
|
|
548
|
+
weekStartsOn?: CalendarWeekday;
|
|
549
|
+
/** Lanes per group (default 2). A number applies to both groups. */
|
|
550
|
+
laneCap?: number | Partial<Record<MonthSpanGroup, number>>;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* The calendar days an item covers in `timeZone`, end-exclusive (`end` is the first day not
|
|
554
|
+
* covered): a 22:00–00:00 item covers only its start day, a 23:00 → 02:00 item two days. A
|
|
555
|
+
* zero-length item covers the day of its start. Throws a `RangeError` when `end` is before
|
|
556
|
+
* `start`; it never swaps them.
|
|
557
|
+
*/
|
|
558
|
+
declare function itemDaySpan(start: string | number | Date, end: string | number | Date, timeZone: string): ZonedDaySpan;
|
|
559
|
+
/**
|
|
560
|
+
* The date keys a `SchedulingCalendar` grid shows, in order: six week rows for `'month'`
|
|
561
|
+
* (from the week holding the 1st), one for `'week'` (the week holding `anchorDate`). Pass the
|
|
562
|
+
* result to `layoutMonthSpans` so the layout and the rendered grid agree.
|
|
563
|
+
*/
|
|
564
|
+
declare function schedulingGridDays(anchorDate: string, view: 'month' | 'week', weekStartsOn?: CalendarWeekday): string[];
|
|
565
|
+
/**
|
|
566
|
+
* Places multi-day spans as one continuous bar per week row. Spans are taken **in the order
|
|
567
|
+
* given** (the consumer's salience order): in each row and group, the first spans to ask get
|
|
568
|
+
* the lanes, the rest are listed in `hiddenByRow`. Windows and items pack in separate groups,
|
|
569
|
+
* each capped by `laneCap`. Day membership is the end-exclusive zoned span in `timeZone`
|
|
570
|
+
* (never a UTC date). `days` are the grid's date keys, a whole number of weeks.
|
|
571
|
+
*/
|
|
572
|
+
declare function layoutMonthSpans(spans: readonly MonthSpanInput[], days: readonly string[], options: LayoutMonthSpansOptions): MonthSpanLayout;
|
|
573
|
+
/** How far past its first local midnight an entry may run and still be drawn in the grid (operator decision E12). */
|
|
574
|
+
declare const TOP_LANE_CROSS_MIDNIGHT_MINUTES = 360;
|
|
575
|
+
interface TimeGridEntryInput {
|
|
576
|
+
id: string;
|
|
577
|
+
/** Half-open `[start, end)` instants (ISO 8601, epoch ms or Date). */
|
|
578
|
+
start: string | number | Date;
|
|
579
|
+
end: string | number | Date;
|
|
580
|
+
/** An entry with no time of day: always drawn in the top lane. */
|
|
581
|
+
allDay?: boolean;
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Whether an entry is drawn in the top lane of the time grid instead of in the day columns:
|
|
585
|
+
* it is all-day, it is longer than one day (it ends after the same wall-clock time on the
|
|
586
|
+
* next day), or it runs more than `crossMidnightMinutes` past its first local midnight. A
|
|
587
|
+
* shorter midnight-crosser stays in the grid as a start segment and a continuation segment.
|
|
588
|
+
*/
|
|
589
|
+
declare function placesInTopLane(entry: Pick<TimeGridEntryInput, 'start' | 'end' | 'allDay'>, timeZone: string, options?: {
|
|
590
|
+
crossMidnightMinutes?: number;
|
|
591
|
+
}): boolean;
|
|
592
|
+
/** Which part of an entry a grid segment is: all of it, its first day, or the rest on the next day. */
|
|
593
|
+
type TimeGridPart = 'whole' | 'start' | 'continuation';
|
|
594
|
+
interface TimeGridSegment {
|
|
595
|
+
id: string;
|
|
596
|
+
part: TimeGridPart;
|
|
597
|
+
/** The segment, clipped to the day (epoch ms). */
|
|
598
|
+
start: number;
|
|
599
|
+
end: number;
|
|
600
|
+
/** Real hours from the start of the day to the segment. Multiply by the hour height. */
|
|
601
|
+
offsetHours: number;
|
|
602
|
+
/** The length of the segment in real hours. */
|
|
603
|
+
lengthHours: number;
|
|
604
|
+
/** 0-based lane inside its overlap cluster. */
|
|
605
|
+
lane: number;
|
|
606
|
+
/** Lanes its cluster uses: the segment is this fraction of the column wide. */
|
|
607
|
+
laneCount: number;
|
|
608
|
+
}
|
|
609
|
+
interface TimeGridDayLayout {
|
|
610
|
+
date: string;
|
|
611
|
+
/** The first instant of the day (epoch ms) and its length in real hours. */
|
|
612
|
+
dayStart: number;
|
|
613
|
+
dayHours: number;
|
|
614
|
+
/** One per entry part that got a lane, by start. */
|
|
615
|
+
segments: TimeGridSegment[];
|
|
616
|
+
/** Entries on this day that got no lane, by start. */
|
|
617
|
+
hidden: string[];
|
|
618
|
+
}
|
|
619
|
+
/**
|
|
620
|
+
* Lays one day column out: every entry that is not in the top lane and touches the day, clipped
|
|
621
|
+
* to it and packed into at most `maxLanes` lanes with `packLanes`. An entry that crosses
|
|
622
|
+
* midnight gives a `'start'` segment on its first day and a `'continuation'` on the next.
|
|
623
|
+
*/
|
|
624
|
+
declare function layoutTimeGridDay(entries: readonly TimeGridEntryInput[], date: string, timeZone: string, options?: {
|
|
625
|
+
maxLanes?: number;
|
|
626
|
+
crossMidnightMinutes?: number;
|
|
627
|
+
}): TimeGridDayLayout;
|
|
628
|
+
interface PlacedDaySpan {
|
|
629
|
+
id: string;
|
|
630
|
+
lane: number;
|
|
631
|
+
/** First and last column (inclusive) of `days` the span covers. */
|
|
632
|
+
startCol: number;
|
|
633
|
+
endCol: number;
|
|
634
|
+
continuesBefore: boolean;
|
|
635
|
+
continuesAfter: boolean;
|
|
636
|
+
}
|
|
637
|
+
interface DaySpanLayout {
|
|
638
|
+
placed: PlacedDaySpan[];
|
|
639
|
+
/** Ids that got no lane, in input order. */
|
|
640
|
+
hidden: string[];
|
|
641
|
+
/** The first day a hidden span covers, when there is one. */
|
|
642
|
+
firstHiddenDay?: string;
|
|
643
|
+
}
|
|
644
|
+
/**
|
|
645
|
+
* Places spans over one row of consecutive `days` (a week, or the single day of the Day
|
|
646
|
+
* view), in the order given, in at most `laneCap` lanes. Day membership is the end-exclusive
|
|
647
|
+
* zoned span. The time grid uses it for its top lane and its window strip.
|
|
648
|
+
*/
|
|
649
|
+
declare function layoutDaySpans(spans: readonly MonthSpanInput[], days: readonly string[], options: {
|
|
650
|
+
timeZone: string;
|
|
651
|
+
laneCap?: number;
|
|
652
|
+
}): DaySpanLayout;
|
|
653
|
+
/** A move the user asks for. The component never applies it: the consumer decides. */
|
|
654
|
+
interface MoveProposal {
|
|
655
|
+
/** ISO 8601 instants of the proposed window. */
|
|
656
|
+
start: string;
|
|
657
|
+
end: string;
|
|
658
|
+
/** `'gap_forward'` when the wall-clock time asked for does not exist that day and moved past the gap. */
|
|
659
|
+
adjusted: 'gap_forward' | null;
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* The window `[start, end)` moved by `minutes` of real time and then by `days` calendar days.
|
|
663
|
+
* A day move keeps the wall-clock start and end (`addZonedDays`), whatever the length of the
|
|
664
|
+
* days in between. Compute it from the original window every time, so that a time falling in
|
|
665
|
+
* a clock-change gap moves forward once, never twice. When a clock change on the target day
|
|
666
|
+
* would put the wall-clock end at or before the start (a window that sits on the skipped or
|
|
667
|
+
* repeated hour), the end keeps the real length of the window instead.
|
|
668
|
+
*/
|
|
669
|
+
declare function proposeMove(span: {
|
|
670
|
+
start: string | number | Date;
|
|
671
|
+
end: string | number | Date;
|
|
672
|
+
}, delta: {
|
|
673
|
+
days?: number;
|
|
674
|
+
minutes?: number;
|
|
675
|
+
}, timeZone: string): MoveProposal;
|
|
676
|
+
|
|
677
|
+
interface TimeGridEntryContext {
|
|
678
|
+
/** Whole text lines that fit in the item: 0 shows the markers only. */
|
|
679
|
+
availableLines: number;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/** `day` is one column of the time grid. `week` is the time grid when `timeGrid` is set, else seven day cells. */
|
|
683
|
+
type SchedulingCalendarView = 'month' | 'week' | 'day' | 'agenda';
|
|
684
|
+
/**
|
|
685
|
+
* @deprecated Use `band`, `status` and `markers` on the entry: they carry no product
|
|
686
|
+
* vocabulary and the consumer supplies every word. The values keep working in 2.x.
|
|
687
|
+
*/
|
|
327
688
|
type SchedulingEntryState = 'scheduled' | 'conflicted' | 'in-progress' | 'blackout-violation';
|
|
689
|
+
/** @deprecated Use `pattern` and `kindLabel` on the overlay. The values keep working in 2.x. */
|
|
328
690
|
type SchedulingOverlayKind = 'maintenance' | 'blackout';
|
|
691
|
+
/**
|
|
692
|
+
* The one dimension that takes a hue. `none` and `low` are untinted, `medium` gets a
|
|
693
|
+
* heavier edge, and only `high` is filled. The consumer decides what a band means.
|
|
694
|
+
*/
|
|
695
|
+
type SchedulingBand = 'none' | 'low' | 'medium' | 'high';
|
|
696
|
+
/**
|
|
697
|
+
* The state channel, drawn without hue: `tentative` is dashed, `committed` is the plain
|
|
698
|
+
* item, `live` carries a leading dot, `done` is dimmed and `dead` is struck through.
|
|
699
|
+
*/
|
|
700
|
+
type SchedulingStatus = 'tentative' | 'committed' | 'live' | 'done' | 'dead';
|
|
701
|
+
type SchedulingMarkerEmphasis = 'refused' | 'warning' | 'neutral';
|
|
702
|
+
/** How a window is hatched. Windows are neutral: the pattern and the visible label tell them apart. */
|
|
703
|
+
type SchedulingOverlayPattern = 'diagonal' | 'cross' | 'dotted' | 'solid';
|
|
329
704
|
/**
|
|
330
705
|
* Which date text a `formatDate` call is for (TENSOR B1/C9, HAR-1347):
|
|
331
706
|
* `day` names one day (each day cell's accessible name, the week-range title);
|
|
332
707
|
* `weekday` is the short column header (the date is any day of that weekday);
|
|
333
|
-
* `month` is the month-view title (the date is the first of the month)
|
|
708
|
+
* `month` is the month-view title (the date is the first of the month);
|
|
709
|
+
* `column` heads one day column of the time grid (weekday and date, e.g. "Wed 07.10").
|
|
334
710
|
*/
|
|
335
|
-
type SchedulingDatePart = 'day' | 'weekday' | 'month';
|
|
711
|
+
type SchedulingDatePart = 'day' | 'weekday' | 'month' | 'column';
|
|
712
|
+
/** A shape or icon with text. The text is always in the accessible name; a marker never relies on colour. */
|
|
713
|
+
interface SchedulingMarker {
|
|
714
|
+
id: string;
|
|
715
|
+
/** An icon from `@tensor_1/react/icons`. Without one the marker draws a shape for its `emphasis`. */
|
|
716
|
+
icon?: ReactNode;
|
|
717
|
+
label: string;
|
|
718
|
+
emphasis?: SchedulingMarkerEmphasis;
|
|
719
|
+
}
|
|
336
720
|
interface SchedulingCalendarEntry {
|
|
337
721
|
id: string;
|
|
338
722
|
title: string;
|
|
339
723
|
start: string;
|
|
340
724
|
end: string;
|
|
725
|
+
/** @deprecated Use `band`, `status` and `markers`. */
|
|
341
726
|
state?: SchedulingEntryState;
|
|
342
727
|
meta?: string;
|
|
728
|
+
band?: SchedulingBand;
|
|
729
|
+
status?: SchedulingStatus;
|
|
730
|
+
markers?: SchedulingMarker[];
|
|
731
|
+
/** The complete accessible name, built by the consumer from its own words. Replaces `labels.entry`. */
|
|
732
|
+
accessibleName?: string;
|
|
733
|
+
/** No time of day. In the time grid the entry is drawn in the top lane. */
|
|
734
|
+
allDay?: boolean;
|
|
735
|
+
/** `false` keeps this entry where it is when the grid allows moves (`canMove`). */
|
|
736
|
+
movable?: boolean;
|
|
343
737
|
}
|
|
344
738
|
interface SchedulingCalendarOverlay {
|
|
345
739
|
id: string;
|
|
740
|
+
/** The window's name, shown as text. */
|
|
346
741
|
label: string;
|
|
347
742
|
start: string;
|
|
348
743
|
end: string;
|
|
349
|
-
|
|
744
|
+
/** @deprecated Use `pattern` and `kindLabel`. */
|
|
745
|
+
kind?: SchedulingOverlayKind;
|
|
746
|
+
/** Defaults to `'solid'`. */
|
|
747
|
+
pattern?: SchedulingOverlayPattern;
|
|
748
|
+
/** What kind of window this is, in the consumer's words. Shown before the name. */
|
|
749
|
+
kindLabel?: string;
|
|
750
|
+
/** What the window applies to. Shown after the name. */
|
|
751
|
+
scopeLabel?: string;
|
|
752
|
+
/** The window applies to everything. A window that is not global never gets the global treatment. */
|
|
753
|
+
global?: boolean;
|
|
754
|
+
/** The complete accessible name. Replaces `labels.overlay`. */
|
|
755
|
+
accessibleName?: string;
|
|
756
|
+
}
|
|
757
|
+
/** What the consumer knows about one day (`YYYY-MM-DD`). The calendar shows these numbers and never derives them. */
|
|
758
|
+
interface SchedulingCalendarDay {
|
|
759
|
+
/** Every item on the day, shown in the cell even when no chip fits. */
|
|
760
|
+
count: number;
|
|
761
|
+
/** The "+N" of the cell. 0 shows none. */
|
|
762
|
+
overflowCount: number;
|
|
763
|
+
/** The accessible text of the count, e.g. "7 items, 2 need review". */
|
|
764
|
+
label?: string;
|
|
765
|
+
markers?: SchedulingMarker[];
|
|
766
|
+
}
|
|
767
|
+
interface SchedulingLegendItem {
|
|
768
|
+
id: string;
|
|
769
|
+
label: string;
|
|
770
|
+
swatch: {
|
|
771
|
+
band?: SchedulingBand;
|
|
772
|
+
status?: SchedulingStatus;
|
|
773
|
+
pattern?: SchedulingOverlayPattern;
|
|
774
|
+
icon?: ReactNode;
|
|
775
|
+
};
|
|
350
776
|
}
|
|
351
777
|
/**
|
|
352
778
|
* Every word the calendar renders (TENSOR RX-125, UIX-12). `{timeZone}`, `{view}`,
|
|
@@ -354,18 +780,31 @@ interface SchedulingCalendarOverlay {
|
|
|
354
780
|
*/
|
|
355
781
|
interface SchedulingCalendarLabels {
|
|
356
782
|
region: string;
|
|
783
|
+
/** @deprecated Use `previousMonth` and `previousWeek`. Still used when those are not set. */
|
|
357
784
|
previous: string;
|
|
785
|
+
/** @deprecated Use `nextMonth` and `nextWeek`. Still used when those are not set. */
|
|
358
786
|
next: string;
|
|
787
|
+
previousMonth?: string;
|
|
788
|
+
nextMonth?: string;
|
|
789
|
+
/** Also names the agenda's step, which moves by a week. */
|
|
790
|
+
previousWeek?: string;
|
|
791
|
+
nextWeek?: string;
|
|
792
|
+
previousDay?: string;
|
|
793
|
+
nextDay?: string;
|
|
359
794
|
viewGroup: string;
|
|
360
795
|
viewMonth: string;
|
|
361
796
|
viewWeek: string;
|
|
797
|
+
viewDay?: string;
|
|
362
798
|
viewAgenda: string;
|
|
363
799
|
loading: string;
|
|
364
800
|
retry: string;
|
|
365
801
|
agenda: string;
|
|
366
802
|
agendaEmpty: string;
|
|
367
803
|
grid: string;
|
|
804
|
+
/** An entry's accessible name unless it sets `accessibleName`. Its marker labels are appended. */
|
|
368
805
|
entry: string;
|
|
806
|
+
/** A window's accessible name unless it sets `accessibleName`. `{title}` is its kind, name and scope. */
|
|
807
|
+
overlay?: string;
|
|
369
808
|
legend: string;
|
|
370
809
|
/** The "+N more" toggle on a day with more entries than `maxEntriesPerDay`. `{count}` placeholder. */
|
|
371
810
|
moreEntries: string;
|
|
@@ -373,20 +812,61 @@ interface SchedulingCalendarLabels {
|
|
|
373
812
|
moreEntriesLabel: string;
|
|
374
813
|
/** The toggle once the day is expanded in place. */
|
|
375
814
|
fewerEntries: string;
|
|
815
|
+
/** The "+N" at the end of a week row whose spans did not all get a lane. `{count}` placeholder. */
|
|
816
|
+
moreSpans?: string;
|
|
817
|
+
/** Accessible name of that control. `{count}` and `{date}` (the first day with a hidden span). */
|
|
818
|
+
moreSpansLabel?: string;
|
|
819
|
+
/** The accessible text of a day's count when `days[date].label` is not given. `{count}` placeholder. */
|
|
820
|
+
dayCount?: string;
|
|
376
821
|
states: Record<SchedulingEntryState, string>;
|
|
822
|
+
/** The words for `status`, used in the default accessible name and the agenda. */
|
|
823
|
+
statuses?: Partial<Record<SchedulingStatus, string>>;
|
|
824
|
+
/** The header of the hour axis: it names the display zone. `{timeZone}` placeholder. */
|
|
825
|
+
timeZone?: string;
|
|
826
|
+
/** Names the strip of windows above the time grid. */
|
|
827
|
+
windows?: string;
|
|
828
|
+
/** "+N windows" when the strip has more windows than lanes. `{count}` placeholder. */
|
|
829
|
+
moreWindows?: string;
|
|
830
|
+
/** Accessible name of that control. `{count}` and `{date}` (the first day with a hidden window). */
|
|
831
|
+
moreWindowsLabel?: string;
|
|
832
|
+
/** Names the lane above the hours that holds all-day and long entries. */
|
|
833
|
+
topLane?: string;
|
|
834
|
+
/** The cue on the second-day part of an entry that crosses midnight. `{time}` is its start. */
|
|
835
|
+
continuesFrom?: string;
|
|
836
|
+
/** Read after an item's name when it can be moved. */
|
|
837
|
+
moveHint?: string;
|
|
838
|
+
/** Announced for a pending move. `{start}` and `{end}` placeholders. */
|
|
839
|
+
moveProposed?: string;
|
|
840
|
+
/** Announced when a pending move is dropped. */
|
|
841
|
+
moveCancelled?: string;
|
|
842
|
+
/** Announced when the time asked for does not exist that day. `{time}` is the time used instead. */
|
|
843
|
+
gapForward?: string;
|
|
377
844
|
}
|
|
378
845
|
declare const DEFAULT_SCHEDULING_CALENDAR_LABELS: SchedulingCalendarLabels;
|
|
379
846
|
interface SchedulingCalendarProps {
|
|
847
|
+
/**
|
|
848
|
+
* The entries. Without `dayEntries` the calendar places each on its day in the order
|
|
849
|
+
* given; with `dayEntries` only the entries that cover more than one day are read from
|
|
850
|
+
* here (they are drawn as spans).
|
|
851
|
+
*/
|
|
380
852
|
entries: SchedulingCalendarEntry[];
|
|
381
853
|
anchorDate: string;
|
|
382
854
|
timeZone: string;
|
|
383
855
|
view?: SchedulingCalendarView;
|
|
384
856
|
onViewChange?: (view: SchedulingCalendarView) => void;
|
|
385
857
|
onAnchorDateChange?: (date: string) => void;
|
|
858
|
+
/** Called by a click or Enter on a chip, a span or an agenda row. */
|
|
386
859
|
onSelectEntry?: (entry: SchedulingCalendarEntry) => void;
|
|
387
860
|
overlays?: SchedulingCalendarOverlay[];
|
|
861
|
+
/** Called by a click or Enter on a window span. */
|
|
862
|
+
onSelectOverlay?: (overlay: SchedulingCalendarOverlay) => void;
|
|
388
863
|
filter?: (entry: SchedulingCalendarEntry) => boolean;
|
|
389
|
-
|
|
864
|
+
/**
|
|
865
|
+
* Replaces a chip's content. The default is the start time in `timeZone` (24 h) and the title.
|
|
866
|
+
* In the time grid the second argument says how many text lines fit in the item (0: show the
|
|
867
|
+
* markers only); elsewhere it is not passed.
|
|
868
|
+
*/
|
|
869
|
+
renderEntry?: (entry: SchedulingCalendarEntry, context?: TimeGridEntryContext) => ReactNode;
|
|
390
870
|
locale?: string;
|
|
391
871
|
/** First column of the month and week grids: 0 = Sunday … 6 = Saturday. Defaults to 1 (Monday). */
|
|
392
872
|
weekStartsOn?: CalendarWeekday;
|
|
@@ -396,20 +876,23 @@ interface SchedulingCalendarProps {
|
|
|
396
876
|
*/
|
|
397
877
|
formatDate?: (date: string, part: SchedulingDatePart) => string;
|
|
398
878
|
/**
|
|
399
|
-
* Formats
|
|
400
|
-
* The component does not shift it: render it in `timeZone` yourself. Defaults to
|
|
401
|
-
*
|
|
879
|
+
* Formats a start or end instant (ISO 8601) for the agenda and the accessible names.
|
|
880
|
+
* The component does not shift it: render it in `timeZone` yourself. Defaults to the
|
|
881
|
+
* `day` date text followed by the 24-hour time in `timeZone`.
|
|
402
882
|
*/
|
|
403
883
|
formatInstant?: (instant: string) => string;
|
|
404
884
|
/**
|
|
405
|
-
*
|
|
406
|
-
*
|
|
885
|
+
* How many chips a day shows. Without `dayEntries` the rest collapse behind "+N more";
|
|
886
|
+
* with `dayEntries` it only sizes the cell (the consumer already cut the list, and a longer
|
|
887
|
+
* list makes the cells taller, never clipped). Unset shows every entry where the cells
|
|
888
|
+
* grow, and sizes a fixed cell for three chips.
|
|
407
889
|
*/
|
|
408
890
|
maxEntriesPerDay?: number;
|
|
409
891
|
/**
|
|
410
|
-
* Called by
|
|
411
|
-
*
|
|
412
|
-
*
|
|
892
|
+
* Called by a day's "+N more" and by a week row's "+N" with the day (and, without
|
|
893
|
+
* `dayEntries`, every entry on it). When set, the consumer shows them (a popover, a
|
|
894
|
+
* drawer, the day view) and the day stays collapsed. Required with `days` or `dayEntries`:
|
|
895
|
+
* a controlled day never expands in place.
|
|
413
896
|
*/
|
|
414
897
|
onShowMore?: (date: string, entries: SchedulingCalendarEntry[]) => void;
|
|
415
898
|
/**
|
|
@@ -419,6 +902,68 @@ interface SchedulingCalendarProps {
|
|
|
419
902
|
* to the number). Return null for no badge.
|
|
420
903
|
*/
|
|
421
904
|
renderDayBadge?: (date: string, entries: SchedulingCalendarEntry[]) => ReactNode;
|
|
905
|
+
/**
|
|
906
|
+
* Consumer-owned numbers per day (`YYYY-MM-DD`). When set, each listed day shows its
|
|
907
|
+
* `count` and markers even with no chip, and its "+N" is `overflowCount`, never a number
|
|
908
|
+
* derived from the entries given. Without `dayEntries` the chips are still this day's
|
|
909
|
+
* `entries`, cut to `maxEntriesPerDay`; the day never expands in place.
|
|
910
|
+
*/
|
|
911
|
+
days?: Record<string, SchedulingCalendarDay>;
|
|
912
|
+
/**
|
|
913
|
+
* The single-day chips of each day, already ranked and cut by the consumer. When set, the
|
|
914
|
+
* calendar renders exactly these in the order given: it does not place, rank, cut or count.
|
|
915
|
+
*/
|
|
916
|
+
dayEntries?: Record<string, SchedulingCalendarEntry[]>;
|
|
917
|
+
/**
|
|
918
|
+
* The result of `layoutMonthSpans` for this grid. When set, the calendar draws exactly
|
|
919
|
+
* these spans and never packs lanes itself. Compute it with `schedulingGridDays`.
|
|
920
|
+
*/
|
|
921
|
+
spanLayout?: MonthSpanLayout;
|
|
922
|
+
/**
|
|
923
|
+
* Lanes kept for windows above the chips. Windows never take a chip slot. Default 2 where
|
|
924
|
+
* the cells have a fixed height; where they grow with their content every window gets a lane.
|
|
925
|
+
*/
|
|
926
|
+
windowLaneCap?: number;
|
|
927
|
+
/** Lanes kept for entries that cover more than one day. Default as for `windowLaneCap`. */
|
|
928
|
+
spanLaneCap?: number;
|
|
929
|
+
/** When set, the legend is exactly these items (an empty list draws no legend). Unset keeps the built-in state legend. */
|
|
930
|
+
legend?: SchedulingLegendItem[];
|
|
931
|
+
/** A line under the legend, e.g. the display zone. */
|
|
932
|
+
legendCaption?: ReactNode;
|
|
933
|
+
/** `false` hides the previous/next buttons, the title and the view switch (the page has its own toolbar). */
|
|
934
|
+
showHeader?: boolean;
|
|
935
|
+
/** Shown above the grid, e.g. "Showing the first 2,000 items". */
|
|
936
|
+
notice?: ReactNode;
|
|
937
|
+
/** Shown inside the grid, below the day cells, when there is nothing to show. */
|
|
938
|
+
emptyNote?: ReactNode;
|
|
939
|
+
/** Called by a click or Enter on a day number. */
|
|
940
|
+
onSelectDate?: (date: string) => void;
|
|
941
|
+
/**
|
|
942
|
+
* Draws `view="week"` as a time grid: seven day columns on an hour axis. `view="day"` is
|
|
943
|
+
* always a time grid. Default `false`: the week stays seven day cells.
|
|
944
|
+
*/
|
|
945
|
+
timeGrid?: boolean;
|
|
946
|
+
/** An instant (ISO 8601). The time grid draws one line at it, in the column of its day. The component keeps no clock. */
|
|
947
|
+
now?: string;
|
|
948
|
+
/**
|
|
949
|
+
* Lets the user ask for a move in the time grid (drag, or Shift and an arrow key, then
|
|
950
|
+
* Enter). Without it, or without `onProposeMove`, items have no move affordance at all.
|
|
951
|
+
*/
|
|
952
|
+
canMove?: boolean;
|
|
953
|
+
/** Minutes a move snaps to. Default 15. */
|
|
954
|
+
step?: number;
|
|
955
|
+
/**
|
|
956
|
+
* Called once per finished gesture with the window the user asks for. The calendar never
|
|
957
|
+
* moves the item: it draws entries where the props say, so an entry whose props do not
|
|
958
|
+
* change is back where it was. Return a promise to keep the outline until it settles.
|
|
959
|
+
*/
|
|
960
|
+
onProposeMove?: (id: string, proposal: MoveProposal) => void | Promise<unknown>;
|
|
961
|
+
/** An entry running more than this many minutes past its first local midnight goes to the top lane. Default 360. */
|
|
962
|
+
topLaneCrossMidnightMinutes?: number;
|
|
963
|
+
/** Rows of the top lane of the time grid. Default 3. */
|
|
964
|
+
topLaneCap?: number;
|
|
965
|
+
/** Lanes side by side in one day column of the time grid, at most. Fewer are used when the column is narrow. Default 4. */
|
|
966
|
+
maxLanes?: number;
|
|
422
967
|
loading?: boolean;
|
|
423
968
|
error?: string;
|
|
424
969
|
onRetry?: () => void;
|
|
@@ -426,7 +971,7 @@ interface SchedulingCalendarProps {
|
|
|
426
971
|
labels?: Partial<SchedulingCalendarLabels>;
|
|
427
972
|
}
|
|
428
973
|
/** Month/week/agenda calendar for UTC ranges rendered in an explicit IANA time zone. */
|
|
429
|
-
declare function SchedulingCalendar({ entries, anchorDate, timeZone, view: controlledView, onViewChange, onAnchorDateChange, onSelectEntry, overlays, filter, renderEntry, locale, weekStartsOn, formatDate, formatInstant: formatInstantProp, maxEntriesPerDay, onShowMore, renderDayBadge, loading, error, onRetry, className, labels: labelOverrides, }: SchedulingCalendarProps): react.JSX.Element;
|
|
974
|
+
declare function SchedulingCalendar({ entries, anchorDate, timeZone, view: controlledView, onViewChange, onAnchorDateChange, onSelectEntry, overlays, onSelectOverlay, filter, renderEntry, locale, weekStartsOn, formatDate, formatInstant: formatInstantProp, maxEntriesPerDay, onShowMore, renderDayBadge, days: dayInfo, dayEntries, spanLayout, windowLaneCap, spanLaneCap, legend, legendCaption, showHeader, notice, emptyNote, onSelectDate, timeGrid, now, canMove, step, onProposeMove, topLaneCrossMidnightMinutes, topLaneCap, maxLanes, loading, error, onRetry, className, labels: labelOverrides, }: SchedulingCalendarProps): react.JSX.Element;
|
|
430
975
|
|
|
431
976
|
/**
|
|
432
977
|
* Every word the picker renders or announces (TENSOR RX-125, UIX-13). `{start}` and
|
|
@@ -462,9 +1007,15 @@ interface DateRangePickerProps {
|
|
|
462
1007
|
className?: string;
|
|
463
1008
|
/** Translatable words; English defaults in {@link DEFAULT_DATE_RANGE_PICKER_LABELS}. */
|
|
464
1009
|
labels?: Partial<DateRangePickerLabels>;
|
|
1010
|
+
/**
|
|
1011
|
+
* The ISO date (`YYYY-MM-DD`) that gets the today ring and `aria-current="date"`.
|
|
1012
|
+
* Defaults to the viewer's local date; pass it when rendering on a server (whose
|
|
1013
|
+
* clock and zone may differ from the viewer's), or `null` for no today marker.
|
|
1014
|
+
*/
|
|
1015
|
+
today?: string | null;
|
|
465
1016
|
}
|
|
466
1017
|
/** Controlled, two-month range picker using the UIx calendar language. */
|
|
467
|
-
declare function DateRangePicker({ value, onChange, visibleMonth: controlledMonth, onVisibleMonthChange, months, min, max, isDateDisabled, locale, label, invalid, invalidMessage, disabled, className, labels: labelOverrides, }: DateRangePickerProps): react.JSX.Element;
|
|
1018
|
+
declare function DateRangePicker({ value, onChange, visibleMonth: controlledMonth, onVisibleMonthChange, months, min, max, isDateDisabled, locale, label, invalid, invalidMessage, disabled, className, labels: labelOverrides, today, }: DateRangePickerProps): react.JSX.Element;
|
|
468
1019
|
|
|
469
1020
|
/**
|
|
470
1021
|
* Pure model for `SchedulingTimeline` (HAR-1364; TENSOR C8): ticks on a time axis, where a
|
|
@@ -639,121 +1190,864 @@ interface SchedulingTimelineProps {
|
|
|
639
1190
|
declare function SchedulingTimeline({ lanes, items, range, scale, timeZone, locale, overlays, markers, now, weekStartsOn, tickWidth, step: stepProp, formatTick, formatInstant: formatInstantProp, renderItem, onSelectItem, onMoveItem, loading, error, onRetry, labels: labelOverrides, className, }: SchedulingTimelineProps): react.JSX.Element;
|
|
640
1191
|
|
|
641
1192
|
/**
|
|
642
|
-
*
|
|
643
|
-
*
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
* Client components read the provider. Server-renderable ones (`Pagination`, `BulkBar`)
|
|
647
|
-
* cannot read context: pass `labels` from `useUixLabels()` in a client parent, or translate
|
|
648
|
-
* on the server.
|
|
1193
|
+
* Two-way text diff for `TextDiff` (HAR-1368). Pure. Myers' O(ND) diff on lines or words,
|
|
1194
|
+
* after trimming the common prefix and suffix. Past `maxEdits` the changed middle is shown as
|
|
1195
|
+
* one replacement instead of searching further, so a rewrite never stalls the page.
|
|
649
1196
|
*/
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
exitFocus?: string;
|
|
671
|
-
};
|
|
672
|
-
sidebar?: {
|
|
673
|
-
expand?: string;
|
|
674
|
-
collapse?: string;
|
|
675
|
-
};
|
|
676
|
-
searchSuggest?: {
|
|
677
|
-
clear?: string;
|
|
678
|
-
};
|
|
679
|
-
commandPalette?: {
|
|
680
|
-
input?: string;
|
|
681
|
-
};
|
|
682
|
-
confirmDialog?: {
|
|
683
|
-
typeToConfirm?: string;
|
|
684
|
-
compensation?: string;
|
|
685
|
-
};
|
|
686
|
-
schedulingCalendar?: Partial<SchedulingCalendarLabels>;
|
|
687
|
-
dateRangePicker?: Partial<DateRangePickerLabels>;
|
|
688
|
-
schedulingTimeline?: Partial<SchedulingTimelineLabels>;
|
|
689
|
-
/** Read by `useUixLabels()` callers; `Pagination` itself is server-safe and takes `labels`. */
|
|
690
|
-
pagination?: Partial<PaginationLabels>;
|
|
691
|
-
/** Read by `useUixLabels()` callers; `BulkBar` itself is server-safe and takes `label`. */
|
|
692
|
-
bulkBar?: {
|
|
693
|
-
region?: string;
|
|
694
|
-
};
|
|
695
|
-
}
|
|
696
|
-
interface UixLabelsProviderProps {
|
|
697
|
-
labels: UixLabels;
|
|
698
|
-
children?: ReactNode;
|
|
1197
|
+
type TextDiffGranularity = 'line' | 'word';
|
|
1198
|
+
interface TextDiffOp {
|
|
1199
|
+
type: 'equal' | 'insert' | 'delete';
|
|
1200
|
+
/** Lines (granularity `line`) or word, space and punctuation tokens (`word`). */
|
|
1201
|
+
tokens: string[];
|
|
1202
|
+
}
|
|
1203
|
+
interface TextDiffOptions {
|
|
1204
|
+
granularity?: TextDiffGranularity;
|
|
1205
|
+
/** More tokens than this on either side gives `status: 'too-large'`. Default 20 000. */
|
|
1206
|
+
maxTokens?: number;
|
|
1207
|
+
/** Edit budget for the search; beyond it the middle becomes one replacement. Default 2 000. */
|
|
1208
|
+
maxEdits?: number;
|
|
1209
|
+
}
|
|
1210
|
+
interface TextDiffResult {
|
|
1211
|
+
status: 'ok' | 'too-large';
|
|
1212
|
+
granularity: TextDiffGranularity;
|
|
1213
|
+
ops: TextDiffOp[];
|
|
1214
|
+
/** Lines, or words (not spaces or punctuation), added and removed. */
|
|
1215
|
+
added: number;
|
|
1216
|
+
removed: number;
|
|
699
1217
|
}
|
|
700
|
-
/**
|
|
701
|
-
declare function
|
|
702
|
-
/**
|
|
703
|
-
declare function
|
|
1218
|
+
/** Splits text into lines (without their `\r\n` / `\n`) or into word, space and punctuation tokens. */
|
|
1219
|
+
declare function tokenizeText(text: string, granularity: TextDiffGranularity): string[];
|
|
1220
|
+
/** Myers diff of two token lists. Tokens compare by string equality. */
|
|
1221
|
+
declare function diffTokens(a: readonly string[], b: readonly string[], maxEdits?: number): TextDiffOp[];
|
|
1222
|
+
/** Diffs two texts by line or by word, with added/removed counts. */
|
|
1223
|
+
declare function diffText(before: string, after: string, { granularity, maxTokens, maxEdits }?: TextDiffOptions): TextDiffResult;
|
|
1224
|
+
/** A run of text inside one line; `changed` marks the words that differ from the other side. */
|
|
1225
|
+
interface TextDiffSegment {
|
|
1226
|
+
text: string;
|
|
1227
|
+
changed: boolean;
|
|
1228
|
+
}
|
|
1229
|
+
interface TextDiffLine {
|
|
1230
|
+
/** 1-based line number on its side. */
|
|
1231
|
+
number: number;
|
|
1232
|
+
/** Word-level marks when the line was paired with a similar counterpart; otherwise one changed segment. */
|
|
1233
|
+
segments: TextDiffSegment[];
|
|
1234
|
+
}
|
|
1235
|
+
type TextDiffRow = {
|
|
1236
|
+
kind: 'equal';
|
|
1237
|
+
before: TextDiffLine;
|
|
1238
|
+
after: TextDiffLine;
|
|
1239
|
+
} | {
|
|
1240
|
+
kind: 'change';
|
|
1241
|
+
before: TextDiffLine;
|
|
1242
|
+
after: TextDiffLine;
|
|
1243
|
+
} | {
|
|
1244
|
+
kind: 'delete';
|
|
1245
|
+
before: TextDiffLine;
|
|
1246
|
+
} | {
|
|
1247
|
+
kind: 'insert';
|
|
1248
|
+
after: TextDiffLine;
|
|
1249
|
+
} | {
|
|
1250
|
+
kind: 'fold';
|
|
1251
|
+
count: number;
|
|
1252
|
+
rows: TextDiffRow[];
|
|
1253
|
+
};
|
|
1254
|
+
/**
|
|
1255
|
+
* Rows for a line diff: unchanged lines, removed/added lines, and changed lines paired side by
|
|
1256
|
+
* side with word marks. With `context`, unchanged runs longer than needed fold into one row.
|
|
1257
|
+
*/
|
|
1258
|
+
declare function textDiffRows(result: TextDiffResult, { context }?: {
|
|
1259
|
+
context?: number;
|
|
1260
|
+
}): TextDiffRow[];
|
|
704
1261
|
|
|
705
|
-
interface
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
1262
|
+
interface TextDiffLabels {
|
|
1263
|
+
before: string;
|
|
1264
|
+
after: string;
|
|
1265
|
+
/** `{added}`, `{removed}`: lines or words, by granularity. */
|
|
1266
|
+
summary: string;
|
|
1267
|
+
noChanges: string;
|
|
1268
|
+
/** Read before removed text. */
|
|
1269
|
+
removed: string;
|
|
1270
|
+
/** Read before added text. */
|
|
1271
|
+
added: string;
|
|
1272
|
+
/** Fold button. `{count}`. */
|
|
1273
|
+
showUnchanged: string;
|
|
1274
|
+
tooLarge: string;
|
|
709
1275
|
}
|
|
710
|
-
declare const
|
|
711
|
-
interface
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
'
|
|
1276
|
+
declare const DEFAULT_TEXT_DIFF_LABELS: TextDiffLabels;
|
|
1277
|
+
interface TextDiffProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
1278
|
+
before: string;
|
|
1279
|
+
after: string;
|
|
1280
|
+
/** Column heading for `before`, e.g. "Version 3". Defaults to `labels.before`. */
|
|
1281
|
+
beforeLabel?: ReactNode;
|
|
1282
|
+
afterLabel?: ReactNode;
|
|
1283
|
+
/** `line` (default) pairs changed lines and marks the words inside; `word` diffs prose as one flow. */
|
|
1284
|
+
granularity?: TextDiffGranularity;
|
|
1285
|
+
/** `split` (default) puts the versions side by side, stacking on narrow containers; `unified` interleaves them. */
|
|
1286
|
+
view?: 'split' | 'unified';
|
|
1287
|
+
/** Line diffs: unchanged lines kept around each change; longer runs fold behind a button. Default: show all. */
|
|
1288
|
+
context?: number;
|
|
1289
|
+
/** Names the diff for assistive technology, e.g. "Changes to the article body". */
|
|
1290
|
+
label?: string;
|
|
1291
|
+
/** Hide the added/removed summary. */
|
|
1292
|
+
hideSummary?: boolean;
|
|
1293
|
+
/** Passed to the model (`maxTokens`, `maxEdits`); see `diffText`. */
|
|
1294
|
+
maxTokens?: number;
|
|
1295
|
+
maxEdits?: number;
|
|
1296
|
+
labels?: Partial<TextDiffLabels>;
|
|
721
1297
|
}
|
|
722
1298
|
/**
|
|
723
|
-
*
|
|
724
|
-
*
|
|
725
|
-
*
|
|
726
|
-
* the
|
|
1299
|
+
* A two-way diff of two texts (HAR-1368; TENSOR C11 knowledge version diff): by line with word
|
|
1300
|
+
* marks inside changed lines, or by word for prose; side by side or unified. Changes are `<del>` /
|
|
1301
|
+
* `<ins>` with a −/+ sign and a spoken "Removed"/"Added", never colour alone. `DiffViewer` stays
|
|
1302
|
+
* the three-way JSON configuration diff.
|
|
727
1303
|
*/
|
|
728
|
-
declare function
|
|
1304
|
+
declare function TextDiff({ before, after, beforeLabel, afterLabel, granularity, view, context, label, hideSummary, maxTokens, maxEdits, labels: labelOverrides, className, ...props }: TextDiffProps): react.JSX.Element;
|
|
729
1305
|
|
|
730
|
-
|
|
1306
|
+
/**
|
|
1307
|
+
* Typed column filters for `FilterEditor` (HAR-1365; TENSOR C6 `table-filter-editor.tsx`,
|
|
1308
|
+
* MOTUS C-1 "+ filter"). The value is data the product serializes into its own query; the
|
|
1309
|
+
* summary feeds a `Chip`. Pure, so a server can summarize a saved view too.
|
|
1310
|
+
*/
|
|
1311
|
+
interface FilterChoice {
|
|
731
1312
|
value: string;
|
|
732
1313
|
label: string;
|
|
733
|
-
keywords?: readonly string[];
|
|
734
|
-
disabled?: boolean;
|
|
735
|
-
}
|
|
736
|
-
declare function filterComboboxOptions(options: readonly ComboboxOption[], query: string): ComboboxOption[];
|
|
737
|
-
|
|
738
|
-
interface ComboboxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
739
|
-
options: readonly ComboboxOption[];
|
|
740
|
-
value?: string;
|
|
741
|
-
defaultValue?: string;
|
|
742
|
-
onValueChange?: (value: string, option: ComboboxOption) => void;
|
|
743
|
-
label: string;
|
|
744
|
-
placeholder?: string;
|
|
745
|
-
emptyLabel: string;
|
|
746
|
-
name?: string;
|
|
747
|
-
disabled?: boolean;
|
|
748
1314
|
}
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
1315
|
+
type TextFilterOperator = 'contains' | 'not-contains' | 'is' | 'is-not' | 'starts-with';
|
|
1316
|
+
type NumberFilterOperator = 'eq' | 'neq' | 'lt' | 'lte' | 'gt' | 'gte' | 'between';
|
|
1317
|
+
type FilterValue = {
|
|
1318
|
+
kind: 'enum';
|
|
1319
|
+
values: string[];
|
|
1320
|
+
} | {
|
|
1321
|
+
kind: 'text';
|
|
1322
|
+
operator: TextFilterOperator;
|
|
1323
|
+
text: string;
|
|
1324
|
+
} | {
|
|
1325
|
+
kind: 'number';
|
|
1326
|
+
operator: NumberFilterOperator;
|
|
1327
|
+
value?: number;
|
|
1328
|
+
to?: number;
|
|
1329
|
+
} | {
|
|
1330
|
+
kind: 'date-range';
|
|
1331
|
+
from?: string;
|
|
1332
|
+
to?: string;
|
|
1333
|
+
} | {
|
|
1334
|
+
kind: 'boolean';
|
|
1335
|
+
value?: boolean;
|
|
1336
|
+
} | {
|
|
1337
|
+
kind: 'reference';
|
|
1338
|
+
values: FilterChoice[];
|
|
1339
|
+
};
|
|
1340
|
+
type FilterValueKind = FilterValue['kind'];
|
|
1341
|
+
/**
|
|
1342
|
+
* A named selection for an `enum` field (HAR-1505), e.g. "Open work" = new, open and pending.
|
|
1343
|
+
* The id, label and values come from the product.
|
|
1344
|
+
*/
|
|
1345
|
+
interface FilterPreset {
|
|
1346
|
+
id: string;
|
|
1347
|
+
label: string;
|
|
1348
|
+
/** The option values the preset selects. Compared as a set: order and repeats do not matter. */
|
|
1349
|
+
values: readonly string[];
|
|
1350
|
+
}
|
|
1351
|
+
interface FilterField {
|
|
1352
|
+
id: string;
|
|
1353
|
+
/** Column name, also the start of the chip summary. */
|
|
1354
|
+
label: string;
|
|
1355
|
+
kind: FilterValueKind;
|
|
1356
|
+
/** `enum`: the choices. */
|
|
1357
|
+
options?: readonly FilterChoice[];
|
|
1358
|
+
/** `reference`: finds records to pick; rejected promises show the error state. */
|
|
1359
|
+
onSearch?: (query: string) => Promise<readonly FilterChoice[]>;
|
|
1360
|
+
/** `text` / `number`: the operators offered, in order. Default: all of the kind. */
|
|
1361
|
+
operators?: readonly (TextFilterOperator | NumberFilterOperator)[];
|
|
1362
|
+
/** `number`: a unit shown after the value, e.g. "days". */
|
|
1363
|
+
unit?: string;
|
|
1364
|
+
/** `boolean`: words for true and false, e.g. Escalated / Not escalated. Default from labels. */
|
|
1365
|
+
trueLabel?: string;
|
|
1366
|
+
falseLabel?: string;
|
|
1367
|
+
/**
|
|
1368
|
+
* `enum`: named selections shown as toggle chips above the options. Activating one replaces
|
|
1369
|
+
* the selection with its values; the one equal to the selection is pressed, and the chip
|
|
1370
|
+
* summary names it.
|
|
1371
|
+
*/
|
|
1372
|
+
presets?: readonly FilterPreset[];
|
|
1373
|
+
}
|
|
1374
|
+
interface FilterSummaryLabels {
|
|
1375
|
+
operators: Record<TextFilterOperator | NumberFilterOperator, string>;
|
|
1376
|
+
yes: string;
|
|
1377
|
+
no: string;
|
|
1378
|
+
/** `{from}`, `{to}`; also used for a number range. */
|
|
1379
|
+
range: string;
|
|
1380
|
+
/** Only a start date. `{from}`. */
|
|
1381
|
+
from: string;
|
|
1382
|
+
/** Only an end date. `{to}`. */
|
|
1383
|
+
until: string;
|
|
1384
|
+
/** More than `maxListed` values: `{first}`, `{count}`. */
|
|
1385
|
+
more: string;
|
|
1386
|
+
/** An `enum` value equal to a preset: `{label}` (the preset), `{field}`. Default `{label}`. */
|
|
1387
|
+
preset?: string;
|
|
1388
|
+
}
|
|
1389
|
+
declare const DEFAULT_FILTER_SUMMARY_LABELS: FilterSummaryLabels;
|
|
1390
|
+
declare const TEXT_FILTER_OPERATORS: readonly TextFilterOperator[];
|
|
1391
|
+
declare const NUMBER_FILTER_OPERATORS: readonly NumberFilterOperator[];
|
|
1392
|
+
/** The empty value for a field kind (what Clear resets to). */
|
|
1393
|
+
declare function emptyFilterValue(kind: FilterValueKind): FilterValue;
|
|
1394
|
+
/** True when the value filters nothing (so the chip goes away). */
|
|
1395
|
+
declare function isFilterEmpty(value: FilterValue | undefined): boolean;
|
|
1396
|
+
/**
|
|
1397
|
+
* The first of `field.presets` whose values equal the value's as a set, or undefined. Only an
|
|
1398
|
+
* `enum` value can match a preset.
|
|
1399
|
+
*/
|
|
1400
|
+
declare function matchFilterPreset(field: FilterField, value: FilterValue | undefined): FilterPreset | undefined;
|
|
1401
|
+
interface SummarizeFilterOptions {
|
|
1402
|
+
labels?: Partial<FilterSummaryLabels>;
|
|
1403
|
+
/** Formats a `YYYY-MM-DD` date (a product format such as DD.MM.YYYY). Default: as given. */
|
|
1404
|
+
formatDate?: (date: string) => string;
|
|
1405
|
+
/** Formats a number. Default: `String`. */
|
|
1406
|
+
formatNumber?: (value: number) => string;
|
|
1407
|
+
/** List this many values before "+N". Default 2. */
|
|
1408
|
+
maxListed?: number;
|
|
1409
|
+
}
|
|
1410
|
+
/**
|
|
1411
|
+
* One line for the filter chip, e.g. "State: Open, Pending", "Priority ≥ 2", "Created:
|
|
1412
|
+
* 01.10.2026 – 05.10.2026", "Escalated: Yes". An enum value equal to one of `field.presets`
|
|
1413
|
+
* gives that preset's label (the `preset` label). Empty values give an empty string.
|
|
1414
|
+
*/
|
|
1415
|
+
declare function summarizeFilter(field: FilterField, value: FilterValue | undefined, options?: SummarizeFilterOptions): string;
|
|
1416
|
+
|
|
1417
|
+
interface FilterEditorLabels {
|
|
1418
|
+
apply: string;
|
|
1419
|
+
clear: string;
|
|
1420
|
+
operator: string;
|
|
1421
|
+
value: string;
|
|
1422
|
+
from: string;
|
|
1423
|
+
to: string;
|
|
1424
|
+
/** Between two numbers: "and". */
|
|
1425
|
+
and: string;
|
|
1426
|
+
any: string;
|
|
1427
|
+
yes: string;
|
|
1428
|
+
no: string;
|
|
1429
|
+
search: string;
|
|
1430
|
+
searching: string;
|
|
1431
|
+
noMatches: string;
|
|
1432
|
+
searchFailed: string;
|
|
1433
|
+
retry: string;
|
|
1434
|
+
selectAll: string;
|
|
1435
|
+
selectNone: string;
|
|
1436
|
+
/** `{count}` chosen. */
|
|
1437
|
+
selected: string;
|
|
1438
|
+
/** Remove one chosen record. `{label}`. */
|
|
1439
|
+
remove: string;
|
|
1440
|
+
/** Names the row of `field.presets` chips. Optional so existing label objects still type-check; default "Presets". */
|
|
1441
|
+
presets?: string;
|
|
1442
|
+
operators: Record<TextFilterOperator | NumberFilterOperator, string>;
|
|
1443
|
+
}
|
|
1444
|
+
declare const DEFAULT_FILTER_EDITOR_LABELS: FilterEditorLabels;
|
|
1445
|
+
interface FilterEditorProps {
|
|
1446
|
+
field: FilterField;
|
|
1447
|
+
/** Undefined means "not filtered yet". */
|
|
1448
|
+
value: FilterValue | undefined;
|
|
1449
|
+
onValueChange: (value: FilterValue) => void;
|
|
1450
|
+
onApply: () => void;
|
|
1451
|
+
onClear: () => void;
|
|
1452
|
+
labels?: Partial<FilterEditorLabels>;
|
|
1453
|
+
/** Show an option filter above an enum list once it has more options than this. Default 8. */
|
|
1454
|
+
searchThreshold?: number;
|
|
1455
|
+
/** Delay before a reference search runs, in ms. Default 250. */
|
|
1456
|
+
searchDelay?: number;
|
|
1457
|
+
}
|
|
1458
|
+
/**
|
|
1459
|
+
* Editor content for one typed column filter (HAR-1365; TENSOR C6, MOTUS C-1): an enum
|
|
1460
|
+
* multi-select, text or number with a condition, a date range, yes/no, or records found by
|
|
1461
|
+
* an async search. The product owns the popover trigger and the query; `summarizeFilter`
|
|
1462
|
+
* turns the applied value into the chip text. `FilterPopover` stays for the one-string case.
|
|
1463
|
+
* An enum field's `presets` (HAR-1505) render as toggle chips above its options. Words come
|
|
1464
|
+
* from `labels`, or from `UixLabelsProvider`'s `filterEditor` entry.
|
|
1465
|
+
*/
|
|
1466
|
+
declare function FilterEditor({ field, value: valueProp, onValueChange, onApply, onClear, labels: labelOverrides, searchThreshold, searchDelay }: FilterEditorProps): react.JSX.Element;
|
|
1467
|
+
|
|
1468
|
+
/**
|
|
1469
|
+
* Select model (HAR-1572) — pure, DOM-free logic behind the UIx `Select` listbox:
|
|
1470
|
+
* flattening options and groups, keyboard movement (APG select-only combobox), typeahead,
|
|
1471
|
+
* filtering and the multi-select value helpers. Unit-tested in select-model.test.mjs.
|
|
1472
|
+
*/
|
|
1473
|
+
|
|
1474
|
+
interface SelectOption {
|
|
1475
|
+
value: string;
|
|
1476
|
+
label: string;
|
|
1477
|
+
disabled?: boolean;
|
|
1478
|
+
/** A second, muted line under the label. */
|
|
1479
|
+
description?: string;
|
|
1480
|
+
/** Shown before the label, in the list and on the trigger. */
|
|
1481
|
+
icon?: ReactNode;
|
|
1482
|
+
/** Extra words that match a search or typeahead (never shown). */
|
|
1483
|
+
keywords?: readonly string[];
|
|
1484
|
+
}
|
|
1485
|
+
interface SelectGroup {
|
|
1486
|
+
label: string;
|
|
1487
|
+
options: readonly SelectOption[];
|
|
1488
|
+
/** Disables every option in the group. */
|
|
1489
|
+
disabled?: boolean;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
/** Chrome strings of `Select`; `{count}` is replaced where noted. */
|
|
1493
|
+
interface SelectLabels {
|
|
1494
|
+
/** Accessible name of the filter field when the Select has no label of its own. */
|
|
1495
|
+
search: string;
|
|
1496
|
+
/** Placeholder of the filter field. */
|
|
1497
|
+
searchPlaceholder: string;
|
|
1498
|
+
loading: string;
|
|
1499
|
+
/** No options at all. */
|
|
1500
|
+
empty: string;
|
|
1501
|
+
/** A filter matched nothing. */
|
|
1502
|
+
noMatches: string;
|
|
1503
|
+
/** Async `loadOptions` failed. */
|
|
1504
|
+
error: string;
|
|
1505
|
+
retry: string;
|
|
1506
|
+
/** Multi-select: clears every value. */
|
|
1507
|
+
clear: string;
|
|
1508
|
+
/** Multi-select on a phone: closes the sheet. */
|
|
1509
|
+
done: string;
|
|
1510
|
+
/** Multi-select trigger, spoken after the "+N". `{count}` = how many are selected. */
|
|
1511
|
+
selectedCount: string;
|
|
1512
|
+
/** Announced after filtering. `{count}`. */
|
|
1513
|
+
results: string;
|
|
1514
|
+
}
|
|
1515
|
+
interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
1516
|
+
size?: 'sm' | 'md';
|
|
1517
|
+
/** The options as data, instead of `<option>` / `<optgroup>` children. */
|
|
1518
|
+
options?: readonly (SelectOption | SelectGroup)[];
|
|
1519
|
+
/**
|
|
1520
|
+
* Called with the new value: a string, or every selected value with `multiple`. `option` is the
|
|
1521
|
+
* option that was chosen or toggled. `onChange(e)` still fires as on a native select.
|
|
1522
|
+
*/
|
|
1523
|
+
onValueChange?: (value: string | string[], option?: SelectOption) => void;
|
|
1524
|
+
/** Shown while nothing is selected. Also makes "nothing" the starting value (and `required` checks it). */
|
|
1525
|
+
placeholder?: string;
|
|
1526
|
+
/** Marks the control invalid (`aria-invalid`), e.g. from your own validation. */
|
|
1527
|
+
invalid?: boolean;
|
|
1528
|
+
/** Shows and submits the value, but does not open. */
|
|
1529
|
+
readOnly?: boolean;
|
|
1530
|
+
/** A filter field at the top of the list. `'auto'` adds it for more than 12 options. Default `false`. */
|
|
1531
|
+
searchable?: boolean | 'auto';
|
|
1532
|
+
/**
|
|
1533
|
+
* Load the options when the list opens (and, when `searchable`, as the filter changes). The
|
|
1534
|
+
* previous request's `signal` is aborted when a newer one starts or the list closes. Pass the
|
|
1535
|
+
* selected option in `options` so its label shows before the first load.
|
|
1536
|
+
*/
|
|
1537
|
+
loadOptions?: (query: string, signal: AbortSignal) => Promise<readonly (SelectOption | SelectGroup)[]>;
|
|
1538
|
+
/** Draw an option's content (the check mark for the selected state is drawn for you). */
|
|
1539
|
+
renderOption?: (option: SelectOption, state: {
|
|
1540
|
+
selected: boolean;
|
|
1541
|
+
active: boolean;
|
|
1542
|
+
}) => ReactNode;
|
|
1543
|
+
/** Draw the trigger's content for the selected option(s). */
|
|
1544
|
+
renderValue?: (selected: readonly SelectOption[]) => ReactNode;
|
|
1545
|
+
/** Preferred side of the list. Default `'bottom-start'`; it flips when there is no room. */
|
|
1546
|
+
placement?: Placement;
|
|
1547
|
+
labels?: Partial<SelectLabels>;
|
|
1548
|
+
}
|
|
1549
|
+
/**
|
|
1550
|
+
* A select that draws its own list (HAR-1572): the WAI-ARIA APG select-only combobox — focus
|
|
1551
|
+
* stays on the trigger, `aria-activedescendant` marks the active option — in a top-layer popover
|
|
1552
|
+
* placed with `useAnchoredPosition`, or a bottom sheet on a phone. A visually hidden native
|
|
1553
|
+
* `<select>` carries `name`, `required`, `form`, `multiple` and the value, so `<option>` children,
|
|
1554
|
+
* `onChange(e)` with `e.target.value`, FormData, `form.reset()`, `ref` and react-hook-form keep
|
|
1555
|
+
* working; `ref` points at that select.
|
|
1556
|
+
*/
|
|
1557
|
+
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLSelectElement>>;
|
|
1558
|
+
|
|
1559
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
1560
|
+
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
1561
|
+
[key: string]: JsonValue;
|
|
1562
|
+
};
|
|
1563
|
+
|
|
1564
|
+
interface RuleCondition {
|
|
1565
|
+
id: string;
|
|
1566
|
+
field: string;
|
|
1567
|
+
operator: string;
|
|
1568
|
+
value?: JsonValue;
|
|
1569
|
+
}
|
|
1570
|
+
interface RuleGroup {
|
|
1571
|
+
id: string;
|
|
1572
|
+
combinator: 'and' | 'or';
|
|
1573
|
+
conditions: Array<RuleCondition | RuleGroup>;
|
|
1574
|
+
}
|
|
1575
|
+
interface RuleAction {
|
|
1576
|
+
id: string;
|
|
1577
|
+
type: string;
|
|
1578
|
+
parameters: Record<string, JsonValue>;
|
|
1579
|
+
}
|
|
1580
|
+
interface RuleDefinition {
|
|
1581
|
+
when: RuleGroup;
|
|
1582
|
+
then: RuleAction[];
|
|
1583
|
+
}
|
|
1584
|
+
/** The built-in checks of `validateRuleDefinition`; each can be reworded or turned off (HAR-1618). */
|
|
1585
|
+
type RuleCheck = 'duplicateId' | 'maxDepth' | 'emptyGroup' | 'missingField' | 'missingOperator' | 'noActions' | 'missingActionType';
|
|
1586
|
+
interface RuleValidationIssue {
|
|
1587
|
+
path: string;
|
|
1588
|
+
message: string;
|
|
1589
|
+
/** Which built-in check raised it. Absent on issues from the consumer's own `validate`. */
|
|
1590
|
+
check?: RuleCheck;
|
|
1591
|
+
}
|
|
1592
|
+
/** The built-in messages. `{id}` is the duplicated id, `{max}` the depth limit. */
|
|
1593
|
+
declare const DEFAULT_RULE_VALIDATION_MESSAGES: Record<RuleCheck, string>;
|
|
1594
|
+
interface RuleValidationOptions {
|
|
1595
|
+
/** Replace individual messages (a translation). */
|
|
1596
|
+
messages?: Partial<Record<RuleCheck, string>>;
|
|
1597
|
+
/**
|
|
1598
|
+
* `false` turns a check off: `{ emptyGroup: false }` for a rule that may have no condition
|
|
1599
|
+
* (a catch-all), `{ noActions: false, missingActionType: false }` for conditions without actions.
|
|
1600
|
+
*/
|
|
1601
|
+
checks?: Partial<Record<RuleCheck, boolean>>;
|
|
1602
|
+
}
|
|
1603
|
+
declare function isRuleGroup(node: RuleCondition | RuleGroup): node is RuleGroup;
|
|
1604
|
+
declare function ruleDepth(group: RuleGroup): number;
|
|
1605
|
+
declare function findRuleNodeDepth(group: RuleGroup, id: string, depth?: number): number | undefined;
|
|
1606
|
+
declare function mapRuleGroup(group: RuleGroup, id: string, update: (node: RuleCondition | RuleGroup) => RuleCondition | RuleGroup): RuleGroup;
|
|
1607
|
+
declare function appendRuleNode(group: RuleGroup, parentId: string, node: RuleCondition | RuleGroup, maxDepth?: number): RuleGroup;
|
|
1608
|
+
declare function removeRuleNode(group: RuleGroup, id: string): RuleGroup;
|
|
1609
|
+
declare function moveRuleNode(group: RuleGroup, id: string, direction: -1 | 1): RuleGroup;
|
|
1610
|
+
/** Set `combinator` on a group and on every group nested in it. */
|
|
1611
|
+
declare function setRuleCombinator(group: RuleGroup, combinator: 'and' | 'or'): RuleGroup;
|
|
1612
|
+
declare function validateRuleDefinition(value: RuleDefinition, maxDepth?: number, options?: RuleValidationOptions): RuleValidationIssue[];
|
|
1613
|
+
/** The words of the `summarizeRule` sentence. `{conditions}` and `{actions}` are filled in. */
|
|
1614
|
+
interface RuleSummaryWords {
|
|
1615
|
+
sentence: string;
|
|
1616
|
+
/** For a rule with no actions to name (a conditions-only rule). */
|
|
1617
|
+
sentenceConditionsOnly: string;
|
|
1618
|
+
noConditions: string;
|
|
1619
|
+
noActions: string;
|
|
1620
|
+
and: string;
|
|
1621
|
+
or: string;
|
|
1622
|
+
}
|
|
1623
|
+
declare const DEFAULT_RULE_SUMMARY_WORDS: RuleSummaryWords;
|
|
1624
|
+
declare function summarizeRule(value: RuleDefinition, labels?: {
|
|
1625
|
+
fields?: Record<string, string>;
|
|
1626
|
+
operators?: Record<string, string>;
|
|
1627
|
+
actions?: Record<string, string>;
|
|
1628
|
+
/** Translate the sentence itself. Default: English. */
|
|
1629
|
+
words?: Partial<RuleSummaryWords>;
|
|
1630
|
+
/** Leave the actions out of the sentence. */
|
|
1631
|
+
conditionsOnly?: boolean;
|
|
1632
|
+
}): string;
|
|
1633
|
+
|
|
1634
|
+
interface RuleValueEditorProps {
|
|
1635
|
+
condition: RuleCondition;
|
|
1636
|
+
onChange: (value: JsonValue | undefined) => void;
|
|
1637
|
+
disabled?: boolean;
|
|
1638
|
+
}
|
|
1639
|
+
interface RuleFieldDefinition {
|
|
1640
|
+
id: string;
|
|
1641
|
+
label: string;
|
|
1642
|
+
description?: string;
|
|
1643
|
+
operators?: string[];
|
|
1644
|
+
renderValueEditor?: (props: RuleValueEditorProps) => ReactNode;
|
|
1645
|
+
}
|
|
1646
|
+
interface RuleOperatorDefinition {
|
|
1647
|
+
id: string;
|
|
1648
|
+
label: string;
|
|
1649
|
+
requiresValue?: boolean;
|
|
1650
|
+
}
|
|
1651
|
+
interface RuleActionDefinition {
|
|
1652
|
+
id: string;
|
|
1653
|
+
label: string;
|
|
1654
|
+
renderParameters?: (action: RuleAction, onChange: (parameters: Record<string, JsonValue>) => void, disabled: boolean) => ReactNode;
|
|
1655
|
+
}
|
|
1656
|
+
/**
|
|
1657
|
+
* Every word the rule builder renders (TENSOR RX-125, UIX-12). `{item}` is one of
|
|
1658
|
+
* `itemGroup` / `itemCondition` / `itemAction`; `{field}` a field label; `{count}` a number.
|
|
1659
|
+
* The `issue…` keys are the built-in validation messages (`{id}` the duplicated id, `{max}`
|
|
1660
|
+
* the depth limit) and the `summary…` / `and` / `or` keys the words of the
|
|
1661
|
+
* `readOnly="summary"` sentence (HAR-1618). Translate once for a subtree with
|
|
1662
|
+
* `UixLabelsProvider labels={{ ruleBuilder: … }}`.
|
|
1663
|
+
*/
|
|
1664
|
+
interface RuleBuilderLabels {
|
|
1665
|
+
region: string;
|
|
1666
|
+
summary: string;
|
|
1667
|
+
when: string;
|
|
1668
|
+
group: string;
|
|
1669
|
+
match: string;
|
|
1670
|
+
all: string;
|
|
1671
|
+
any: string;
|
|
1672
|
+
field: string;
|
|
1673
|
+
operator: string;
|
|
1674
|
+
valueFor: string;
|
|
1675
|
+
itemGroup: string;
|
|
1676
|
+
itemCondition: string;
|
|
1677
|
+
itemAction: string;
|
|
1678
|
+
moveUp: string;
|
|
1679
|
+
moveUpNamed: string;
|
|
1680
|
+
moveDown: string;
|
|
1681
|
+
moveDownNamed: string;
|
|
1682
|
+
remove: string;
|
|
1683
|
+
removeNamed: string;
|
|
1684
|
+
then: string;
|
|
1685
|
+
actionType: string;
|
|
1686
|
+
valid: string;
|
|
1687
|
+
issuesOne: string;
|
|
1688
|
+
issuesMany: string;
|
|
1689
|
+
summaryIssuesOne: string;
|
|
1690
|
+
summaryIssuesMany: string;
|
|
1691
|
+
addCondition: string;
|
|
1692
|
+
addGroup: string;
|
|
1693
|
+
addAction: string;
|
|
1694
|
+
issueDuplicateId: string;
|
|
1695
|
+
issueMaxDepth: string;
|
|
1696
|
+
issueEmptyGroup: string;
|
|
1697
|
+
issueMissingField: string;
|
|
1698
|
+
issueMissingOperator: string;
|
|
1699
|
+
issueNoActions: string;
|
|
1700
|
+
issueMissingActionType: string;
|
|
1701
|
+
summarySentence: string;
|
|
1702
|
+
summarySentenceConditionsOnly: string;
|
|
1703
|
+
summaryNoConditions: string;
|
|
1704
|
+
summaryNoActions: string;
|
|
1705
|
+
and: string;
|
|
1706
|
+
or: string;
|
|
1707
|
+
}
|
|
1708
|
+
declare const DEFAULT_RULE_BUILDER_LABELS: RuleBuilderLabels;
|
|
1709
|
+
interface RuleBuilderProps {
|
|
1710
|
+
value: RuleDefinition;
|
|
1711
|
+
onChange: (value: RuleDefinition) => void;
|
|
1712
|
+
fields: RuleFieldDefinition[];
|
|
1713
|
+
operators: RuleOperatorDefinition[];
|
|
1714
|
+
/** The action types of the "Then" block. Not needed with `conditionsOnly`. */
|
|
1715
|
+
actions?: RuleActionDefinition[];
|
|
1716
|
+
maxDepth?: number;
|
|
1717
|
+
/**
|
|
1718
|
+
* `true`: the same builder with every control disabled and no add, move or remove buttons.
|
|
1719
|
+
* `'summary'`: one sentence instead of the controls (what `readOnly` rendered up to 2.31.0;
|
|
1720
|
+
* its words are the `summary…`, `and` and `or` labels).
|
|
1721
|
+
*/
|
|
1722
|
+
readOnly?: boolean | 'summary';
|
|
1723
|
+
/**
|
|
1724
|
+
* Edit conditions only (HAR-1618): no "Then" block and no "Add action", and the two action
|
|
1725
|
+
* checks (`noActions`, `missingActionType`) are off. `value.then` is passed through untouched.
|
|
1726
|
+
*/
|
|
1727
|
+
conditionsOnly?: boolean;
|
|
1728
|
+
/**
|
|
1729
|
+
* Fix every group to this combinator, for a stored shape that is a flat AND-list. The Match
|
|
1730
|
+
* choice becomes plain text ("Match all (AND)"), new groups get this combinator, and every
|
|
1731
|
+
* `onChange` carries it on all groups, so the other value is never emitted.
|
|
1732
|
+
*/
|
|
1733
|
+
combinator?: 'and' | 'or';
|
|
1734
|
+
/** Hide the Match control (and its text when `combinator` fixes it). */
|
|
1735
|
+
hideCombinator?: boolean;
|
|
1736
|
+
/**
|
|
1737
|
+
* `false` hides "Add group". It is hidden as well when `maxDepth` is 1, where it could never
|
|
1738
|
+
* be used. Default `true`.
|
|
1739
|
+
*/
|
|
1740
|
+
allowGroups?: boolean;
|
|
1741
|
+
/**
|
|
1742
|
+
* Turn built-in checks off: `{ emptyGroup: false }` for a rule that may have no condition
|
|
1743
|
+
* (a catch-all), `{ noActions: false }` for a rule that may do nothing. Their messages are
|
|
1744
|
+
* the `issue…` labels.
|
|
1745
|
+
*/
|
|
1746
|
+
checks?: Partial<Record<RuleCheck, boolean>>;
|
|
1747
|
+
/** Extra issues; they are appended to the built-in ones. */
|
|
1748
|
+
validate?: (value: RuleDefinition) => RuleValidationIssue[];
|
|
1749
|
+
className?: string;
|
|
1750
|
+
/** @deprecated use `labels.addCondition` */
|
|
1751
|
+
addConditionLabel?: string;
|
|
1752
|
+
/** @deprecated use `labels.addGroup` */
|
|
1753
|
+
addGroupLabel?: string;
|
|
1754
|
+
/** @deprecated use `labels.addAction` */
|
|
1755
|
+
addActionLabel?: string;
|
|
1756
|
+
labels?: Partial<RuleBuilderLabels>;
|
|
1757
|
+
}
|
|
1758
|
+
/** Declarative controlled when-conditions-to-actions editor with bounded nesting. */
|
|
1759
|
+
declare function RuleBuilder({ value, onChange, fields, operators, actions, maxDepth, readOnly, conditionsOnly, combinator, hideCombinator, allowGroups, checks, validate, className, addConditionLabel, addGroupLabel, addActionLabel, labels: labelOverrides, }: RuleBuilderProps): react.JSX.Element;
|
|
1760
|
+
|
|
1761
|
+
/** File helpers shared by `FileUpload` and `Attachment` (HAR-984/985). Pure. */
|
|
1762
|
+
interface FileSizeOptions {
|
|
1763
|
+
/**
|
|
1764
|
+
* `1000` (default): decimal, as file managers on macOS and most of the web show sizes
|
|
1765
|
+
* (1 MB = 1,000,000 bytes). `1024`: binary, as Windows and many servers count them
|
|
1766
|
+
* (1 MB = 1,048,576 bytes) — use it when the rest of the product does, so one file never
|
|
1767
|
+
* shows two sizes (HAR-1630).
|
|
1768
|
+
*/
|
|
1769
|
+
base?: 1000 | 1024;
|
|
1770
|
+
/**
|
|
1771
|
+
* The five unit labels, bytes first. Default `['B', 'KB', 'MB', 'GB', 'TB']` for both bases;
|
|
1772
|
+
* pass `['B', 'KiB', 'MiB', 'GiB', 'TiB']` to mark base 1024 the IEC way, or localised ones.
|
|
1773
|
+
*/
|
|
1774
|
+
units?: readonly [string, string, string, string, string];
|
|
1775
|
+
}
|
|
1776
|
+
/** A product's own size formatter for `FileUpload` and `Attachment` (`formatSize`). */
|
|
1777
|
+
type FileSizeFormatter = (bytes: number, locale?: string) => string;
|
|
1778
|
+
/**
|
|
1779
|
+
* "1.2 MB", "340 KB", "12 B" in the locale's number format. Base 1000 unless `options.base`
|
|
1780
|
+
* is 1024.
|
|
1781
|
+
*/
|
|
1782
|
+
declare function formatFileSize(bytes: number, locale?: string, options?: FileSizeOptions): string;
|
|
1783
|
+
/** Whether a file matches an `accept` list (".pdf,image/*,application/zip"). An empty list accepts all. */
|
|
1784
|
+
declare function fileMatchesAccept(file: {
|
|
1785
|
+
name: string;
|
|
1786
|
+
type?: string;
|
|
1787
|
+
}, accept?: string): boolean;
|
|
1788
|
+
type FileRejectionReason = 'type' | 'size' | 'count';
|
|
1789
|
+
interface FileRejection<F = File> {
|
|
1790
|
+
file: F;
|
|
1791
|
+
reason: FileRejectionReason;
|
|
1792
|
+
}
|
|
1793
|
+
/**
|
|
1794
|
+
* Splits picked files into accepted and rejected (wrong type, over `maxSize` bytes, or beyond
|
|
1795
|
+
* `maxFiles` counting the `existing` ones). Order is kept.
|
|
1796
|
+
*/
|
|
1797
|
+
declare function partitionFiles<F extends {
|
|
1798
|
+
name: string;
|
|
1799
|
+
type?: string;
|
|
1800
|
+
size: number;
|
|
1801
|
+
}>(files: readonly F[], { accept, maxSize, maxFiles, existing }: {
|
|
1802
|
+
accept?: string;
|
|
1803
|
+
maxSize?: number;
|
|
1804
|
+
maxFiles?: number;
|
|
1805
|
+
existing?: number;
|
|
1806
|
+
}): {
|
|
1807
|
+
accepted: F[];
|
|
1808
|
+
rejected: FileRejection<F>[];
|
|
1809
|
+
};
|
|
1810
|
+
/** A coarse kind for a file icon. */
|
|
1811
|
+
declare function fileKind(file: {
|
|
1812
|
+
name: string;
|
|
1813
|
+
type?: string;
|
|
1814
|
+
}): 'image' | 'video' | 'pdf' | 'sheet' | 'archive' | 'text' | 'other';
|
|
1815
|
+
|
|
1816
|
+
type FileUploadStatus = 'queued' | 'uploading' | 'done' | 'error';
|
|
1817
|
+
interface FileUploadItem {
|
|
1818
|
+
id: string;
|
|
1819
|
+
name: string;
|
|
1820
|
+
/** Bytes. */
|
|
1821
|
+
size: number;
|
|
1822
|
+
type?: string;
|
|
1823
|
+
status: FileUploadStatus;
|
|
1824
|
+
/** 0–100 while uploading; without it the bar is indeterminate. */
|
|
1825
|
+
progress?: number;
|
|
1826
|
+
/** Why it failed (shown under the name with a Retry button). */
|
|
1827
|
+
error?: ReactNode;
|
|
1828
|
+
/** An object URL or remote URL for an image thumbnail. */
|
|
1829
|
+
previewUrl?: string;
|
|
1830
|
+
/** Alternative text, when the product asks for it (`onAltChange`). */
|
|
1831
|
+
alt?: string;
|
|
1832
|
+
}
|
|
1833
|
+
interface FileUploadLabels {
|
|
1834
|
+
/** Main line of the drop zone. */
|
|
1835
|
+
title: string;
|
|
1836
|
+
choose: string;
|
|
1837
|
+
/** Shown while a file is dragged over. */
|
|
1838
|
+
drop: string;
|
|
1839
|
+
list: string;
|
|
1840
|
+
remove: string;
|
|
1841
|
+
/** Accessible name of Retry. `{name}`. */
|
|
1842
|
+
retry: string;
|
|
1843
|
+
/** Visible text of Retry. */
|
|
1844
|
+
retryShort: string;
|
|
1845
|
+
queued: string;
|
|
1846
|
+
/** `{progress}`. */
|
|
1847
|
+
uploading: string;
|
|
1848
|
+
done: string;
|
|
1849
|
+
failed: string;
|
|
1850
|
+
/** `{name}` — set `alt` for images. */
|
|
1851
|
+
alt: string;
|
|
1852
|
+
/** `{count}` files added. */
|
|
1853
|
+
added: string;
|
|
1854
|
+
/** `{name}`, `{accept}`. */
|
|
1855
|
+
wrongType: string;
|
|
1856
|
+
/** `{name}`, `{max}`. */
|
|
1857
|
+
tooLarge: string;
|
|
1858
|
+
/** `{name}`, `{max}`. */
|
|
1859
|
+
tooMany: string;
|
|
1860
|
+
}
|
|
1861
|
+
declare const DEFAULT_FILE_UPLOAD_LABELS: FileUploadLabels;
|
|
1862
|
+
interface FileUploadProps {
|
|
1863
|
+
/** The files so far, with their upload state (controlled). */
|
|
1864
|
+
items: readonly FileUploadItem[];
|
|
1865
|
+
/**
|
|
1866
|
+
* Called with the files that passed `accept`, `maxSize` and `maxFiles`, and the ones that did
|
|
1867
|
+
* not. Add accepted files to `items` and upload them; the component never uploads.
|
|
1868
|
+
*/
|
|
1869
|
+
onFilesAdded: (accepted: File[], rejected: FileRejection[]) => void;
|
|
1870
|
+
onRemove?: (id: string) => void;
|
|
1871
|
+
onRetry?: (id: string) => void;
|
|
1872
|
+
/** Ask for alt text on image items (MOTUS photo intake). */
|
|
1873
|
+
onAltChange?: (id: string, alt: string) => void;
|
|
1874
|
+
/** Accepted types, as for `<input accept>`. */
|
|
1875
|
+
accept?: string;
|
|
1876
|
+
/** Largest file in bytes. */
|
|
1877
|
+
maxSize?: number;
|
|
1878
|
+
/** Most files in `items`. */
|
|
1879
|
+
maxFiles?: number;
|
|
1880
|
+
/** Default true. */
|
|
1881
|
+
multiple?: boolean;
|
|
1882
|
+
/** Open the camera on phones (`user` or `environment`). */
|
|
1883
|
+
capture?: 'user' | 'environment';
|
|
1884
|
+
disabled?: boolean;
|
|
1885
|
+
/** Second line of the drop zone, e.g. "PDF or images, up to 20 MB". */
|
|
1886
|
+
hint?: ReactNode;
|
|
1887
|
+
locale?: string;
|
|
1888
|
+
/** Count sizes in 1024s (1 MB = 1,048,576 bytes) instead of 1000s. Default `1000`. */
|
|
1889
|
+
sizeBase?: 1000 | 1024;
|
|
1890
|
+
/** The product's own size formatter; it replaces `formatFileSize` (and `sizeBase`). */
|
|
1891
|
+
formatSize?: FileSizeFormatter;
|
|
1892
|
+
/**
|
|
1893
|
+
* Words for this instance. Each one defaults to `UixLabelsProvider` `fileUpload`, then to
|
|
1894
|
+
* English, so one provider translates every upload below it (HAR-1630).
|
|
1895
|
+
*/
|
|
1896
|
+
labels?: Partial<FileUploadLabels>;
|
|
1897
|
+
className?: string;
|
|
1898
|
+
}
|
|
1899
|
+
/**
|
|
1900
|
+
* Drop zone, file picker and upload list (HAR-984; TENSOR C15, MOTUS C-7, MEDx S18/S19). The
|
|
1901
|
+
* product owns the upload: it receives validated `File`s and reports progress, success and
|
|
1902
|
+
* failure through `items`. Keyboard users get a real button; drop is an extra, not the only way.
|
|
1903
|
+
*/
|
|
1904
|
+
declare function FileUpload({ items, onFilesAdded, onRemove, onRetry, onAltChange, accept, maxSize, maxFiles, multiple, capture, disabled, hint, locale, sizeBase, formatSize, labels: labelOverrides, className, }: FileUploadProps): react.JSX.Element;
|
|
1905
|
+
|
|
1906
|
+
/**
|
|
1907
|
+
* The words of an `Attachment` row. In a module of its own, with no "use client": the
|
|
1908
|
+
* server-renderable `Attachment` and its client parts both read it, and a server component can
|
|
1909
|
+
* still import the defaults as plain values.
|
|
1910
|
+
*/
|
|
1911
|
+
interface AttachmentLabels {
|
|
1912
|
+
/** Remove button. `{name}`. */
|
|
1913
|
+
remove: string;
|
|
1914
|
+
/** Download link name when `download` is set. `{name}`. */
|
|
1915
|
+
download: string;
|
|
1916
|
+
loading: string;
|
|
1917
|
+
forbidden: string;
|
|
1918
|
+
}
|
|
1919
|
+
declare const DEFAULT_ATTACHMENT_LABELS: AttachmentLabels;
|
|
1920
|
+
|
|
1921
|
+
/**
|
|
1922
|
+
* Kit chrome strings by component (HAR-1358; TENSOR C20, MOTUS executive summary #3).
|
|
1923
|
+
* Each entry overrides that component's English defaults for every instance below the
|
|
1924
|
+
* provider; an explicit prop on one instance still wins.
|
|
1925
|
+
*
|
|
1926
|
+
* Client components read the provider. Server-renderable ones (`Pagination`, `BulkBar`)
|
|
1927
|
+
* cannot read context: pass `labels` from `useUixLabels()` in a client parent, or translate
|
|
1928
|
+
* on the server.
|
|
1929
|
+
*/
|
|
1930
|
+
interface UixLabels {
|
|
1931
|
+
modal?: {
|
|
1932
|
+
close?: string;
|
|
1933
|
+
};
|
|
1934
|
+
drawer?: {
|
|
1935
|
+
close?: string;
|
|
1936
|
+
};
|
|
1937
|
+
peek?: {
|
|
1938
|
+
previous?: string;
|
|
1939
|
+
next?: string;
|
|
1940
|
+
close?: string;
|
|
1941
|
+
};
|
|
1942
|
+
toast?: {
|
|
1943
|
+
dismiss?: string;
|
|
1944
|
+
};
|
|
1945
|
+
toaster?: {
|
|
1946
|
+
region?: string;
|
|
1947
|
+
};
|
|
1948
|
+
appShell?: {
|
|
1949
|
+
skipToContent?: string;
|
|
1950
|
+
exitFocus?: string;
|
|
1951
|
+
};
|
|
1952
|
+
sidebar?: {
|
|
1953
|
+
expand?: string;
|
|
1954
|
+
collapse?: string;
|
|
1955
|
+
};
|
|
1956
|
+
searchSuggest?: {
|
|
1957
|
+
clear?: string;
|
|
1958
|
+
};
|
|
1959
|
+
commandPalette?: {
|
|
1960
|
+
input?: string;
|
|
1961
|
+
};
|
|
1962
|
+
confirmDialog?: {
|
|
1963
|
+
typeToConfirm?: string;
|
|
1964
|
+
compensation?: string;
|
|
1965
|
+
};
|
|
1966
|
+
schedulingCalendar?: Partial<SchedulingCalendarLabels>;
|
|
1967
|
+
dateRangePicker?: Partial<DateRangePickerLabels>;
|
|
1968
|
+
schedulingTimeline?: Partial<SchedulingTimelineLabels>;
|
|
1969
|
+
textDiff?: Partial<TextDiffLabels>;
|
|
1970
|
+
filterEditor?: Partial<FilterEditorLabels>;
|
|
1971
|
+
select?: Partial<SelectLabels>;
|
|
1972
|
+
ruleBuilder?: Partial<RuleBuilderLabels>;
|
|
1973
|
+
fileUpload?: Partial<FileUploadLabels>;
|
|
1974
|
+
attachment?: Partial<AttachmentLabels>;
|
|
1975
|
+
/** `remove`: the name of a removable chip's × button; `{label}` is the chip text. */
|
|
1976
|
+
chip?: {
|
|
1977
|
+
remove?: string;
|
|
1978
|
+
};
|
|
1979
|
+
/** `dismiss`: the name of a dismissible alert's × button. */
|
|
1980
|
+
alert?: {
|
|
1981
|
+
dismiss?: string;
|
|
1982
|
+
};
|
|
1983
|
+
/** Read by `useUixLabels()` callers; `Pagination` itself is server-safe and takes `labels`. */
|
|
1984
|
+
pagination?: Partial<PaginationLabels>;
|
|
1985
|
+
/** Read by `useUixLabels()` callers; `BulkBar` itself is server-safe and takes `label`. */
|
|
1986
|
+
bulkBar?: {
|
|
1987
|
+
region?: string;
|
|
1988
|
+
};
|
|
1989
|
+
}
|
|
1990
|
+
interface UixLabelsProviderProps {
|
|
1991
|
+
labels: UixLabels;
|
|
1992
|
+
children?: ReactNode;
|
|
1993
|
+
}
|
|
1994
|
+
/** Translates kit chrome once for a subtree. Nested providers merge per component. */
|
|
1995
|
+
declare function UixLabelsProvider({ labels, children }: UixLabelsProviderProps): react.JSX.Element;
|
|
1996
|
+
/** The chrome strings in effect here (empty outside a provider). */
|
|
1997
|
+
declare function useUixLabels(): UixLabels;
|
|
1998
|
+
|
|
1999
|
+
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
2000
|
+
size?: 'sm' | 'md';
|
|
2001
|
+
invalid?: boolean;
|
|
2002
|
+
valid?: boolean;
|
|
2003
|
+
}
|
|
2004
|
+
declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
|
|
2005
|
+
interface InputGroupProps {
|
|
2006
|
+
children: ReactNode;
|
|
2007
|
+
leadingIcon?: ReactNode;
|
|
2008
|
+
trailingIcon?: ReactNode;
|
|
2009
|
+
className?: string;
|
|
2010
|
+
/** Injected by `<Field>` when it wraps the group; forwarded onto the child control. */
|
|
2011
|
+
id?: string;
|
|
2012
|
+
'aria-describedby'?: string;
|
|
2013
|
+
'aria-invalid'?: AriaAttributes['aria-invalid'];
|
|
2014
|
+
'aria-required'?: AriaAttributes['aria-required'];
|
|
2015
|
+
}
|
|
2016
|
+
/**
|
|
2017
|
+
* Icon-adorned wrapper for a child `<Input>`. The control is passed as `children`, so
|
|
2018
|
+
* `<Field>`'s injected `id`/`aria-*` land on this wrapper — they're forwarded onto the
|
|
2019
|
+
* single child element (the child's own props win) so label/message association survives
|
|
2020
|
+
* the extra div (UIX-A11Y-3).
|
|
2021
|
+
*/
|
|
2022
|
+
declare function InputGroup({ children, leadingIcon, trailingIcon, className, id, 'aria-describedby': describedBy, 'aria-invalid': invalid, 'aria-required': required, }: InputGroupProps): react.JSX.Element;
|
|
2023
|
+
|
|
2024
|
+
interface ComboboxOption {
|
|
2025
|
+
value: string;
|
|
2026
|
+
label: string;
|
|
2027
|
+
keywords?: readonly string[];
|
|
2028
|
+
disabled?: boolean;
|
|
2029
|
+
}
|
|
2030
|
+
declare function filterComboboxOptions(options: readonly ComboboxOption[], query: string): ComboboxOption[];
|
|
2031
|
+
|
|
2032
|
+
interface ComboboxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
2033
|
+
options: readonly ComboboxOption[];
|
|
2034
|
+
value?: string;
|
|
2035
|
+
defaultValue?: string;
|
|
2036
|
+
onValueChange?: (value: string, option: ComboboxOption) => void;
|
|
2037
|
+
label: string;
|
|
2038
|
+
placeholder?: string;
|
|
2039
|
+
emptyLabel: string;
|
|
2040
|
+
name?: string;
|
|
2041
|
+
disabled?: boolean;
|
|
2042
|
+
}
|
|
2043
|
+
/** Searchable single-select combobox with keyboard navigation and no framework dependencies. */
|
|
2044
|
+
declare function Combobox({ options, value, defaultValue, onValueChange, label, placeholder, emptyLabel, name, disabled, className, ...props }: ComboboxProps): react.JSX.Element;
|
|
2045
|
+
|
|
2046
|
+
/** One result row. */
|
|
2047
|
+
interface SearchSuggestOption {
|
|
2048
|
+
/** Stable id, returned by `onSelect`. */
|
|
2049
|
+
id: string;
|
|
2050
|
+
/** The result's name. Matched letters are emphasised. */
|
|
757
2051
|
title: string;
|
|
758
2052
|
/** Where the result lives, outermost first (a breadcrumb). Middle crumbs truncate first. */
|
|
759
2053
|
meta?: readonly string[];
|
|
@@ -911,11 +2205,6 @@ interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
|
911
2205
|
}
|
|
912
2206
|
declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
913
2207
|
|
|
914
|
-
interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
915
|
-
size?: 'sm' | 'md';
|
|
916
|
-
}
|
|
917
|
-
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLSelectElement>>;
|
|
918
|
-
|
|
919
2208
|
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
920
2209
|
label?: ReactNode;
|
|
921
2210
|
indeterminate?: boolean;
|
|
@@ -977,7 +2266,8 @@ interface ConfirmDialogProps {
|
|
|
977
2266
|
description?: ReactNode;
|
|
978
2267
|
confirmLabel: ReactNode;
|
|
979
2268
|
cancelLabel: ReactNode;
|
|
980
|
-
|
|
2269
|
+
/** Accessible name of the close button. Default: `UixLabelsProvider` `modal.close`, then "Close dialog". */
|
|
2270
|
+
closeLabel?: string;
|
|
981
2271
|
onConfirm: () => void | Promise<void>;
|
|
982
2272
|
onCancel: () => void;
|
|
983
2273
|
pending?: boolean;
|
|
@@ -1044,13 +2334,33 @@ interface PromptDialogProps {
|
|
|
1044
2334
|
placeholder?: string;
|
|
1045
2335
|
submitLabel: ReactNode;
|
|
1046
2336
|
cancelLabel: ReactNode;
|
|
1047
|
-
|
|
2337
|
+
/** Accessible name of the close button. Default: `UixLabelsProvider` `modal.close`, then "Close dialog". */
|
|
2338
|
+
closeLabel?: string;
|
|
1048
2339
|
onSubmit: (value: string) => void | Promise<void>;
|
|
1049
2340
|
onCancel: () => void;
|
|
1050
2341
|
validate?: (value: string) => ReactNode | undefined;
|
|
1051
2342
|
pending?: boolean;
|
|
2343
|
+
/**
|
|
2344
|
+
* Ask for a longer answer in a textarea (a reason, a note); a number sets its rows, `true`
|
|
2345
|
+
* is 4. Enter adds a line there, so the form is sent with the submit button or Ctrl/⌘+Enter
|
|
2346
|
+
* (HAR-1614).
|
|
2347
|
+
*/
|
|
2348
|
+
multiline?: boolean | number;
|
|
2349
|
+
/**
|
|
2350
|
+
* The answer confirms something that cannot be taken back (a forced import): the submit
|
|
2351
|
+
* button is the danger button and the dialog is an `alertdialog`.
|
|
2352
|
+
*/
|
|
2353
|
+
destructive?: boolean;
|
|
2354
|
+
/**
|
|
2355
|
+
* Why the last submit failed, from the server. Shown under the field (`role="alert"`) and
|
|
2356
|
+
* tied to it; the dialog stays open. A message from `validate` takes its place while the
|
|
2357
|
+
* value is invalid.
|
|
2358
|
+
*/
|
|
2359
|
+
error?: ReactNode;
|
|
2360
|
+
/** Default: `'alertdialog'` when `destructive`, else `'dialog'`. */
|
|
2361
|
+
role?: 'dialog' | 'alertdialog';
|
|
1052
2362
|
}
|
|
1053
|
-
declare function PromptDialog({ open, title, description, inputLabel, defaultValue, placeholder, submitLabel, cancelLabel, closeLabel, onSubmit, onCancel, validate, pending }: PromptDialogProps): react.JSX.Element;
|
|
2363
|
+
declare function PromptDialog({ open, title, description, inputLabel, defaultValue, placeholder, submitLabel, cancelLabel, closeLabel, onSubmit, onCancel, validate, pending, multiline, destructive, error: submitError, role, }: PromptDialogProps): react.JSX.Element;
|
|
1054
2364
|
|
|
1055
2365
|
interface DrawerProps extends Omit<HTMLAttributes<HTMLDialogElement>, 'title'> {
|
|
1056
2366
|
/** TENSOR RX-125 (UIX-04): translatable; English default. */
|
|
@@ -1166,6 +2476,62 @@ interface CardLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 't
|
|
|
1166
2476
|
/** A whole-card anchor with visible hover and keyboard focus affordances. */
|
|
1167
2477
|
declare function CardLink({ title, subtitle, headerAction, footer, children, className, ...props }: CardLinkProps): react.JSX.Element;
|
|
1168
2478
|
|
|
2479
|
+
/** Columns at one width. */
|
|
2480
|
+
type DashboardGridColumnCount = 1 | 2 | 3 | 4;
|
|
2481
|
+
/**
|
|
2482
|
+
* A width of the GRID itself (a container query), not of the viewport:
|
|
2483
|
+
* `base` any width, `sm` ≥ 36rem, `md` ≥ 48rem, `lg` ≥ 60rem, `xl` ≥ 80rem.
|
|
2484
|
+
*/
|
|
2485
|
+
type DashboardGridBreakpoint = 'base' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2486
|
+
/**
|
|
2487
|
+
* One column count for every width, or a count per breakpoint. A breakpoint you leave out keeps
|
|
2488
|
+
* the count of the next smaller one, and a missing `base` is 1.
|
|
2489
|
+
*/
|
|
2490
|
+
type DashboardGridColumns = DashboardGridColumnCount | Partial<Record<DashboardGridBreakpoint, DashboardGridColumnCount>>;
|
|
2491
|
+
/** How much of the row an item takes. `2` clamps to the columns there are; `full` is always the whole row. */
|
|
2492
|
+
type DashboardGridSpan = 1 | 2 | 'full';
|
|
2493
|
+
/** Space between items: `sm` --uix-space-3, `md` --uix-space-4, `lg` --uix-space-6. */
|
|
2494
|
+
type DashboardGridGap = 'sm' | 'md' | 'lg';
|
|
2495
|
+
interface DashboardGridProps extends HTMLAttributes<HTMLDivElement> {
|
|
2496
|
+
/** Default: 1 column, 2 from `sm`, 3 from `lg` (of the grid's own width). */
|
|
2497
|
+
columns?: DashboardGridColumns;
|
|
2498
|
+
/** Default `md`. */
|
|
2499
|
+
gap?: DashboardGridGap;
|
|
2500
|
+
}
|
|
2501
|
+
interface DashboardGridItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
2502
|
+
/** Default `1`. */
|
|
2503
|
+
span?: DashboardGridSpan;
|
|
2504
|
+
}
|
|
2505
|
+
/**
|
|
2506
|
+
* The class list of a dashboard grid, for markup you render yourself (a server template, or a
|
|
2507
|
+
* drag-and-drop library's own element). Same output as `<DashboardGrid>`.
|
|
2508
|
+
*/
|
|
2509
|
+
declare function dashboardGridClassName(columns?: DashboardGridColumns, gap?: DashboardGridGap): string;
|
|
2510
|
+
/** The class list of a dashboard grid item, for markup you render yourself. */
|
|
2511
|
+
declare function dashboardGridItemClassName(span?: DashboardGridSpan): string;
|
|
2512
|
+
/**
|
|
2513
|
+
* A cell of a {@link DashboardGrid}: one column, two, or the full row. It is an inline-size
|
|
2514
|
+
* container (container name: uix-dashboard-grid-item), so its content can size from it, e.g. a Chart with
|
|
2515
|
+
* `height="clamp(160px, 40cqi, 360px)"`. Widgets in one row share a height.
|
|
2516
|
+
*/
|
|
2517
|
+
declare const DashboardGridItem: react.ForwardRefExoticComponent<DashboardGridItemProps & react.RefAttributes<HTMLDivElement>>;
|
|
2518
|
+
/**
|
|
2519
|
+
* The layout grid for dashboard widgets (HAR-1555). The column count follows the grid's own
|
|
2520
|
+
* width, so it adapts to a sidebar as well as to the screen. Pure layout: drag-and-drop,
|
|
2521
|
+
* persistence and widget chrome stay in the product. Server-renderable.
|
|
2522
|
+
*
|
|
2523
|
+
* ```tsx
|
|
2524
|
+
* <DashboardGrid columns={{ base: 1, sm: 2, lg: 3 }}>
|
|
2525
|
+
* <DashboardGrid.Item><Stat … /></DashboardGrid.Item>
|
|
2526
|
+
* <DashboardGrid.Item span={2}>…</DashboardGrid.Item>
|
|
2527
|
+
* <DashboardGrid.Item span="full"><Chart … /></DashboardGrid.Item>
|
|
2528
|
+
* </DashboardGrid>
|
|
2529
|
+
* ```
|
|
2530
|
+
*/
|
|
2531
|
+
declare const DashboardGrid: react.ForwardRefExoticComponent<DashboardGridProps & react.RefAttributes<HTMLDivElement>> & {
|
|
2532
|
+
Item: react.ForwardRefExoticComponent<DashboardGridItemProps & react.RefAttributes<HTMLDivElement>>;
|
|
2533
|
+
};
|
|
2534
|
+
|
|
1169
2535
|
interface BreadcrumbItem {
|
|
1170
2536
|
id?: string;
|
|
1171
2537
|
label: ReactNode;
|
|
@@ -1289,6 +2655,12 @@ interface CollapsibleSectionProps extends Omit<DetailsHTMLAttributes<HTMLDetails
|
|
|
1289
2655
|
title: ReactNode;
|
|
1290
2656
|
summary?: ReactNode;
|
|
1291
2657
|
children?: ReactNode;
|
|
2658
|
+
/**
|
|
2659
|
+
* Open when first rendered. With `persistKey`, what the person last chose wins over it:
|
|
2660
|
+
* "open by default, but remember" (HAR-1628). `open` is the same starting state and also
|
|
2661
|
+
* re-applies whenever the parent changes it.
|
|
2662
|
+
*/
|
|
2663
|
+
defaultOpen?: boolean;
|
|
1292
2664
|
/**
|
|
1293
2665
|
* Mount the body only while it is needed (HAR-1352; TENSOR B32): `true` mounts it while
|
|
1294
2666
|
* open and unmounts it on close; `'keep'` mounts it on first open and keeps it. For
|
|
@@ -1296,12 +2668,33 @@ interface CollapsibleSectionProps extends Omit<DetailsHTMLAttributes<HTMLDetails
|
|
|
1296
2668
|
*/
|
|
1297
2669
|
lazy?: boolean | 'keep';
|
|
1298
2670
|
/**
|
|
1299
|
-
* Remember the open state
|
|
1300
|
-
*
|
|
2671
|
+
* Remember the open state under this key (`uix:collapsible:<key>`), in `persistStorage`.
|
|
2672
|
+
* Applied after mount, so the server HTML uses `open` / `defaultOpen`; a remembered state
|
|
2673
|
+
* then replaces either.
|
|
1301
2674
|
*/
|
|
1302
2675
|
persistKey?: string;
|
|
1303
|
-
/**
|
|
2676
|
+
/**
|
|
2677
|
+
* Where `persistKey` keeps the state: `'session'` (`sessionStorage`, this tab until it
|
|
2678
|
+
* closes) or `'local'` (`localStorage`, across sessions). Default `'session'`.
|
|
2679
|
+
*/
|
|
2680
|
+
persistStorage?: 'session' | 'local';
|
|
2681
|
+
/**
|
|
2682
|
+
* Each new value opens the section, scrolls it into view and moves focus to its summary
|
|
2683
|
+
* ("jump to SLA"). A value already set when the section mounts is honoured too (a deep link
|
|
2684
|
+
* that lands on a closed section); `undefined` and `0` mean "no request yet", so a counter
|
|
2685
|
+
* that starts at 0 does not open anything.
|
|
2686
|
+
*/
|
|
1304
2687
|
openRequest?: number;
|
|
2688
|
+
/**
|
|
2689
|
+
* A quiet row for a section inside a card: no border or background of its own, tighter
|
|
2690
|
+
* padding, a rule between neighbouring compact sections.
|
|
2691
|
+
*/
|
|
2692
|
+
compact?: boolean;
|
|
2693
|
+
/**
|
|
2694
|
+
* Render the title as a heading of this level, and make the body a `role="region"` named by
|
|
2695
|
+
* it. Leave unset for a section that should stay out of the page outline.
|
|
2696
|
+
*/
|
|
2697
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
1305
2698
|
}
|
|
1306
2699
|
/**
|
|
1307
2700
|
* A `<details>` disclosure. Without `lazy`, `persistKey` or `openRequest` it is a plain,
|
|
@@ -1352,6 +2745,10 @@ interface DescriptionListItem {
|
|
|
1352
2745
|
id?: string;
|
|
1353
2746
|
term: ReactNode;
|
|
1354
2747
|
description: ReactNode;
|
|
2748
|
+
/** Attributes for this row's `<dt>` (an `id` to anchor to, `data-*`). */
|
|
2749
|
+
termProps?: HTMLAttributes<HTMLElement>;
|
|
2750
|
+
/** Attributes for this row's `<dd>`. */
|
|
2751
|
+
descriptionProps?: HTMLAttributes<HTMLElement>;
|
|
1355
2752
|
}
|
|
1356
2753
|
interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {
|
|
1357
2754
|
items?: DescriptionListItem[];
|
|
@@ -1361,15 +2758,27 @@ declare function DescriptionList({ items, children, className, ...props }: Descr
|
|
|
1361
2758
|
interface DescriptionItemProps {
|
|
1362
2759
|
term: ReactNode;
|
|
1363
2760
|
children?: ReactNode;
|
|
2761
|
+
/**
|
|
2762
|
+
* Attributes for the `<dt>`: an `id` a deep link or `aria-describedby` points at, `data-*`,
|
|
2763
|
+
* a `className` (HAR-1628). The pair has no wrapper element, so this is where they go.
|
|
2764
|
+
*/
|
|
2765
|
+
termProps?: HTMLAttributes<HTMLElement>;
|
|
2766
|
+
/** Attributes for the `<dd>`. */
|
|
2767
|
+
descriptionProps?: HTMLAttributes<HTMLElement>;
|
|
1364
2768
|
}
|
|
1365
2769
|
/**
|
|
1366
2770
|
* One hand-authored row. Renders a `<dt>`/`<dd>` fragment so the pair lands as
|
|
1367
2771
|
* direct grid children of the enclosing `<DescriptionList>` (never wrap it in
|
|
1368
2772
|
* an element — that breaks the two-column alignment).
|
|
1369
2773
|
*/
|
|
1370
|
-
declare function DescriptionItem({ term, children }: DescriptionItemProps): react.JSX.Element;
|
|
2774
|
+
declare function DescriptionItem({ term, children, termProps, descriptionProps }: DescriptionItemProps): react.JSX.Element;
|
|
1371
2775
|
|
|
1372
|
-
|
|
2776
|
+
/**
|
|
2777
|
+
* Besides its own props, `Tabs` takes the HTML attributes of the `role="tablist"` element and
|
|
2778
|
+
* renders them there, in both overflow modes: `aria-label` / `aria-labelledby` to name the
|
|
2779
|
+
* tablist (HAR-1600), `id`, `data-*`. `role` stays `tablist`.
|
|
2780
|
+
*/
|
|
2781
|
+
interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'role'> {
|
|
1373
2782
|
variant?: 'line' | 'enclosed' | 'pill';
|
|
1374
2783
|
value?: string;
|
|
1375
2784
|
onChange?: (value: string) => void;
|
|
@@ -1389,7 +2798,7 @@ interface TabsProps {
|
|
|
1389
2798
|
*/
|
|
1390
2799
|
activation?: 'automatic' | 'manual';
|
|
1391
2800
|
}
|
|
1392
|
-
declare function Tabs({ variant, value, onChange, children, className, overflow, activation }: TabsProps): react.JSX.Element;
|
|
2801
|
+
declare function Tabs({ variant, value, onChange, children, className, overflow, activation, onKeyDown: onKeyDownProp, ...listProps }: TabsProps): react.JSX.Element;
|
|
1393
2802
|
interface TabProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
1394
2803
|
value: string;
|
|
1395
2804
|
children?: ReactNode;
|
|
@@ -1548,181 +2957,54 @@ interface NavFavouriteItem {
|
|
|
1548
2957
|
readonly link: ReactNode;
|
|
1549
2958
|
}
|
|
1550
2959
|
interface NavFavouritesLabels {
|
|
1551
|
-
/** Disclosure header, e.g. "Favourites". */
|
|
1552
|
-
readonly heading: string;
|
|
1553
|
-
/** Shown when there are no favourites. */
|
|
1554
|
-
readonly empty: string;
|
|
1555
|
-
readonly moveUp: string;
|
|
1556
|
-
readonly moveDown: string;
|
|
1557
|
-
/** Per-row remove action template with a `{label}` placeholder, e.g. "Remove {label} from favourites". */
|
|
1558
|
-
readonly remove: string;
|
|
1559
|
-
/** Per-row overflow-trigger accessible-name template with `{label}`. Defaults to "{label} favourite options". */
|
|
1560
|
-
readonly options?: string;
|
|
1561
|
-
}
|
|
1562
|
-
interface NavFavouritesProps {
|
|
1563
|
-
/** The already-resolved favourites, in display order. */
|
|
1564
|
-
items: ReadonlyArray<NavFavouriteItem>;
|
|
1565
|
-
collapsed?: boolean;
|
|
1566
|
-
onToggleCollapsed?: () => void;
|
|
1567
|
-
/** Called with the id of the favourite to unpin. */
|
|
1568
|
-
onRemove: (id: string) => void;
|
|
1569
|
-
/** Called with the full new id order after a move. */
|
|
1570
|
-
onReorder: (orderedIds: string[]) => void;
|
|
1571
|
-
labels: NavFavouritesLabels;
|
|
1572
|
-
/** Optional telemetry hook emitted as `data-empty-reason` on the empty-state node. */
|
|
1573
|
-
emptyReason?: string;
|
|
1574
|
-
className?: string;
|
|
1575
|
-
}
|
|
1576
|
-
/**
|
|
1577
|
-
* Controlled Favourites disclosure for a sidebar nav (UIx owns the look + the
|
|
1578
|
-
* APG interaction contract; the consumer owns the favourites list + persistence).
|
|
1579
|
-
*
|
|
1580
|
-
* An ARIA disclosure exactly like a collapsible nav group: a header button with
|
|
1581
|
-
* `aria-expanded`/`aria-controls`, the region always rendered with a stable id
|
|
1582
|
-
* and toggled via `hidden`, focus pulled to the header before collapse.
|
|
1583
|
-
*
|
|
1584
|
-
* Each row carries the consumer-rendered destination link plus:
|
|
1585
|
-
* - an overflow menu (APG menu-button: button + `aria-haspopup="menu"` +
|
|
1586
|
-
* `aria-expanded`; Up/Down roving focus; Escape returns focus to the
|
|
1587
|
-
* trigger) with Move up / Move down / Remove,
|
|
1588
|
-
* - Alt+ArrowUp / Alt+ArrowDown accelerators on the focused row so moves
|
|
1589
|
-
* chain without re-opening the menu.
|
|
1590
|
-
*
|
|
1591
|
-
* Focus management:
|
|
1592
|
-
* - after Remove, focus moves to the adjacent favourite, or to the header
|
|
1593
|
-
* when the list empties,
|
|
1594
|
-
* - after Move up/down, focus stays on the moved row's control in its new
|
|
1595
|
-
* position.
|
|
1596
|
-
*/
|
|
1597
|
-
declare function NavFavourites({ items, collapsed, onToggleCollapsed, onRemove, onReorder, labels, emptyReason, className, }: NavFavouritesProps): react.JSX.Element;
|
|
1598
|
-
|
|
1599
|
-
/** File helpers shared by `FileUpload` and `Attachment` (HAR-984/985). Pure. */
|
|
1600
|
-
/** "1.2 MB", "340 KB", "12 B" in the locale's number format (base 1000, like file managers). */
|
|
1601
|
-
declare function formatFileSize(bytes: number, locale?: string): string;
|
|
1602
|
-
/** Whether a file matches an `accept` list (".pdf,image/*,application/zip"). An empty list accepts all. */
|
|
1603
|
-
declare function fileMatchesAccept(file: {
|
|
1604
|
-
name: string;
|
|
1605
|
-
type?: string;
|
|
1606
|
-
}, accept?: string): boolean;
|
|
1607
|
-
type FileRejectionReason = 'type' | 'size' | 'count';
|
|
1608
|
-
interface FileRejection<F = File> {
|
|
1609
|
-
file: F;
|
|
1610
|
-
reason: FileRejectionReason;
|
|
1611
|
-
}
|
|
1612
|
-
/**
|
|
1613
|
-
* Splits picked files into accepted and rejected (wrong type, over `maxSize` bytes, or beyond
|
|
1614
|
-
* `maxFiles` counting the `existing` ones). Order is kept.
|
|
1615
|
-
*/
|
|
1616
|
-
declare function partitionFiles<F extends {
|
|
1617
|
-
name: string;
|
|
1618
|
-
type?: string;
|
|
1619
|
-
size: number;
|
|
1620
|
-
}>(files: readonly F[], { accept, maxSize, maxFiles, existing }: {
|
|
1621
|
-
accept?: string;
|
|
1622
|
-
maxSize?: number;
|
|
1623
|
-
maxFiles?: number;
|
|
1624
|
-
existing?: number;
|
|
1625
|
-
}): {
|
|
1626
|
-
accepted: F[];
|
|
1627
|
-
rejected: FileRejection<F>[];
|
|
1628
|
-
};
|
|
1629
|
-
/** A coarse kind for a file icon. */
|
|
1630
|
-
declare function fileKind(file: {
|
|
1631
|
-
name: string;
|
|
1632
|
-
type?: string;
|
|
1633
|
-
}): 'image' | 'video' | 'pdf' | 'sheet' | 'archive' | 'text' | 'other';
|
|
1634
|
-
|
|
1635
|
-
type FileUploadStatus = 'queued' | 'uploading' | 'done' | 'error';
|
|
1636
|
-
interface FileUploadItem {
|
|
1637
|
-
id: string;
|
|
1638
|
-
name: string;
|
|
1639
|
-
/** Bytes. */
|
|
1640
|
-
size: number;
|
|
1641
|
-
type?: string;
|
|
1642
|
-
status: FileUploadStatus;
|
|
1643
|
-
/** 0–100 while uploading; without it the bar is indeterminate. */
|
|
1644
|
-
progress?: number;
|
|
1645
|
-
/** Why it failed (shown under the name with a Retry button). */
|
|
1646
|
-
error?: ReactNode;
|
|
1647
|
-
/** An object URL or remote URL for an image thumbnail. */
|
|
1648
|
-
previewUrl?: string;
|
|
1649
|
-
/** Alternative text, when the product asks for it (`onAltChange`). */
|
|
1650
|
-
alt?: string;
|
|
1651
|
-
}
|
|
1652
|
-
interface FileUploadLabels {
|
|
1653
|
-
/** Main line of the drop zone. */
|
|
1654
|
-
title: string;
|
|
1655
|
-
choose: string;
|
|
1656
|
-
/** Shown while a file is dragged over. */
|
|
1657
|
-
drop: string;
|
|
1658
|
-
list: string;
|
|
1659
|
-
remove: string;
|
|
1660
|
-
/** Accessible name of Retry. `{name}`. */
|
|
1661
|
-
retry: string;
|
|
1662
|
-
/** Visible text of Retry. */
|
|
1663
|
-
retryShort: string;
|
|
1664
|
-
queued: string;
|
|
1665
|
-
/** `{progress}`. */
|
|
1666
|
-
uploading: string;
|
|
1667
|
-
done: string;
|
|
1668
|
-
failed: string;
|
|
1669
|
-
/** `{name}` — set `alt` for images. */
|
|
1670
|
-
alt: string;
|
|
1671
|
-
/** `{count}` files added. */
|
|
1672
|
-
added: string;
|
|
1673
|
-
/** `{name}`, `{accept}`. */
|
|
1674
|
-
wrongType: string;
|
|
1675
|
-
/** `{name}`, `{max}`. */
|
|
1676
|
-
tooLarge: string;
|
|
1677
|
-
/** `{name}`, `{max}`. */
|
|
1678
|
-
tooMany: string;
|
|
1679
|
-
}
|
|
1680
|
-
declare const DEFAULT_FILE_UPLOAD_LABELS: FileUploadLabels;
|
|
1681
|
-
interface FileUploadProps {
|
|
1682
|
-
/** The files so far, with their upload state (controlled). */
|
|
1683
|
-
items: readonly FileUploadItem[];
|
|
1684
|
-
/**
|
|
1685
|
-
* Called with the files that passed `accept`, `maxSize` and `maxFiles`, and the ones that did
|
|
1686
|
-
* not. Add accepted files to `items` and upload them; the component never uploads.
|
|
1687
|
-
*/
|
|
1688
|
-
onFilesAdded: (accepted: File[], rejected: FileRejection[]) => void;
|
|
1689
|
-
onRemove?: (id: string) => void;
|
|
1690
|
-
onRetry?: (id: string) => void;
|
|
1691
|
-
/** Ask for alt text on image items (MOTUS photo intake). */
|
|
1692
|
-
onAltChange?: (id: string, alt: string) => void;
|
|
1693
|
-
/** Accepted types, as for `<input accept>`. */
|
|
1694
|
-
accept?: string;
|
|
1695
|
-
/** Largest file in bytes. */
|
|
1696
|
-
maxSize?: number;
|
|
1697
|
-
/** Most files in `items`. */
|
|
1698
|
-
maxFiles?: number;
|
|
1699
|
-
/** Default true. */
|
|
1700
|
-
multiple?: boolean;
|
|
1701
|
-
/** Open the camera on phones (`user` or `environment`). */
|
|
1702
|
-
capture?: 'user' | 'environment';
|
|
1703
|
-
disabled?: boolean;
|
|
1704
|
-
/** Second line of the drop zone, e.g. "PDF or images, up to 20 MB". */
|
|
1705
|
-
hint?: ReactNode;
|
|
1706
|
-
locale?: string;
|
|
1707
|
-
labels?: Partial<FileUploadLabels>;
|
|
2960
|
+
/** Disclosure header, e.g. "Favourites". */
|
|
2961
|
+
readonly heading: string;
|
|
2962
|
+
/** Shown when there are no favourites. */
|
|
2963
|
+
readonly empty: string;
|
|
2964
|
+
readonly moveUp: string;
|
|
2965
|
+
readonly moveDown: string;
|
|
2966
|
+
/** Per-row remove action template with a `{label}` placeholder, e.g. "Remove {label} from favourites". */
|
|
2967
|
+
readonly remove: string;
|
|
2968
|
+
/** Per-row overflow-trigger accessible-name template with `{label}`. Defaults to "{label} favourite options". */
|
|
2969
|
+
readonly options?: string;
|
|
2970
|
+
}
|
|
2971
|
+
interface NavFavouritesProps {
|
|
2972
|
+
/** The already-resolved favourites, in display order. */
|
|
2973
|
+
items: ReadonlyArray<NavFavouriteItem>;
|
|
2974
|
+
collapsed?: boolean;
|
|
2975
|
+
onToggleCollapsed?: () => void;
|
|
2976
|
+
/** Called with the id of the favourite to unpin. */
|
|
2977
|
+
onRemove: (id: string) => void;
|
|
2978
|
+
/** Called with the full new id order after a move. */
|
|
2979
|
+
onReorder: (orderedIds: string[]) => void;
|
|
2980
|
+
labels: NavFavouritesLabels;
|
|
2981
|
+
/** Optional telemetry hook emitted as `data-empty-reason` on the empty-state node. */
|
|
2982
|
+
emptyReason?: string;
|
|
1708
2983
|
className?: string;
|
|
1709
2984
|
}
|
|
1710
2985
|
/**
|
|
1711
|
-
*
|
|
1712
|
-
*
|
|
1713
|
-
*
|
|
2986
|
+
* Controlled Favourites disclosure for a sidebar nav (UIx owns the look + the
|
|
2987
|
+
* APG interaction contract; the consumer owns the favourites list + persistence).
|
|
2988
|
+
*
|
|
2989
|
+
* An ARIA disclosure exactly like a collapsible nav group: a header button with
|
|
2990
|
+
* `aria-expanded`/`aria-controls`, the region always rendered with a stable id
|
|
2991
|
+
* and toggled via `hidden`, focus pulled to the header before collapse.
|
|
2992
|
+
*
|
|
2993
|
+
* Each row carries the consumer-rendered destination link plus:
|
|
2994
|
+
* - an overflow menu (APG menu-button: button + `aria-haspopup="menu"` +
|
|
2995
|
+
* `aria-expanded`; Up/Down roving focus; Escape returns focus to the
|
|
2996
|
+
* trigger) with Move up / Move down / Remove,
|
|
2997
|
+
* - Alt+ArrowUp / Alt+ArrowDown accelerators on the focused row so moves
|
|
2998
|
+
* chain without re-opening the menu.
|
|
2999
|
+
*
|
|
3000
|
+
* Focus management:
|
|
3001
|
+
* - after Remove, focus moves to the adjacent favourite, or to the header
|
|
3002
|
+
* when the list empties,
|
|
3003
|
+
* - after Move up/down, focus stays on the moved row's control in its new
|
|
3004
|
+
* position.
|
|
1714
3005
|
*/
|
|
1715
|
-
declare function
|
|
3006
|
+
declare function NavFavourites({ items, collapsed, onToggleCollapsed, onRemove, onReorder, labels, emptyReason, className, }: NavFavouritesProps): react.JSX.Element;
|
|
1716
3007
|
|
|
1717
|
-
interface AttachmentLabels {
|
|
1718
|
-
/** Remove button. `{name}`. */
|
|
1719
|
-
remove: string;
|
|
1720
|
-
/** Download link name when `download` is set. `{name}`. */
|
|
1721
|
-
download: string;
|
|
1722
|
-
loading: string;
|
|
1723
|
-
forbidden: string;
|
|
1724
|
-
}
|
|
1725
|
-
declare const DEFAULT_ATTACHMENT_LABELS: AttachmentLabels;
|
|
1726
3008
|
interface AttachmentProps extends Omit<LiHTMLAttributes<HTMLLIElement>, 'children'> {
|
|
1727
3009
|
/** File name as the user should read it (decrypted, if the product stores it encrypted). */
|
|
1728
3010
|
name: string;
|
|
@@ -1749,13 +3031,22 @@ interface AttachmentProps extends Omit<LiHTMLAttributes<HTMLLIElement>, 'childre
|
|
|
1749
3031
|
/** Extra actions at the end of the row. */
|
|
1750
3032
|
actions?: ReactNode;
|
|
1751
3033
|
locale?: string;
|
|
3034
|
+
/** Count sizes in 1024s (1 MB = 1,048,576 bytes) instead of 1000s. Default `1000`. */
|
|
3035
|
+
sizeBase?: 1000 | 1024;
|
|
3036
|
+
/** The product's own size formatter; it replaces `formatFileSize` (and `sizeBase`). */
|
|
3037
|
+
formatSize?: FileSizeFormatter;
|
|
3038
|
+
/**
|
|
3039
|
+
* Words for this row. Each one defaults to `UixLabelsProvider` `attachment`, then to English,
|
|
3040
|
+
* so one provider translates every row below it (HAR-1630).
|
|
3041
|
+
*/
|
|
1752
3042
|
labels?: Partial<AttachmentLabels>;
|
|
1753
3043
|
}
|
|
1754
3044
|
/**
|
|
1755
3045
|
* One file row (HAR-985; TENSOR C15/B12 `attachments-panel-view.tsx`, MEDx S19/S52): glyph or
|
|
1756
|
-
* thumbnail, the name as a link, size and meta, a state slot, and remove. Server-renderable
|
|
3046
|
+
* thumbnail, the name as a link, size and meta, a state slot, and remove. Server-renderable:
|
|
3047
|
+
* the words that come from `UixLabelsProvider` are rendered by small client parts.
|
|
1757
3048
|
*/
|
|
1758
|
-
declare function Attachment({ name, size, type, href, download, renderLink, meta, state, thumbnail, onRemove, status, error, actions, locale,
|
|
3049
|
+
declare function Attachment({ name, size, type, href, download, renderLink, meta, state, thumbnail, onRemove, status, error, actions, locale, sizeBase, formatSize, labels, className, ...props }: AttachmentProps): react.JSX.Element;
|
|
1759
3050
|
interface AttachmentListProps extends HTMLAttributes<HTMLUListElement> {
|
|
1760
3051
|
/** Names the list, e.g. "Attachments (3)". */
|
|
1761
3052
|
label?: string;
|
|
@@ -1770,17 +3061,61 @@ interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
|
1770
3061
|
title?: ReactNode;
|
|
1771
3062
|
icon?: ReactNode;
|
|
1772
3063
|
children?: ReactNode;
|
|
3064
|
+
/**
|
|
3065
|
+
* A trailing slot for what the alert offers to do: a `Button`, a link (HAR-1614). It keeps
|
|
3066
|
+
* its place at the end while the text beside it wraps.
|
|
3067
|
+
*/
|
|
3068
|
+
actions?: ReactNode;
|
|
3069
|
+
/**
|
|
3070
|
+
* Adds a × at the end. The alert does not hide itself: stop rendering it in the handler, and
|
|
3071
|
+
* move focus somewhere sensible if the alert held it.
|
|
3072
|
+
*/
|
|
3073
|
+
onDismiss?: () => void;
|
|
3074
|
+
/** Accessible name of the ×. Default: `UixLabelsProvider` `alert.dismiss`, then "Dismiss". */
|
|
3075
|
+
dismissLabel?: string;
|
|
1773
3076
|
}
|
|
1774
|
-
|
|
3077
|
+
/**
|
|
3078
|
+
* Inline banner over `.uix-alert`. The ref is the alert element, so a form can move focus to
|
|
3079
|
+
* its error message (give it `tabIndex={-1}`).
|
|
3080
|
+
*/
|
|
3081
|
+
declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
|
|
1775
3082
|
|
|
1776
3083
|
interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {
|
|
1777
|
-
|
|
3084
|
+
/** `sm` 16 px (inline, beside text or inside a 24 px control), `md` 20 px (default), `lg` 32 px. */
|
|
3085
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1778
3086
|
accent?: boolean;
|
|
1779
3087
|
/** Announced loading text (default "Loading…"). */
|
|
1780
3088
|
label?: string;
|
|
1781
3089
|
}
|
|
1782
3090
|
declare function Spinner({ size, accent, label, className, ...props }: SpinnerProps): react.JSX.Element;
|
|
1783
3091
|
|
|
3092
|
+
type HeartbeatState = 'live' | 'idle' | 'warning' | 'danger';
|
|
3093
|
+
interface HeartbeatProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
|
|
3094
|
+
/**
|
|
3095
|
+
* `live` (default): a green dot with a pulsing ring. `warning` / `danger`: the same in that
|
|
3096
|
+
* tone. `idle`: a grey dot, no ring.
|
|
3097
|
+
*/
|
|
3098
|
+
state?: HeartbeatState;
|
|
3099
|
+
/**
|
|
3100
|
+
* What the dot means, for assistive technology ("Live", "Connection lost"). Without it the
|
|
3101
|
+
* dot is decorative (`aria-hidden`): say the state in text beside it, as `LiveIndicator` does.
|
|
3102
|
+
*/
|
|
3103
|
+
label?: string;
|
|
3104
|
+
}
|
|
3105
|
+
/**
|
|
3106
|
+
* The pulsing status dot over `.uix-heartbeat` (HAR-1606), so products stop hand-writing its
|
|
3107
|
+
* three spans. Decorative unless it has a `label`. The ring stops under
|
|
3108
|
+
* `prefers-reduced-motion` (the kit's global motion guard); the dot and its colour stay.
|
|
3109
|
+
*/
|
|
3110
|
+
declare function Heartbeat({ state, label, className, ...props }: HeartbeatProps): react.JSX.Element;
|
|
3111
|
+
interface LiveIndicatorProps extends HTMLAttributes<HTMLSpanElement> {
|
|
3112
|
+
state?: HeartbeatState;
|
|
3113
|
+
/** The state in words: "Live", "Paused", "Reconnecting…". It is what a screen reader gets. */
|
|
3114
|
+
children?: ReactNode;
|
|
3115
|
+
}
|
|
3116
|
+
/** A `Heartbeat` with its state in text beside it, over `.uix-live`. */
|
|
3117
|
+
declare function LiveIndicator({ state, children, className, ...props }: LiveIndicatorProps): react.JSX.Element;
|
|
3118
|
+
|
|
1784
3119
|
/**
|
|
1785
3120
|
* The imperative toast queue behind `toast()` (HAR-1363; TENSOR A2/C3, MOTUS A3/A4/C-13).
|
|
1786
3121
|
* Plain module state, no React: mutation helpers and server-action wrappers can call
|
|
@@ -1994,14 +3329,20 @@ declare function Highlighted({ text, query }: HighlightedProps): react.JSX.Eleme
|
|
|
1994
3329
|
|
|
1995
3330
|
type PillTone = 'neutral' | 'success' | 'info' | 'warning' | 'danger' | 'critical' | 'muted' | 'attention' | 'overdue' | 'sla-ok' | 'sla-at-risk' | 'sla-breached' | 'p1' | 'p2' | 'p3' | 'p4' | 'p5';
|
|
1996
3331
|
type PillTreatment = 'filled' | 'outline';
|
|
3332
|
+
type PillSize = 'sm' | 'md' | 'lg';
|
|
1997
3333
|
interface StatusPillProps extends HTMLAttributes<HTMLSpanElement> {
|
|
1998
3334
|
tone?: PillTone;
|
|
1999
3335
|
/** 'filled' (default) = tinted wash; 'outline' = transparent fill + tone-tinted border. */
|
|
2000
3336
|
treatment?: PillTreatment;
|
|
3337
|
+
/**
|
|
3338
|
+
* `sm` for a dense table cell or beside small text, `lg` for a page header (the public status
|
|
3339
|
+
* page). Default `md`, the size every pill had before (HAR-1614).
|
|
3340
|
+
*/
|
|
3341
|
+
size?: PillSize;
|
|
2001
3342
|
dot?: boolean;
|
|
2002
3343
|
children?: ReactNode;
|
|
2003
3344
|
}
|
|
2004
|
-
declare function StatusPill({ tone, treatment, dot, children, className, ...props }: StatusPillProps): react.JSX.Element;
|
|
3345
|
+
declare function StatusPill({ tone, treatment, size, dot, children, className, ...props }: StatusPillProps): react.JSX.Element;
|
|
2005
3346
|
|
|
2006
3347
|
interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
2007
3348
|
/** 0..max. Ignored when `indeterminate`. */
|
|
@@ -2015,8 +3356,12 @@ interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
2015
3356
|
}
|
|
2016
3357
|
declare function Progress({ value, max, indeterminate, label, className, ...props }: ProgressProps): react.JSX.Element;
|
|
2017
3358
|
|
|
2018
|
-
/**
|
|
2019
|
-
|
|
3359
|
+
/**
|
|
3360
|
+
* Fill color tone for the meter bar. Defaults to `success` (green).
|
|
3361
|
+
* `neutral` and `accent` are for a plain proportion that is neither good nor bad (a poll
|
|
3362
|
+
* option's share of the votes): a grey or brand fill, and no tone word is spoken (HAR-1606).
|
|
3363
|
+
*/
|
|
3364
|
+
type MeterTone = 'success' | 'warning' | 'danger' | 'attention' | 'overdue' | 'neutral' | 'accent';
|
|
2020
3365
|
interface MeterProps extends HTMLAttributes<HTMLDivElement> {
|
|
2021
3366
|
/** Fill level 0–100. Clamped to this range. */
|
|
2022
3367
|
value?: number;
|
|
@@ -2025,7 +3370,7 @@ interface MeterProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
2025
3370
|
/** Accessible name — rendered as `aria-label` (an explicit `aria-label` prop wins). */
|
|
2026
3371
|
label?: string;
|
|
2027
3372
|
/** TENSOR RX-125 (UIX-04): the spoken tone words; English defaults. */
|
|
2028
|
-
toneLabels?: Partial<Record<Exclude<MeterTone, 'success'>, string>>;
|
|
3373
|
+
toneLabels?: Partial<Record<Exclude<MeterTone, 'success' | 'neutral' | 'accent'>, string>>;
|
|
2029
3374
|
}
|
|
2030
3375
|
/** Horizontal utilization / threshold bar backed by `.uix-meter`. */
|
|
2031
3376
|
declare function Meter({ value, tone, label, toneLabels, className, ...props }: MeterProps): react.JSX.Element;
|
|
@@ -2097,13 +3442,26 @@ interface ChipProps extends Omit<HTMLAttributes<HTMLElement>, 'onClick'> {
|
|
|
2097
3442
|
/** A link chip. */
|
|
2098
3443
|
href?: string;
|
|
2099
3444
|
renderLink?: UixRenderLink;
|
|
3445
|
+
/**
|
|
3446
|
+
* A link chip for the page that is open: `aria-current="page"` and the filled look
|
|
3447
|
+
* (HAR-1632). `pressed` gives the same look but says "toggle button", which a link is not.
|
|
3448
|
+
*/
|
|
3449
|
+
current?: boolean;
|
|
2100
3450
|
/** Adds a × button that removes the chip. */
|
|
2101
3451
|
onRemove?: () => void;
|
|
2102
3452
|
/**
|
|
2103
3453
|
* Accessible name of the × button. `{label}` is replaced by the chip text when it is a
|
|
2104
|
-
* string. Default "Remove {label}"; pass a full name
|
|
3454
|
+
* string. Default: `UixLabelsProvider` `chip.remove`, then "Remove {label}"; pass a full name
|
|
3455
|
+
* when the text is not a string.
|
|
2105
3456
|
*/
|
|
2106
3457
|
removeLabel?: string;
|
|
3458
|
+
/**
|
|
3459
|
+
* Attributes for the body: the element that carries the chip's own action. On a plain chip
|
|
3460
|
+
* that is the chip itself, where the other props already go; on a removable chip the other
|
|
3461
|
+
* props go to the wrapper, so this is how `aria-haspopup`, `aria-expanded`, `aria-controls`
|
|
3462
|
+
* or an `id` reach the button that opens the filter editor (HAR-1632).
|
|
3463
|
+
*/
|
|
3464
|
+
bodyProps?: HTMLAttributes<HTMLElement>;
|
|
2107
3465
|
/** `add` is the dashed "+ Add filter" chip. */
|
|
2108
3466
|
variant?: 'default' | 'add';
|
|
2109
3467
|
disabled?: boolean;
|
|
@@ -2111,8 +3469,10 @@ interface ChipProps extends Omit<HTMLAttributes<HTMLElement>, 'onClick'> {
|
|
|
2111
3469
|
/**
|
|
2112
3470
|
* Filter, tag and token chip over `.uix-chip` (HAR-1360; TENSOR C7/B34, MOTUS C-6/B-A18).
|
|
2113
3471
|
* Plain text, a toggle, a link or a button, optionally with a × that removes it.
|
|
3472
|
+
* The ref goes to the body (the button, link or span that carries the chip's action), also on
|
|
3473
|
+
* a removable chip: anchor a popover to it and return focus to it without a DOM lookup.
|
|
2114
3474
|
*/
|
|
2115
|
-
declare
|
|
3475
|
+
declare const Chip: react.ForwardRefExoticComponent<ChipProps & react.RefAttributes<HTMLElement>>;
|
|
2116
3476
|
interface ChipGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
2117
3477
|
/** Names the group, e.g. "Active filters". */
|
|
2118
3478
|
label?: string;
|
|
@@ -2157,9 +3517,20 @@ declare const DEFAULT_STEP_STATE_LABELS: StepStateLabels;
|
|
|
2157
3517
|
interface StepsProps extends HTMLAttributes<HTMLOListElement> {
|
|
2158
3518
|
/**
|
|
2159
3519
|
* `horizontal` (default) lays the steps in a row and stacks them below 40rem;
|
|
2160
|
-
* `vertical` always stacks, with descriptions under each title.
|
|
3520
|
+
* `vertical` always stacks, with descriptions under each title. Steps that hold
|
|
3521
|
+
* content (`progress={false}`) are always vertical.
|
|
2161
3522
|
*/
|
|
2162
3523
|
orientation?: 'horizontal' | 'vertical';
|
|
3524
|
+
/**
|
|
3525
|
+
* `true` (default): a progress indicator. Every step has a state, which is read after its
|
|
3526
|
+
* title, and the current one carries `aria-current="step"`.
|
|
3527
|
+
* `false`: a numbered list of sections that are all on screen at once (an intake form in
|
|
3528
|
+
* four parts). No state is drawn or announced, and each `Step`'s children are its content,
|
|
3529
|
+
* in a group named by the step's title (HAR-1628).
|
|
3530
|
+
*/
|
|
3531
|
+
progress?: boolean;
|
|
3532
|
+
/** Render each step's title as a heading of this level (for `progress={false}` sections). */
|
|
3533
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
2163
3534
|
/** Names the list, e.g. "Intake progress". */
|
|
2164
3535
|
label?: string;
|
|
2165
3536
|
stateLabels?: Partial<StepStateLabels>;
|
|
@@ -2176,16 +3547,29 @@ interface StepProps extends Omit<LiHTMLAttributes<HTMLLIElement>, 'title'> {
|
|
|
2176
3547
|
href?: string;
|
|
2177
3548
|
renderLink?: UixRenderLink;
|
|
2178
3549
|
onSelect?: () => void;
|
|
3550
|
+
/**
|
|
3551
|
+
* The step's content: fields, text, a table. Rendered under the title in a group named by
|
|
3552
|
+
* it. Meant for `<Steps progress={false}>`; in a progress indicator keep steps to a title
|
|
3553
|
+
* and a description.
|
|
3554
|
+
*/
|
|
3555
|
+
children?: ReactNode;
|
|
2179
3556
|
/** Set by `Steps`. */
|
|
2180
3557
|
index?: number;
|
|
2181
3558
|
/** Set by `Steps`. */
|
|
2182
3559
|
last?: boolean;
|
|
2183
3560
|
/** Set by `Steps`. */
|
|
2184
3561
|
stateLabels?: StepStateLabels;
|
|
3562
|
+
/** Set by `Steps`. */
|
|
3563
|
+
progress?: boolean;
|
|
3564
|
+
/** Set by `Steps`. */
|
|
3565
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
2185
3566
|
}
|
|
2186
|
-
/**
|
|
2187
|
-
|
|
2188
|
-
|
|
3567
|
+
/**
|
|
3568
|
+
* Numbered progress through a multi-step flow (HAR-1362; TENSOR C13, MOTUS C-9), or with
|
|
3569
|
+
* `progress={false}` a numbered list of sections that each hold content (HAR-1628).
|
|
3570
|
+
*/
|
|
3571
|
+
declare function Steps({ orientation, progress, headingLevel, label, stateLabels, className, children, ...props }: StepsProps): react.JSX.Element;
|
|
3572
|
+
declare function Step({ title, description, state, marker, href, renderLink, onSelect, children, index, last, stateLabels, progress, headingLevel, className, ...props }: StepProps): react.JSX.Element;
|
|
2189
3573
|
|
|
2190
3574
|
interface TooltipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'content'> {
|
|
2191
3575
|
/** Tooltip text. Pass this or `content`. */
|
|
@@ -2460,6 +3844,14 @@ interface SegmentedProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'
|
|
|
2460
3844
|
value?: string;
|
|
2461
3845
|
/** Fires with the option's value when a different option is chosen. */
|
|
2462
3846
|
onChange?: (value: string) => void;
|
|
3847
|
+
/**
|
|
3848
|
+
* How the choice is exposed to assistive technology (HAR-1604).
|
|
3849
|
+
* `'toggle'` (default): `role="group"` of buttons with `aria-pressed`, for a view or filter
|
|
3850
|
+
* toggle bar. `'radio'`: `role="radiogroup"` of `role="radio"` with `aria-checked`, for a
|
|
3851
|
+
* setting with exactly one value (theme, density, language). Name the group with
|
|
3852
|
+
* `aria-label` or `aria-labelledby` in either mode. The keyboard model is the same in both.
|
|
3853
|
+
*/
|
|
3854
|
+
selection?: 'toggle' | 'radio';
|
|
2463
3855
|
children?: ReactNode;
|
|
2464
3856
|
}
|
|
2465
3857
|
/**
|
|
@@ -2467,16 +3859,22 @@ interface SegmentedProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'
|
|
|
2467
3859
|
* (density, audience, view mode …) that reads as one pill with a lifted active
|
|
2468
3860
|
* segment. Selection state is shared with `<SegmentedOption>` via context, so
|
|
2469
3861
|
* the caller only wires `value` + `onChange` once.
|
|
3862
|
+
*
|
|
3863
|
+
* Keyboard (HAR-1604): the group is ONE tab stop, on the selected option (the first enabled
|
|
3864
|
+
* one when nothing is selected). Arrow Right/Down and Left/Up move to the next / previous
|
|
3865
|
+
* enabled option and select it, wrapping at the ends; Home and End jump; Left/Right swap in
|
|
3866
|
+
* a right-to-left group. Before 2.32.0 every option was its own tab stop.
|
|
2470
3867
|
*/
|
|
2471
|
-
declare function Segmented({ value, onChange, children, className, ...props }: SegmentedProps): react.JSX.Element;
|
|
3868
|
+
declare function Segmented({ value, onChange, selection, children, className, onKeyDown, ...props }: SegmentedProps): react.JSX.Element;
|
|
2472
3869
|
interface SegmentedOptionProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'onChange'> {
|
|
2473
3870
|
value: string;
|
|
2474
3871
|
children?: ReactNode;
|
|
2475
3872
|
}
|
|
2476
3873
|
/**
|
|
2477
3874
|
* One option in a `<Segmented>`. Active state is derived from the parent's
|
|
2478
|
-
* `value`; the
|
|
2479
|
-
* `.uix-segmented__option[aria-pressed="true"]
|
|
3875
|
+
* `value`; the selected segment lifts to the surface via
|
|
3876
|
+
* `.uix-segmented__option[aria-pressed="true"]` (or `[aria-checked="true"]` in a
|
|
3877
|
+
* `selection="radio"` group).
|
|
2480
3878
|
*/
|
|
2481
3879
|
declare function SegmentedOption({ value, children, className, onClick, ...props }: SegmentedOptionProps): react.JSX.Element;
|
|
2482
3880
|
|
|
@@ -2544,215 +3942,81 @@ interface ViewMenuProps {
|
|
|
2544
3942
|
className?: string;
|
|
2545
3943
|
}
|
|
2546
3944
|
/**
|
|
2547
|
-
* Controlled table presentation panel with its own surface: density, zebra / freeze and a column
|
|
2548
|
-
* list under sticky section titles. A column row is grip · checkbox · name · ⋯ (grip and ⋯ with
|
|
2549
|
-
* `onReorder`). Usable inside a Popover or any overlay shell, including one that adds no chrome.
|
|
2550
|
-
*/
|
|
2551
|
-
declare function ViewMenu({ density, densityLabel, densityOptions, onDensityChange, displayLabel, zebra, freeze, columns, columnsLabel, onColumnVisibilityChange, onReorder, columnLabels, footer, className, }: ViewMenuProps): react.JSX.Element;
|
|
2552
|
-
interface FilterOption {
|
|
2553
|
-
value: string;
|
|
2554
|
-
label: string;
|
|
2555
|
-
}
|
|
2556
|
-
interface FilterPopoverProps {
|
|
2557
|
-
label: ReactNode;
|
|
2558
|
-
type?: 'text' | 'number' | 'date' | 'select' | 'enum' | 'boolean';
|
|
2559
|
-
value: string;
|
|
2560
|
-
onValueChange: (value: string) => void;
|
|
2561
|
-
options?: readonly FilterOption[];
|
|
2562
|
-
applyLabel: ReactNode;
|
|
2563
|
-
clearLabel: ReactNode;
|
|
2564
|
-
onApply: () => void;
|
|
2565
|
-
onClear: () => void;
|
|
2566
|
-
placeholder?: string;
|
|
2567
|
-
}
|
|
2568
|
-
/** Controlled filter editor content; applications own query serialization and the popover trigger. */
|
|
2569
|
-
declare function FilterPopover({ label, type, value, onValueChange, options, applyLabel, clearLabel, onApply, onClear, placeholder }: FilterPopoverProps): react.JSX.Element;
|
|
2570
|
-
interface SavedViewItem {
|
|
2571
|
-
id: string;
|
|
2572
|
-
label: ReactNode;
|
|
2573
|
-
active?: boolean;
|
|
2574
|
-
pinned?: boolean;
|
|
2575
|
-
}
|
|
2576
|
-
/** A titled group of saved views, e.g. the user's custom views above the built-in presets. */
|
|
2577
|
-
interface SavedViewSection {
|
|
2578
|
-
id: string;
|
|
2579
|
-
label: ReactNode;
|
|
2580
|
-
items: readonly SavedViewItem[];
|
|
2581
|
-
}
|
|
2582
|
-
interface SavedViewMenuBaseProps {
|
|
2583
|
-
onSelect: (id: string) => void;
|
|
2584
|
-
emptyLabel?: ReactNode;
|
|
2585
|
-
/** The row's overflow slot (e.g. a ⋯ menu trigger). It stays quiet until the row is hovered or focused, or its menu is open. */
|
|
2586
|
-
actions?: (item: SavedViewItem) => ReactNode;
|
|
2587
|
-
footer?: ReactNode;
|
|
2588
|
-
}
|
|
2589
|
-
type SavedViewMenuProps = SavedViewMenuBaseProps & ({
|
|
2590
|
-
items: readonly SavedViewItem[];
|
|
2591
|
-
sections?: never;
|
|
2592
|
-
} | {
|
|
2593
|
-
sections: readonly SavedViewSection[];
|
|
2594
|
-
items?: never;
|
|
2595
|
-
}) & ({
|
|
2596
|
-
onPinChange: (id: string, pinned: boolean) => void;
|
|
2597
|
-
pinLabel: string;
|
|
2598
|
-
unpinLabel: string;
|
|
2599
|
-
} | {
|
|
2600
|
-
onPinChange?: undefined;
|
|
2601
|
-
pinLabel?: never;
|
|
2602
|
-
unpinLabel?: never;
|
|
2603
|
-
}) & ({
|
|
2604
|
-
/**
|
|
2605
|
-
* Adds a drag grip to every row. Rows move only within their own section; the
|
|
2606
|
-
* callback receives that section's full id order (and its id when `sections` is used).
|
|
2607
|
-
* The grip also moves its row with ArrowUp / ArrowDown.
|
|
2608
|
-
*/
|
|
2609
|
-
onReorder: (orderedIds: string[], sectionId: string | undefined) => void;
|
|
2610
|
-
/** Accessible name of the grip; the row's name is attached as its description. */
|
|
2611
|
-
reorderLabel: string;
|
|
2612
|
-
} | {
|
|
2613
|
-
onReorder?: undefined;
|
|
2614
|
-
reorderLabel?: never;
|
|
2615
|
-
});
|
|
2616
|
-
/**
|
|
2617
|
-
* Generic saved-view selector: optional titled sections inside one `.uix-menu`, rows of
|
|
2618
|
-
* grip · name · overflow. The selected row is tinted as a whole (no check glyph). Persistence,
|
|
2619
|
-
* ownership, permissions and labels remain application concerns.
|
|
2620
|
-
*/
|
|
2621
|
-
declare function SavedViewMenu({ items, sections, onSelect, onPinChange, pinLabel, unpinLabel, onReorder, reorderLabel, emptyLabel, actions, footer }: SavedViewMenuProps): react.JSX.Element;
|
|
2622
|
-
|
|
2623
|
-
/**
|
|
2624
|
-
* Typed column filters for `FilterEditor` (HAR-1365; TENSOR C6 `table-filter-editor.tsx`,
|
|
2625
|
-
* MOTUS C-1 "+ filter"). The value is data the product serializes into its own query; the
|
|
2626
|
-
* summary feeds a `Chip`. Pure, so a server can summarize a saved view too.
|
|
2627
|
-
*/
|
|
2628
|
-
interface FilterChoice {
|
|
2629
|
-
value: string;
|
|
2630
|
-
label: string;
|
|
2631
|
-
}
|
|
2632
|
-
type TextFilterOperator = 'contains' | 'not-contains' | 'is' | 'is-not' | 'starts-with';
|
|
2633
|
-
type NumberFilterOperator = 'eq' | 'neq' | 'lt' | 'lte' | 'gt' | 'gte' | 'between';
|
|
2634
|
-
type FilterValue = {
|
|
2635
|
-
kind: 'enum';
|
|
2636
|
-
values: string[];
|
|
2637
|
-
} | {
|
|
2638
|
-
kind: 'text';
|
|
2639
|
-
operator: TextFilterOperator;
|
|
2640
|
-
text: string;
|
|
2641
|
-
} | {
|
|
2642
|
-
kind: 'number';
|
|
2643
|
-
operator: NumberFilterOperator;
|
|
2644
|
-
value?: number;
|
|
2645
|
-
to?: number;
|
|
2646
|
-
} | {
|
|
2647
|
-
kind: 'date-range';
|
|
2648
|
-
from?: string;
|
|
2649
|
-
to?: string;
|
|
2650
|
-
} | {
|
|
2651
|
-
kind: 'boolean';
|
|
2652
|
-
value?: boolean;
|
|
2653
|
-
} | {
|
|
2654
|
-
kind: 'reference';
|
|
2655
|
-
values: FilterChoice[];
|
|
2656
|
-
};
|
|
2657
|
-
type FilterValueKind = FilterValue['kind'];
|
|
2658
|
-
interface FilterField {
|
|
2659
|
-
id: string;
|
|
2660
|
-
/** Column name, also the start of the chip summary. */
|
|
2661
|
-
label: string;
|
|
2662
|
-
kind: FilterValueKind;
|
|
2663
|
-
/** `enum`: the choices. */
|
|
2664
|
-
options?: readonly FilterChoice[];
|
|
2665
|
-
/** `reference`: finds records to pick; rejected promises show the error state. */
|
|
2666
|
-
onSearch?: (query: string) => Promise<readonly FilterChoice[]>;
|
|
2667
|
-
/** `text` / `number`: the operators offered, in order. Default: all of the kind. */
|
|
2668
|
-
operators?: readonly (TextFilterOperator | NumberFilterOperator)[];
|
|
2669
|
-
/** `number`: a unit shown after the value, e.g. "days". */
|
|
2670
|
-
unit?: string;
|
|
2671
|
-
/** `boolean`: words for true and false, e.g. Escalated / Not escalated. Default from labels. */
|
|
2672
|
-
trueLabel?: string;
|
|
2673
|
-
falseLabel?: string;
|
|
2674
|
-
}
|
|
2675
|
-
interface FilterSummaryLabels {
|
|
2676
|
-
operators: Record<TextFilterOperator | NumberFilterOperator, string>;
|
|
2677
|
-
yes: string;
|
|
2678
|
-
no: string;
|
|
2679
|
-
/** `{from}`, `{to}`; also used for a number range. */
|
|
2680
|
-
range: string;
|
|
2681
|
-
/** Only a start date. `{from}`. */
|
|
2682
|
-
from: string;
|
|
2683
|
-
/** Only an end date. `{to}`. */
|
|
2684
|
-
until: string;
|
|
2685
|
-
/** More than `maxListed` values: `{first}`, `{count}`. */
|
|
2686
|
-
more: string;
|
|
2687
|
-
}
|
|
2688
|
-
declare const DEFAULT_FILTER_SUMMARY_LABELS: FilterSummaryLabels;
|
|
2689
|
-
declare const TEXT_FILTER_OPERATORS: readonly TextFilterOperator[];
|
|
2690
|
-
declare const NUMBER_FILTER_OPERATORS: readonly NumberFilterOperator[];
|
|
2691
|
-
/** The empty value for a field kind (what Clear resets to). */
|
|
2692
|
-
declare function emptyFilterValue(kind: FilterValueKind): FilterValue;
|
|
2693
|
-
/** True when the value filters nothing (so the chip goes away). */
|
|
2694
|
-
declare function isFilterEmpty(value: FilterValue | undefined): boolean;
|
|
2695
|
-
interface SummarizeFilterOptions {
|
|
2696
|
-
labels?: Partial<FilterSummaryLabels>;
|
|
2697
|
-
/** Formats a `YYYY-MM-DD` date (a product format such as DD.MM.YYYY). Default: as given. */
|
|
2698
|
-
formatDate?: (date: string) => string;
|
|
2699
|
-
/** Formats a number. Default: `String`. */
|
|
2700
|
-
formatNumber?: (value: number) => string;
|
|
2701
|
-
/** List this many values before "+N". Default 2. */
|
|
2702
|
-
maxListed?: number;
|
|
2703
|
-
}
|
|
2704
|
-
/**
|
|
2705
|
-
* One line for the filter chip, e.g. "State: Open, Pending", "Priority ≥ 2", "Created:
|
|
2706
|
-
* 01.10.2026 – 05.10.2026", "Escalated: Yes". Empty values give an empty string.
|
|
3945
|
+
* Controlled table presentation panel with its own surface: density, zebra / freeze and a column
|
|
3946
|
+
* list under sticky section titles. A column row is grip · checkbox · name · ⋯ (grip and ⋯ with
|
|
3947
|
+
* `onReorder`). Usable inside a Popover or any overlay shell, including one that adds no chrome.
|
|
2707
3948
|
*/
|
|
2708
|
-
declare function
|
|
2709
|
-
|
|
2710
|
-
interface FilterEditorLabels {
|
|
2711
|
-
apply: string;
|
|
2712
|
-
clear: string;
|
|
2713
|
-
operator: string;
|
|
3949
|
+
declare function ViewMenu({ density, densityLabel, densityOptions, onDensityChange, displayLabel, zebra, freeze, columns, columnsLabel, onColumnVisibilityChange, onReorder, columnLabels, footer, className, }: ViewMenuProps): react.JSX.Element;
|
|
3950
|
+
interface FilterOption {
|
|
2714
3951
|
value: string;
|
|
2715
|
-
|
|
2716
|
-
to: string;
|
|
2717
|
-
/** Between two numbers: "and". */
|
|
2718
|
-
and: string;
|
|
2719
|
-
any: string;
|
|
2720
|
-
yes: string;
|
|
2721
|
-
no: string;
|
|
2722
|
-
search: string;
|
|
2723
|
-
searching: string;
|
|
2724
|
-
noMatches: string;
|
|
2725
|
-
searchFailed: string;
|
|
2726
|
-
retry: string;
|
|
2727
|
-
selectAll: string;
|
|
2728
|
-
selectNone: string;
|
|
2729
|
-
/** `{count}` chosen. */
|
|
2730
|
-
selected: string;
|
|
2731
|
-
/** Remove one chosen record. `{label}`. */
|
|
2732
|
-
remove: string;
|
|
2733
|
-
operators: Record<TextFilterOperator | NumberFilterOperator, string>;
|
|
3952
|
+
label: string;
|
|
2734
3953
|
}
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
value:
|
|
2740
|
-
|
|
3954
|
+
interface FilterPopoverProps {
|
|
3955
|
+
label: ReactNode;
|
|
3956
|
+
type?: 'text' | 'number' | 'date' | 'select' | 'enum' | 'boolean';
|
|
3957
|
+
value: string;
|
|
3958
|
+
onValueChange: (value: string) => void;
|
|
3959
|
+
options?: readonly FilterOption[];
|
|
3960
|
+
applyLabel: ReactNode;
|
|
3961
|
+
clearLabel: ReactNode;
|
|
2741
3962
|
onApply: () => void;
|
|
2742
3963
|
onClear: () => void;
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
3964
|
+
placeholder?: string;
|
|
3965
|
+
}
|
|
3966
|
+
/** Controlled filter editor content; applications own query serialization and the popover trigger. */
|
|
3967
|
+
declare function FilterPopover({ label, type, value, onValueChange, options, applyLabel, clearLabel, onApply, onClear, placeholder }: FilterPopoverProps): react.JSX.Element;
|
|
3968
|
+
interface SavedViewItem {
|
|
3969
|
+
id: string;
|
|
3970
|
+
label: ReactNode;
|
|
3971
|
+
active?: boolean;
|
|
3972
|
+
pinned?: boolean;
|
|
3973
|
+
}
|
|
3974
|
+
/** A titled group of saved views, e.g. the user's custom views above the built-in presets. */
|
|
3975
|
+
interface SavedViewSection {
|
|
3976
|
+
id: string;
|
|
3977
|
+
label: ReactNode;
|
|
3978
|
+
items: readonly SavedViewItem[];
|
|
3979
|
+
}
|
|
3980
|
+
interface SavedViewMenuBaseProps {
|
|
3981
|
+
onSelect: (id: string) => void;
|
|
3982
|
+
emptyLabel?: ReactNode;
|
|
3983
|
+
/** The row's overflow slot (e.g. a ⋯ menu trigger). It stays quiet until the row is hovered or focused, or its menu is open. */
|
|
3984
|
+
actions?: (item: SavedViewItem) => ReactNode;
|
|
3985
|
+
footer?: ReactNode;
|
|
2748
3986
|
}
|
|
3987
|
+
type SavedViewMenuProps = SavedViewMenuBaseProps & ({
|
|
3988
|
+
items: readonly SavedViewItem[];
|
|
3989
|
+
sections?: never;
|
|
3990
|
+
} | {
|
|
3991
|
+
sections: readonly SavedViewSection[];
|
|
3992
|
+
items?: never;
|
|
3993
|
+
}) & ({
|
|
3994
|
+
onPinChange: (id: string, pinned: boolean) => void;
|
|
3995
|
+
pinLabel: string;
|
|
3996
|
+
unpinLabel: string;
|
|
3997
|
+
} | {
|
|
3998
|
+
onPinChange?: undefined;
|
|
3999
|
+
pinLabel?: never;
|
|
4000
|
+
unpinLabel?: never;
|
|
4001
|
+
}) & ({
|
|
4002
|
+
/**
|
|
4003
|
+
* Adds a drag grip to every row. Rows move only within their own section; the
|
|
4004
|
+
* callback receives that section's full id order (and its id when `sections` is used).
|
|
4005
|
+
* The grip also moves its row with ArrowUp / ArrowDown.
|
|
4006
|
+
*/
|
|
4007
|
+
onReorder: (orderedIds: string[], sectionId: string | undefined) => void;
|
|
4008
|
+
/** Accessible name of the grip; the row's name is attached as its description. */
|
|
4009
|
+
reorderLabel: string;
|
|
4010
|
+
} | {
|
|
4011
|
+
onReorder?: undefined;
|
|
4012
|
+
reorderLabel?: never;
|
|
4013
|
+
});
|
|
2749
4014
|
/**
|
|
2750
|
-
*
|
|
2751
|
-
*
|
|
2752
|
-
*
|
|
2753
|
-
* turns the applied value into the chip text. `FilterPopover` stays for the one-string case.
|
|
4015
|
+
* Generic saved-view selector: optional titled sections inside one `.uix-menu`, rows of
|
|
4016
|
+
* grip · name · overflow. The selected row is tinted as a whole (no check glyph). Persistence,
|
|
4017
|
+
* ownership, permissions and labels remain application concerns.
|
|
2754
4018
|
*/
|
|
2755
|
-
declare function
|
|
4019
|
+
declare function SavedViewMenu({ items, sections, onSelect, onPinChange, pinLabel, unpinLabel, onReorder, reorderLabel, emptyLabel, actions, footer }: SavedViewMenuProps): react.JSX.Element;
|
|
2756
4020
|
|
|
2757
4021
|
interface TimelineProps extends HTMLAttributes<HTMLOListElement> {
|
|
2758
4022
|
children?: ReactNode;
|
|
@@ -2823,9 +4087,13 @@ interface ProseProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
2823
4087
|
* release notes). Apply to a block of rendered HTML/markdown.
|
|
2824
4088
|
*/
|
|
2825
4089
|
declare function Prose({ children, className, ...props }: ProseProps): react.JSX.Element;
|
|
2826
|
-
type NoteTone = 'info' | 'success' | 'warning' | 'danger';
|
|
4090
|
+
type NoteTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
2827
4091
|
interface NoteProps extends HTMLAttributes<HTMLDivElement> {
|
|
2828
|
-
|
|
4092
|
+
/**
|
|
4093
|
+
* `'neutral'` and `undefined` are both the default look. `undefined` is spelled out in the type
|
|
4094
|
+
* so `tone={maybeTone}` also compiles under `exactOptionalPropertyTypes` (HAR-1614).
|
|
4095
|
+
*/
|
|
4096
|
+
tone?: NoteTone | undefined;
|
|
2829
4097
|
icon?: ReactNode;
|
|
2830
4098
|
children?: ReactNode;
|
|
2831
4099
|
}
|
|
@@ -2840,7 +4108,8 @@ interface PopoverProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
2840
4108
|
popover?: 'auto' | 'manual';
|
|
2841
4109
|
/**
|
|
2842
4110
|
* Element (or ref) to anchor against. When set, the popover is placed with
|
|
2843
|
-
* cross-browser JS positioning — flip when it won't fit, shift to stay on-screen.
|
|
4111
|
+
* cross-browser JS positioning — flip when it won't fit, shift to stay on-screen. A popover
|
|
4112
|
+
* that fits neither above nor below slides over its anchor rather than leave the viewport.
|
|
2844
4113
|
* Where the browser supports CSS anchor positioning, the placement is written as an
|
|
2845
4114
|
* offset from the anchor, so it stays attached while the page scrolls; elsewhere it
|
|
2846
4115
|
* follows scroll from JS. The native Popover API still provides the top layer (so it
|
|
@@ -2860,6 +4129,24 @@ interface PopoverProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
2860
4129
|
closeWhenAnchorHidden?: boolean;
|
|
2861
4130
|
/** Called when `closeWhenAnchorHidden` is about to close the popover. */
|
|
2862
4131
|
onAnchorHidden?: () => void;
|
|
4132
|
+
/**
|
|
4133
|
+
* Cap the popover's height to the viewport (minus 8 px at each edge) and scroll inside it,
|
|
4134
|
+
* for content that can be taller than a phone screen. Needs `anchor`. Default `false`.
|
|
4135
|
+
*/
|
|
4136
|
+
capHeight?: boolean;
|
|
4137
|
+
/**
|
|
4138
|
+
* Open while the pointer is over the `anchor` or the anchor has keyboard focus, and close
|
|
4139
|
+
* when both have left the anchor and the popover — a hover card (HAR-1614). The pointer can
|
|
4140
|
+
* travel from the anchor into the popover, and focus can move into it, without closing it;
|
|
4141
|
+
* Escape closes it. Touch does not hover: open it from the anchor's own click there.
|
|
4142
|
+
* `true` waits 300 ms before opening and 150 ms before closing; pass the delays to change
|
|
4143
|
+
* them. Needs `anchor`; `popover` then defaults to `"manual"`, so a hover card does not
|
|
4144
|
+
* dismiss a menu or dialog that is open.
|
|
4145
|
+
*/
|
|
4146
|
+
openOnHover?: boolean | {
|
|
4147
|
+
openDelay?: number;
|
|
4148
|
+
closeDelay?: number;
|
|
4149
|
+
};
|
|
2863
4150
|
children?: ReactNode;
|
|
2864
4151
|
}
|
|
2865
4152
|
/**
|
|
@@ -2867,15 +4154,20 @@ interface PopoverProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
2867
4154
|
* things like a filter popover, menu, or rich select by putting controls inside.
|
|
2868
4155
|
* Pass `anchor` to get collision-aware, cross-browser placement (UIX-FIX-02).
|
|
2869
4156
|
*/
|
|
2870
|
-
declare function Popover({ popover, anchor, placement, offset, closeWhenAnchorHidden, onAnchorHidden, className, children, ...props }: PopoverProps): react.JSX.Element;
|
|
4157
|
+
declare function Popover({ popover: popoverProp, anchor, placement, offset, closeWhenAnchorHidden, onAnchorHidden, capHeight, openOnHover, className, children, ...props }: PopoverProps): react.JSX.Element;
|
|
2871
4158
|
|
|
4159
|
+
/** `id` and `data-*` for the item's own element (HAR-1629): a stable hook for tests, journeys and analytics. */
|
|
4160
|
+
interface MenuItemAttributes {
|
|
4161
|
+
id?: string;
|
|
4162
|
+
[dataAttribute: `data-${string}`]: string | number | boolean | undefined;
|
|
4163
|
+
}
|
|
2872
4164
|
interface MenuProps {
|
|
2873
4165
|
/**
|
|
2874
4166
|
* The menu button, usually a `Button`. It receives `aria-haspopup="menu"`,
|
|
2875
4167
|
* `aria-expanded`, `aria-controls` and the open/keyboard handlers.
|
|
2876
4168
|
*/
|
|
2877
4169
|
trigger: ReactElement;
|
|
2878
|
-
/** `MenuItem`, `MenuGroup` and `MenuSeparator`. */
|
|
4170
|
+
/** `MenuItem`, `MenuItemRadio`, `MenuItemCheckbox`, `MenuRadioGroup`, `MenuGroup` and `MenuSeparator`. */
|
|
2879
4171
|
children?: ReactNode;
|
|
2880
4172
|
/** Controlled open state; pair with `onOpenChange`. */
|
|
2881
4173
|
open?: boolean;
|
|
@@ -2889,10 +4181,11 @@ interface MenuProps {
|
|
|
2889
4181
|
/**
|
|
2890
4182
|
* A menu button with an APG menu (HAR-1359; TENSOR C1, MOTUS B-A14): ↓/↑ move, Home/End,
|
|
2891
4183
|
* type-to-find, Enter/Space activate, Esc and Tab close, focus returns to the trigger.
|
|
2892
|
-
* The surface is the kit `Popover`, so it escapes clipping containers
|
|
4184
|
+
* The surface is the kit `Popover`, so it escapes clipping containers; a menu taller than
|
|
4185
|
+
* the viewport is capped to it and scrolls (HAR-1613).
|
|
2893
4186
|
*/
|
|
2894
4187
|
declare function Menu({ trigger, children, open: controlledOpen, defaultOpen, onOpenChange, label, placement, className }: MenuProps): react.JSX.Element;
|
|
2895
|
-
interface MenuItemProps {
|
|
4188
|
+
interface MenuItemProps extends MenuItemAttributes {
|
|
2896
4189
|
children?: ReactNode;
|
|
2897
4190
|
/** Runs on click, Enter or Space; the menu then closes and focus returns to the trigger. */
|
|
2898
4191
|
onSelect?: () => void;
|
|
@@ -2906,7 +4199,49 @@ interface MenuItemProps {
|
|
|
2906
4199
|
disabled?: boolean;
|
|
2907
4200
|
className?: string;
|
|
2908
4201
|
}
|
|
2909
|
-
declare function MenuItem({ children, onSelect, href, renderLink, icon, shortcut, tone, disabled, className }: MenuItemProps): react.JSX.Element;
|
|
4202
|
+
declare function MenuItem({ children, onSelect, href, renderLink, icon, shortcut, tone, disabled, className, ...rest }: MenuItemProps): react.JSX.Element;
|
|
4203
|
+
interface MenuRadioGroupProps {
|
|
4204
|
+
/** The `value` of the checked `MenuItemRadio`. */
|
|
4205
|
+
value?: string;
|
|
4206
|
+
onValueChange?: (value: string) => void;
|
|
4207
|
+
/** Visible group heading; it also names the group. */
|
|
4208
|
+
label?: ReactNode;
|
|
4209
|
+
/** Names the group when there is no visible `label`. */
|
|
4210
|
+
'aria-label'?: string;
|
|
4211
|
+
children?: ReactNode;
|
|
4212
|
+
}
|
|
4213
|
+
/** One choice out of several inside a `Menu`: wraps `MenuItemRadio` rows and holds their value (HAR-1629). */
|
|
4214
|
+
declare function MenuRadioGroup({ value, onValueChange, label, 'aria-label': ariaLabel, children }: MenuRadioGroupProps): react.JSX.Element;
|
|
4215
|
+
interface MenuItemRadioProps extends MenuItemAttributes {
|
|
4216
|
+
/** Checked when it equals the surrounding `MenuRadioGroup`'s `value`. */
|
|
4217
|
+
value: string;
|
|
4218
|
+
/** For a radio item used without a `MenuRadioGroup`. */
|
|
4219
|
+
checked?: boolean;
|
|
4220
|
+
/** Runs when the item is chosen, after the group's `onValueChange`. */
|
|
4221
|
+
onSelect?: () => void;
|
|
4222
|
+
/** Close the menu after a click or Enter. Default `true`. Space never closes it. */
|
|
4223
|
+
closeOnSelect?: boolean;
|
|
4224
|
+
children?: ReactNode;
|
|
4225
|
+
icon?: ReactNode;
|
|
4226
|
+
shortcut?: ReactNode;
|
|
4227
|
+
disabled?: boolean;
|
|
4228
|
+
className?: string;
|
|
4229
|
+
}
|
|
4230
|
+
/** A `role="menuitemradio"` row with `aria-checked` and a check mark for the current choice. */
|
|
4231
|
+
declare function MenuItemRadio({ value, checked, onSelect, closeOnSelect, ...rest }: MenuItemRadioProps): react.JSX.Element;
|
|
4232
|
+
interface MenuItemCheckboxProps extends MenuItemAttributes {
|
|
4233
|
+
checked: boolean;
|
|
4234
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
4235
|
+
/** Close the menu after a click or Enter. Default `false`: several boxes are usually ticked in a row. */
|
|
4236
|
+
closeOnSelect?: boolean;
|
|
4237
|
+
children?: ReactNode;
|
|
4238
|
+
icon?: ReactNode;
|
|
4239
|
+
shortcut?: ReactNode;
|
|
4240
|
+
disabled?: boolean;
|
|
4241
|
+
className?: string;
|
|
4242
|
+
}
|
|
4243
|
+
/** A `role="menuitemcheckbox"` row with `aria-checked`; the menu stays open while boxes are ticked. */
|
|
4244
|
+
declare function MenuItemCheckbox({ checked, onCheckedChange, closeOnSelect, ...rest }: MenuItemCheckboxProps): react.JSX.Element;
|
|
2910
4245
|
interface MenuGroupProps {
|
|
2911
4246
|
label: ReactNode;
|
|
2912
4247
|
children?: ReactNode;
|
|
@@ -3301,128 +4636,6 @@ interface StatusRowProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
3301
4636
|
/** Status row — indicator + name + trailing meta (`.uix-status-row`). */
|
|
3302
4637
|
declare function StatusRow({ indicator, name, meta, className, ...props }: StatusRowProps): react.JSX.Element;
|
|
3303
4638
|
|
|
3304
|
-
type JsonPrimitive = string | number | boolean | null;
|
|
3305
|
-
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
3306
|
-
[key: string]: JsonValue;
|
|
3307
|
-
};
|
|
3308
|
-
|
|
3309
|
-
interface RuleCondition {
|
|
3310
|
-
id: string;
|
|
3311
|
-
field: string;
|
|
3312
|
-
operator: string;
|
|
3313
|
-
value?: JsonValue;
|
|
3314
|
-
}
|
|
3315
|
-
interface RuleGroup {
|
|
3316
|
-
id: string;
|
|
3317
|
-
combinator: 'and' | 'or';
|
|
3318
|
-
conditions: Array<RuleCondition | RuleGroup>;
|
|
3319
|
-
}
|
|
3320
|
-
interface RuleAction {
|
|
3321
|
-
id: string;
|
|
3322
|
-
type: string;
|
|
3323
|
-
parameters: Record<string, JsonValue>;
|
|
3324
|
-
}
|
|
3325
|
-
interface RuleDefinition {
|
|
3326
|
-
when: RuleGroup;
|
|
3327
|
-
then: RuleAction[];
|
|
3328
|
-
}
|
|
3329
|
-
interface RuleValidationIssue {
|
|
3330
|
-
path: string;
|
|
3331
|
-
message: string;
|
|
3332
|
-
}
|
|
3333
|
-
declare function isRuleGroup(node: RuleCondition | RuleGroup): node is RuleGroup;
|
|
3334
|
-
declare function ruleDepth(group: RuleGroup): number;
|
|
3335
|
-
declare function findRuleNodeDepth(group: RuleGroup, id: string, depth?: number): number | undefined;
|
|
3336
|
-
declare function mapRuleGroup(group: RuleGroup, id: string, update: (node: RuleCondition | RuleGroup) => RuleCondition | RuleGroup): RuleGroup;
|
|
3337
|
-
declare function appendRuleNode(group: RuleGroup, parentId: string, node: RuleCondition | RuleGroup, maxDepth?: number): RuleGroup;
|
|
3338
|
-
declare function removeRuleNode(group: RuleGroup, id: string): RuleGroup;
|
|
3339
|
-
declare function moveRuleNode(group: RuleGroup, id: string, direction: -1 | 1): RuleGroup;
|
|
3340
|
-
declare function validateRuleDefinition(value: RuleDefinition, maxDepth?: number): RuleValidationIssue[];
|
|
3341
|
-
declare function summarizeRule(value: RuleDefinition, labels?: {
|
|
3342
|
-
fields?: Record<string, string>;
|
|
3343
|
-
operators?: Record<string, string>;
|
|
3344
|
-
actions?: Record<string, string>;
|
|
3345
|
-
}): string;
|
|
3346
|
-
|
|
3347
|
-
interface RuleValueEditorProps {
|
|
3348
|
-
condition: RuleCondition;
|
|
3349
|
-
onChange: (value: JsonValue | undefined) => void;
|
|
3350
|
-
disabled?: boolean;
|
|
3351
|
-
}
|
|
3352
|
-
interface RuleFieldDefinition {
|
|
3353
|
-
id: string;
|
|
3354
|
-
label: string;
|
|
3355
|
-
description?: string;
|
|
3356
|
-
operators?: string[];
|
|
3357
|
-
renderValueEditor?: (props: RuleValueEditorProps) => ReactNode;
|
|
3358
|
-
}
|
|
3359
|
-
interface RuleOperatorDefinition {
|
|
3360
|
-
id: string;
|
|
3361
|
-
label: string;
|
|
3362
|
-
requiresValue?: boolean;
|
|
3363
|
-
}
|
|
3364
|
-
interface RuleActionDefinition {
|
|
3365
|
-
id: string;
|
|
3366
|
-
label: string;
|
|
3367
|
-
renderParameters?: (action: RuleAction, onChange: (parameters: Record<string, JsonValue>) => void, disabled: boolean) => ReactNode;
|
|
3368
|
-
}
|
|
3369
|
-
/**
|
|
3370
|
-
* Every word the rule builder renders (TENSOR RX-125, UIX-12). `{item}` is one of
|
|
3371
|
-
* `itemGroup` / `itemCondition` / `itemAction`; `{field}` a field label; `{count}` a number.
|
|
3372
|
-
*/
|
|
3373
|
-
interface RuleBuilderLabels {
|
|
3374
|
-
region: string;
|
|
3375
|
-
summary: string;
|
|
3376
|
-
when: string;
|
|
3377
|
-
group: string;
|
|
3378
|
-
match: string;
|
|
3379
|
-
all: string;
|
|
3380
|
-
any: string;
|
|
3381
|
-
field: string;
|
|
3382
|
-
operator: string;
|
|
3383
|
-
valueFor: string;
|
|
3384
|
-
itemGroup: string;
|
|
3385
|
-
itemCondition: string;
|
|
3386
|
-
itemAction: string;
|
|
3387
|
-
moveUp: string;
|
|
3388
|
-
moveUpNamed: string;
|
|
3389
|
-
moveDown: string;
|
|
3390
|
-
moveDownNamed: string;
|
|
3391
|
-
remove: string;
|
|
3392
|
-
removeNamed: string;
|
|
3393
|
-
then: string;
|
|
3394
|
-
actionType: string;
|
|
3395
|
-
valid: string;
|
|
3396
|
-
issuesOne: string;
|
|
3397
|
-
issuesMany: string;
|
|
3398
|
-
summaryIssuesOne: string;
|
|
3399
|
-
summaryIssuesMany: string;
|
|
3400
|
-
addCondition: string;
|
|
3401
|
-
addGroup: string;
|
|
3402
|
-
addAction: string;
|
|
3403
|
-
}
|
|
3404
|
-
declare const DEFAULT_RULE_BUILDER_LABELS: RuleBuilderLabels;
|
|
3405
|
-
interface RuleBuilderProps {
|
|
3406
|
-
value: RuleDefinition;
|
|
3407
|
-
onChange: (value: RuleDefinition) => void;
|
|
3408
|
-
fields: RuleFieldDefinition[];
|
|
3409
|
-
operators: RuleOperatorDefinition[];
|
|
3410
|
-
actions: RuleActionDefinition[];
|
|
3411
|
-
maxDepth?: number;
|
|
3412
|
-
readOnly?: boolean;
|
|
3413
|
-
validate?: (value: RuleDefinition) => RuleValidationIssue[];
|
|
3414
|
-
className?: string;
|
|
3415
|
-
/** @deprecated use `labels.addCondition` */
|
|
3416
|
-
addConditionLabel?: string;
|
|
3417
|
-
/** @deprecated use `labels.addGroup` */
|
|
3418
|
-
addGroupLabel?: string;
|
|
3419
|
-
/** @deprecated use `labels.addAction` */
|
|
3420
|
-
addActionLabel?: string;
|
|
3421
|
-
labels?: Partial<RuleBuilderLabels>;
|
|
3422
|
-
}
|
|
3423
|
-
/** Declarative controlled when-conditions-to-actions editor with bounded nesting. */
|
|
3424
|
-
declare function RuleBuilder({ value, onChange, fields, operators, actions, maxDepth, readOnly, validate, className, addConditionLabel, addGroupLabel, addActionLabel, labels: labelOverrides, }: RuleBuilderProps): react.JSX.Element;
|
|
3425
|
-
|
|
3426
4639
|
interface BuilderCanvasItem {
|
|
3427
4640
|
id: string;
|
|
3428
4641
|
type: string;
|
|
@@ -4043,4 +5256,4 @@ declare function hsvToHex(value: HsvColor): string;
|
|
|
4043
5256
|
declare function contrastRatio(background: string, foreground: string): number | undefined;
|
|
4044
5257
|
declare function meetsContrast(background: string, foreground: string, minimum?: number): boolean;
|
|
4045
5258
|
|
|
4046
|
-
export { type AccessStateProps, Alert, type AlertProps, type AlertTone, AppShell, type AppShellProps, type AppliedBrandProfileSnapshot, type AsyncOperationState, AsyncOperationStatus, type AsyncOperationStatusProps, Attachment, type AttachmentLabels, AttachmentList, type AttachmentListProps, type AttachmentProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type BoundedRelationshipGraph, type BrandProfile, BrandProfileEditor, type BrandProfileEditorLabels, type BrandProfileEditorProps, type BrandProfileLogo, type BrandProfileTypography, BrandProfiles, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, BuilderCanvas, type BuilderCanvasItem, type BuilderCanvasLabels, type BuilderCanvasProps, type BuilderPaletteItem, BulkBar, type BulkBarProps, Button, ButtonGroup, type ButtonGroupProps, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, type CalendarDay, type CalendarWeekday, Card, CardLink, type CardLinkProps, type CardProps, CellStrong, CellSub, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, CollapsibleSection, type CollapsibleSectionProps, ColorPicker, type ColorPickerLabels, type ColorPickerProps, type ColumnFilter, Combobox, type ComboboxOption, type ComboboxProps, CommandGroup, type CommandGroupProps, CommandItem, type CommandItemProps, CommandPalette, type CommandPaletteProps, Comment, type CommentProps, Comments, type CommentsProps, Composer, ComposerBar, type ComposerBarProps, type ComposerProps, ConfirmDialog, type ConfirmDialogProps, ContentList, ContentListItem, type ContentListItemProps, type ContentListProps, CopyButton, type CopyButtonProps, DAY, DEFAULT_ATTACHMENT_LABELS, DEFAULT_BRAND_PROFILE_EDITOR_LABELS, DEFAULT_BUILDER_CANVAS_LABELS, DEFAULT_COLOR_PICKER_LABELS, DEFAULT_DATE_RANGE_PICKER_LABELS, DEFAULT_DIFF_VIEWER_LABELS, DEFAULT_ENTITY_PICKER_LABELS, DEFAULT_FILE_UPLOAD_LABELS, DEFAULT_FILTER_EDITOR_LABELS, DEFAULT_FILTER_SUMMARY_LABELS, DEFAULT_LIGHTBOX_LABELS, DEFAULT_MATCH_REVIEW_LABELS, DEFAULT_PAGINATION_LABELS, DEFAULT_RELATIONSHIP_GRAPH_LABELS, DEFAULT_RULE_BUILDER_LABELS, DEFAULT_SAVE_STATUS_LABELS, DEFAULT_SCHEDULING_CALENDAR_LABELS, DEFAULT_SCHEDULING_TIMELINE_LABELS, DEFAULT_STEP_STATE_LABELS, DateRangePicker, type DateRangePickerLabels, type DateRangePickerProps, type DateRangeValue, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListItem, type DescriptionListProps, DetailLayout, type DetailLayoutProps, DetailPage, type DetailPageLinkProps, type DetailPageMetric, type DetailPageProps, type DetailPageTab, type DiffEntry, type DiffKind, type DiffResolution, type DiffSummary, DiffViewer, type DiffViewerLabels, type DiffViewerProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, EntityPicker, type EntityPickerLabels, type EntityPickerProps, ErrorState, type ErrorStateProps, EventRow, type EventRowProps, ExpandToggle, type ExpandToggleProps, FeaturedRundown, FeaturedRundownItem, type FeaturedRundownItemProps, type FeaturedRundownProps, FeaturedStage, type FeaturedStageProps, Field, type FieldProps, type FileRejection, type FileRejectionReason, FileUpload, type FileUploadItem, type FileUploadLabels, type FileUploadProps, type FileUploadStatus, type FilterChoice, FilterEditor, type FilterEditorLabels, type FilterEditorProps, type FilterField, type FilterKind, type FilterOp, type FilterOption, FilterPopover, type FilterPopoverProps, type FilterSummaryLabels, type FilterValue, type FilterValueKind, FilteredEmptyState, type FlatNode, Flow, FlowNode, type FlowNodeProps, type FlowNodeState, type FlowProps, type FlowVariant, type FoldedText, ForbiddenState, HOUR, Highlighted, type HighlightedProps, type HsvColor, Inbox, InboxDetail, type InboxDetailProps, InboxItem, type InboxItemProps, InboxList, type InboxListProps, type InboxProps, InfoTip, type InfoTipProps, Input, InputGroup, type InputGroupProps, type InputProps, type JsonPrimitive, type JsonValue, Kanban, KanbanCard, type KanbanCardProps, KanbanColumn, type KanbanColumnProps, type KanbanMoveDirection, type KanbanProps, Kbd, KbdCombo, type KbdComboProps, type KbdPlatform, type KbdProps, Label, type LabelProps, type LayeredColumn, type LayeredEdgeClassification, type LayeredEdgeKind, type LayeredItem, type LayeredLayout, type LayeredLayoutOptions, type LayeredNavigationKey, LicensePositionBar, type LicensePositionBarProps, Lightbox, type LightboxItem, type LightboxLabels, type LightboxProps, List, ListItem, type ListItemProps, type ListProps, LoadingState, type LoadingStateProps, Mark, type MarkProps, type MatchBulkResult, MatchReview, type MatchReviewAction, type MatchReviewCandidate, type MatchReviewField, type MatchReviewLabels, type MatchReviewProps, Menu, MenuGroup, type MenuGroupProps, MenuItem, type MenuItemProps, type MenuProps, MenuSeparator, Meter, type MeterProps, type MeterTone, MetricInput, type MetricInputProps, Modal, type ModalProps, NUMBER_FILTER_OPERATORS, type NavFavouriteItem, NavFavourites, type NavFavouritesLabels, type NavFavouritesProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, NewsLead, type NewsLeadProps, NotFoundState, Note, type NoteProps, type NoteTone, NoticeQueue, type NoticeQueueProps, type NumberFilterOperator, PageHeader, type PageHeaderProps, PageIntro, type PageIntroProps, Pagination, type PaginationLabels, type PaginationProps, Peek, type PeekProps, type PillTone, type PillTreatment, Pipeline, type PipelineProps, PipelineStage, type PipelineStageProps, type PipelineStageState, type PlacedSpan, Placement, Popconfirm, type PopconfirmProps, Popover, type PopoverProps, type PositionedRelationshipNode, type Primitive, Progress, type ProgressProps, PromptDialog, type PromptDialogProps, Prose, type ProseProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type RelatedLinkItem, RelatedLinks, type RelatedLinksProps, RelationshipGraph, type RelationshipGraphArrow, type RelationshipGraphCluster, type RelationshipGraphEdge, type RelationshipGraphLabels, type RelationshipGraphLegendItem, type RelationshipGraphNode, type RelationshipGraphProps, RelativeTime, type RelativeTimeFormatContext, type RelativeTimeProps, type RelativeTimeUnit, type RelativeTimeValue, ResourceGrid, type ResourceGridProps, type RgbColor, type RoutedEdge, type Row, RowAction, type RowActionProps, RowActions, type RowActionsProps, type RuleAction, type RuleActionDefinition, RuleBuilder, type RuleBuilderLabels, type RuleBuilderProps, type RuleCondition, type RuleDefinition, type RuleFieldDefinition, type RuleGroup, type RuleOperatorDefinition, type RuleValidationIssue, type RuleValueEditorProps, SaveStatus, type SaveStatusLabels, type SaveStatusProps, type SaveStatusState, type SavedViewItem, SavedViewMenu, type SavedViewMenuProps, type SavedViewSection, SchedulingCalendar, type SchedulingCalendarEntry, type SchedulingCalendarLabels, type SchedulingCalendarOverlay, type SchedulingCalendarProps, type SchedulingCalendarView, type SchedulingDatePart, type SchedulingEntryState, type SchedulingOverlayKind, SchedulingTimeline, type SchedulingTimelineItem, type SchedulingTimelineLabels, type SchedulingTimelineLane, type SchedulingTimelineMarker, type SchedulingTimelineOverlay, type SchedulingTimelineOverlayKind, type SchedulingTimelineProps, type SearchSegment, SearchSuggest, type SearchSuggestAction, type SearchSuggestOption, type SearchSuggestProps, SectionHead, type SectionHeadProps, type Segment, Segmented, SegmentedOption, type SegmentedOptionProps, type SegmentedProps, Select, type SelectAllState, type SelectProps, type ShellNav, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, Skeleton, type SkeletonProps, type SortDir, type SortDirection, type SortKey, Spinner, type SpinnerProps, StarButton, type StarButtonProps, Stat, StatLine, type StatLineItem, type StatLineProps, type StatProps, type StatTrend, type StateVariant, StatusPill, type StatusPillProps, StatusRow, type StatusRowProps, Step, type StepProps, type StepState, type StepStateLabels, Steps, type StepsProps, SubNavItem, type SubNavItemProps, type SummarizeFilterOptions, Switch, type SwitchProps, TEXT_FILTER_OPERATORS, TOAST_LEAVE_MS, Tab, TabPanel, type TabPanelProps, type TabProps, Table, type TableDensity, type TableProps, TableWrap, type TableWrapProps, Tabs, type TabsProps, Td, type TdProps, type TextFilterOperator, Textarea, type TextareaProps, Th, type ThProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineProps, type TimelineRange, type TimelineScale, type TimelineSpan, type TimelineTick, Toast, type ToastAction, type ToastApi, type ToastDismissReason, type ToastKind, type ToastOptions, type ToastPromiseMessages, type ToastProps, type ToastRecord, type ToastStore, type ToastTone, Toaster, type ToasterProps, ToggleRow, type ToggleRowProps, Tooltip, type TooltipProps, Tr, type TrProps, Tree, type TreeLike, type TreeNavAction, type TreeNodeData, type TreeNodeProps, type TreeProps, type UixLabels, UixLabelsProvider, type UixLabelsProviderProps, type UixLinkProps, type UixRenderLink, type UndoableToastOptions, type UseAnchoredPositionOptions, type UseTableOptions, type UseTableResult, type UseVirtualRowsOptions, type UseVirtualRowsResult, UserChip, type UserChipProps, ViewMenu, type ViewMenuColumn, type ViewMenuColumnLabels, type ViewMenuProps, type ViewState, type VirtualWindow, type ZonedDateSpan, addCalendarDays, addCalendarMonths, appendRuleNode, applyBrandProfile, applyFilters, boundRelationshipGraph, buildMonthGrid, buildThreeWayDiff, clampMetricValue, clampWidth, classifyLayeredEdges, clusterIdFor, contrastRatio, createToastApi, createToastStore, cx, defaultTimelineStep, emptyFilterValue, enumerateDateSpan, fileKind, fileMatchesAccept, filterComboboxOptions, findRuleNodeDepth, flattenTree, foldForSearch, formatFileSize, hexToRgb, highlightSegments, hsvToHex, hsvToRgb, isDateInRange, isDateUnavailable, isFilterEmpty, isRuleGroup, layeredNeighbor, layoutLane, layoutLayeredGraph, layoutRelationshipGraph, mapRuleGroup, matchFilter, meetsContrast, mergePinned, moveRuleNode, multiSort, nextSortDir, normalizeHex, parseDateValue, parseMetricValue, parseView, partitionFiles, pixelsToMs, placeSpan, relationshipNeighbors, relativeTimeValue, removeRuleNode, renderPlainLink, reorder, restoreBrandProfile, rgbToHex, rgbToHsv, ruleDepth, searchRows, searchSegments, selectAllState, selectRangeDate, serializeView, shiftSpan, shouldVirtualize, snapToStep, startOfMonth, stepMetricValue, summarizeDiff, summarizeFilter, summarizeRule, timelineTicks, toDateKey, toast, toggleId, togglePage, toggleSort, traverseRelationshipNode, treeNav, useAnchoredPosition, useDialog, useTable, useUixLabels, useVirtualRows, validateRuleDefinition, virtualWindow, wrapEdgeLabel, zonedDateKey, zonedDateSpan };
|
|
5259
|
+
export { type AccessStateProps, Alert, type AlertProps, type AlertTone, AppShell, type AppShellProps, type AppliedBrandProfileSnapshot, type AsyncOperationState, AsyncOperationStatus, type AsyncOperationStatusProps, Attachment, type AttachmentLabels, AttachmentList, type AttachmentListProps, type AttachmentProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type BoundedRelationshipGraph, type BrandProfile, BrandProfileEditor, type BrandProfileEditorLabels, type BrandProfileEditorProps, type BrandProfileLogo, type BrandProfileTypography, BrandProfiles, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, BuilderCanvas, type BuilderCanvasItem, type BuilderCanvasLabels, type BuilderCanvasProps, type BuilderPaletteItem, BulkBar, type BulkBarProps, Button, ButtonGroup, type ButtonGroupProps, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, type CalendarDay, type CalendarWeekday, Card, CardLink, type CardLinkProps, type CardProps, CellStrong, CellSub, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, CollapsibleSection, type CollapsibleSectionProps, ColorPicker, type ColorPickerLabels, type ColorPickerProps, type ColumnFilter, Combobox, type ComboboxOption, type ComboboxProps, CommandGroup, type CommandGroupProps, CommandItem, type CommandItemProps, CommandPalette, type CommandPaletteProps, Comment, type CommentProps, Comments, type CommentsProps, Composer, ComposerBar, type ComposerBarProps, type ComposerProps, ConfirmDialog, type ConfirmDialogProps, ContentList, ContentListItem, type ContentListItemProps, type ContentListProps, CopyButton, type CopyButtonProps, DAY, DEFAULT_ATTACHMENT_LABELS, DEFAULT_BRAND_PROFILE_EDITOR_LABELS, DEFAULT_BUILDER_CANVAS_LABELS, DEFAULT_COLOR_PICKER_LABELS, DEFAULT_DATE_RANGE_PICKER_LABELS, DEFAULT_DIFF_VIEWER_LABELS, DEFAULT_ENTITY_PICKER_LABELS, DEFAULT_FILE_UPLOAD_LABELS, DEFAULT_FILTER_EDITOR_LABELS, DEFAULT_FILTER_SUMMARY_LABELS, DEFAULT_LIGHTBOX_LABELS, DEFAULT_MATCH_REVIEW_LABELS, DEFAULT_PAGINATION_LABELS, DEFAULT_RELATIONSHIP_GRAPH_LABELS, DEFAULT_RULE_BUILDER_LABELS, DEFAULT_RULE_SUMMARY_WORDS, DEFAULT_RULE_VALIDATION_MESSAGES, DEFAULT_SAVE_STATUS_LABELS, DEFAULT_SCHEDULING_CALENDAR_LABELS, DEFAULT_SCHEDULING_TIMELINE_LABELS, DEFAULT_STEP_STATE_LABELS, DEFAULT_TEXT_DIFF_LABELS, DashboardGrid, type DashboardGridBreakpoint, type DashboardGridColumnCount, type DashboardGridColumns, type DashboardGridGap, DashboardGridItem, type DashboardGridItemProps, type DashboardGridProps, type DashboardGridSpan, DateRangePicker, type DateRangePickerLabels, type DateRangePickerProps, type DateRangeValue, type DaySpanLayout, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListItem, type DescriptionListProps, DetailLayout, type DetailLayoutProps, DetailPage, type DetailPageLinkProps, type DetailPageMetric, type DetailPageProps, type DetailPageTab, type DiffEntry, type DiffKind, type DiffResolution, type DiffSummary, DiffViewer, type DiffViewerLabels, type DiffViewerProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, EntityPicker, type EntityPickerLabels, type EntityPickerProps, ErrorState, type ErrorStateProps, EventRow, type EventRowProps, ExpandToggle, type ExpandToggleProps, FeaturedRundown, FeaturedRundownItem, type FeaturedRundownItemProps, type FeaturedRundownProps, FeaturedStage, type FeaturedStageProps, Field, type FieldProps, type FileRejection, type FileRejectionReason, type FileSizeFormatter, type FileSizeOptions, FileUpload, type FileUploadItem, type FileUploadLabels, type FileUploadProps, type FileUploadStatus, type FilterChoice, FilterEditor, type FilterEditorLabels, type FilterEditorProps, type FilterField, type FilterKind, type FilterOp, type FilterOption, FilterPopover, type FilterPopoverProps, type FilterPreset, type FilterSummaryLabels, type FilterValue, type FilterValueKind, FilteredEmptyState, type FlatNode, Flow, FlowNode, type FlowNodeProps, type FlowNodeState, type FlowProps, type FlowVariant, type FoldedText, ForbiddenState, HOUR, Heartbeat, type HeartbeatProps, type HeartbeatState, Highlighted, type HighlightedProps, type HsvColor, Inbox, InboxDetail, type InboxDetailProps, InboxItem, type InboxItemProps, InboxList, type InboxListProps, type InboxProps, InfoTip, type InfoTipProps, Input, InputGroup, type InputGroupProps, type InputProps, type JsonPrimitive, type JsonValue, Kanban, KanbanCard, type KanbanCardProps, KanbanColumn, type KanbanColumnProps, type KanbanMoveDirection, type KanbanProps, Kbd, KbdCombo, type KbdComboProps, type KbdPlatform, type KbdProps, Label, type LabelProps, type LaneCluster, type LaneInterval, type LanePlacement, type LayeredColumn, type LayeredEdgeClassification, type LayeredEdgeKind, type LayeredItem, type LayeredLayout, type LayeredLayoutOptions, type LayeredNavigationKey, type LayoutMonthSpansOptions, LicensePositionBar, type LicensePositionBarProps, Lightbox, type LightboxItem, type LightboxLabels, type LightboxProps, List, ListItem, type ListItemProps, type ListProps, LiveIndicator, type LiveIndicatorProps, LoadingState, type LoadingStateProps, Mark, type MarkProps, type MatchBulkResult, MatchReview, type MatchReviewAction, type MatchReviewCandidate, type MatchReviewField, type MatchReviewLabels, type MatchReviewProps, Menu, MenuGroup, type MenuGroupProps, MenuItem, type MenuItemAttributes, MenuItemCheckbox, type MenuItemCheckboxProps, type MenuItemProps, MenuItemRadio, type MenuItemRadioProps, type MenuProps, MenuRadioGroup, type MenuRadioGroupProps, MenuSeparator, Meter, type MeterProps, type MeterTone, MetricInput, type MetricInputProps, Modal, type ModalProps, type MonthSpanGroup, type MonthSpanInput, type MonthSpanLayout, type MoveProposal, NUMBER_FILTER_OPERATORS, type NavFavouriteItem, NavFavourites, type NavFavouritesLabels, type NavFavouritesProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, NewsLead, type NewsLeadProps, NotFoundState, Note, type NoteProps, type NoteTone, NoticeQueue, type NoticeQueueProps, type NumberFilterOperator, type PackLanesOptions, type PackedLanes, PageHeader, type PageHeaderProps, PageIntro, type PageIntroProps, Pagination, type PaginationLabels, type PaginationProps, Peek, type PeekProps, type PillSize, type PillTone, type PillTreatment, Pipeline, type PipelineProps, PipelineStage, type PipelineStageProps, type PipelineStageState, type PlacedDaySpan, type PlacedMonthSpan, type PlacedSpan, Placement, Popconfirm, type PopconfirmProps, Popover, type PopoverProps, type PositionedRelationshipNode, type Primitive, Progress, type ProgressProps, PromptDialog, type PromptDialogProps, Prose, type ProseProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type RelatedLinkItem, RelatedLinks, type RelatedLinksProps, RelationshipGraph, type RelationshipGraphArrow, type RelationshipGraphCluster, type RelationshipGraphEdge, type RelationshipGraphLabels, type RelationshipGraphLegendItem, type RelationshipGraphNode, type RelationshipGraphProps, RelativeTime, type RelativeTimeFormatContext, type RelativeTimeProps, type RelativeTimeUnit, type RelativeTimeValue, ResourceGrid, type ResourceGridProps, type RgbColor, type RoutedEdge, type Row, RowAction, type RowActionProps, RowActions, type RowActionsProps, type RuleAction, type RuleActionDefinition, RuleBuilder, type RuleBuilderLabels, type RuleBuilderProps, type RuleCheck, type RuleCondition, type RuleDefinition, type RuleFieldDefinition, type RuleGroup, type RuleOperatorDefinition, type RuleSummaryWords, type RuleValidationIssue, type RuleValidationOptions, type RuleValueEditorProps, SaveStatus, type SaveStatusLabels, type SaveStatusProps, type SaveStatusState, type SavedViewItem, SavedViewMenu, type SavedViewMenuProps, type SavedViewSection, type SchedulingBand, SchedulingCalendar, type SchedulingCalendarDay, type SchedulingCalendarEntry, type SchedulingCalendarLabels, type SchedulingCalendarOverlay, type SchedulingCalendarProps, type SchedulingCalendarView, type SchedulingDatePart, type SchedulingEntryState, type SchedulingLegendItem, type SchedulingMarker, type SchedulingMarkerEmphasis, type SchedulingOverlayKind, type SchedulingOverlayPattern, type SchedulingStatus, SchedulingTimeline, type SchedulingTimelineItem, type SchedulingTimelineLabels, type SchedulingTimelineLane, type SchedulingTimelineMarker, type SchedulingTimelineOverlay, type SchedulingTimelineOverlayKind, type SchedulingTimelineProps, type SearchSegment, SearchSuggest, type SearchSuggestAction, type SearchSuggestOption, type SearchSuggestProps, SectionHead, type SectionHeadProps, type Segment, Segmented, SegmentedOption, type SegmentedOptionProps, type SegmentedProps, Select, type SelectAllState, type SelectGroup, type SelectLabels, type SelectOption, type SelectProps, type ShellNav, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, Skeleton, type SkeletonProps, type SortDir, type SortDirection, type SortKey, Spinner, type SpinnerProps, StarButton, type StarButtonProps, Stat, StatLine, type StatLineItem, type StatLineProps, type StatProps, type StatTrend, type StateVariant, StatusPill, type StatusPillProps, StatusRow, type StatusRowProps, Step, type StepProps, type StepState, type StepStateLabels, Steps, type StepsProps, SubNavItem, type SubNavItemProps, type SummarizeFilterOptions, Switch, type SwitchProps, TEXT_FILTER_OPERATORS, TOAST_LEAVE_MS, TOP_LANE_CROSS_MIDNIGHT_MINUTES, Tab, TabPanel, type TabPanelProps, type TabProps, Table, type TableDensity, type TableProps, TableWrap, type TableWrapProps, Tabs, type TabsProps, Td, type TdProps, TextDiff, type TextDiffGranularity, type TextDiffLabels, type TextDiffLine, type TextDiffOp, type TextDiffOptions, type TextDiffProps, type TextDiffResult, type TextDiffRow, type TextDiffSegment, type TextFilterOperator, Textarea, type TextareaProps, Th, type ThProps, type TimeGridDayLayout, type TimeGridEntryContext, type TimeGridEntryInput, type TimeGridPart, type TimeGridSegment, Timeline, TimelineItem, type TimelineItemProps, type TimelineProps, type TimelineRange, type TimelineScale, type TimelineSpan, type TimelineTick, Toast, type ToastAction, type ToastApi, type ToastDismissReason, type ToastKind, type ToastOptions, type ToastPromiseMessages, type ToastProps, type ToastRecord, type ToastStore, type ToastTone, Toaster, type ToasterProps, ToggleRow, type ToggleRowProps, Tooltip, type TooltipProps, Tr, type TrProps, Tree, type TreeLike, type TreeNavAction, type TreeNodeData, type TreeNodeProps, type TreeProps, type UixLabels, UixLabelsProvider, type UixLabelsProviderProps, type UixLinkProps, type UixRenderLink, type UndoableToastOptions, type UseAnchoredPositionOptions, type UseTableOptions, type UseTableResult, type UseVirtualRowsOptions, type UseVirtualRowsResult, UserChip, type UserChipProps, ViewMenu, type ViewMenuColumn, type ViewMenuColumnLabels, type ViewMenuProps, type ViewState, type VirtualWindow, type ZonedDateSpan, type ZonedDayBounds, type ZonedDayShift, type ZonedDaySpan, type ZonedHourSlot, addCalendarDays, addCalendarMonths, addZonedDays, appendRuleNode, applyBrandProfile, applyFilters, boundRelationshipGraph, buildMonthGrid, buildThreeWayDiff, cachedDateTimeFormat, clampMetricValue, clampWidth, classifyLayeredEdges, clusterIdFor, contrastRatio, createToastApi, createToastStore, cx, dashboardGridClassName, dashboardGridItemClassName, defaultTimelineStep, diffText, diffTokens, emptyFilterValue, enumerateDateKeys, enumerateDateSpan, fileKind, fileMatchesAccept, filterComboboxOptions, findRuleNodeDepth, flattenTree, foldForSearch, formatFileSize, hexToRgb, highlightSegments, hsvToHex, hsvToRgb, isDateInRange, isDateUnavailable, isFilterEmpty, isRuleGroup, itemDaySpan, layeredNeighbor, layoutDaySpans, layoutLane, layoutLayeredGraph, layoutMonthSpans, layoutRelationshipGraph, layoutTimeGridDay, mapRuleGroup, matchFilter, matchFilterPreset, meetsContrast, mergePinned, moveRuleNode, multiSort, nextSortDir, normalizeHex, packLanes, parseDateValue, parseMetricValue, parseView, partitionFiles, pixelsToMs, placeSpan, placesInTopLane, proposeMove, rankOverflow, relationshipNeighbors, relativeTimeValue, removeRuleNode, renderPlainLink, reorder, restoreBrandProfile, rgbToHex, rgbToHsv, ruleDepth, schedulingGridDays, searchRows, searchSegments, selectAllState, selectRangeDate, serializeView, setRuleCombinator, shiftSpan, shouldVirtualize, snapToStep, startOfMonth, stepMetricValue, summarizeDiff, summarizeFilter, summarizeRule, textDiffRows, timelineTicks, toDateKey, toast, toggleId, togglePage, toggleSort, tokenizeText, traverseRelationshipNode, treeNav, useAnchoredPosition, useDialog, useTable, useUixLabels, useVirtualRows, validateRuleDefinition, virtualWindow, wrapEdgeLabel, zonedDateKey, zonedDateSpan, zonedDayBounds, zonedDaySpan, zonedHourSlots, zonedTimeOfDay };
|