@tensor_1/react 2.30.0 → 2.32.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 +430 -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 +58 -0
- package/dist/components/Attachment.js +69 -0
- 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/EntityPicker.d.ts +56 -0
- package/dist/components/EntityPicker.js +168 -0
- package/dist/components/FileIcon.d.ts +9 -0
- package/dist/components/FileIcon.js +17 -0
- package/dist/components/FileUpload.d.ts +95 -0
- package/dist/components/FileUpload.js +145 -0
- package/dist/components/FilterEditor.d.ts +55 -0
- package/dist/components/FilterEditor.js +186 -0
- package/dist/components/Heartbeat.d.ts +31 -0
- package/dist/components/Heartbeat.js +28 -0
- package/dist/components/Lightbox.d.ts +45 -0
- package/dist/components/Lightbox.js +102 -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 +142 -11
- package/dist/components/SchedulingCalendar.js +234 -57
- package/dist/components/SchedulingTimeline.d.ts +1 -0
- package/dist/components/SearchSuggest.d.ts +6 -2
- package/dist/components/SearchSuggest.js +4 -0
- 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 +56 -0
- package/dist/file-model.js +52 -0
- package/dist/filter-model.d.ts +112 -0
- package/dist/filter-model.js +103 -0
- 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 +4938 -1631
- package/dist/index.d.cts +1622 -178
- package/dist/index.d.ts +20 -6
- package/dist/index.js +88 -4
- package/dist/labels-context.d.ts +28 -0
- 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 +66 -0
- package/dist/scheduling-calendar-model.js +82 -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,9 +508,90 @@ declare function isDateUnavailable(date: string, options: {
|
|
|
323
508
|
isDisabled?: (date: string) => boolean;
|
|
324
509
|
}): boolean;
|
|
325
510
|
|
|
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
|
+
|
|
326
574
|
type SchedulingCalendarView = 'month' | 'week' | 'agenda';
|
|
575
|
+
/**
|
|
576
|
+
* @deprecated Use `band`, `status` and `markers` on the entry: they carry no product
|
|
577
|
+
* vocabulary and the consumer supplies every word. The values keep working in 2.x.
|
|
578
|
+
*/
|
|
327
579
|
type SchedulingEntryState = 'scheduled' | 'conflicted' | 'in-progress' | 'blackout-violation';
|
|
580
|
+
/** @deprecated Use `pattern` and `kindLabel` on the overlay. The values keep working in 2.x. */
|
|
328
581
|
type SchedulingOverlayKind = 'maintenance' | 'blackout';
|
|
582
|
+
/**
|
|
583
|
+
* The one dimension that takes a hue. `none` and `low` are untinted, `medium` gets a
|
|
584
|
+
* heavier edge, and only `high` is filled. The consumer decides what a band means.
|
|
585
|
+
*/
|
|
586
|
+
type SchedulingBand = 'none' | 'low' | 'medium' | 'high';
|
|
587
|
+
/**
|
|
588
|
+
* The state channel, drawn without hue: `tentative` is dashed, `committed` is the plain
|
|
589
|
+
* item, `live` carries a leading dot, `done` is dimmed and `dead` is struck through.
|
|
590
|
+
*/
|
|
591
|
+
type SchedulingStatus = 'tentative' | 'committed' | 'live' | 'done' | 'dead';
|
|
592
|
+
type SchedulingMarkerEmphasis = 'refused' | 'warning' | 'neutral';
|
|
593
|
+
/** How a window is hatched. Windows are neutral: the pattern and the visible label tell them apart. */
|
|
594
|
+
type SchedulingOverlayPattern = 'diagonal' | 'cross' | 'dotted' | 'solid';
|
|
329
595
|
/**
|
|
330
596
|
* Which date text a `formatDate` call is for (TENSOR B1/C9, HAR-1347):
|
|
331
597
|
* `day` names one day (each day cell's accessible name, the week-range title);
|
|
@@ -333,20 +599,66 @@ type SchedulingOverlayKind = 'maintenance' | 'blackout';
|
|
|
333
599
|
* `month` is the month-view title (the date is the first of the month).
|
|
334
600
|
*/
|
|
335
601
|
type SchedulingDatePart = 'day' | 'weekday' | 'month';
|
|
602
|
+
/** A shape or icon with text. The text is always in the accessible name; a marker never relies on colour. */
|
|
603
|
+
interface SchedulingMarker {
|
|
604
|
+
id: string;
|
|
605
|
+
/** An icon from `@tensor_1/react/icons`. Without one the marker draws a shape for its `emphasis`. */
|
|
606
|
+
icon?: ReactNode;
|
|
607
|
+
label: string;
|
|
608
|
+
emphasis?: SchedulingMarkerEmphasis;
|
|
609
|
+
}
|
|
336
610
|
interface SchedulingCalendarEntry {
|
|
337
611
|
id: string;
|
|
338
612
|
title: string;
|
|
339
613
|
start: string;
|
|
340
614
|
end: string;
|
|
615
|
+
/** @deprecated Use `band`, `status` and `markers`. */
|
|
341
616
|
state?: SchedulingEntryState;
|
|
342
617
|
meta?: string;
|
|
618
|
+
band?: SchedulingBand;
|
|
619
|
+
status?: SchedulingStatus;
|
|
620
|
+
markers?: SchedulingMarker[];
|
|
621
|
+
/** The complete accessible name, built by the consumer from its own words. Replaces `labels.entry`. */
|
|
622
|
+
accessibleName?: string;
|
|
343
623
|
}
|
|
344
624
|
interface SchedulingCalendarOverlay {
|
|
345
625
|
id: string;
|
|
626
|
+
/** The window's name, shown as text. */
|
|
346
627
|
label: string;
|
|
347
628
|
start: string;
|
|
348
629
|
end: string;
|
|
349
|
-
|
|
630
|
+
/** @deprecated Use `pattern` and `kindLabel`. */
|
|
631
|
+
kind?: SchedulingOverlayKind;
|
|
632
|
+
/** Defaults to `'solid'`. */
|
|
633
|
+
pattern?: SchedulingOverlayPattern;
|
|
634
|
+
/** What kind of window this is, in the consumer's words. Shown before the name. */
|
|
635
|
+
kindLabel?: string;
|
|
636
|
+
/** What the window applies to. Shown after the name. */
|
|
637
|
+
scopeLabel?: string;
|
|
638
|
+
/** The window applies to everything. A window that is not global never gets the global treatment. */
|
|
639
|
+
global?: boolean;
|
|
640
|
+
/** The complete accessible name. Replaces `labels.overlay`. */
|
|
641
|
+
accessibleName?: string;
|
|
642
|
+
}
|
|
643
|
+
/** What the consumer knows about one day (`YYYY-MM-DD`). The calendar shows these numbers and never derives them. */
|
|
644
|
+
interface SchedulingCalendarDay {
|
|
645
|
+
/** Every item on the day, shown in the cell even when no chip fits. */
|
|
646
|
+
count: number;
|
|
647
|
+
/** The "+N" of the cell. 0 shows none. */
|
|
648
|
+
overflowCount: number;
|
|
649
|
+
/** The accessible text of the count, e.g. "7 items, 2 need review". */
|
|
650
|
+
label?: string;
|
|
651
|
+
markers?: SchedulingMarker[];
|
|
652
|
+
}
|
|
653
|
+
interface SchedulingLegendItem {
|
|
654
|
+
id: string;
|
|
655
|
+
label: string;
|
|
656
|
+
swatch: {
|
|
657
|
+
band?: SchedulingBand;
|
|
658
|
+
status?: SchedulingStatus;
|
|
659
|
+
pattern?: SchedulingOverlayPattern;
|
|
660
|
+
icon?: ReactNode;
|
|
661
|
+
};
|
|
350
662
|
}
|
|
351
663
|
/**
|
|
352
664
|
* Every word the calendar renders (TENSOR RX-125, UIX-12). `{timeZone}`, `{view}`,
|
|
@@ -354,8 +666,15 @@ interface SchedulingCalendarOverlay {
|
|
|
354
666
|
*/
|
|
355
667
|
interface SchedulingCalendarLabels {
|
|
356
668
|
region: string;
|
|
669
|
+
/** @deprecated Use `previousMonth` and `previousWeek`. Still used when those are not set. */
|
|
357
670
|
previous: string;
|
|
671
|
+
/** @deprecated Use `nextMonth` and `nextWeek`. Still used when those are not set. */
|
|
358
672
|
next: string;
|
|
673
|
+
previousMonth?: string;
|
|
674
|
+
nextMonth?: string;
|
|
675
|
+
/** Also names the agenda's step, which moves by a week. */
|
|
676
|
+
previousWeek?: string;
|
|
677
|
+
nextWeek?: string;
|
|
359
678
|
viewGroup: string;
|
|
360
679
|
viewMonth: string;
|
|
361
680
|
viewWeek: string;
|
|
@@ -365,7 +684,10 @@ interface SchedulingCalendarLabels {
|
|
|
365
684
|
agenda: string;
|
|
366
685
|
agendaEmpty: string;
|
|
367
686
|
grid: string;
|
|
687
|
+
/** An entry's accessible name unless it sets `accessibleName`. Its marker labels are appended. */
|
|
368
688
|
entry: string;
|
|
689
|
+
/** A window's accessible name unless it sets `accessibleName`. `{title}` is its kind, name and scope. */
|
|
690
|
+
overlay?: string;
|
|
369
691
|
legend: string;
|
|
370
692
|
/** The "+N more" toggle on a day with more entries than `maxEntriesPerDay`. `{count}` placeholder. */
|
|
371
693
|
moreEntries: string;
|
|
@@ -373,19 +695,36 @@ interface SchedulingCalendarLabels {
|
|
|
373
695
|
moreEntriesLabel: string;
|
|
374
696
|
/** The toggle once the day is expanded in place. */
|
|
375
697
|
fewerEntries: string;
|
|
698
|
+
/** The "+N" at the end of a week row whose spans did not all get a lane. `{count}` placeholder. */
|
|
699
|
+
moreSpans?: string;
|
|
700
|
+
/** Accessible name of that control. `{count}` and `{date}` (the first day with a hidden span). */
|
|
701
|
+
moreSpansLabel?: string;
|
|
702
|
+
/** The accessible text of a day's count when `days[date].label` is not given. `{count}` placeholder. */
|
|
703
|
+
dayCount?: string;
|
|
376
704
|
states: Record<SchedulingEntryState, string>;
|
|
705
|
+
/** The words for `status`, used in the default accessible name and the agenda. */
|
|
706
|
+
statuses?: Partial<Record<SchedulingStatus, string>>;
|
|
377
707
|
}
|
|
378
708
|
declare const DEFAULT_SCHEDULING_CALENDAR_LABELS: SchedulingCalendarLabels;
|
|
379
709
|
interface SchedulingCalendarProps {
|
|
710
|
+
/**
|
|
711
|
+
* The entries. Without `dayEntries` the calendar places each on its day in the order
|
|
712
|
+
* given; with `dayEntries` only the entries that cover more than one day are read from
|
|
713
|
+
* here (they are drawn as spans).
|
|
714
|
+
*/
|
|
380
715
|
entries: SchedulingCalendarEntry[];
|
|
381
716
|
anchorDate: string;
|
|
382
717
|
timeZone: string;
|
|
383
718
|
view?: SchedulingCalendarView;
|
|
384
719
|
onViewChange?: (view: SchedulingCalendarView) => void;
|
|
385
720
|
onAnchorDateChange?: (date: string) => void;
|
|
721
|
+
/** Called by a click or Enter on a chip, a span or an agenda row. */
|
|
386
722
|
onSelectEntry?: (entry: SchedulingCalendarEntry) => void;
|
|
387
723
|
overlays?: SchedulingCalendarOverlay[];
|
|
724
|
+
/** Called by a click or Enter on a window span. */
|
|
725
|
+
onSelectOverlay?: (overlay: SchedulingCalendarOverlay) => void;
|
|
388
726
|
filter?: (entry: SchedulingCalendarEntry) => boolean;
|
|
727
|
+
/** Replaces a chip's content. The default is the start time in `timeZone` (24 h) and the title. */
|
|
389
728
|
renderEntry?: (entry: SchedulingCalendarEntry) => ReactNode;
|
|
390
729
|
locale?: string;
|
|
391
730
|
/** First column of the month and week grids: 0 = Sunday … 6 = Saturday. Defaults to 1 (Monday). */
|
|
@@ -396,20 +735,23 @@ interface SchedulingCalendarProps {
|
|
|
396
735
|
*/
|
|
397
736
|
formatDate?: (date: string, part: SchedulingDatePart) => string;
|
|
398
737
|
/**
|
|
399
|
-
* Formats
|
|
400
|
-
* The component does not shift it: render it in `timeZone` yourself. Defaults to
|
|
401
|
-
*
|
|
738
|
+
* Formats a start or end instant (ISO 8601) for the agenda and the accessible names.
|
|
739
|
+
* The component does not shift it: render it in `timeZone` yourself. Defaults to the
|
|
740
|
+
* `day` date text followed by the 24-hour time in `timeZone`.
|
|
402
741
|
*/
|
|
403
742
|
formatInstant?: (instant: string) => string;
|
|
404
743
|
/**
|
|
405
|
-
*
|
|
406
|
-
*
|
|
744
|
+
* How many chips a day shows. Without `dayEntries` the rest collapse behind "+N more";
|
|
745
|
+
* with `dayEntries` it only sizes the cell (the consumer already cut the list, and a longer
|
|
746
|
+
* list makes the cells taller, never clipped). Unset shows every entry where the cells
|
|
747
|
+
* grow, and sizes a fixed cell for three chips.
|
|
407
748
|
*/
|
|
408
749
|
maxEntriesPerDay?: number;
|
|
409
750
|
/**
|
|
410
|
-
* Called by
|
|
411
|
-
*
|
|
412
|
-
*
|
|
751
|
+
* Called by a day's "+N more" and by a week row's "+N" with the day (and, without
|
|
752
|
+
* `dayEntries`, every entry on it). When set, the consumer shows them (a popover, a
|
|
753
|
+
* drawer, the day view) and the day stays collapsed. Required with `days` or `dayEntries`:
|
|
754
|
+
* a controlled day never expands in place.
|
|
413
755
|
*/
|
|
414
756
|
onShowMore?: (date: string, entries: SchedulingCalendarEntry[]) => void;
|
|
415
757
|
/**
|
|
@@ -419,6 +761,42 @@ interface SchedulingCalendarProps {
|
|
|
419
761
|
* to the number). Return null for no badge.
|
|
420
762
|
*/
|
|
421
763
|
renderDayBadge?: (date: string, entries: SchedulingCalendarEntry[]) => ReactNode;
|
|
764
|
+
/**
|
|
765
|
+
* Consumer-owned numbers per day (`YYYY-MM-DD`). When set, each listed day shows its
|
|
766
|
+
* `count` and markers even with no chip, and its "+N" is `overflowCount`, never a number
|
|
767
|
+
* derived from the entries given. Without `dayEntries` the chips are still this day's
|
|
768
|
+
* `entries`, cut to `maxEntriesPerDay`; the day never expands in place.
|
|
769
|
+
*/
|
|
770
|
+
days?: Record<string, SchedulingCalendarDay>;
|
|
771
|
+
/**
|
|
772
|
+
* The single-day chips of each day, already ranked and cut by the consumer. When set, the
|
|
773
|
+
* calendar renders exactly these in the order given: it does not place, rank, cut or count.
|
|
774
|
+
*/
|
|
775
|
+
dayEntries?: Record<string, SchedulingCalendarEntry[]>;
|
|
776
|
+
/**
|
|
777
|
+
* The result of `layoutMonthSpans` for this grid. When set, the calendar draws exactly
|
|
778
|
+
* these spans and never packs lanes itself. Compute it with `schedulingGridDays`.
|
|
779
|
+
*/
|
|
780
|
+
spanLayout?: MonthSpanLayout;
|
|
781
|
+
/**
|
|
782
|
+
* Lanes kept for windows above the chips. Windows never take a chip slot. Default 2 where
|
|
783
|
+
* the cells have a fixed height; where they grow with their content every window gets a lane.
|
|
784
|
+
*/
|
|
785
|
+
windowLaneCap?: number;
|
|
786
|
+
/** Lanes kept for entries that cover more than one day. Default as for `windowLaneCap`. */
|
|
787
|
+
spanLaneCap?: number;
|
|
788
|
+
/** When set, the legend is exactly these items (an empty list draws no legend). Unset keeps the built-in state legend. */
|
|
789
|
+
legend?: SchedulingLegendItem[];
|
|
790
|
+
/** A line under the legend, e.g. the display zone. */
|
|
791
|
+
legendCaption?: ReactNode;
|
|
792
|
+
/** `false` hides the previous/next buttons, the title and the view switch (the page has its own toolbar). */
|
|
793
|
+
showHeader?: boolean;
|
|
794
|
+
/** Shown above the grid, e.g. "Showing the first 2,000 items". */
|
|
795
|
+
notice?: ReactNode;
|
|
796
|
+
/** Shown inside the grid, below the day cells, when there is nothing to show. */
|
|
797
|
+
emptyNote?: ReactNode;
|
|
798
|
+
/** Called by a click or Enter on a day number. */
|
|
799
|
+
onSelectDate?: (date: string) => void;
|
|
422
800
|
loading?: boolean;
|
|
423
801
|
error?: string;
|
|
424
802
|
onRetry?: () => void;
|
|
@@ -426,7 +804,7 @@ interface SchedulingCalendarProps {
|
|
|
426
804
|
labels?: Partial<SchedulingCalendarLabels>;
|
|
427
805
|
}
|
|
428
806
|
/** 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;
|
|
807
|
+
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, loading, error, onRetry, className, labels: labelOverrides, }: SchedulingCalendarProps): react.JSX.Element;
|
|
430
808
|
|
|
431
809
|
/**
|
|
432
810
|
* Every word the picker renders or announces (TENSOR RX-125, UIX-13). `{start}` and
|
|
@@ -462,9 +840,15 @@ interface DateRangePickerProps {
|
|
|
462
840
|
className?: string;
|
|
463
841
|
/** Translatable words; English defaults in {@link DEFAULT_DATE_RANGE_PICKER_LABELS}. */
|
|
464
842
|
labels?: Partial<DateRangePickerLabels>;
|
|
843
|
+
/**
|
|
844
|
+
* The ISO date (`YYYY-MM-DD`) that gets the today ring and `aria-current="date"`.
|
|
845
|
+
* Defaults to the viewer's local date; pass it when rendering on a server (whose
|
|
846
|
+
* clock and zone may differ from the viewer's), or `null` for no today marker.
|
|
847
|
+
*/
|
|
848
|
+
today?: string | null;
|
|
465
849
|
}
|
|
466
850
|
/** 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;
|
|
851
|
+
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
852
|
|
|
469
853
|
/**
|
|
470
854
|
* Pure model for `SchedulingTimeline` (HAR-1364; TENSOR C8): ticks on a time axis, where a
|
|
@@ -638,6 +1022,735 @@ interface SchedulingTimelineProps {
|
|
|
638
1022
|
*/
|
|
639
1023
|
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
1024
|
|
|
1025
|
+
/**
|
|
1026
|
+
* Two-way text diff for `TextDiff` (HAR-1368). Pure. Myers' O(ND) diff on lines or words,
|
|
1027
|
+
* after trimming the common prefix and suffix. Past `maxEdits` the changed middle is shown as
|
|
1028
|
+
* one replacement instead of searching further, so a rewrite never stalls the page.
|
|
1029
|
+
*/
|
|
1030
|
+
type TextDiffGranularity = 'line' | 'word';
|
|
1031
|
+
interface TextDiffOp {
|
|
1032
|
+
type: 'equal' | 'insert' | 'delete';
|
|
1033
|
+
/** Lines (granularity `line`) or word, space and punctuation tokens (`word`). */
|
|
1034
|
+
tokens: string[];
|
|
1035
|
+
}
|
|
1036
|
+
interface TextDiffOptions {
|
|
1037
|
+
granularity?: TextDiffGranularity;
|
|
1038
|
+
/** More tokens than this on either side gives `status: 'too-large'`. Default 20 000. */
|
|
1039
|
+
maxTokens?: number;
|
|
1040
|
+
/** Edit budget for the search; beyond it the middle becomes one replacement. Default 2 000. */
|
|
1041
|
+
maxEdits?: number;
|
|
1042
|
+
}
|
|
1043
|
+
interface TextDiffResult {
|
|
1044
|
+
status: 'ok' | 'too-large';
|
|
1045
|
+
granularity: TextDiffGranularity;
|
|
1046
|
+
ops: TextDiffOp[];
|
|
1047
|
+
/** Lines, or words (not spaces or punctuation), added and removed. */
|
|
1048
|
+
added: number;
|
|
1049
|
+
removed: number;
|
|
1050
|
+
}
|
|
1051
|
+
/** Splits text into lines (without their `\r\n` / `\n`) or into word, space and punctuation tokens. */
|
|
1052
|
+
declare function tokenizeText(text: string, granularity: TextDiffGranularity): string[];
|
|
1053
|
+
/** Myers diff of two token lists. Tokens compare by string equality. */
|
|
1054
|
+
declare function diffTokens(a: readonly string[], b: readonly string[], maxEdits?: number): TextDiffOp[];
|
|
1055
|
+
/** Diffs two texts by line or by word, with added/removed counts. */
|
|
1056
|
+
declare function diffText(before: string, after: string, { granularity, maxTokens, maxEdits }?: TextDiffOptions): TextDiffResult;
|
|
1057
|
+
/** A run of text inside one line; `changed` marks the words that differ from the other side. */
|
|
1058
|
+
interface TextDiffSegment {
|
|
1059
|
+
text: string;
|
|
1060
|
+
changed: boolean;
|
|
1061
|
+
}
|
|
1062
|
+
interface TextDiffLine {
|
|
1063
|
+
/** 1-based line number on its side. */
|
|
1064
|
+
number: number;
|
|
1065
|
+
/** Word-level marks when the line was paired with a similar counterpart; otherwise one changed segment. */
|
|
1066
|
+
segments: TextDiffSegment[];
|
|
1067
|
+
}
|
|
1068
|
+
type TextDiffRow = {
|
|
1069
|
+
kind: 'equal';
|
|
1070
|
+
before: TextDiffLine;
|
|
1071
|
+
after: TextDiffLine;
|
|
1072
|
+
} | {
|
|
1073
|
+
kind: 'change';
|
|
1074
|
+
before: TextDiffLine;
|
|
1075
|
+
after: TextDiffLine;
|
|
1076
|
+
} | {
|
|
1077
|
+
kind: 'delete';
|
|
1078
|
+
before: TextDiffLine;
|
|
1079
|
+
} | {
|
|
1080
|
+
kind: 'insert';
|
|
1081
|
+
after: TextDiffLine;
|
|
1082
|
+
} | {
|
|
1083
|
+
kind: 'fold';
|
|
1084
|
+
count: number;
|
|
1085
|
+
rows: TextDiffRow[];
|
|
1086
|
+
};
|
|
1087
|
+
/**
|
|
1088
|
+
* Rows for a line diff: unchanged lines, removed/added lines, and changed lines paired side by
|
|
1089
|
+
* side with word marks. With `context`, unchanged runs longer than needed fold into one row.
|
|
1090
|
+
*/
|
|
1091
|
+
declare function textDiffRows(result: TextDiffResult, { context }?: {
|
|
1092
|
+
context?: number;
|
|
1093
|
+
}): TextDiffRow[];
|
|
1094
|
+
|
|
1095
|
+
interface TextDiffLabels {
|
|
1096
|
+
before: string;
|
|
1097
|
+
after: string;
|
|
1098
|
+
/** `{added}`, `{removed}`: lines or words, by granularity. */
|
|
1099
|
+
summary: string;
|
|
1100
|
+
noChanges: string;
|
|
1101
|
+
/** Read before removed text. */
|
|
1102
|
+
removed: string;
|
|
1103
|
+
/** Read before added text. */
|
|
1104
|
+
added: string;
|
|
1105
|
+
/** Fold button. `{count}`. */
|
|
1106
|
+
showUnchanged: string;
|
|
1107
|
+
tooLarge: string;
|
|
1108
|
+
}
|
|
1109
|
+
declare const DEFAULT_TEXT_DIFF_LABELS: TextDiffLabels;
|
|
1110
|
+
interface TextDiffProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
1111
|
+
before: string;
|
|
1112
|
+
after: string;
|
|
1113
|
+
/** Column heading for `before`, e.g. "Version 3". Defaults to `labels.before`. */
|
|
1114
|
+
beforeLabel?: ReactNode;
|
|
1115
|
+
afterLabel?: ReactNode;
|
|
1116
|
+
/** `line` (default) pairs changed lines and marks the words inside; `word` diffs prose as one flow. */
|
|
1117
|
+
granularity?: TextDiffGranularity;
|
|
1118
|
+
/** `split` (default) puts the versions side by side, stacking on narrow containers; `unified` interleaves them. */
|
|
1119
|
+
view?: 'split' | 'unified';
|
|
1120
|
+
/** Line diffs: unchanged lines kept around each change; longer runs fold behind a button. Default: show all. */
|
|
1121
|
+
context?: number;
|
|
1122
|
+
/** Names the diff for assistive technology, e.g. "Changes to the article body". */
|
|
1123
|
+
label?: string;
|
|
1124
|
+
/** Hide the added/removed summary. */
|
|
1125
|
+
hideSummary?: boolean;
|
|
1126
|
+
/** Passed to the model (`maxTokens`, `maxEdits`); see `diffText`. */
|
|
1127
|
+
maxTokens?: number;
|
|
1128
|
+
maxEdits?: number;
|
|
1129
|
+
labels?: Partial<TextDiffLabels>;
|
|
1130
|
+
}
|
|
1131
|
+
/**
|
|
1132
|
+
* A two-way diff of two texts (HAR-1368; TENSOR C11 knowledge version diff): by line with word
|
|
1133
|
+
* marks inside changed lines, or by word for prose; side by side or unified. Changes are `<del>` /
|
|
1134
|
+
* `<ins>` with a −/+ sign and a spoken "Removed"/"Added", never colour alone. `DiffViewer` stays
|
|
1135
|
+
* the three-way JSON configuration diff.
|
|
1136
|
+
*/
|
|
1137
|
+
declare function TextDiff({ before, after, beforeLabel, afterLabel, granularity, view, context, label, hideSummary, maxTokens, maxEdits, labels: labelOverrides, className, ...props }: TextDiffProps): react.JSX.Element;
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Typed column filters for `FilterEditor` (HAR-1365; TENSOR C6 `table-filter-editor.tsx`,
|
|
1141
|
+
* MOTUS C-1 "+ filter"). The value is data the product serializes into its own query; the
|
|
1142
|
+
* summary feeds a `Chip`. Pure, so a server can summarize a saved view too.
|
|
1143
|
+
*/
|
|
1144
|
+
interface FilterChoice {
|
|
1145
|
+
value: string;
|
|
1146
|
+
label: string;
|
|
1147
|
+
}
|
|
1148
|
+
type TextFilterOperator = 'contains' | 'not-contains' | 'is' | 'is-not' | 'starts-with';
|
|
1149
|
+
type NumberFilterOperator = 'eq' | 'neq' | 'lt' | 'lte' | 'gt' | 'gte' | 'between';
|
|
1150
|
+
type FilterValue = {
|
|
1151
|
+
kind: 'enum';
|
|
1152
|
+
values: string[];
|
|
1153
|
+
} | {
|
|
1154
|
+
kind: 'text';
|
|
1155
|
+
operator: TextFilterOperator;
|
|
1156
|
+
text: string;
|
|
1157
|
+
} | {
|
|
1158
|
+
kind: 'number';
|
|
1159
|
+
operator: NumberFilterOperator;
|
|
1160
|
+
value?: number;
|
|
1161
|
+
to?: number;
|
|
1162
|
+
} | {
|
|
1163
|
+
kind: 'date-range';
|
|
1164
|
+
from?: string;
|
|
1165
|
+
to?: string;
|
|
1166
|
+
} | {
|
|
1167
|
+
kind: 'boolean';
|
|
1168
|
+
value?: boolean;
|
|
1169
|
+
} | {
|
|
1170
|
+
kind: 'reference';
|
|
1171
|
+
values: FilterChoice[];
|
|
1172
|
+
};
|
|
1173
|
+
type FilterValueKind = FilterValue['kind'];
|
|
1174
|
+
/**
|
|
1175
|
+
* A named selection for an `enum` field (HAR-1505), e.g. "Open work" = new, open and pending.
|
|
1176
|
+
* The id, label and values come from the product.
|
|
1177
|
+
*/
|
|
1178
|
+
interface FilterPreset {
|
|
1179
|
+
id: string;
|
|
1180
|
+
label: string;
|
|
1181
|
+
/** The option values the preset selects. Compared as a set: order and repeats do not matter. */
|
|
1182
|
+
values: readonly string[];
|
|
1183
|
+
}
|
|
1184
|
+
interface FilterField {
|
|
1185
|
+
id: string;
|
|
1186
|
+
/** Column name, also the start of the chip summary. */
|
|
1187
|
+
label: string;
|
|
1188
|
+
kind: FilterValueKind;
|
|
1189
|
+
/** `enum`: the choices. */
|
|
1190
|
+
options?: readonly FilterChoice[];
|
|
1191
|
+
/** `reference`: finds records to pick; rejected promises show the error state. */
|
|
1192
|
+
onSearch?: (query: string) => Promise<readonly FilterChoice[]>;
|
|
1193
|
+
/** `text` / `number`: the operators offered, in order. Default: all of the kind. */
|
|
1194
|
+
operators?: readonly (TextFilterOperator | NumberFilterOperator)[];
|
|
1195
|
+
/** `number`: a unit shown after the value, e.g. "days". */
|
|
1196
|
+
unit?: string;
|
|
1197
|
+
/** `boolean`: words for true and false, e.g. Escalated / Not escalated. Default from labels. */
|
|
1198
|
+
trueLabel?: string;
|
|
1199
|
+
falseLabel?: string;
|
|
1200
|
+
/**
|
|
1201
|
+
* `enum`: named selections shown as toggle chips above the options. Activating one replaces
|
|
1202
|
+
* the selection with its values; the one equal to the selection is pressed, and the chip
|
|
1203
|
+
* summary names it.
|
|
1204
|
+
*/
|
|
1205
|
+
presets?: readonly FilterPreset[];
|
|
1206
|
+
}
|
|
1207
|
+
interface FilterSummaryLabels {
|
|
1208
|
+
operators: Record<TextFilterOperator | NumberFilterOperator, string>;
|
|
1209
|
+
yes: string;
|
|
1210
|
+
no: string;
|
|
1211
|
+
/** `{from}`, `{to}`; also used for a number range. */
|
|
1212
|
+
range: string;
|
|
1213
|
+
/** Only a start date. `{from}`. */
|
|
1214
|
+
from: string;
|
|
1215
|
+
/** Only an end date. `{to}`. */
|
|
1216
|
+
until: string;
|
|
1217
|
+
/** More than `maxListed` values: `{first}`, `{count}`. */
|
|
1218
|
+
more: string;
|
|
1219
|
+
/** An `enum` value equal to a preset: `{label}` (the preset), `{field}`. Default `{label}`. */
|
|
1220
|
+
preset?: string;
|
|
1221
|
+
}
|
|
1222
|
+
declare const DEFAULT_FILTER_SUMMARY_LABELS: FilterSummaryLabels;
|
|
1223
|
+
declare const TEXT_FILTER_OPERATORS: readonly TextFilterOperator[];
|
|
1224
|
+
declare const NUMBER_FILTER_OPERATORS: readonly NumberFilterOperator[];
|
|
1225
|
+
/** The empty value for a field kind (what Clear resets to). */
|
|
1226
|
+
declare function emptyFilterValue(kind: FilterValueKind): FilterValue;
|
|
1227
|
+
/** True when the value filters nothing (so the chip goes away). */
|
|
1228
|
+
declare function isFilterEmpty(value: FilterValue | undefined): boolean;
|
|
1229
|
+
/**
|
|
1230
|
+
* The first of `field.presets` whose values equal the value's as a set, or undefined. Only an
|
|
1231
|
+
* `enum` value can match a preset.
|
|
1232
|
+
*/
|
|
1233
|
+
declare function matchFilterPreset(field: FilterField, value: FilterValue | undefined): FilterPreset | undefined;
|
|
1234
|
+
interface SummarizeFilterOptions {
|
|
1235
|
+
labels?: Partial<FilterSummaryLabels>;
|
|
1236
|
+
/** Formats a `YYYY-MM-DD` date (a product format such as DD.MM.YYYY). Default: as given. */
|
|
1237
|
+
formatDate?: (date: string) => string;
|
|
1238
|
+
/** Formats a number. Default: `String`. */
|
|
1239
|
+
formatNumber?: (value: number) => string;
|
|
1240
|
+
/** List this many values before "+N". Default 2. */
|
|
1241
|
+
maxListed?: number;
|
|
1242
|
+
}
|
|
1243
|
+
/**
|
|
1244
|
+
* One line for the filter chip, e.g. "State: Open, Pending", "Priority ≥ 2", "Created:
|
|
1245
|
+
* 01.10.2026 – 05.10.2026", "Escalated: Yes". An enum value equal to one of `field.presets`
|
|
1246
|
+
* gives that preset's label (the `preset` label). Empty values give an empty string.
|
|
1247
|
+
*/
|
|
1248
|
+
declare function summarizeFilter(field: FilterField, value: FilterValue | undefined, options?: SummarizeFilterOptions): string;
|
|
1249
|
+
|
|
1250
|
+
interface FilterEditorLabels {
|
|
1251
|
+
apply: string;
|
|
1252
|
+
clear: string;
|
|
1253
|
+
operator: string;
|
|
1254
|
+
value: string;
|
|
1255
|
+
from: string;
|
|
1256
|
+
to: string;
|
|
1257
|
+
/** Between two numbers: "and". */
|
|
1258
|
+
and: string;
|
|
1259
|
+
any: string;
|
|
1260
|
+
yes: string;
|
|
1261
|
+
no: string;
|
|
1262
|
+
search: string;
|
|
1263
|
+
searching: string;
|
|
1264
|
+
noMatches: string;
|
|
1265
|
+
searchFailed: string;
|
|
1266
|
+
retry: string;
|
|
1267
|
+
selectAll: string;
|
|
1268
|
+
selectNone: string;
|
|
1269
|
+
/** `{count}` chosen. */
|
|
1270
|
+
selected: string;
|
|
1271
|
+
/** Remove one chosen record. `{label}`. */
|
|
1272
|
+
remove: string;
|
|
1273
|
+
/** Names the row of `field.presets` chips. Optional so existing label objects still type-check; default "Presets". */
|
|
1274
|
+
presets?: string;
|
|
1275
|
+
operators: Record<TextFilterOperator | NumberFilterOperator, string>;
|
|
1276
|
+
}
|
|
1277
|
+
declare const DEFAULT_FILTER_EDITOR_LABELS: FilterEditorLabels;
|
|
1278
|
+
interface FilterEditorProps {
|
|
1279
|
+
field: FilterField;
|
|
1280
|
+
/** Undefined means "not filtered yet". */
|
|
1281
|
+
value: FilterValue | undefined;
|
|
1282
|
+
onValueChange: (value: FilterValue) => void;
|
|
1283
|
+
onApply: () => void;
|
|
1284
|
+
onClear: () => void;
|
|
1285
|
+
labels?: Partial<FilterEditorLabels>;
|
|
1286
|
+
/** Show an option filter above an enum list once it has more options than this. Default 8. */
|
|
1287
|
+
searchThreshold?: number;
|
|
1288
|
+
/** Delay before a reference search runs, in ms. Default 250. */
|
|
1289
|
+
searchDelay?: number;
|
|
1290
|
+
}
|
|
1291
|
+
/**
|
|
1292
|
+
* Editor content for one typed column filter (HAR-1365; TENSOR C6, MOTUS C-1): an enum
|
|
1293
|
+
* multi-select, text or number with a condition, a date range, yes/no, or records found by
|
|
1294
|
+
* an async search. The product owns the popover trigger and the query; `summarizeFilter`
|
|
1295
|
+
* turns the applied value into the chip text. `FilterPopover` stays for the one-string case.
|
|
1296
|
+
* An enum field's `presets` (HAR-1505) render as toggle chips above its options. Words come
|
|
1297
|
+
* from `labels`, or from `UixLabelsProvider`'s `filterEditor` entry.
|
|
1298
|
+
*/
|
|
1299
|
+
declare function FilterEditor({ field, value: valueProp, onValueChange, onApply, onClear, labels: labelOverrides, searchThreshold, searchDelay }: FilterEditorProps): react.JSX.Element;
|
|
1300
|
+
|
|
1301
|
+
/**
|
|
1302
|
+
* Select model (HAR-1572) — pure, DOM-free logic behind the UIx `Select` listbox:
|
|
1303
|
+
* flattening options and groups, keyboard movement (APG select-only combobox), typeahead,
|
|
1304
|
+
* filtering and the multi-select value helpers. Unit-tested in select-model.test.mjs.
|
|
1305
|
+
*/
|
|
1306
|
+
|
|
1307
|
+
interface SelectOption {
|
|
1308
|
+
value: string;
|
|
1309
|
+
label: string;
|
|
1310
|
+
disabled?: boolean;
|
|
1311
|
+
/** A second, muted line under the label. */
|
|
1312
|
+
description?: string;
|
|
1313
|
+
/** Shown before the label, in the list and on the trigger. */
|
|
1314
|
+
icon?: ReactNode;
|
|
1315
|
+
/** Extra words that match a search or typeahead (never shown). */
|
|
1316
|
+
keywords?: readonly string[];
|
|
1317
|
+
}
|
|
1318
|
+
interface SelectGroup {
|
|
1319
|
+
label: string;
|
|
1320
|
+
options: readonly SelectOption[];
|
|
1321
|
+
/** Disables every option in the group. */
|
|
1322
|
+
disabled?: boolean;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
/** Chrome strings of `Select`; `{count}` is replaced where noted. */
|
|
1326
|
+
interface SelectLabels {
|
|
1327
|
+
/** Accessible name of the filter field when the Select has no label of its own. */
|
|
1328
|
+
search: string;
|
|
1329
|
+
/** Placeholder of the filter field. */
|
|
1330
|
+
searchPlaceholder: string;
|
|
1331
|
+
loading: string;
|
|
1332
|
+
/** No options at all. */
|
|
1333
|
+
empty: string;
|
|
1334
|
+
/** A filter matched nothing. */
|
|
1335
|
+
noMatches: string;
|
|
1336
|
+
/** Async `loadOptions` failed. */
|
|
1337
|
+
error: string;
|
|
1338
|
+
retry: string;
|
|
1339
|
+
/** Multi-select: clears every value. */
|
|
1340
|
+
clear: string;
|
|
1341
|
+
/** Multi-select on a phone: closes the sheet. */
|
|
1342
|
+
done: string;
|
|
1343
|
+
/** Multi-select trigger, spoken after the "+N". `{count}` = how many are selected. */
|
|
1344
|
+
selectedCount: string;
|
|
1345
|
+
/** Announced after filtering. `{count}`. */
|
|
1346
|
+
results: string;
|
|
1347
|
+
}
|
|
1348
|
+
interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
1349
|
+
size?: 'sm' | 'md';
|
|
1350
|
+
/** The options as data, instead of `<option>` / `<optgroup>` children. */
|
|
1351
|
+
options?: readonly (SelectOption | SelectGroup)[];
|
|
1352
|
+
/**
|
|
1353
|
+
* Called with the new value: a string, or every selected value with `multiple`. `option` is the
|
|
1354
|
+
* option that was chosen or toggled. `onChange(e)` still fires as on a native select.
|
|
1355
|
+
*/
|
|
1356
|
+
onValueChange?: (value: string | string[], option?: SelectOption) => void;
|
|
1357
|
+
/** Shown while nothing is selected. Also makes "nothing" the starting value (and `required` checks it). */
|
|
1358
|
+
placeholder?: string;
|
|
1359
|
+
/** Marks the control invalid (`aria-invalid`), e.g. from your own validation. */
|
|
1360
|
+
invalid?: boolean;
|
|
1361
|
+
/** Shows and submits the value, but does not open. */
|
|
1362
|
+
readOnly?: boolean;
|
|
1363
|
+
/** A filter field at the top of the list. `'auto'` adds it for more than 12 options. Default `false`. */
|
|
1364
|
+
searchable?: boolean | 'auto';
|
|
1365
|
+
/**
|
|
1366
|
+
* Load the options when the list opens (and, when `searchable`, as the filter changes). The
|
|
1367
|
+
* previous request's `signal` is aborted when a newer one starts or the list closes. Pass the
|
|
1368
|
+
* selected option in `options` so its label shows before the first load.
|
|
1369
|
+
*/
|
|
1370
|
+
loadOptions?: (query: string, signal: AbortSignal) => Promise<readonly (SelectOption | SelectGroup)[]>;
|
|
1371
|
+
/** Draw an option's content (the check mark for the selected state is drawn for you). */
|
|
1372
|
+
renderOption?: (option: SelectOption, state: {
|
|
1373
|
+
selected: boolean;
|
|
1374
|
+
active: boolean;
|
|
1375
|
+
}) => ReactNode;
|
|
1376
|
+
/** Draw the trigger's content for the selected option(s). */
|
|
1377
|
+
renderValue?: (selected: readonly SelectOption[]) => ReactNode;
|
|
1378
|
+
/** Preferred side of the list. Default `'bottom-start'`; it flips when there is no room. */
|
|
1379
|
+
placement?: Placement;
|
|
1380
|
+
labels?: Partial<SelectLabels>;
|
|
1381
|
+
}
|
|
1382
|
+
/**
|
|
1383
|
+
* A select that draws its own list (HAR-1572): the WAI-ARIA APG select-only combobox — focus
|
|
1384
|
+
* stays on the trigger, `aria-activedescendant` marks the active option — in a top-layer popover
|
|
1385
|
+
* placed with `useAnchoredPosition`, or a bottom sheet on a phone. A visually hidden native
|
|
1386
|
+
* `<select>` carries `name`, `required`, `form`, `multiple` and the value, so `<option>` children,
|
|
1387
|
+
* `onChange(e)` with `e.target.value`, FormData, `form.reset()`, `ref` and react-hook-form keep
|
|
1388
|
+
* working; `ref` points at that select.
|
|
1389
|
+
*/
|
|
1390
|
+
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLSelectElement>>;
|
|
1391
|
+
|
|
1392
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
1393
|
+
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
1394
|
+
[key: string]: JsonValue;
|
|
1395
|
+
};
|
|
1396
|
+
|
|
1397
|
+
interface RuleCondition {
|
|
1398
|
+
id: string;
|
|
1399
|
+
field: string;
|
|
1400
|
+
operator: string;
|
|
1401
|
+
value?: JsonValue;
|
|
1402
|
+
}
|
|
1403
|
+
interface RuleGroup {
|
|
1404
|
+
id: string;
|
|
1405
|
+
combinator: 'and' | 'or';
|
|
1406
|
+
conditions: Array<RuleCondition | RuleGroup>;
|
|
1407
|
+
}
|
|
1408
|
+
interface RuleAction {
|
|
1409
|
+
id: string;
|
|
1410
|
+
type: string;
|
|
1411
|
+
parameters: Record<string, JsonValue>;
|
|
1412
|
+
}
|
|
1413
|
+
interface RuleDefinition {
|
|
1414
|
+
when: RuleGroup;
|
|
1415
|
+
then: RuleAction[];
|
|
1416
|
+
}
|
|
1417
|
+
/** The built-in checks of `validateRuleDefinition`; each can be reworded or turned off (HAR-1618). */
|
|
1418
|
+
type RuleCheck = 'duplicateId' | 'maxDepth' | 'emptyGroup' | 'missingField' | 'missingOperator' | 'noActions' | 'missingActionType';
|
|
1419
|
+
interface RuleValidationIssue {
|
|
1420
|
+
path: string;
|
|
1421
|
+
message: string;
|
|
1422
|
+
/** Which built-in check raised it. Absent on issues from the consumer's own `validate`. */
|
|
1423
|
+
check?: RuleCheck;
|
|
1424
|
+
}
|
|
1425
|
+
/** The built-in messages. `{id}` is the duplicated id, `{max}` the depth limit. */
|
|
1426
|
+
declare const DEFAULT_RULE_VALIDATION_MESSAGES: Record<RuleCheck, string>;
|
|
1427
|
+
interface RuleValidationOptions {
|
|
1428
|
+
/** Replace individual messages (a translation). */
|
|
1429
|
+
messages?: Partial<Record<RuleCheck, string>>;
|
|
1430
|
+
/**
|
|
1431
|
+
* `false` turns a check off: `{ emptyGroup: false }` for a rule that may have no condition
|
|
1432
|
+
* (a catch-all), `{ noActions: false, missingActionType: false }` for conditions without actions.
|
|
1433
|
+
*/
|
|
1434
|
+
checks?: Partial<Record<RuleCheck, boolean>>;
|
|
1435
|
+
}
|
|
1436
|
+
declare function isRuleGroup(node: RuleCondition | RuleGroup): node is RuleGroup;
|
|
1437
|
+
declare function ruleDepth(group: RuleGroup): number;
|
|
1438
|
+
declare function findRuleNodeDepth(group: RuleGroup, id: string, depth?: number): number | undefined;
|
|
1439
|
+
declare function mapRuleGroup(group: RuleGroup, id: string, update: (node: RuleCondition | RuleGroup) => RuleCondition | RuleGroup): RuleGroup;
|
|
1440
|
+
declare function appendRuleNode(group: RuleGroup, parentId: string, node: RuleCondition | RuleGroup, maxDepth?: number): RuleGroup;
|
|
1441
|
+
declare function removeRuleNode(group: RuleGroup, id: string): RuleGroup;
|
|
1442
|
+
declare function moveRuleNode(group: RuleGroup, id: string, direction: -1 | 1): RuleGroup;
|
|
1443
|
+
/** Set `combinator` on a group and on every group nested in it. */
|
|
1444
|
+
declare function setRuleCombinator(group: RuleGroup, combinator: 'and' | 'or'): RuleGroup;
|
|
1445
|
+
declare function validateRuleDefinition(value: RuleDefinition, maxDepth?: number, options?: RuleValidationOptions): RuleValidationIssue[];
|
|
1446
|
+
/** The words of the `summarizeRule` sentence. `{conditions}` and `{actions}` are filled in. */
|
|
1447
|
+
interface RuleSummaryWords {
|
|
1448
|
+
sentence: string;
|
|
1449
|
+
/** For a rule with no actions to name (a conditions-only rule). */
|
|
1450
|
+
sentenceConditionsOnly: string;
|
|
1451
|
+
noConditions: string;
|
|
1452
|
+
noActions: string;
|
|
1453
|
+
and: string;
|
|
1454
|
+
or: string;
|
|
1455
|
+
}
|
|
1456
|
+
declare const DEFAULT_RULE_SUMMARY_WORDS: RuleSummaryWords;
|
|
1457
|
+
declare function summarizeRule(value: RuleDefinition, labels?: {
|
|
1458
|
+
fields?: Record<string, string>;
|
|
1459
|
+
operators?: Record<string, string>;
|
|
1460
|
+
actions?: Record<string, string>;
|
|
1461
|
+
/** Translate the sentence itself. Default: English. */
|
|
1462
|
+
words?: Partial<RuleSummaryWords>;
|
|
1463
|
+
/** Leave the actions out of the sentence. */
|
|
1464
|
+
conditionsOnly?: boolean;
|
|
1465
|
+
}): string;
|
|
1466
|
+
|
|
1467
|
+
interface RuleValueEditorProps {
|
|
1468
|
+
condition: RuleCondition;
|
|
1469
|
+
onChange: (value: JsonValue | undefined) => void;
|
|
1470
|
+
disabled?: boolean;
|
|
1471
|
+
}
|
|
1472
|
+
interface RuleFieldDefinition {
|
|
1473
|
+
id: string;
|
|
1474
|
+
label: string;
|
|
1475
|
+
description?: string;
|
|
1476
|
+
operators?: string[];
|
|
1477
|
+
renderValueEditor?: (props: RuleValueEditorProps) => ReactNode;
|
|
1478
|
+
}
|
|
1479
|
+
interface RuleOperatorDefinition {
|
|
1480
|
+
id: string;
|
|
1481
|
+
label: string;
|
|
1482
|
+
requiresValue?: boolean;
|
|
1483
|
+
}
|
|
1484
|
+
interface RuleActionDefinition {
|
|
1485
|
+
id: string;
|
|
1486
|
+
label: string;
|
|
1487
|
+
renderParameters?: (action: RuleAction, onChange: (parameters: Record<string, JsonValue>) => void, disabled: boolean) => ReactNode;
|
|
1488
|
+
}
|
|
1489
|
+
/**
|
|
1490
|
+
* Every word the rule builder renders (TENSOR RX-125, UIX-12). `{item}` is one of
|
|
1491
|
+
* `itemGroup` / `itemCondition` / `itemAction`; `{field}` a field label; `{count}` a number.
|
|
1492
|
+
* The `issue…` keys are the built-in validation messages (`{id}` the duplicated id, `{max}`
|
|
1493
|
+
* the depth limit) and the `summary…` / `and` / `or` keys the words of the
|
|
1494
|
+
* `readOnly="summary"` sentence (HAR-1618). Translate once for a subtree with
|
|
1495
|
+
* `UixLabelsProvider labels={{ ruleBuilder: … }}`.
|
|
1496
|
+
*/
|
|
1497
|
+
interface RuleBuilderLabels {
|
|
1498
|
+
region: string;
|
|
1499
|
+
summary: string;
|
|
1500
|
+
when: string;
|
|
1501
|
+
group: string;
|
|
1502
|
+
match: string;
|
|
1503
|
+
all: string;
|
|
1504
|
+
any: string;
|
|
1505
|
+
field: string;
|
|
1506
|
+
operator: string;
|
|
1507
|
+
valueFor: string;
|
|
1508
|
+
itemGroup: string;
|
|
1509
|
+
itemCondition: string;
|
|
1510
|
+
itemAction: string;
|
|
1511
|
+
moveUp: string;
|
|
1512
|
+
moveUpNamed: string;
|
|
1513
|
+
moveDown: string;
|
|
1514
|
+
moveDownNamed: string;
|
|
1515
|
+
remove: string;
|
|
1516
|
+
removeNamed: string;
|
|
1517
|
+
then: string;
|
|
1518
|
+
actionType: string;
|
|
1519
|
+
valid: string;
|
|
1520
|
+
issuesOne: string;
|
|
1521
|
+
issuesMany: string;
|
|
1522
|
+
summaryIssuesOne: string;
|
|
1523
|
+
summaryIssuesMany: string;
|
|
1524
|
+
addCondition: string;
|
|
1525
|
+
addGroup: string;
|
|
1526
|
+
addAction: string;
|
|
1527
|
+
issueDuplicateId: string;
|
|
1528
|
+
issueMaxDepth: string;
|
|
1529
|
+
issueEmptyGroup: string;
|
|
1530
|
+
issueMissingField: string;
|
|
1531
|
+
issueMissingOperator: string;
|
|
1532
|
+
issueNoActions: string;
|
|
1533
|
+
issueMissingActionType: string;
|
|
1534
|
+
summarySentence: string;
|
|
1535
|
+
summarySentenceConditionsOnly: string;
|
|
1536
|
+
summaryNoConditions: string;
|
|
1537
|
+
summaryNoActions: string;
|
|
1538
|
+
and: string;
|
|
1539
|
+
or: string;
|
|
1540
|
+
}
|
|
1541
|
+
declare const DEFAULT_RULE_BUILDER_LABELS: RuleBuilderLabels;
|
|
1542
|
+
interface RuleBuilderProps {
|
|
1543
|
+
value: RuleDefinition;
|
|
1544
|
+
onChange: (value: RuleDefinition) => void;
|
|
1545
|
+
fields: RuleFieldDefinition[];
|
|
1546
|
+
operators: RuleOperatorDefinition[];
|
|
1547
|
+
/** The action types of the "Then" block. Not needed with `conditionsOnly`. */
|
|
1548
|
+
actions?: RuleActionDefinition[];
|
|
1549
|
+
maxDepth?: number;
|
|
1550
|
+
/**
|
|
1551
|
+
* `true`: the same builder with every control disabled and no add, move or remove buttons.
|
|
1552
|
+
* `'summary'`: one sentence instead of the controls (what `readOnly` rendered up to 2.31.0;
|
|
1553
|
+
* its words are the `summary…`, `and` and `or` labels).
|
|
1554
|
+
*/
|
|
1555
|
+
readOnly?: boolean | 'summary';
|
|
1556
|
+
/**
|
|
1557
|
+
* Edit conditions only (HAR-1618): no "Then" block and no "Add action", and the two action
|
|
1558
|
+
* checks (`noActions`, `missingActionType`) are off. `value.then` is passed through untouched.
|
|
1559
|
+
*/
|
|
1560
|
+
conditionsOnly?: boolean;
|
|
1561
|
+
/**
|
|
1562
|
+
* Fix every group to this combinator, for a stored shape that is a flat AND-list. The Match
|
|
1563
|
+
* choice becomes plain text ("Match all (AND)"), new groups get this combinator, and every
|
|
1564
|
+
* `onChange` carries it on all groups, so the other value is never emitted.
|
|
1565
|
+
*/
|
|
1566
|
+
combinator?: 'and' | 'or';
|
|
1567
|
+
/** Hide the Match control (and its text when `combinator` fixes it). */
|
|
1568
|
+
hideCombinator?: boolean;
|
|
1569
|
+
/**
|
|
1570
|
+
* `false` hides "Add group". It is hidden as well when `maxDepth` is 1, where it could never
|
|
1571
|
+
* be used. Default `true`.
|
|
1572
|
+
*/
|
|
1573
|
+
allowGroups?: boolean;
|
|
1574
|
+
/**
|
|
1575
|
+
* Turn built-in checks off: `{ emptyGroup: false }` for a rule that may have no condition
|
|
1576
|
+
* (a catch-all), `{ noActions: false }` for a rule that may do nothing. Their messages are
|
|
1577
|
+
* the `issue…` labels.
|
|
1578
|
+
*/
|
|
1579
|
+
checks?: Partial<Record<RuleCheck, boolean>>;
|
|
1580
|
+
/** Extra issues; they are appended to the built-in ones. */
|
|
1581
|
+
validate?: (value: RuleDefinition) => RuleValidationIssue[];
|
|
1582
|
+
className?: string;
|
|
1583
|
+
/** @deprecated use `labels.addCondition` */
|
|
1584
|
+
addConditionLabel?: string;
|
|
1585
|
+
/** @deprecated use `labels.addGroup` */
|
|
1586
|
+
addGroupLabel?: string;
|
|
1587
|
+
/** @deprecated use `labels.addAction` */
|
|
1588
|
+
addActionLabel?: string;
|
|
1589
|
+
labels?: Partial<RuleBuilderLabels>;
|
|
1590
|
+
}
|
|
1591
|
+
/** Declarative controlled when-conditions-to-actions editor with bounded nesting. */
|
|
1592
|
+
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;
|
|
1593
|
+
|
|
1594
|
+
/** File helpers shared by `FileUpload` and `Attachment` (HAR-984/985). Pure. */
|
|
1595
|
+
interface FileSizeOptions {
|
|
1596
|
+
/**
|
|
1597
|
+
* `1000` (default): decimal, as file managers on macOS and most of the web show sizes
|
|
1598
|
+
* (1 MB = 1,000,000 bytes). `1024`: binary, as Windows and many servers count them
|
|
1599
|
+
* (1 MB = 1,048,576 bytes) — use it when the rest of the product does, so one file never
|
|
1600
|
+
* shows two sizes (HAR-1630).
|
|
1601
|
+
*/
|
|
1602
|
+
base?: 1000 | 1024;
|
|
1603
|
+
/**
|
|
1604
|
+
* The five unit labels, bytes first. Default `['B', 'KB', 'MB', 'GB', 'TB']` for both bases;
|
|
1605
|
+
* pass `['B', 'KiB', 'MiB', 'GiB', 'TiB']` to mark base 1024 the IEC way, or localised ones.
|
|
1606
|
+
*/
|
|
1607
|
+
units?: readonly [string, string, string, string, string];
|
|
1608
|
+
}
|
|
1609
|
+
/** A product's own size formatter for `FileUpload` and `Attachment` (`formatSize`). */
|
|
1610
|
+
type FileSizeFormatter = (bytes: number, locale?: string) => string;
|
|
1611
|
+
/**
|
|
1612
|
+
* "1.2 MB", "340 KB", "12 B" in the locale's number format. Base 1000 unless `options.base`
|
|
1613
|
+
* is 1024.
|
|
1614
|
+
*/
|
|
1615
|
+
declare function formatFileSize(bytes: number, locale?: string, options?: FileSizeOptions): string;
|
|
1616
|
+
/** Whether a file matches an `accept` list (".pdf,image/*,application/zip"). An empty list accepts all. */
|
|
1617
|
+
declare function fileMatchesAccept(file: {
|
|
1618
|
+
name: string;
|
|
1619
|
+
type?: string;
|
|
1620
|
+
}, accept?: string): boolean;
|
|
1621
|
+
type FileRejectionReason = 'type' | 'size' | 'count';
|
|
1622
|
+
interface FileRejection<F = File> {
|
|
1623
|
+
file: F;
|
|
1624
|
+
reason: FileRejectionReason;
|
|
1625
|
+
}
|
|
1626
|
+
/**
|
|
1627
|
+
* Splits picked files into accepted and rejected (wrong type, over `maxSize` bytes, or beyond
|
|
1628
|
+
* `maxFiles` counting the `existing` ones). Order is kept.
|
|
1629
|
+
*/
|
|
1630
|
+
declare function partitionFiles<F extends {
|
|
1631
|
+
name: string;
|
|
1632
|
+
type?: string;
|
|
1633
|
+
size: number;
|
|
1634
|
+
}>(files: readonly F[], { accept, maxSize, maxFiles, existing }: {
|
|
1635
|
+
accept?: string;
|
|
1636
|
+
maxSize?: number;
|
|
1637
|
+
maxFiles?: number;
|
|
1638
|
+
existing?: number;
|
|
1639
|
+
}): {
|
|
1640
|
+
accepted: F[];
|
|
1641
|
+
rejected: FileRejection<F>[];
|
|
1642
|
+
};
|
|
1643
|
+
/** A coarse kind for a file icon. */
|
|
1644
|
+
declare function fileKind(file: {
|
|
1645
|
+
name: string;
|
|
1646
|
+
type?: string;
|
|
1647
|
+
}): 'image' | 'video' | 'pdf' | 'sheet' | 'archive' | 'text' | 'other';
|
|
1648
|
+
|
|
1649
|
+
type FileUploadStatus = 'queued' | 'uploading' | 'done' | 'error';
|
|
1650
|
+
interface FileUploadItem {
|
|
1651
|
+
id: string;
|
|
1652
|
+
name: string;
|
|
1653
|
+
/** Bytes. */
|
|
1654
|
+
size: number;
|
|
1655
|
+
type?: string;
|
|
1656
|
+
status: FileUploadStatus;
|
|
1657
|
+
/** 0–100 while uploading; without it the bar is indeterminate. */
|
|
1658
|
+
progress?: number;
|
|
1659
|
+
/** Why it failed (shown under the name with a Retry button). */
|
|
1660
|
+
error?: ReactNode;
|
|
1661
|
+
/** An object URL or remote URL for an image thumbnail. */
|
|
1662
|
+
previewUrl?: string;
|
|
1663
|
+
/** Alternative text, when the product asks for it (`onAltChange`). */
|
|
1664
|
+
alt?: string;
|
|
1665
|
+
}
|
|
1666
|
+
interface FileUploadLabels {
|
|
1667
|
+
/** Main line of the drop zone. */
|
|
1668
|
+
title: string;
|
|
1669
|
+
choose: string;
|
|
1670
|
+
/** Shown while a file is dragged over. */
|
|
1671
|
+
drop: string;
|
|
1672
|
+
list: string;
|
|
1673
|
+
remove: string;
|
|
1674
|
+
/** Accessible name of Retry. `{name}`. */
|
|
1675
|
+
retry: string;
|
|
1676
|
+
/** Visible text of Retry. */
|
|
1677
|
+
retryShort: string;
|
|
1678
|
+
queued: string;
|
|
1679
|
+
/** `{progress}`. */
|
|
1680
|
+
uploading: string;
|
|
1681
|
+
done: string;
|
|
1682
|
+
failed: string;
|
|
1683
|
+
/** `{name}` — set `alt` for images. */
|
|
1684
|
+
alt: string;
|
|
1685
|
+
/** `{count}` files added. */
|
|
1686
|
+
added: string;
|
|
1687
|
+
/** `{name}`, `{accept}`. */
|
|
1688
|
+
wrongType: string;
|
|
1689
|
+
/** `{name}`, `{max}`. */
|
|
1690
|
+
tooLarge: string;
|
|
1691
|
+
/** `{name}`, `{max}`. */
|
|
1692
|
+
tooMany: string;
|
|
1693
|
+
}
|
|
1694
|
+
declare const DEFAULT_FILE_UPLOAD_LABELS: FileUploadLabels;
|
|
1695
|
+
interface FileUploadProps {
|
|
1696
|
+
/** The files so far, with their upload state (controlled). */
|
|
1697
|
+
items: readonly FileUploadItem[];
|
|
1698
|
+
/**
|
|
1699
|
+
* Called with the files that passed `accept`, `maxSize` and `maxFiles`, and the ones that did
|
|
1700
|
+
* not. Add accepted files to `items` and upload them; the component never uploads.
|
|
1701
|
+
*/
|
|
1702
|
+
onFilesAdded: (accepted: File[], rejected: FileRejection[]) => void;
|
|
1703
|
+
onRemove?: (id: string) => void;
|
|
1704
|
+
onRetry?: (id: string) => void;
|
|
1705
|
+
/** Ask for alt text on image items (MOTUS photo intake). */
|
|
1706
|
+
onAltChange?: (id: string, alt: string) => void;
|
|
1707
|
+
/** Accepted types, as for `<input accept>`. */
|
|
1708
|
+
accept?: string;
|
|
1709
|
+
/** Largest file in bytes. */
|
|
1710
|
+
maxSize?: number;
|
|
1711
|
+
/** Most files in `items`. */
|
|
1712
|
+
maxFiles?: number;
|
|
1713
|
+
/** Default true. */
|
|
1714
|
+
multiple?: boolean;
|
|
1715
|
+
/** Open the camera on phones (`user` or `environment`). */
|
|
1716
|
+
capture?: 'user' | 'environment';
|
|
1717
|
+
disabled?: boolean;
|
|
1718
|
+
/** Second line of the drop zone, e.g. "PDF or images, up to 20 MB". */
|
|
1719
|
+
hint?: ReactNode;
|
|
1720
|
+
locale?: string;
|
|
1721
|
+
/** Count sizes in 1024s (1 MB = 1,048,576 bytes) instead of 1000s. Default `1000`. */
|
|
1722
|
+
sizeBase?: 1000 | 1024;
|
|
1723
|
+
/** The product's own size formatter; it replaces `formatFileSize` (and `sizeBase`). */
|
|
1724
|
+
formatSize?: FileSizeFormatter;
|
|
1725
|
+
/**
|
|
1726
|
+
* Words for this instance. Each one defaults to `UixLabelsProvider` `fileUpload`, then to
|
|
1727
|
+
* English, so one provider translates every upload below it (HAR-1630).
|
|
1728
|
+
*/
|
|
1729
|
+
labels?: Partial<FileUploadLabels>;
|
|
1730
|
+
className?: string;
|
|
1731
|
+
}
|
|
1732
|
+
/**
|
|
1733
|
+
* Drop zone, file picker and upload list (HAR-984; TENSOR C15, MOTUS C-7, MEDx S18/S19). The
|
|
1734
|
+
* product owns the upload: it receives validated `File`s and reports progress, success and
|
|
1735
|
+
* failure through `items`. Keyboard users get a real button; drop is an extra, not the only way.
|
|
1736
|
+
*/
|
|
1737
|
+
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;
|
|
1738
|
+
|
|
1739
|
+
/**
|
|
1740
|
+
* The words of an `Attachment` row. In a module of its own, with no "use client": the
|
|
1741
|
+
* server-renderable `Attachment` and its client parts both read it, and a server component can
|
|
1742
|
+
* still import the defaults as plain values.
|
|
1743
|
+
*/
|
|
1744
|
+
interface AttachmentLabels {
|
|
1745
|
+
/** Remove button. `{name}`. */
|
|
1746
|
+
remove: string;
|
|
1747
|
+
/** Download link name when `download` is set. `{name}`. */
|
|
1748
|
+
download: string;
|
|
1749
|
+
loading: string;
|
|
1750
|
+
forbidden: string;
|
|
1751
|
+
}
|
|
1752
|
+
declare const DEFAULT_ATTACHMENT_LABELS: AttachmentLabels;
|
|
1753
|
+
|
|
641
1754
|
/**
|
|
642
1755
|
* Kit chrome strings by component (HAR-1358; TENSOR C20, MOTUS executive summary #3).
|
|
643
1756
|
* Each entry overrides that component's English defaults for every instance below the
|
|
@@ -686,6 +1799,20 @@ interface UixLabels {
|
|
|
686
1799
|
schedulingCalendar?: Partial<SchedulingCalendarLabels>;
|
|
687
1800
|
dateRangePicker?: Partial<DateRangePickerLabels>;
|
|
688
1801
|
schedulingTimeline?: Partial<SchedulingTimelineLabels>;
|
|
1802
|
+
textDiff?: Partial<TextDiffLabels>;
|
|
1803
|
+
filterEditor?: Partial<FilterEditorLabels>;
|
|
1804
|
+
select?: Partial<SelectLabels>;
|
|
1805
|
+
ruleBuilder?: Partial<RuleBuilderLabels>;
|
|
1806
|
+
fileUpload?: Partial<FileUploadLabels>;
|
|
1807
|
+
attachment?: Partial<AttachmentLabels>;
|
|
1808
|
+
/** `remove`: the name of a removable chip's × button; `{label}` is the chip text. */
|
|
1809
|
+
chip?: {
|
|
1810
|
+
remove?: string;
|
|
1811
|
+
};
|
|
1812
|
+
/** `dismiss`: the name of a dismissible alert's × button. */
|
|
1813
|
+
alert?: {
|
|
1814
|
+
dismiss?: string;
|
|
1815
|
+
};
|
|
689
1816
|
/** Read by `useUixLabels()` callers; `Pagination` itself is server-safe and takes `labels`. */
|
|
690
1817
|
pagination?: Partial<PaginationLabels>;
|
|
691
1818
|
/** Read by `useUixLabels()` callers; `BulkBar` itself is server-safe and takes `label`. */
|
|
@@ -822,6 +1949,10 @@ interface SearchSuggestProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onCha
|
|
|
822
1949
|
autoFocus?: boolean;
|
|
823
1950
|
/** Form field name of the input. */
|
|
824
1951
|
name?: string;
|
|
1952
|
+
/** Id of the input itself (for a `<label for>` / `Field htmlFor`); `id` stays on the wrapper. */
|
|
1953
|
+
inputId?: string;
|
|
1954
|
+
/** `aria-describedby` of the input (hint and error text from a `Field`). */
|
|
1955
|
+
inputDescribedBy?: string;
|
|
825
1956
|
}
|
|
826
1957
|
/**
|
|
827
1958
|
* A search field with a suggestion list underneath: the "search and jump" pattern of Windows
|
|
@@ -830,7 +1961,58 @@ interface SearchSuggestProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onCha
|
|
|
830
1961
|
* (`aria-activedescendant`), Enter opens it (the first row when none is active), Escape closes the
|
|
831
1962
|
* list and a second Escape clears the text.
|
|
832
1963
|
*/
|
|
833
|
-
declare function SearchSuggest({ value, onValueChange, options, onSelect, label, placeholder, highlight, heading, headingAction, footer, loading, loadingLabel, empty, error, shortcutHint, clearLabel: clearLabelProp, status, size, open: openProp, strategy, onOpenChange, inputRef, autoFocus, name, className, onBlur, ...props }: SearchSuggestProps): react.JSX.Element;
|
|
1964
|
+
declare function SearchSuggest({ value, onValueChange, options, onSelect, label, placeholder, highlight, heading, headingAction, footer, loading, loadingLabel, empty, error, shortcutHint, clearLabel: clearLabelProp, status, size, open: openProp, strategy, onOpenChange, inputRef, autoFocus, name, inputId, inputDescribedBy, className, onBlur, ...props }: SearchSuggestProps): react.JSX.Element;
|
|
1965
|
+
|
|
1966
|
+
interface EntityPickerLabels {
|
|
1967
|
+
/** Accessible name of the search field while picking. */
|
|
1968
|
+
search: string;
|
|
1969
|
+
loading: string;
|
|
1970
|
+
empty: string;
|
|
1971
|
+
error: string;
|
|
1972
|
+
retry: string;
|
|
1973
|
+
/** Clears the chosen record. `{title}`. */
|
|
1974
|
+
clear: string;
|
|
1975
|
+
/** Names the chosen-record button that reopens the search. `{label}`, `{title}`. */
|
|
1976
|
+
change: string;
|
|
1977
|
+
/** Shown in the field when nothing is chosen. */
|
|
1978
|
+
none: string;
|
|
1979
|
+
/** Polite count after a search. `{count}`. */
|
|
1980
|
+
results: string;
|
|
1981
|
+
}
|
|
1982
|
+
declare const DEFAULT_ENTITY_PICKER_LABELS: EntityPickerLabels;
|
|
1983
|
+
interface EntityPickerProps {
|
|
1984
|
+
/** The chosen record, or null. */
|
|
1985
|
+
value: SearchSuggestOption | null;
|
|
1986
|
+
onValueChange: (next: SearchSuggestOption | null) => void;
|
|
1987
|
+
/** Finds records for the query; a rejection shows the error state with a Retry row. */
|
|
1988
|
+
onSearch: (query: string) => Promise<readonly SearchSuggestOption[]>;
|
|
1989
|
+
/** The field's name (the visible label usually comes from a surrounding `Field`). */
|
|
1990
|
+
label: string;
|
|
1991
|
+
/** Id of the control, for `Field htmlFor`/`label for`. */
|
|
1992
|
+
id?: string;
|
|
1993
|
+
/** Hidden form value: the chosen record's id. */
|
|
1994
|
+
name?: string;
|
|
1995
|
+
placeholder?: string;
|
|
1996
|
+
/** Search only from this many characters. Default 0 (an empty query lists suggestions). */
|
|
1997
|
+
minQueryLength?: number;
|
|
1998
|
+
/** Debounce before searching, in ms. Default 250. */
|
|
1999
|
+
delay?: number;
|
|
2000
|
+
disabled?: boolean;
|
|
2001
|
+
invalid?: boolean;
|
|
2002
|
+
/** Ids of hint/error text (from `Field`). */
|
|
2003
|
+
'aria-describedby'?: string;
|
|
2004
|
+
/** How the chosen record shows in the field. Default: title, then the last breadcrumb. */
|
|
2005
|
+
renderValue?: (option: SearchSuggestOption) => ReactNode;
|
|
2006
|
+
labels?: Partial<EntityPickerLabels>;
|
|
2007
|
+
className?: string;
|
|
2008
|
+
}
|
|
2009
|
+
/**
|
|
2010
|
+
* A form field that holds one record found by an async search (HAR-1366; TENSOR B28/C5
|
|
2011
|
+
* `entity-picker.tsx`, MOTUS B-P10): the chosen record shows as the field's value with a
|
|
2012
|
+
* clear ×; choosing again or typing opens a `SearchSuggest` list with loading, empty and error
|
|
2013
|
+
* states, and Retry is a list row, so the keyboard reaches it. Stale results are ignored.
|
|
2014
|
+
*/
|
|
2015
|
+
declare function EntityPicker({ value, onValueChange, onSearch, label, id, name, placeholder, minQueryLength, delay, disabled, invalid, 'aria-describedby': describedBy, renderValue, labels: labelOverrides, className, }: EntityPickerProps): react.JSX.Element;
|
|
834
2016
|
|
|
835
2017
|
/** One run of a result's text, emphasised or not. */
|
|
836
2018
|
interface SearchSegment {
|
|
@@ -856,11 +2038,6 @@ interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
|
856
2038
|
}
|
|
857
2039
|
declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
858
2040
|
|
|
859
|
-
interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> {
|
|
860
|
-
size?: 'sm' | 'md';
|
|
861
|
-
}
|
|
862
|
-
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLSelectElement>>;
|
|
863
|
-
|
|
864
2041
|
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
865
2042
|
label?: ReactNode;
|
|
866
2043
|
indeterminate?: boolean;
|
|
@@ -922,7 +2099,8 @@ interface ConfirmDialogProps {
|
|
|
922
2099
|
description?: ReactNode;
|
|
923
2100
|
confirmLabel: ReactNode;
|
|
924
2101
|
cancelLabel: ReactNode;
|
|
925
|
-
|
|
2102
|
+
/** Accessible name of the close button. Default: `UixLabelsProvider` `modal.close`, then "Close dialog". */
|
|
2103
|
+
closeLabel?: string;
|
|
926
2104
|
onConfirm: () => void | Promise<void>;
|
|
927
2105
|
onCancel: () => void;
|
|
928
2106
|
pending?: boolean;
|
|
@@ -989,13 +2167,33 @@ interface PromptDialogProps {
|
|
|
989
2167
|
placeholder?: string;
|
|
990
2168
|
submitLabel: ReactNode;
|
|
991
2169
|
cancelLabel: ReactNode;
|
|
992
|
-
|
|
2170
|
+
/** Accessible name of the close button. Default: `UixLabelsProvider` `modal.close`, then "Close dialog". */
|
|
2171
|
+
closeLabel?: string;
|
|
993
2172
|
onSubmit: (value: string) => void | Promise<void>;
|
|
994
2173
|
onCancel: () => void;
|
|
995
2174
|
validate?: (value: string) => ReactNode | undefined;
|
|
996
2175
|
pending?: boolean;
|
|
2176
|
+
/**
|
|
2177
|
+
* Ask for a longer answer in a textarea (a reason, a note); a number sets its rows, `true`
|
|
2178
|
+
* is 4. Enter adds a line there, so the form is sent with the submit button or Ctrl/⌘+Enter
|
|
2179
|
+
* (HAR-1614).
|
|
2180
|
+
*/
|
|
2181
|
+
multiline?: boolean | number;
|
|
2182
|
+
/**
|
|
2183
|
+
* The answer confirms something that cannot be taken back (a forced import): the submit
|
|
2184
|
+
* button is the danger button and the dialog is an `alertdialog`.
|
|
2185
|
+
*/
|
|
2186
|
+
destructive?: boolean;
|
|
2187
|
+
/**
|
|
2188
|
+
* Why the last submit failed, from the server. Shown under the field (`role="alert"`) and
|
|
2189
|
+
* tied to it; the dialog stays open. A message from `validate` takes its place while the
|
|
2190
|
+
* value is invalid.
|
|
2191
|
+
*/
|
|
2192
|
+
error?: ReactNode;
|
|
2193
|
+
/** Default: `'alertdialog'` when `destructive`, else `'dialog'`. */
|
|
2194
|
+
role?: 'dialog' | 'alertdialog';
|
|
997
2195
|
}
|
|
998
|
-
declare function PromptDialog({ open, title, description, inputLabel, defaultValue, placeholder, submitLabel, cancelLabel, closeLabel, onSubmit, onCancel, validate, pending }: PromptDialogProps): react.JSX.Element;
|
|
2196
|
+
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;
|
|
999
2197
|
|
|
1000
2198
|
interface DrawerProps extends Omit<HTMLAttributes<HTMLDialogElement>, 'title'> {
|
|
1001
2199
|
/** TENSOR RX-125 (UIX-04): translatable; English default. */
|
|
@@ -1037,6 +2235,47 @@ interface PeekProps extends Omit<HTMLAttributes<HTMLDialogElement>, 'title'> {
|
|
|
1037
2235
|
}
|
|
1038
2236
|
declare function Peek({ open, onClose, title, children, footer, onNavPrev, onNavNext, hint, previousLabel: previousLabelProp, nextLabel: nextLabelProp, closeLabel: closeLabelProp, className, onClick, ...rest }: PeekProps): react.JSX.Element;
|
|
1039
2237
|
|
|
2238
|
+
interface LightboxItem {
|
|
2239
|
+
src: string;
|
|
2240
|
+
/** Alternative text for an image; the video's name for a video. */
|
|
2241
|
+
alt: string;
|
|
2242
|
+
caption?: ReactNode;
|
|
2243
|
+
kind?: 'image' | 'video';
|
|
2244
|
+
/** Intrinsic size, so an SVG or a slow image keeps its box. */
|
|
2245
|
+
width?: number;
|
|
2246
|
+
height?: number;
|
|
2247
|
+
}
|
|
2248
|
+
interface LightboxLabels {
|
|
2249
|
+
region: string;
|
|
2250
|
+
previous: string;
|
|
2251
|
+
next: string;
|
|
2252
|
+
close: string;
|
|
2253
|
+
/** `{index}`, `{total}`. */
|
|
2254
|
+
counter: string;
|
|
2255
|
+
zoomIn: string;
|
|
2256
|
+
zoomOut: string;
|
|
2257
|
+
}
|
|
2258
|
+
declare const DEFAULT_LIGHTBOX_LABELS: LightboxLabels;
|
|
2259
|
+
interface LightboxProps {
|
|
2260
|
+
items: readonly LightboxItem[];
|
|
2261
|
+
/** The item on show (0-based). */
|
|
2262
|
+
index: number;
|
|
2263
|
+
onIndexChange: (index: number) => void;
|
|
2264
|
+
open: boolean;
|
|
2265
|
+
onClose: () => void;
|
|
2266
|
+
/** Wrap from the last item to the first. Default false. */
|
|
2267
|
+
loop?: boolean;
|
|
2268
|
+
labels?: Partial<LightboxLabels>;
|
|
2269
|
+
className?: string;
|
|
2270
|
+
}
|
|
2271
|
+
/**
|
|
2272
|
+
* A full-screen media viewer over `.uix-lightbox` (HAR-1367; TENSOR C12 `capture-viewer.tsx`,
|
|
2273
|
+
* MOTUS C-8 programme gallery): previous/next buttons, ←/→ and Home/End, swipe on touch, an
|
|
2274
|
+
* announced "n of total" counter, a caption, and a fit/actual-size toggle. Native `<dialog>`,
|
|
2275
|
+
* so focus stays inside and Escape closes; focus returns to the control that opened it.
|
|
2276
|
+
*/
|
|
2277
|
+
declare function Lightbox({ items, index, onIndexChange, open, onClose, loop, labels: labelOverrides, className }: LightboxProps): react.JSX.Element;
|
|
2278
|
+
|
|
1040
2279
|
interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
1041
2280
|
title?: ReactNode;
|
|
1042
2281
|
/** Element for the title — pick a real heading to slot the card into the page outline (UIX-A11Y-4). Default `div` keeps legacy rendering. */
|
|
@@ -1070,6 +2309,62 @@ interface CardLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 't
|
|
|
1070
2309
|
/** A whole-card anchor with visible hover and keyboard focus affordances. */
|
|
1071
2310
|
declare function CardLink({ title, subtitle, headerAction, footer, children, className, ...props }: CardLinkProps): react.JSX.Element;
|
|
1072
2311
|
|
|
2312
|
+
/** Columns at one width. */
|
|
2313
|
+
type DashboardGridColumnCount = 1 | 2 | 3 | 4;
|
|
2314
|
+
/**
|
|
2315
|
+
* A width of the GRID itself (a container query), not of the viewport:
|
|
2316
|
+
* `base` any width, `sm` ≥ 36rem, `md` ≥ 48rem, `lg` ≥ 60rem, `xl` ≥ 80rem.
|
|
2317
|
+
*/
|
|
2318
|
+
type DashboardGridBreakpoint = 'base' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2319
|
+
/**
|
|
2320
|
+
* One column count for every width, or a count per breakpoint. A breakpoint you leave out keeps
|
|
2321
|
+
* the count of the next smaller one, and a missing `base` is 1.
|
|
2322
|
+
*/
|
|
2323
|
+
type DashboardGridColumns = DashboardGridColumnCount | Partial<Record<DashboardGridBreakpoint, DashboardGridColumnCount>>;
|
|
2324
|
+
/** How much of the row an item takes. `2` clamps to the columns there are; `full` is always the whole row. */
|
|
2325
|
+
type DashboardGridSpan = 1 | 2 | 'full';
|
|
2326
|
+
/** Space between items: `sm` --uix-space-3, `md` --uix-space-4, `lg` --uix-space-6. */
|
|
2327
|
+
type DashboardGridGap = 'sm' | 'md' | 'lg';
|
|
2328
|
+
interface DashboardGridProps extends HTMLAttributes<HTMLDivElement> {
|
|
2329
|
+
/** Default: 1 column, 2 from `sm`, 3 from `lg` (of the grid's own width). */
|
|
2330
|
+
columns?: DashboardGridColumns;
|
|
2331
|
+
/** Default `md`. */
|
|
2332
|
+
gap?: DashboardGridGap;
|
|
2333
|
+
}
|
|
2334
|
+
interface DashboardGridItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
2335
|
+
/** Default `1`. */
|
|
2336
|
+
span?: DashboardGridSpan;
|
|
2337
|
+
}
|
|
2338
|
+
/**
|
|
2339
|
+
* The class list of a dashboard grid, for markup you render yourself (a server template, or a
|
|
2340
|
+
* drag-and-drop library's own element). Same output as `<DashboardGrid>`.
|
|
2341
|
+
*/
|
|
2342
|
+
declare function dashboardGridClassName(columns?: DashboardGridColumns, gap?: DashboardGridGap): string;
|
|
2343
|
+
/** The class list of a dashboard grid item, for markup you render yourself. */
|
|
2344
|
+
declare function dashboardGridItemClassName(span?: DashboardGridSpan): string;
|
|
2345
|
+
/**
|
|
2346
|
+
* A cell of a {@link DashboardGrid}: one column, two, or the full row. It is an inline-size
|
|
2347
|
+
* container (container name: uix-dashboard-grid-item), so its content can size from it, e.g. a Chart with
|
|
2348
|
+
* `height="clamp(160px, 40cqi, 360px)"`. Widgets in one row share a height.
|
|
2349
|
+
*/
|
|
2350
|
+
declare const DashboardGridItem: react.ForwardRefExoticComponent<DashboardGridItemProps & react.RefAttributes<HTMLDivElement>>;
|
|
2351
|
+
/**
|
|
2352
|
+
* The layout grid for dashboard widgets (HAR-1555). The column count follows the grid's own
|
|
2353
|
+
* width, so it adapts to a sidebar as well as to the screen. Pure layout: drag-and-drop,
|
|
2354
|
+
* persistence and widget chrome stay in the product. Server-renderable.
|
|
2355
|
+
*
|
|
2356
|
+
* ```tsx
|
|
2357
|
+
* <DashboardGrid columns={{ base: 1, sm: 2, lg: 3 }}>
|
|
2358
|
+
* <DashboardGrid.Item><Stat … /></DashboardGrid.Item>
|
|
2359
|
+
* <DashboardGrid.Item span={2}>…</DashboardGrid.Item>
|
|
2360
|
+
* <DashboardGrid.Item span="full"><Chart … /></DashboardGrid.Item>
|
|
2361
|
+
* </DashboardGrid>
|
|
2362
|
+
* ```
|
|
2363
|
+
*/
|
|
2364
|
+
declare const DashboardGrid: react.ForwardRefExoticComponent<DashboardGridProps & react.RefAttributes<HTMLDivElement>> & {
|
|
2365
|
+
Item: react.ForwardRefExoticComponent<DashboardGridItemProps & react.RefAttributes<HTMLDivElement>>;
|
|
2366
|
+
};
|
|
2367
|
+
|
|
1073
2368
|
interface BreadcrumbItem {
|
|
1074
2369
|
id?: string;
|
|
1075
2370
|
label: ReactNode;
|
|
@@ -1193,6 +2488,12 @@ interface CollapsibleSectionProps extends Omit<DetailsHTMLAttributes<HTMLDetails
|
|
|
1193
2488
|
title: ReactNode;
|
|
1194
2489
|
summary?: ReactNode;
|
|
1195
2490
|
children?: ReactNode;
|
|
2491
|
+
/**
|
|
2492
|
+
* Open when first rendered. With `persistKey`, what the person last chose wins over it:
|
|
2493
|
+
* "open by default, but remember" (HAR-1628). `open` is the same starting state and also
|
|
2494
|
+
* re-applies whenever the parent changes it.
|
|
2495
|
+
*/
|
|
2496
|
+
defaultOpen?: boolean;
|
|
1196
2497
|
/**
|
|
1197
2498
|
* Mount the body only while it is needed (HAR-1352; TENSOR B32): `true` mounts it while
|
|
1198
2499
|
* open and unmounts it on close; `'keep'` mounts it on first open and keeps it. For
|
|
@@ -1200,12 +2501,33 @@ interface CollapsibleSectionProps extends Omit<DetailsHTMLAttributes<HTMLDetails
|
|
|
1200
2501
|
*/
|
|
1201
2502
|
lazy?: boolean | 'keep';
|
|
1202
2503
|
/**
|
|
1203
|
-
* Remember the open state
|
|
1204
|
-
*
|
|
2504
|
+
* Remember the open state under this key (`uix:collapsible:<key>`), in `persistStorage`.
|
|
2505
|
+
* Applied after mount, so the server HTML uses `open` / `defaultOpen`; a remembered state
|
|
2506
|
+
* then replaces either.
|
|
1205
2507
|
*/
|
|
1206
2508
|
persistKey?: string;
|
|
1207
|
-
/**
|
|
2509
|
+
/**
|
|
2510
|
+
* Where `persistKey` keeps the state: `'session'` (`sessionStorage`, this tab until it
|
|
2511
|
+
* closes) or `'local'` (`localStorage`, across sessions). Default `'session'`.
|
|
2512
|
+
*/
|
|
2513
|
+
persistStorage?: 'session' | 'local';
|
|
2514
|
+
/**
|
|
2515
|
+
* Each new value opens the section, scrolls it into view and moves focus to its summary
|
|
2516
|
+
* ("jump to SLA"). A value already set when the section mounts is honoured too (a deep link
|
|
2517
|
+
* that lands on a closed section); `undefined` and `0` mean "no request yet", so a counter
|
|
2518
|
+
* that starts at 0 does not open anything.
|
|
2519
|
+
*/
|
|
1208
2520
|
openRequest?: number;
|
|
2521
|
+
/**
|
|
2522
|
+
* A quiet row for a section inside a card: no border or background of its own, tighter
|
|
2523
|
+
* padding, a rule between neighbouring compact sections.
|
|
2524
|
+
*/
|
|
2525
|
+
compact?: boolean;
|
|
2526
|
+
/**
|
|
2527
|
+
* Render the title as a heading of this level, and make the body a `role="region"` named by
|
|
2528
|
+
* it. Leave unset for a section that should stay out of the page outline.
|
|
2529
|
+
*/
|
|
2530
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
1209
2531
|
}
|
|
1210
2532
|
/**
|
|
1211
2533
|
* A `<details>` disclosure. Without `lazy`, `persistKey` or `openRequest` it is a plain,
|
|
@@ -1256,6 +2578,10 @@ interface DescriptionListItem {
|
|
|
1256
2578
|
id?: string;
|
|
1257
2579
|
term: ReactNode;
|
|
1258
2580
|
description: ReactNode;
|
|
2581
|
+
/** Attributes for this row's `<dt>` (an `id` to anchor to, `data-*`). */
|
|
2582
|
+
termProps?: HTMLAttributes<HTMLElement>;
|
|
2583
|
+
/** Attributes for this row's `<dd>`. */
|
|
2584
|
+
descriptionProps?: HTMLAttributes<HTMLElement>;
|
|
1259
2585
|
}
|
|
1260
2586
|
interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {
|
|
1261
2587
|
items?: DescriptionListItem[];
|
|
@@ -1265,15 +2591,27 @@ declare function DescriptionList({ items, children, className, ...props }: Descr
|
|
|
1265
2591
|
interface DescriptionItemProps {
|
|
1266
2592
|
term: ReactNode;
|
|
1267
2593
|
children?: ReactNode;
|
|
2594
|
+
/**
|
|
2595
|
+
* Attributes for the `<dt>`: an `id` a deep link or `aria-describedby` points at, `data-*`,
|
|
2596
|
+
* a `className` (HAR-1628). The pair has no wrapper element, so this is where they go.
|
|
2597
|
+
*/
|
|
2598
|
+
termProps?: HTMLAttributes<HTMLElement>;
|
|
2599
|
+
/** Attributes for the `<dd>`. */
|
|
2600
|
+
descriptionProps?: HTMLAttributes<HTMLElement>;
|
|
1268
2601
|
}
|
|
1269
2602
|
/**
|
|
1270
2603
|
* One hand-authored row. Renders a `<dt>`/`<dd>` fragment so the pair lands as
|
|
1271
2604
|
* direct grid children of the enclosing `<DescriptionList>` (never wrap it in
|
|
1272
2605
|
* an element — that breaks the two-column alignment).
|
|
1273
2606
|
*/
|
|
1274
|
-
declare function DescriptionItem({ term, children }: DescriptionItemProps): react.JSX.Element;
|
|
2607
|
+
declare function DescriptionItem({ term, children, termProps, descriptionProps }: DescriptionItemProps): react.JSX.Element;
|
|
1275
2608
|
|
|
1276
|
-
|
|
2609
|
+
/**
|
|
2610
|
+
* Besides its own props, `Tabs` takes the HTML attributes of the `role="tablist"` element and
|
|
2611
|
+
* renders them there, in both overflow modes: `aria-label` / `aria-labelledby` to name the
|
|
2612
|
+
* tablist (HAR-1600), `id`, `data-*`. `role` stays `tablist`.
|
|
2613
|
+
*/
|
|
2614
|
+
interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'role'> {
|
|
1277
2615
|
variant?: 'line' | 'enclosed' | 'pill';
|
|
1278
2616
|
value?: string;
|
|
1279
2617
|
onChange?: (value: string) => void;
|
|
@@ -1293,7 +2631,7 @@ interface TabsProps {
|
|
|
1293
2631
|
*/
|
|
1294
2632
|
activation?: 'automatic' | 'manual';
|
|
1295
2633
|
}
|
|
1296
|
-
declare function Tabs({ variant, value, onChange, children, className, overflow, activation }: TabsProps): react.JSX.Element;
|
|
2634
|
+
declare function Tabs({ variant, value, onChange, children, className, overflow, activation, onKeyDown: onKeyDownProp, ...listProps }: TabsProps): react.JSX.Element;
|
|
1297
2635
|
interface TabProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
1298
2636
|
value: string;
|
|
1299
2637
|
children?: ReactNode;
|
|
@@ -1500,23 +2838,117 @@ interface NavFavouritesProps {
|
|
|
1500
2838
|
*/
|
|
1501
2839
|
declare function NavFavourites({ items, collapsed, onToggleCollapsed, onRemove, onReorder, labels, emptyReason, className, }: NavFavouritesProps): react.JSX.Element;
|
|
1502
2840
|
|
|
2841
|
+
interface AttachmentProps extends Omit<LiHTMLAttributes<HTMLLIElement>, 'children'> {
|
|
2842
|
+
/** File name as the user should read it (decrypted, if the product stores it encrypted). */
|
|
2843
|
+
name: string;
|
|
2844
|
+
/** Bytes. */
|
|
2845
|
+
size?: number;
|
|
2846
|
+
/** MIME type, for the file glyph. */
|
|
2847
|
+
type?: string;
|
|
2848
|
+
/** Opens or downloads the file. The name becomes the link. */
|
|
2849
|
+
href?: string;
|
|
2850
|
+
/** Download instead of opening; a string sets the saved file name. */
|
|
2851
|
+
download?: boolean | string;
|
|
2852
|
+
renderLink?: UixRenderLink;
|
|
2853
|
+
/** A quieter line: who added it and when. */
|
|
2854
|
+
meta?: ReactNode;
|
|
2855
|
+
/** A state slot after the name, e.g. `<StatusPill tone="warning">Scanning</StatusPill>`. */
|
|
2856
|
+
state?: ReactNode;
|
|
2857
|
+
/** Replaces the file glyph (e.g. an image thumbnail). */
|
|
2858
|
+
thumbnail?: ReactNode;
|
|
2859
|
+
/** Adds a remove button; confirm destructive removals in the handler (`ConfirmDialog`/`Popconfirm`). */
|
|
2860
|
+
onRemove?: () => void;
|
|
2861
|
+
/** `loading` (no link yet), `error` (shows `error`), `forbidden` (no link, a reason). */
|
|
2862
|
+
status?: 'ready' | 'loading' | 'error' | 'forbidden';
|
|
2863
|
+
error?: ReactNode;
|
|
2864
|
+
/** Extra actions at the end of the row. */
|
|
2865
|
+
actions?: ReactNode;
|
|
2866
|
+
locale?: string;
|
|
2867
|
+
/** Count sizes in 1024s (1 MB = 1,048,576 bytes) instead of 1000s. Default `1000`. */
|
|
2868
|
+
sizeBase?: 1000 | 1024;
|
|
2869
|
+
/** The product's own size formatter; it replaces `formatFileSize` (and `sizeBase`). */
|
|
2870
|
+
formatSize?: FileSizeFormatter;
|
|
2871
|
+
/**
|
|
2872
|
+
* Words for this row. Each one defaults to `UixLabelsProvider` `attachment`, then to English,
|
|
2873
|
+
* so one provider translates every row below it (HAR-1630).
|
|
2874
|
+
*/
|
|
2875
|
+
labels?: Partial<AttachmentLabels>;
|
|
2876
|
+
}
|
|
2877
|
+
/**
|
|
2878
|
+
* One file row (HAR-985; TENSOR C15/B12 `attachments-panel-view.tsx`, MEDx S19/S52): glyph or
|
|
2879
|
+
* thumbnail, the name as a link, size and meta, a state slot, and remove. Server-renderable:
|
|
2880
|
+
* the words that come from `UixLabelsProvider` are rendered by small client parts.
|
|
2881
|
+
*/
|
|
2882
|
+
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;
|
|
2883
|
+
interface AttachmentListProps extends HTMLAttributes<HTMLUListElement> {
|
|
2884
|
+
/** Names the list, e.g. "Attachments (3)". */
|
|
2885
|
+
label?: string;
|
|
2886
|
+
children?: ReactNode;
|
|
2887
|
+
}
|
|
2888
|
+
/** A list of `Attachment` rows. */
|
|
2889
|
+
declare function AttachmentList({ label, className, children, ...props }: AttachmentListProps): react.JSX.Element;
|
|
2890
|
+
|
|
1503
2891
|
type AlertTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
1504
2892
|
interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
1505
2893
|
tone?: AlertTone;
|
|
1506
2894
|
title?: ReactNode;
|
|
1507
2895
|
icon?: ReactNode;
|
|
1508
2896
|
children?: ReactNode;
|
|
2897
|
+
/**
|
|
2898
|
+
* A trailing slot for what the alert offers to do: a `Button`, a link (HAR-1614). It keeps
|
|
2899
|
+
* its place at the end while the text beside it wraps.
|
|
2900
|
+
*/
|
|
2901
|
+
actions?: ReactNode;
|
|
2902
|
+
/**
|
|
2903
|
+
* Adds a × at the end. The alert does not hide itself: stop rendering it in the handler, and
|
|
2904
|
+
* move focus somewhere sensible if the alert held it.
|
|
2905
|
+
*/
|
|
2906
|
+
onDismiss?: () => void;
|
|
2907
|
+
/** Accessible name of the ×. Default: `UixLabelsProvider` `alert.dismiss`, then "Dismiss". */
|
|
2908
|
+
dismissLabel?: string;
|
|
1509
2909
|
}
|
|
1510
|
-
|
|
2910
|
+
/**
|
|
2911
|
+
* Inline banner over `.uix-alert`. The ref is the alert element, so a form can move focus to
|
|
2912
|
+
* its error message (give it `tabIndex={-1}`).
|
|
2913
|
+
*/
|
|
2914
|
+
declare const Alert: react.ForwardRefExoticComponent<AlertProps & react.RefAttributes<HTMLDivElement>>;
|
|
1511
2915
|
|
|
1512
2916
|
interface SpinnerProps extends HTMLAttributes<HTMLSpanElement> {
|
|
1513
|
-
|
|
2917
|
+
/** `sm` 16 px (inline, beside text or inside a 24 px control), `md` 20 px (default), `lg` 32 px. */
|
|
2918
|
+
size?: 'sm' | 'md' | 'lg';
|
|
1514
2919
|
accent?: boolean;
|
|
1515
2920
|
/** Announced loading text (default "Loading…"). */
|
|
1516
2921
|
label?: string;
|
|
1517
2922
|
}
|
|
1518
2923
|
declare function Spinner({ size, accent, label, className, ...props }: SpinnerProps): react.JSX.Element;
|
|
1519
2924
|
|
|
2925
|
+
type HeartbeatState = 'live' | 'idle' | 'warning' | 'danger';
|
|
2926
|
+
interface HeartbeatProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
|
|
2927
|
+
/**
|
|
2928
|
+
* `live` (default): a green dot with a pulsing ring. `warning` / `danger`: the same in that
|
|
2929
|
+
* tone. `idle`: a grey dot, no ring.
|
|
2930
|
+
*/
|
|
2931
|
+
state?: HeartbeatState;
|
|
2932
|
+
/**
|
|
2933
|
+
* What the dot means, for assistive technology ("Live", "Connection lost"). Without it the
|
|
2934
|
+
* dot is decorative (`aria-hidden`): say the state in text beside it, as `LiveIndicator` does.
|
|
2935
|
+
*/
|
|
2936
|
+
label?: string;
|
|
2937
|
+
}
|
|
2938
|
+
/**
|
|
2939
|
+
* The pulsing status dot over `.uix-heartbeat` (HAR-1606), so products stop hand-writing its
|
|
2940
|
+
* three spans. Decorative unless it has a `label`. The ring stops under
|
|
2941
|
+
* `prefers-reduced-motion` (the kit's global motion guard); the dot and its colour stay.
|
|
2942
|
+
*/
|
|
2943
|
+
declare function Heartbeat({ state, label, className, ...props }: HeartbeatProps): react.JSX.Element;
|
|
2944
|
+
interface LiveIndicatorProps extends HTMLAttributes<HTMLSpanElement> {
|
|
2945
|
+
state?: HeartbeatState;
|
|
2946
|
+
/** The state in words: "Live", "Paused", "Reconnecting…". It is what a screen reader gets. */
|
|
2947
|
+
children?: ReactNode;
|
|
2948
|
+
}
|
|
2949
|
+
/** A `Heartbeat` with its state in text beside it, over `.uix-live`. */
|
|
2950
|
+
declare function LiveIndicator({ state, children, className, ...props }: LiveIndicatorProps): react.JSX.Element;
|
|
2951
|
+
|
|
1520
2952
|
/**
|
|
1521
2953
|
* The imperative toast queue behind `toast()` (HAR-1363; TENSOR A2/C3, MOTUS A3/A4/C-13).
|
|
1522
2954
|
* Plain module state, no React: mutation helpers and server-action wrappers can call
|
|
@@ -1730,14 +3162,20 @@ declare function Highlighted({ text, query }: HighlightedProps): react.JSX.Eleme
|
|
|
1730
3162
|
|
|
1731
3163
|
type PillTone = 'neutral' | 'success' | 'info' | 'warning' | 'danger' | 'critical' | 'muted' | 'attention' | 'overdue' | 'sla-ok' | 'sla-at-risk' | 'sla-breached' | 'p1' | 'p2' | 'p3' | 'p4' | 'p5';
|
|
1732
3164
|
type PillTreatment = 'filled' | 'outline';
|
|
3165
|
+
type PillSize = 'sm' | 'md' | 'lg';
|
|
1733
3166
|
interface StatusPillProps extends HTMLAttributes<HTMLSpanElement> {
|
|
1734
3167
|
tone?: PillTone;
|
|
1735
3168
|
/** 'filled' (default) = tinted wash; 'outline' = transparent fill + tone-tinted border. */
|
|
1736
3169
|
treatment?: PillTreatment;
|
|
3170
|
+
/**
|
|
3171
|
+
* `sm` for a dense table cell or beside small text, `lg` for a page header (the public status
|
|
3172
|
+
* page). Default `md`, the size every pill had before (HAR-1614).
|
|
3173
|
+
*/
|
|
3174
|
+
size?: PillSize;
|
|
1737
3175
|
dot?: boolean;
|
|
1738
3176
|
children?: ReactNode;
|
|
1739
3177
|
}
|
|
1740
|
-
declare function StatusPill({ tone, treatment, dot, children, className, ...props }: StatusPillProps): react.JSX.Element;
|
|
3178
|
+
declare function StatusPill({ tone, treatment, size, dot, children, className, ...props }: StatusPillProps): react.JSX.Element;
|
|
1741
3179
|
|
|
1742
3180
|
interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
1743
3181
|
/** 0..max. Ignored when `indeterminate`. */
|
|
@@ -1751,8 +3189,12 @@ interface ProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
1751
3189
|
}
|
|
1752
3190
|
declare function Progress({ value, max, indeterminate, label, className, ...props }: ProgressProps): react.JSX.Element;
|
|
1753
3191
|
|
|
1754
|
-
/**
|
|
1755
|
-
|
|
3192
|
+
/**
|
|
3193
|
+
* Fill color tone for the meter bar. Defaults to `success` (green).
|
|
3194
|
+
* `neutral` and `accent` are for a plain proportion that is neither good nor bad (a poll
|
|
3195
|
+
* option's share of the votes): a grey or brand fill, and no tone word is spoken (HAR-1606).
|
|
3196
|
+
*/
|
|
3197
|
+
type MeterTone = 'success' | 'warning' | 'danger' | 'attention' | 'overdue' | 'neutral' | 'accent';
|
|
1756
3198
|
interface MeterProps extends HTMLAttributes<HTMLDivElement> {
|
|
1757
3199
|
/** Fill level 0–100. Clamped to this range. */
|
|
1758
3200
|
value?: number;
|
|
@@ -1761,7 +3203,7 @@ interface MeterProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
1761
3203
|
/** Accessible name — rendered as `aria-label` (an explicit `aria-label` prop wins). */
|
|
1762
3204
|
label?: string;
|
|
1763
3205
|
/** TENSOR RX-125 (UIX-04): the spoken tone words; English defaults. */
|
|
1764
|
-
toneLabels?: Partial<Record<Exclude<MeterTone, 'success'>, string>>;
|
|
3206
|
+
toneLabels?: Partial<Record<Exclude<MeterTone, 'success' | 'neutral' | 'accent'>, string>>;
|
|
1765
3207
|
}
|
|
1766
3208
|
/** Horizontal utilization / threshold bar backed by `.uix-meter`. */
|
|
1767
3209
|
declare function Meter({ value, tone, label, toneLabels, className, ...props }: MeterProps): react.JSX.Element;
|
|
@@ -1833,13 +3275,26 @@ interface ChipProps extends Omit<HTMLAttributes<HTMLElement>, 'onClick'> {
|
|
|
1833
3275
|
/** A link chip. */
|
|
1834
3276
|
href?: string;
|
|
1835
3277
|
renderLink?: UixRenderLink;
|
|
3278
|
+
/**
|
|
3279
|
+
* A link chip for the page that is open: `aria-current="page"` and the filled look
|
|
3280
|
+
* (HAR-1632). `pressed` gives the same look but says "toggle button", which a link is not.
|
|
3281
|
+
*/
|
|
3282
|
+
current?: boolean;
|
|
1836
3283
|
/** Adds a × button that removes the chip. */
|
|
1837
3284
|
onRemove?: () => void;
|
|
1838
3285
|
/**
|
|
1839
3286
|
* Accessible name of the × button. `{label}` is replaced by the chip text when it is a
|
|
1840
|
-
* string. Default "Remove {label}"; pass a full name
|
|
3287
|
+
* string. Default: `UixLabelsProvider` `chip.remove`, then "Remove {label}"; pass a full name
|
|
3288
|
+
* when the text is not a string.
|
|
1841
3289
|
*/
|
|
1842
3290
|
removeLabel?: string;
|
|
3291
|
+
/**
|
|
3292
|
+
* Attributes for the body: the element that carries the chip's own action. On a plain chip
|
|
3293
|
+
* that is the chip itself, where the other props already go; on a removable chip the other
|
|
3294
|
+
* props go to the wrapper, so this is how `aria-haspopup`, `aria-expanded`, `aria-controls`
|
|
3295
|
+
* or an `id` reach the button that opens the filter editor (HAR-1632).
|
|
3296
|
+
*/
|
|
3297
|
+
bodyProps?: HTMLAttributes<HTMLElement>;
|
|
1843
3298
|
/** `add` is the dashed "+ Add filter" chip. */
|
|
1844
3299
|
variant?: 'default' | 'add';
|
|
1845
3300
|
disabled?: boolean;
|
|
@@ -1847,8 +3302,10 @@ interface ChipProps extends Omit<HTMLAttributes<HTMLElement>, 'onClick'> {
|
|
|
1847
3302
|
/**
|
|
1848
3303
|
* Filter, tag and token chip over `.uix-chip` (HAR-1360; TENSOR C7/B34, MOTUS C-6/B-A18).
|
|
1849
3304
|
* Plain text, a toggle, a link or a button, optionally with a × that removes it.
|
|
3305
|
+
* The ref goes to the body (the button, link or span that carries the chip's action), also on
|
|
3306
|
+
* a removable chip: anchor a popover to it and return focus to it without a DOM lookup.
|
|
1850
3307
|
*/
|
|
1851
|
-
declare
|
|
3308
|
+
declare const Chip: react.ForwardRefExoticComponent<ChipProps & react.RefAttributes<HTMLElement>>;
|
|
1852
3309
|
interface ChipGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
1853
3310
|
/** Names the group, e.g. "Active filters". */
|
|
1854
3311
|
label?: string;
|
|
@@ -1893,9 +3350,20 @@ declare const DEFAULT_STEP_STATE_LABELS: StepStateLabels;
|
|
|
1893
3350
|
interface StepsProps extends HTMLAttributes<HTMLOListElement> {
|
|
1894
3351
|
/**
|
|
1895
3352
|
* `horizontal` (default) lays the steps in a row and stacks them below 40rem;
|
|
1896
|
-
* `vertical` always stacks, with descriptions under each title.
|
|
3353
|
+
* `vertical` always stacks, with descriptions under each title. Steps that hold
|
|
3354
|
+
* content (`progress={false}`) are always vertical.
|
|
1897
3355
|
*/
|
|
1898
3356
|
orientation?: 'horizontal' | 'vertical';
|
|
3357
|
+
/**
|
|
3358
|
+
* `true` (default): a progress indicator. Every step has a state, which is read after its
|
|
3359
|
+
* title, and the current one carries `aria-current="step"`.
|
|
3360
|
+
* `false`: a numbered list of sections that are all on screen at once (an intake form in
|
|
3361
|
+
* four parts). No state is drawn or announced, and each `Step`'s children are its content,
|
|
3362
|
+
* in a group named by the step's title (HAR-1628).
|
|
3363
|
+
*/
|
|
3364
|
+
progress?: boolean;
|
|
3365
|
+
/** Render each step's title as a heading of this level (for `progress={false}` sections). */
|
|
3366
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
1899
3367
|
/** Names the list, e.g. "Intake progress". */
|
|
1900
3368
|
label?: string;
|
|
1901
3369
|
stateLabels?: Partial<StepStateLabels>;
|
|
@@ -1912,16 +3380,29 @@ interface StepProps extends Omit<LiHTMLAttributes<HTMLLIElement>, 'title'> {
|
|
|
1912
3380
|
href?: string;
|
|
1913
3381
|
renderLink?: UixRenderLink;
|
|
1914
3382
|
onSelect?: () => void;
|
|
3383
|
+
/**
|
|
3384
|
+
* The step's content: fields, text, a table. Rendered under the title in a group named by
|
|
3385
|
+
* it. Meant for `<Steps progress={false}>`; in a progress indicator keep steps to a title
|
|
3386
|
+
* and a description.
|
|
3387
|
+
*/
|
|
3388
|
+
children?: ReactNode;
|
|
1915
3389
|
/** Set by `Steps`. */
|
|
1916
3390
|
index?: number;
|
|
1917
3391
|
/** Set by `Steps`. */
|
|
1918
3392
|
last?: boolean;
|
|
1919
3393
|
/** Set by `Steps`. */
|
|
1920
3394
|
stateLabels?: StepStateLabels;
|
|
3395
|
+
/** Set by `Steps`. */
|
|
3396
|
+
progress?: boolean;
|
|
3397
|
+
/** Set by `Steps`. */
|
|
3398
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
1921
3399
|
}
|
|
1922
|
-
/**
|
|
1923
|
-
|
|
1924
|
-
|
|
3400
|
+
/**
|
|
3401
|
+
* Numbered progress through a multi-step flow (HAR-1362; TENSOR C13, MOTUS C-9), or with
|
|
3402
|
+
* `progress={false}` a numbered list of sections that each hold content (HAR-1628).
|
|
3403
|
+
*/
|
|
3404
|
+
declare function Steps({ orientation, progress, headingLevel, label, stateLabels, className, children, ...props }: StepsProps): react.JSX.Element;
|
|
3405
|
+
declare function Step({ title, description, state, marker, href, renderLink, onSelect, children, index, last, stateLabels, progress, headingLevel, className, ...props }: StepProps): react.JSX.Element;
|
|
1925
3406
|
|
|
1926
3407
|
interface TooltipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'content'> {
|
|
1927
3408
|
/** Tooltip text. Pass this or `content`. */
|
|
@@ -2196,6 +3677,14 @@ interface SegmentedProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'
|
|
|
2196
3677
|
value?: string;
|
|
2197
3678
|
/** Fires with the option's value when a different option is chosen. */
|
|
2198
3679
|
onChange?: (value: string) => void;
|
|
3680
|
+
/**
|
|
3681
|
+
* How the choice is exposed to assistive technology (HAR-1604).
|
|
3682
|
+
* `'toggle'` (default): `role="group"` of buttons with `aria-pressed`, for a view or filter
|
|
3683
|
+
* toggle bar. `'radio'`: `role="radiogroup"` of `role="radio"` with `aria-checked`, for a
|
|
3684
|
+
* setting with exactly one value (theme, density, language). Name the group with
|
|
3685
|
+
* `aria-label` or `aria-labelledby` in either mode. The keyboard model is the same in both.
|
|
3686
|
+
*/
|
|
3687
|
+
selection?: 'toggle' | 'radio';
|
|
2199
3688
|
children?: ReactNode;
|
|
2200
3689
|
}
|
|
2201
3690
|
/**
|
|
@@ -2203,16 +3692,22 @@ interface SegmentedProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'
|
|
|
2203
3692
|
* (density, audience, view mode …) that reads as one pill with a lifted active
|
|
2204
3693
|
* segment. Selection state is shared with `<SegmentedOption>` via context, so
|
|
2205
3694
|
* the caller only wires `value` + `onChange` once.
|
|
3695
|
+
*
|
|
3696
|
+
* Keyboard (HAR-1604): the group is ONE tab stop, on the selected option (the first enabled
|
|
3697
|
+
* one when nothing is selected). Arrow Right/Down and Left/Up move to the next / previous
|
|
3698
|
+
* enabled option and select it, wrapping at the ends; Home and End jump; Left/Right swap in
|
|
3699
|
+
* a right-to-left group. Before 2.32.0 every option was its own tab stop.
|
|
2206
3700
|
*/
|
|
2207
|
-
declare function Segmented({ value, onChange, children, className, ...props }: SegmentedProps): react.JSX.Element;
|
|
3701
|
+
declare function Segmented({ value, onChange, selection, children, className, onKeyDown, ...props }: SegmentedProps): react.JSX.Element;
|
|
2208
3702
|
interface SegmentedOptionProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'onChange'> {
|
|
2209
3703
|
value: string;
|
|
2210
3704
|
children?: ReactNode;
|
|
2211
3705
|
}
|
|
2212
3706
|
/**
|
|
2213
3707
|
* One option in a `<Segmented>`. Active state is derived from the parent's
|
|
2214
|
-
* `value`; the
|
|
2215
|
-
* `.uix-segmented__option[aria-pressed="true"]
|
|
3708
|
+
* `value`; the selected segment lifts to the surface via
|
|
3709
|
+
* `.uix-segmented__option[aria-pressed="true"]` (or `[aria-checked="true"]` in a
|
|
3710
|
+
* `selection="radio"` group).
|
|
2216
3711
|
*/
|
|
2217
3712
|
declare function SegmentedOption({ value, children, className, onClick, ...props }: SegmentedOptionProps): react.JSX.Element;
|
|
2218
3713
|
|
|
@@ -2425,9 +3920,13 @@ interface ProseProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
2425
3920
|
* release notes). Apply to a block of rendered HTML/markdown.
|
|
2426
3921
|
*/
|
|
2427
3922
|
declare function Prose({ children, className, ...props }: ProseProps): react.JSX.Element;
|
|
2428
|
-
type NoteTone = 'info' | 'success' | 'warning' | 'danger';
|
|
3923
|
+
type NoteTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
2429
3924
|
interface NoteProps extends HTMLAttributes<HTMLDivElement> {
|
|
2430
|
-
|
|
3925
|
+
/**
|
|
3926
|
+
* `'neutral'` and `undefined` are both the default look. `undefined` is spelled out in the type
|
|
3927
|
+
* so `tone={maybeTone}` also compiles under `exactOptionalPropertyTypes` (HAR-1614).
|
|
3928
|
+
*/
|
|
3929
|
+
tone?: NoteTone | undefined;
|
|
2431
3930
|
icon?: ReactNode;
|
|
2432
3931
|
children?: ReactNode;
|
|
2433
3932
|
}
|
|
@@ -2442,7 +3941,8 @@ interface PopoverProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
2442
3941
|
popover?: 'auto' | 'manual';
|
|
2443
3942
|
/**
|
|
2444
3943
|
* Element (or ref) to anchor against. When set, the popover is placed with
|
|
2445
|
-
* cross-browser JS positioning — flip when it won't fit, shift to stay on-screen.
|
|
3944
|
+
* cross-browser JS positioning — flip when it won't fit, shift to stay on-screen. A popover
|
|
3945
|
+
* that fits neither above nor below slides over its anchor rather than leave the viewport.
|
|
2446
3946
|
* Where the browser supports CSS anchor positioning, the placement is written as an
|
|
2447
3947
|
* offset from the anchor, so it stays attached while the page scrolls; elsewhere it
|
|
2448
3948
|
* follows scroll from JS. The native Popover API still provides the top layer (so it
|
|
@@ -2462,6 +3962,24 @@ interface PopoverProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
2462
3962
|
closeWhenAnchorHidden?: boolean;
|
|
2463
3963
|
/** Called when `closeWhenAnchorHidden` is about to close the popover. */
|
|
2464
3964
|
onAnchorHidden?: () => void;
|
|
3965
|
+
/**
|
|
3966
|
+
* Cap the popover's height to the viewport (minus 8 px at each edge) and scroll inside it,
|
|
3967
|
+
* for content that can be taller than a phone screen. Needs `anchor`. Default `false`.
|
|
3968
|
+
*/
|
|
3969
|
+
capHeight?: boolean;
|
|
3970
|
+
/**
|
|
3971
|
+
* Open while the pointer is over the `anchor` or the anchor has keyboard focus, and close
|
|
3972
|
+
* when both have left the anchor and the popover — a hover card (HAR-1614). The pointer can
|
|
3973
|
+
* travel from the anchor into the popover, and focus can move into it, without closing it;
|
|
3974
|
+
* Escape closes it. Touch does not hover: open it from the anchor's own click there.
|
|
3975
|
+
* `true` waits 300 ms before opening and 150 ms before closing; pass the delays to change
|
|
3976
|
+
* them. Needs `anchor`; `popover` then defaults to `"manual"`, so a hover card does not
|
|
3977
|
+
* dismiss a menu or dialog that is open.
|
|
3978
|
+
*/
|
|
3979
|
+
openOnHover?: boolean | {
|
|
3980
|
+
openDelay?: number;
|
|
3981
|
+
closeDelay?: number;
|
|
3982
|
+
};
|
|
2465
3983
|
children?: ReactNode;
|
|
2466
3984
|
}
|
|
2467
3985
|
/**
|
|
@@ -2469,15 +3987,20 @@ interface PopoverProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
2469
3987
|
* things like a filter popover, menu, or rich select by putting controls inside.
|
|
2470
3988
|
* Pass `anchor` to get collision-aware, cross-browser placement (UIX-FIX-02).
|
|
2471
3989
|
*/
|
|
2472
|
-
declare function Popover({ popover, anchor, placement, offset, closeWhenAnchorHidden, onAnchorHidden, className, children, ...props }: PopoverProps): react.JSX.Element;
|
|
3990
|
+
declare function Popover({ popover: popoverProp, anchor, placement, offset, closeWhenAnchorHidden, onAnchorHidden, capHeight, openOnHover, className, children, ...props }: PopoverProps): react.JSX.Element;
|
|
2473
3991
|
|
|
3992
|
+
/** `id` and `data-*` for the item's own element (HAR-1629): a stable hook for tests, journeys and analytics. */
|
|
3993
|
+
interface MenuItemAttributes {
|
|
3994
|
+
id?: string;
|
|
3995
|
+
[dataAttribute: `data-${string}`]: string | number | boolean | undefined;
|
|
3996
|
+
}
|
|
2474
3997
|
interface MenuProps {
|
|
2475
3998
|
/**
|
|
2476
3999
|
* The menu button, usually a `Button`. It receives `aria-haspopup="menu"`,
|
|
2477
4000
|
* `aria-expanded`, `aria-controls` and the open/keyboard handlers.
|
|
2478
4001
|
*/
|
|
2479
4002
|
trigger: ReactElement;
|
|
2480
|
-
/** `MenuItem`, `MenuGroup` and `MenuSeparator`. */
|
|
4003
|
+
/** `MenuItem`, `MenuItemRadio`, `MenuItemCheckbox`, `MenuRadioGroup`, `MenuGroup` and `MenuSeparator`. */
|
|
2481
4004
|
children?: ReactNode;
|
|
2482
4005
|
/** Controlled open state; pair with `onOpenChange`. */
|
|
2483
4006
|
open?: boolean;
|
|
@@ -2491,10 +4014,11 @@ interface MenuProps {
|
|
|
2491
4014
|
/**
|
|
2492
4015
|
* A menu button with an APG menu (HAR-1359; TENSOR C1, MOTUS B-A14): ↓/↑ move, Home/End,
|
|
2493
4016
|
* type-to-find, Enter/Space activate, Esc and Tab close, focus returns to the trigger.
|
|
2494
|
-
* The surface is the kit `Popover`, so it escapes clipping containers
|
|
4017
|
+
* The surface is the kit `Popover`, so it escapes clipping containers; a menu taller than
|
|
4018
|
+
* the viewport is capped to it and scrolls (HAR-1613).
|
|
2495
4019
|
*/
|
|
2496
4020
|
declare function Menu({ trigger, children, open: controlledOpen, defaultOpen, onOpenChange, label, placement, className }: MenuProps): react.JSX.Element;
|
|
2497
|
-
interface MenuItemProps {
|
|
4021
|
+
interface MenuItemProps extends MenuItemAttributes {
|
|
2498
4022
|
children?: ReactNode;
|
|
2499
4023
|
/** Runs on click, Enter or Space; the menu then closes and focus returns to the trigger. */
|
|
2500
4024
|
onSelect?: () => void;
|
|
@@ -2508,7 +4032,49 @@ interface MenuItemProps {
|
|
|
2508
4032
|
disabled?: boolean;
|
|
2509
4033
|
className?: string;
|
|
2510
4034
|
}
|
|
2511
|
-
declare function MenuItem({ children, onSelect, href, renderLink, icon, shortcut, tone, disabled, className }: MenuItemProps): react.JSX.Element;
|
|
4035
|
+
declare function MenuItem({ children, onSelect, href, renderLink, icon, shortcut, tone, disabled, className, ...rest }: MenuItemProps): react.JSX.Element;
|
|
4036
|
+
interface MenuRadioGroupProps {
|
|
4037
|
+
/** The `value` of the checked `MenuItemRadio`. */
|
|
4038
|
+
value?: string;
|
|
4039
|
+
onValueChange?: (value: string) => void;
|
|
4040
|
+
/** Visible group heading; it also names the group. */
|
|
4041
|
+
label?: ReactNode;
|
|
4042
|
+
/** Names the group when there is no visible `label`. */
|
|
4043
|
+
'aria-label'?: string;
|
|
4044
|
+
children?: ReactNode;
|
|
4045
|
+
}
|
|
4046
|
+
/** One choice out of several inside a `Menu`: wraps `MenuItemRadio` rows and holds their value (HAR-1629). */
|
|
4047
|
+
declare function MenuRadioGroup({ value, onValueChange, label, 'aria-label': ariaLabel, children }: MenuRadioGroupProps): react.JSX.Element;
|
|
4048
|
+
interface MenuItemRadioProps extends MenuItemAttributes {
|
|
4049
|
+
/** Checked when it equals the surrounding `MenuRadioGroup`'s `value`. */
|
|
4050
|
+
value: string;
|
|
4051
|
+
/** For a radio item used without a `MenuRadioGroup`. */
|
|
4052
|
+
checked?: boolean;
|
|
4053
|
+
/** Runs when the item is chosen, after the group's `onValueChange`. */
|
|
4054
|
+
onSelect?: () => void;
|
|
4055
|
+
/** Close the menu after a click or Enter. Default `true`. Space never closes it. */
|
|
4056
|
+
closeOnSelect?: boolean;
|
|
4057
|
+
children?: ReactNode;
|
|
4058
|
+
icon?: ReactNode;
|
|
4059
|
+
shortcut?: ReactNode;
|
|
4060
|
+
disabled?: boolean;
|
|
4061
|
+
className?: string;
|
|
4062
|
+
}
|
|
4063
|
+
/** A `role="menuitemradio"` row with `aria-checked` and a check mark for the current choice. */
|
|
4064
|
+
declare function MenuItemRadio({ value, checked, onSelect, closeOnSelect, ...rest }: MenuItemRadioProps): react.JSX.Element;
|
|
4065
|
+
interface MenuItemCheckboxProps extends MenuItemAttributes {
|
|
4066
|
+
checked: boolean;
|
|
4067
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
4068
|
+
/** Close the menu after a click or Enter. Default `false`: several boxes are usually ticked in a row. */
|
|
4069
|
+
closeOnSelect?: boolean;
|
|
4070
|
+
children?: ReactNode;
|
|
4071
|
+
icon?: ReactNode;
|
|
4072
|
+
shortcut?: ReactNode;
|
|
4073
|
+
disabled?: boolean;
|
|
4074
|
+
className?: string;
|
|
4075
|
+
}
|
|
4076
|
+
/** A `role="menuitemcheckbox"` row with `aria-checked`; the menu stays open while boxes are ticked. */
|
|
4077
|
+
declare function MenuItemCheckbox({ checked, onCheckedChange, closeOnSelect, ...rest }: MenuItemCheckboxProps): react.JSX.Element;
|
|
2512
4078
|
interface MenuGroupProps {
|
|
2513
4079
|
label: ReactNode;
|
|
2514
4080
|
children?: ReactNode;
|
|
@@ -2903,128 +4469,6 @@ interface StatusRowProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
2903
4469
|
/** Status row — indicator + name + trailing meta (`.uix-status-row`). */
|
|
2904
4470
|
declare function StatusRow({ indicator, name, meta, className, ...props }: StatusRowProps): react.JSX.Element;
|
|
2905
4471
|
|
|
2906
|
-
type JsonPrimitive = string | number | boolean | null;
|
|
2907
|
-
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
2908
|
-
[key: string]: JsonValue;
|
|
2909
|
-
};
|
|
2910
|
-
|
|
2911
|
-
interface RuleCondition {
|
|
2912
|
-
id: string;
|
|
2913
|
-
field: string;
|
|
2914
|
-
operator: string;
|
|
2915
|
-
value?: JsonValue;
|
|
2916
|
-
}
|
|
2917
|
-
interface RuleGroup {
|
|
2918
|
-
id: string;
|
|
2919
|
-
combinator: 'and' | 'or';
|
|
2920
|
-
conditions: Array<RuleCondition | RuleGroup>;
|
|
2921
|
-
}
|
|
2922
|
-
interface RuleAction {
|
|
2923
|
-
id: string;
|
|
2924
|
-
type: string;
|
|
2925
|
-
parameters: Record<string, JsonValue>;
|
|
2926
|
-
}
|
|
2927
|
-
interface RuleDefinition {
|
|
2928
|
-
when: RuleGroup;
|
|
2929
|
-
then: RuleAction[];
|
|
2930
|
-
}
|
|
2931
|
-
interface RuleValidationIssue {
|
|
2932
|
-
path: string;
|
|
2933
|
-
message: string;
|
|
2934
|
-
}
|
|
2935
|
-
declare function isRuleGroup(node: RuleCondition | RuleGroup): node is RuleGroup;
|
|
2936
|
-
declare function ruleDepth(group: RuleGroup): number;
|
|
2937
|
-
declare function findRuleNodeDepth(group: RuleGroup, id: string, depth?: number): number | undefined;
|
|
2938
|
-
declare function mapRuleGroup(group: RuleGroup, id: string, update: (node: RuleCondition | RuleGroup) => RuleCondition | RuleGroup): RuleGroup;
|
|
2939
|
-
declare function appendRuleNode(group: RuleGroup, parentId: string, node: RuleCondition | RuleGroup, maxDepth?: number): RuleGroup;
|
|
2940
|
-
declare function removeRuleNode(group: RuleGroup, id: string): RuleGroup;
|
|
2941
|
-
declare function moveRuleNode(group: RuleGroup, id: string, direction: -1 | 1): RuleGroup;
|
|
2942
|
-
declare function validateRuleDefinition(value: RuleDefinition, maxDepth?: number): RuleValidationIssue[];
|
|
2943
|
-
declare function summarizeRule(value: RuleDefinition, labels?: {
|
|
2944
|
-
fields?: Record<string, string>;
|
|
2945
|
-
operators?: Record<string, string>;
|
|
2946
|
-
actions?: Record<string, string>;
|
|
2947
|
-
}): string;
|
|
2948
|
-
|
|
2949
|
-
interface RuleValueEditorProps {
|
|
2950
|
-
condition: RuleCondition;
|
|
2951
|
-
onChange: (value: JsonValue | undefined) => void;
|
|
2952
|
-
disabled?: boolean;
|
|
2953
|
-
}
|
|
2954
|
-
interface RuleFieldDefinition {
|
|
2955
|
-
id: string;
|
|
2956
|
-
label: string;
|
|
2957
|
-
description?: string;
|
|
2958
|
-
operators?: string[];
|
|
2959
|
-
renderValueEditor?: (props: RuleValueEditorProps) => ReactNode;
|
|
2960
|
-
}
|
|
2961
|
-
interface RuleOperatorDefinition {
|
|
2962
|
-
id: string;
|
|
2963
|
-
label: string;
|
|
2964
|
-
requiresValue?: boolean;
|
|
2965
|
-
}
|
|
2966
|
-
interface RuleActionDefinition {
|
|
2967
|
-
id: string;
|
|
2968
|
-
label: string;
|
|
2969
|
-
renderParameters?: (action: RuleAction, onChange: (parameters: Record<string, JsonValue>) => void, disabled: boolean) => ReactNode;
|
|
2970
|
-
}
|
|
2971
|
-
/**
|
|
2972
|
-
* Every word the rule builder renders (TENSOR RX-125, UIX-12). `{item}` is one of
|
|
2973
|
-
* `itemGroup` / `itemCondition` / `itemAction`; `{field}` a field label; `{count}` a number.
|
|
2974
|
-
*/
|
|
2975
|
-
interface RuleBuilderLabels {
|
|
2976
|
-
region: string;
|
|
2977
|
-
summary: string;
|
|
2978
|
-
when: string;
|
|
2979
|
-
group: string;
|
|
2980
|
-
match: string;
|
|
2981
|
-
all: string;
|
|
2982
|
-
any: string;
|
|
2983
|
-
field: string;
|
|
2984
|
-
operator: string;
|
|
2985
|
-
valueFor: string;
|
|
2986
|
-
itemGroup: string;
|
|
2987
|
-
itemCondition: string;
|
|
2988
|
-
itemAction: string;
|
|
2989
|
-
moveUp: string;
|
|
2990
|
-
moveUpNamed: string;
|
|
2991
|
-
moveDown: string;
|
|
2992
|
-
moveDownNamed: string;
|
|
2993
|
-
remove: string;
|
|
2994
|
-
removeNamed: string;
|
|
2995
|
-
then: string;
|
|
2996
|
-
actionType: string;
|
|
2997
|
-
valid: string;
|
|
2998
|
-
issuesOne: string;
|
|
2999
|
-
issuesMany: string;
|
|
3000
|
-
summaryIssuesOne: string;
|
|
3001
|
-
summaryIssuesMany: string;
|
|
3002
|
-
addCondition: string;
|
|
3003
|
-
addGroup: string;
|
|
3004
|
-
addAction: string;
|
|
3005
|
-
}
|
|
3006
|
-
declare const DEFAULT_RULE_BUILDER_LABELS: RuleBuilderLabels;
|
|
3007
|
-
interface RuleBuilderProps {
|
|
3008
|
-
value: RuleDefinition;
|
|
3009
|
-
onChange: (value: RuleDefinition) => void;
|
|
3010
|
-
fields: RuleFieldDefinition[];
|
|
3011
|
-
operators: RuleOperatorDefinition[];
|
|
3012
|
-
actions: RuleActionDefinition[];
|
|
3013
|
-
maxDepth?: number;
|
|
3014
|
-
readOnly?: boolean;
|
|
3015
|
-
validate?: (value: RuleDefinition) => RuleValidationIssue[];
|
|
3016
|
-
className?: string;
|
|
3017
|
-
/** @deprecated use `labels.addCondition` */
|
|
3018
|
-
addConditionLabel?: string;
|
|
3019
|
-
/** @deprecated use `labels.addGroup` */
|
|
3020
|
-
addGroupLabel?: string;
|
|
3021
|
-
/** @deprecated use `labels.addAction` */
|
|
3022
|
-
addActionLabel?: string;
|
|
3023
|
-
labels?: Partial<RuleBuilderLabels>;
|
|
3024
|
-
}
|
|
3025
|
-
/** Declarative controlled when-conditions-to-actions editor with bounded nesting. */
|
|
3026
|
-
declare function RuleBuilder({ value, onChange, fields, operators, actions, maxDepth, readOnly, validate, className, addConditionLabel, addGroupLabel, addActionLabel, labels: labelOverrides, }: RuleBuilderProps): react.JSX.Element;
|
|
3027
|
-
|
|
3028
4472
|
interface BuilderCanvasItem {
|
|
3029
4473
|
id: string;
|
|
3030
4474
|
type: string;
|
|
@@ -3645,4 +5089,4 @@ declare function hsvToHex(value: HsvColor): string;
|
|
|
3645
5089
|
declare function contrastRatio(background: string, foreground: string): number | undefined;
|
|
3646
5090
|
declare function meetsContrast(background: string, foreground: string, minimum?: number): boolean;
|
|
3647
5091
|
|
|
3648
|
-
export { type AccessStateProps, Alert, type AlertProps, type AlertTone, AppShell, type AppShellProps, type AppliedBrandProfileSnapshot, type AsyncOperationState, AsyncOperationStatus, type AsyncOperationStatusProps, 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_BRAND_PROFILE_EDITOR_LABELS, DEFAULT_BUILDER_CANVAS_LABELS, DEFAULT_COLOR_PICKER_LABELS, DEFAULT_DATE_RANGE_PICKER_LABELS, DEFAULT_DIFF_VIEWER_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, ErrorState, type ErrorStateProps, EventRow, type EventRowProps, ExpandToggle, type ExpandToggleProps, FeaturedRundown, FeaturedRundownItem, type FeaturedRundownItemProps, type FeaturedRundownProps, FeaturedStage, type FeaturedStageProps, Field, type FieldProps, type FilterKind, type FilterOp, type FilterOption, FilterPopover, type FilterPopoverProps, 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, 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, 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, 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, Switch, type SwitchProps, TOAST_LEAVE_MS, Tab, TabPanel, type TabPanelProps, type TabProps, Table, type TableDensity, type TableProps, TableWrap, type TableWrapProps, Tabs, type TabsProps, Td, type TdProps, 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, enumerateDateSpan, filterComboboxOptions, findRuleNodeDepth, flattenTree, foldForSearch, hexToRgb, highlightSegments, hsvToHex, hsvToRgb, isDateInRange, isDateUnavailable, isRuleGroup, layeredNeighbor, layoutLane, layoutLayeredGraph, layoutRelationshipGraph, mapRuleGroup, matchFilter, meetsContrast, mergePinned, moveRuleNode, multiSort, nextSortDir, normalizeHex, parseDateValue, parseMetricValue, parseView, pixelsToMs, placeSpan, relationshipNeighbors, relativeTimeValue, removeRuleNode, renderPlainLink, reorder, restoreBrandProfile, rgbToHex, rgbToHsv, ruleDepth, searchRows, searchSegments, selectAllState, selectRangeDate, serializeView, shiftSpan, shouldVirtualize, snapToStep, startOfMonth, stepMetricValue, summarizeDiff, summarizeRule, timelineTicks, toDateKey, toast, toggleId, togglePage, toggleSort, traverseRelationshipNode, treeNav, useAnchoredPosition, useDialog, useTable, useUixLabels, useVirtualRows, validateRuleDefinition, virtualWindow, wrapEdgeLabel, zonedDateKey, zonedDateSpan };
|
|
5092
|
+
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, 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, 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 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, 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, 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, layoutLane, layoutLayeredGraph, layoutMonthSpans, layoutRelationshipGraph, mapRuleGroup, matchFilter, matchFilterPreset, meetsContrast, mergePinned, moveRuleNode, multiSort, nextSortDir, normalizeHex, packLanes, parseDateValue, parseMetricValue, parseView, partitionFiles, pixelsToMs, placeSpan, 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 };
|