gridsmith-ui 0.23.0 → 0.25.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 +8 -6
- package/dist/Breadcrumbs-CGS8GKl-.d.ts +33 -0
- package/dist/MentionList-CoNBRFGR.d.ts +8 -0
- package/dist/charts.d.ts +42 -1
- package/dist/charts.js +320 -89
- package/dist/charts.js.map +1 -1
- package/dist/chat.js +5 -4
- package/dist/chat.js.map +1 -1
- package/dist/chunk-2YSEME33.js +118 -0
- package/dist/chunk-2YSEME33.js.map +1 -0
- package/dist/{chunk-6PL7FXYH.js → chunk-3CUKJ4VP.js} +321 -11
- package/dist/chunk-3CUKJ4VP.js.map +1 -0
- package/dist/{chunk-SBTBMAIU.js → chunk-FHMCAOAH.js} +6 -6
- package/dist/{chunk-SBTBMAIU.js.map → chunk-FHMCAOAH.js.map} +1 -1
- package/dist/chunk-HP7WUZPK.js +80 -0
- package/dist/chunk-HP7WUZPK.js.map +1 -0
- package/dist/{chunk-4LDYR7QP.js → chunk-HYMXAIXN.js} +53 -13
- package/dist/chunk-HYMXAIXN.js.map +1 -0
- package/dist/{chunk-7TOJ4G7S.js → chunk-HZIP4EJI.js} +14 -9
- package/dist/chunk-HZIP4EJI.js.map +1 -0
- package/dist/{chunk-RT7RYGC3.js → chunk-JXANCXK6.js} +4 -39
- package/dist/chunk-JXANCXK6.js.map +1 -0
- package/dist/{chunk-CXMV7SXJ.js → chunk-MD2EFMES.js} +5 -77
- package/dist/chunk-MD2EFMES.js.map +1 -0
- package/dist/{chunk-IVCVNAXG.js → chunk-OTCEJN64.js} +3 -3
- package/dist/{chunk-IVCVNAXG.js.map → chunk-OTCEJN64.js.map} +1 -1
- package/dist/{chunk-EYMGLK4M.js → chunk-QGSCF7PN.js} +7 -7
- package/dist/chunk-QGSCF7PN.js.map +1 -0
- package/dist/{chunk-CKWITUSH.js → chunk-QM4SJKWV.js} +15 -5
- package/dist/chunk-QM4SJKWV.js.map +1 -0
- package/dist/chunk-RWKCAKN3.js +209 -0
- package/dist/chunk-RWKCAKN3.js.map +1 -0
- package/dist/{chunk-ICNWPNMM.js → chunk-W7GCEJEH.js} +11 -23
- package/dist/chunk-W7GCEJEH.js.map +1 -0
- package/dist/chunk-WOVYHFUD.js +50 -0
- package/dist/chunk-WOVYHFUD.js.map +1 -0
- package/dist/{chunk-NCIZQYXQ.js → chunk-X2HEV7FB.js} +33 -3
- package/dist/chunk-X2HEV7FB.js.map +1 -0
- package/dist/chunk-XVB55M3N.js +42 -0
- package/dist/chunk-XVB55M3N.js.map +1 -0
- package/dist/data-grid.d.ts +1 -1
- package/dist/data-grid.js +14 -12
- package/dist/data-grid.js.map +1 -1
- package/dist/editor-mentions.d.ts +30 -0
- package/dist/editor-mentions.js +160 -0
- package/dist/editor-mentions.js.map +1 -0
- package/dist/editor.d.ts +23 -3
- package/dist/editor.js +59 -9
- package/dist/editor.js.map +1 -1
- package/dist/{feather-2JFSFLXN.js → feather-W26ERBQV.js} +11 -3
- package/dist/feather-W26ERBQV.js.map +1 -0
- package/dist/{heroicons-4AQ4YBVG.js → heroicons-MY43466C.js} +21 -7
- package/dist/heroicons-MY43466C.js.map +1 -0
- package/dist/icons.d.ts +11 -4
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +348 -65
- package/dist/index.js +886 -576
- package/dist/index.js.map +1 -1
- package/dist/kanban.js +26 -8
- package/dist/kanban.js.map +1 -1
- package/dist/{lucide-RZC2FEMS.js → lucide-CMPVM3PS.js} +11 -3
- package/dist/lucide-CMPVM3PS.js.map +1 -0
- package/dist/{phosphor-CEN25FLM.js → phosphor-RMHZOW2O.js} +11 -3
- package/dist/phosphor-RMHZOW2O.js.map +1 -0
- package/dist/resizable.d.ts +16 -1
- package/dist/resizable.js +91 -23
- package/dist/resizable.js.map +1 -1
- package/dist/roots.css +15 -0
- package/dist/{tabler-YXXC7Y6B.js → tabler-MJVEYHA5.js} +11 -3
- package/dist/tabler-MJVEYHA5.js.map +1 -0
- package/dist/{use-pagination-DiJo0aW5.d.ts → use-pagination-BnKOnBdz.d.ts} +3 -0
- package/dist/virtualized.d.ts +1 -1
- package/dist/virtualized.js +8 -6
- package/dist/virtualized.js.map +1 -1
- package/package.json +29 -21
- package/dist/chunk-4LDYR7QP.js.map +0 -1
- package/dist/chunk-6PL7FXYH.js.map +0 -1
- package/dist/chunk-7TOJ4G7S.js.map +0 -1
- package/dist/chunk-CKWITUSH.js.map +0 -1
- package/dist/chunk-CXMV7SXJ.js.map +0 -1
- package/dist/chunk-EYMGLK4M.js.map +0 -1
- package/dist/chunk-ICNWPNMM.js.map +0 -1
- package/dist/chunk-NCIZQYXQ.js.map +0 -1
- package/dist/chunk-RT7RYGC3.js.map +0 -1
- package/dist/feather-2JFSFLXN.js.map +0 -1
- package/dist/heroicons-4AQ4YBVG.js.map +0 -1
- package/dist/lucide-RZC2FEMS.js.map +0 -1
- package/dist/phosphor-CEN25FLM.js.map +0 -1
- package/dist/tabler-YXXC7Y6B.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, LabelHTMLAttributes, TextareaHTMLAttributes, Ref, ReactElement, CSSProperties, HTMLAttributes, RefObject, KeyboardEvent, AnchorHTMLAttributes,
|
|
2
|
+
import { ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, LabelHTMLAttributes, TextareaHTMLAttributes, Ref, ReactElement, CSSProperties, HTMLAttributes, RefObject, KeyboardEvent, AnchorHTMLAttributes, ElementType } from 'react';
|
|
3
|
+
import { IconSlot, IconName } from './icons.js';
|
|
3
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import {
|
|
5
|
+
import { M as MentionSuggestion } from './MentionList-CoNBRFGR.js';
|
|
5
6
|
import { C as ColumnKind, B as BreakpointKey } from './table-utils-BkjNEWts.js';
|
|
6
7
|
export { a as BreakpointWidthProvider, u as useBreakpoint } from './table-utils-BkjNEWts.js';
|
|
7
|
-
import { P as Pager, A as AppShellPreferences } from './use-pagination-
|
|
8
|
-
export { a as PaginationOptions, b as PreferencesContext, R as ResolvedPreferences, p as preferenceActionKey, u as usePagination, c as usePreferences } from './use-pagination-
|
|
8
|
+
import { P as Pager, A as AppShellPreferences } from './use-pagination-BnKOnBdz.js';
|
|
9
|
+
export { a as PaginationOptions, b as PreferencesContext, R as ResolvedPreferences, p as preferenceActionKey, u as usePagination, c as usePreferences } from './use-pagination-BnKOnBdz.js';
|
|
10
|
+
export { B as BreadcrumbItem, a as Breadcrumbs, b as BreadcrumbsSeparator, c as BreadcrumbsSize, d as BreadcrumbsVariant } from './Breadcrumbs-CGS8GKl-.js';
|
|
9
11
|
|
|
10
12
|
type ButtonVariant = "default" | "secondary" | "tertiary" | "outline" | "ghost" | "destructive" | "success" | "warning" | "link";
|
|
11
13
|
type ButtonSize = "xs" | "sm" | "md" | "lg" | "icon-xs" | "icon-sm" | "icon" | "icon-lg";
|
|
@@ -15,8 +17,10 @@ declare const ButtonSizeContext: react.Context<ControlSize | null>;
|
|
|
15
17
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
16
18
|
variant?: ButtonVariant;
|
|
17
19
|
size?: ButtonSize;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
/** An icon name ("clock"), drawn as the theme's icon at the button's icon size, or an element. Not text: use children. */
|
|
21
|
+
iconLeft?: IconSlot;
|
|
22
|
+
/** As iconLeft, after the label. */
|
|
23
|
+
iconRight?: IconSlot;
|
|
20
24
|
loading?: boolean;
|
|
21
25
|
children?: ReactNode;
|
|
22
26
|
}
|
|
@@ -205,8 +209,87 @@ interface ComboboxProps extends FieldControlWiring {
|
|
|
205
209
|
container?: Element | DocumentFragment;
|
|
206
210
|
error?: boolean;
|
|
207
211
|
size?: ControlSize;
|
|
212
|
+
/** The control's name when no Field labels it (a toolbar's filter). Inside a Field, the Field's label names it. */
|
|
213
|
+
"aria-label"?: string;
|
|
208
214
|
}
|
|
209
|
-
declare function Combobox({ value, onChange: onChangeProp, options, placeholder, disabled, loading, className, ref, container, error, size: sizeProp, ...wiring }: ComboboxProps): react_jsx_runtime.JSX.Element;
|
|
215
|
+
declare function Combobox({ value, onChange: onChangeProp, options, placeholder, disabled, loading, className, ref, container, error, size: sizeProp, "aria-label": ariaLabel, ...wiring }: ComboboxProps): react_jsx_runtime.JSX.Element;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* The browser's own name for a zone (Sprint 25.17 A28, R28-51): one browser always names a zone one way, so a stored
|
|
219
|
+
* "Asia/Calcutta" and a listed "Asia/Kolkata" are one zone, with no alias table shipped. An id the browser doesn't know
|
|
220
|
+
* stays as given.
|
|
221
|
+
*/
|
|
222
|
+
declare function canonicalTimeZone(zone: string): string;
|
|
223
|
+
/** The browser's time zone, by its own name; "UTC" where the browser names none. */
|
|
224
|
+
declare function browserTimeZone(): string;
|
|
225
|
+
/**
|
|
226
|
+
* A zone's offset from UTC at an instant, as the page's language names it ("GMT+1", "GMT-5", "GMT+5:30"): read at that
|
|
227
|
+
* instant, so it follows daylight saving.
|
|
228
|
+
*/
|
|
229
|
+
declare function timeZoneOffset(zone: string, at?: Date): string;
|
|
230
|
+
interface TimezoneSelectProps extends FieldControlWiring {
|
|
231
|
+
/**
|
|
232
|
+
* The stored zone, an IANA id ("Europe/London"). Empty: the field is empty, and the browser's zone is the list's first
|
|
233
|
+
* option, marked as the user's, to pick with one key. Start the page's state from the stored zone, else
|
|
234
|
+
* browserTimeZone(), to show the browser's as chosen.
|
|
235
|
+
*/
|
|
236
|
+
value?: string;
|
|
237
|
+
/** Called with the chosen zone's id, by the browser's own name. */
|
|
238
|
+
onChange: (zone: string) => void;
|
|
239
|
+
size?: ControlSize;
|
|
240
|
+
disabled?: boolean;
|
|
241
|
+
placeholder?: string;
|
|
242
|
+
className?: string;
|
|
243
|
+
/** The control's name when no Field labels it. In a settings form, a Field labels it ("Time zone"). */
|
|
244
|
+
"aria-label"?: string;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* A time zone select (Sprint 25.17 A28, R28-51): every IANA zone the browser knows, each shown with its offset now
|
|
248
|
+
* (which follows daylight saving), searchable by city, region or offset, with the house keyboard (the Combobox's).
|
|
249
|
+
* UTC is always offered. A stored zone is matched by the browser's own name for it, and one the browser doesn't list
|
|
250
|
+
* is still shown, never a blank.
|
|
251
|
+
*/
|
|
252
|
+
declare function TimezoneSelect({ value, onChange, placeholder, ...rest }: TimezoneSelectProps): react_jsx_runtime.JSX.Element;
|
|
253
|
+
|
|
254
|
+
/** A time: an ISO string, a Date, or milliseconds since the epoch. */
|
|
255
|
+
type TimeValue = string | Date | number;
|
|
256
|
+
/**
|
|
257
|
+
* A time as people read it (Sprint 25.17 A29, R28-48; date_time#1, #11 and #13): within `thresholdHours` of now,
|
|
258
|
+
* relative ("now", "5 minutes ago", "in 2 hours", "yesterday", counting days on the calendar), in the page's language;
|
|
259
|
+
* beyond it, the date and the time. The threshold is given: the project's is the shell's
|
|
260
|
+
* (dateTime.relativeThresholdHours), which RelativeTime and useRelativeTimeFormat read for you.
|
|
261
|
+
*/
|
|
262
|
+
declare function formatRelativeTime(time: TimeValue, options: {
|
|
263
|
+
thresholdHours: number;
|
|
264
|
+
now?: number;
|
|
265
|
+
}): string;
|
|
266
|
+
/**
|
|
267
|
+
* formatRelativeTime with the project's threshold, the shell's (dateTime.relativeThresholdHours), for a time drawn as
|
|
268
|
+
* text in a slot that takes a string: a Timeline item's `timestamp`, with the time itself as its `dateTime` so the exact
|
|
269
|
+
* time shows on hover. The text is read when the page renders; RelativeTime draws a time that refreshes as it ages.
|
|
270
|
+
*/
|
|
271
|
+
declare function useRelativeTimeFormat(): (time: TimeValue) => string;
|
|
272
|
+
/** The full timestamp, as the tooltip and a screen reader give it: the date, the time and its zone, in the page's language. */
|
|
273
|
+
declare function formatFullTime(time: TimeValue): string;
|
|
274
|
+
interface RelativeTimeProps {
|
|
275
|
+
/** The time: an ISO string, a Date, or milliseconds since the epoch. */
|
|
276
|
+
time: TimeValue;
|
|
277
|
+
/** Within this many hours it reads relative, else the date and time. Leave it out: the project's (the shell's dateTime.relativeThresholdHours). */
|
|
278
|
+
thresholdHours?: number;
|
|
279
|
+
/** The time's own classes (its colour, its size); the tooltip keeps the library's. */
|
|
280
|
+
className?: string;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* A time drawn as the project reads times (Sprint 25.17 A29, R28-48): relative within the project's threshold, the date
|
|
284
|
+
* and time beyond it, and the full timestamp, with its zone, on hover and, outside a collection's rows, on focus
|
|
285
|
+
* (date_time#1, #2, #13). Outside them it is a Tab stop; among a table's, a list's or a grid's rows it isn't (a stop per
|
|
286
|
+
* row would make the collection hard to cross, and nest a stop in a row that is a button), and a screen reader hears the
|
|
287
|
+
* full timestamp with the time everywhere. It refreshes as it ages, each minute in its first hour and each hour after,
|
|
288
|
+
* and becomes the date and time once past the threshold; a time that changes is read against the clock afresh. Drawn on a
|
|
289
|
+
* server, the browser's reading of the clock replaces the server's when the page hydrates, with no error for the moment
|
|
290
|
+
* between them. In a sortable Table column, pass the time itself as the column's sort value.
|
|
291
|
+
*/
|
|
292
|
+
declare function RelativeTime({ time, thresholdHours, className }: RelativeTimeProps): react_jsx_runtime.JSX.Element | null;
|
|
210
293
|
|
|
211
294
|
type CheckboxSize = "sm" | "md";
|
|
212
295
|
/** A Field passes its wiring (0.21.0): its label names the box, and its hint and error describe it. */
|
|
@@ -594,13 +677,19 @@ interface FormWrapperProps {
|
|
|
594
677
|
*/
|
|
595
678
|
errorSummary?: boolean | ((errors: FormFieldError[]) => ReactNode);
|
|
596
679
|
/**
|
|
597
|
-
*
|
|
598
|
-
*
|
|
680
|
+
* The form takes the full width it is given, for the rare form whose fields need it: several columns side by side,
|
|
681
|
+
* line items. Without it the form, its buttons with it, keeps the narrow reading width wherever it sits.
|
|
682
|
+
*/
|
|
683
|
+
fullWidth?: boolean;
|
|
684
|
+
/**
|
|
685
|
+
* Classes for the form. Wherever it sits — a page of its own, a card, beside a list, under a tab, a settings panel —
|
|
686
|
+
* the form keeps the narrow page's reading width however wide its box is (--ds-form-max, Sprint 25.9 A4; everywhere
|
|
687
|
+
* since Sprint 25.16 A8); in a Drawer or a Dialog it takes the overlay's width. A `max-w-*` class here wins.
|
|
599
688
|
*/
|
|
600
689
|
className?: string;
|
|
601
690
|
ref?: React.Ref<HTMLFormElement>;
|
|
602
691
|
}
|
|
603
|
-
declare function FormWrapper({ onSubmit, validationMode: validationModeProp, children, actions: actionsProp, actionsAlign: actionsAlignProp, onCancel, cancelLabel, focusFirstError, errorSummary, className, ref }: FormWrapperProps): react_jsx_runtime.JSX.Element;
|
|
692
|
+
declare function FormWrapper({ onSubmit, validationMode: validationModeProp, children, actions: actionsProp, actionsAlign: actionsAlignProp, onCancel, cancelLabel, focusFirstError, errorSummary, fullWidth, className, ref }: FormWrapperProps): react_jsx_runtime.JSX.Element;
|
|
604
693
|
|
|
605
694
|
interface AddAnotherProps<T> {
|
|
606
695
|
/** The rows. Each keeps its own id (`getId`), never its index, so its values, field ids and errors stay with it when another row goes. */
|
|
@@ -653,13 +742,7 @@ interface TransferListProps {
|
|
|
653
742
|
}
|
|
654
743
|
declare function TransferList({ available, selected, onChange: onChangeProp, availableTitle, selectedTitle, searchable, className, ref, }: TransferListProps): react_jsx_runtime.JSX.Element;
|
|
655
744
|
|
|
656
|
-
interface
|
|
657
|
-
id: string;
|
|
658
|
-
label: string;
|
|
659
|
-
avatar?: string;
|
|
660
|
-
description?: string;
|
|
661
|
-
}
|
|
662
|
-
interface MentionInputProps {
|
|
745
|
+
interface MentionInputProps extends FieldControlWiring {
|
|
663
746
|
value?: string;
|
|
664
747
|
onChange?: (value: string) => void;
|
|
665
748
|
suggestions: MentionSuggestion[];
|
|
@@ -667,8 +750,10 @@ interface MentionInputProps {
|
|
|
667
750
|
placeholder?: string;
|
|
668
751
|
disabled?: boolean;
|
|
669
752
|
className?: string;
|
|
753
|
+
/** The field's name when no Field labels it. Inside a Field, the Field's label names it. */
|
|
754
|
+
"aria-label"?: string;
|
|
670
755
|
}
|
|
671
|
-
declare function MentionInput({ value: controlledValue, onChange: onChangeProp, suggestions, trigger, placeholder, disabled, className, }: MentionInputProps): react_jsx_runtime.JSX.Element;
|
|
756
|
+
declare function MentionInput({ value: controlledValue, onChange: onChangeProp, suggestions, trigger, placeholder, disabled, className, error, "aria-label": ariaLabel, ...wiring }: MentionInputProps): react_jsx_runtime.JSX.Element;
|
|
672
757
|
|
|
673
758
|
type CardVariant = "default" | "featured" | "interactive" | "outline" | "ghost";
|
|
674
759
|
type CardSelectType = "radio" | "checkbox" | "toggle";
|
|
@@ -859,9 +944,11 @@ interface Column {
|
|
|
859
944
|
* What the column sorts by, when its cells don't say (Sprint 25.13 A3): a column of elements (an avatar beside a name,
|
|
860
945
|
* a badge, a time) gives each row's name, number or date here, `sortValue: (row) => row.actorName`, and a column of
|
|
861
946
|
* sizes gives bytes. Without it a sortable column sorts by the cell itself, which works for text and numbers; a cell
|
|
862
|
-
* that is an element can't be compared, and the column warns in development (data_display#1).
|
|
947
|
+
* that is an element can't be compared, and the column warns in development (data_display#1). It may return any of a
|
|
948
|
+
* row's fields as they are (a row's values are typed for its cells): a string, a number or a Date sorts; an element
|
|
949
|
+
* doesn't.
|
|
863
950
|
*/
|
|
864
|
-
sortValue?: (row: TableRow) =>
|
|
951
|
+
sortValue?: (row: TableRow) => unknown;
|
|
865
952
|
/**
|
|
866
953
|
* Keep the column in view while the table scrolls sideways (Sprint 25.13 A35): "end" for the row's actions, pinned on
|
|
867
954
|
* the right; "start" for the row's name, drawn first and pinned beside the selection while it leaves room. Without a
|
|
@@ -1091,9 +1178,11 @@ interface EmptyStateProps {
|
|
|
1091
1178
|
* An icon name from the theme's pack ("inbox", "filter") or an element. A
|
|
1092
1179
|
* name is the easy path: the state renders it at the frame's size. An `Icon`
|
|
1093
1180
|
* element is resized to match; any other element is rendered as given. A
|
|
1094
|
-
* string
|
|
1095
|
-
*
|
|
1096
|
-
*
|
|
1181
|
+
* string is always read as a name, never printed as a word (the Sprint 22
|
|
1182
|
+
* bench saw builders pass names into a ReactNode prop and React print the
|
|
1183
|
+
* word — 14 Sep 2026). `IconName` takes any string, so a name the theme's
|
|
1184
|
+
* pack lacks still type-checks: it draws nothing, and in development the Icon
|
|
1185
|
+
* says so (Sprint 25.17 A26).
|
|
1097
1186
|
*/
|
|
1098
1187
|
icon?: IconName | Exclude<ReactNode, string>;
|
|
1099
1188
|
/** How the icon is framed: the neutral circle (default), or none when the icon element brings its own frame. */
|
|
@@ -1216,7 +1305,14 @@ declare function TableToolbar({ search, primaryFilter, filters, filtersOpen, onF
|
|
|
1216
1305
|
interface TimelineItem {
|
|
1217
1306
|
title: string;
|
|
1218
1307
|
description?: string;
|
|
1219
|
-
/**
|
|
1308
|
+
/**
|
|
1309
|
+
* When it happened (an ISO string, a Date or milliseconds), drawn as the project reads times, with RelativeTime:
|
|
1310
|
+
* relative within the shell's threshold, the date and time beyond it, the full timestamp on hover, refreshing as it
|
|
1311
|
+
* ages (Sprint 25.17's second review: a time the page formatted itself read differently on a server and in the browser,
|
|
1312
|
+
* and read the date twice to a screen reader). With `time`, leave timestamp and dateTime out.
|
|
1313
|
+
*/
|
|
1314
|
+
time?: TimeValue;
|
|
1315
|
+
/** What the item shows for its time, as text the page wrote: "Mon 14:05". For a time ago, pass `time`. */
|
|
1220
1316
|
timestamp?: string;
|
|
1221
1317
|
/**
|
|
1222
1318
|
* The item's exact time (an ISO string or a Date). The timestamp is then a <time> element, with the exact date and
|
|
@@ -1224,8 +1320,11 @@ interface TimelineItem {
|
|
|
1224
1320
|
* "2 hours ago" with no way to the date). Without a timestamp, the exact date is shown.
|
|
1225
1321
|
*/
|
|
1226
1322
|
dateTime?: string | Date;
|
|
1227
|
-
/**
|
|
1228
|
-
|
|
1323
|
+
/**
|
|
1324
|
+
* Takes the dot's place — the actor's Avatar (size="sm") on an activity feed, or an icon: its name ("upload"), drawn as
|
|
1325
|
+
* the theme's icon at 16 px, or an element. `variant` colours the dot only.
|
|
1326
|
+
*/
|
|
1327
|
+
icon?: IconSlot;
|
|
1229
1328
|
variant?: "default" | "success" | "warning" | "error";
|
|
1230
1329
|
}
|
|
1231
1330
|
interface TimelineProps {
|
|
@@ -1309,12 +1408,18 @@ interface TreeViewProps {
|
|
|
1309
1408
|
checkable?: boolean;
|
|
1310
1409
|
defaultExpanded?: string[];
|
|
1311
1410
|
defaultSelected?: string[];
|
|
1411
|
+
/**
|
|
1412
|
+
* The selected ids, when the app holds the selection: the address names the open item, or a crumb of its path
|
|
1413
|
+
* selects a folder (Sprint 25.16 A19). `onSelect` reports a click and the app passes the new selection back.
|
|
1414
|
+
* Without it the tree keeps its own, starting from `defaultSelected`.
|
|
1415
|
+
*/
|
|
1416
|
+
selected?: string[];
|
|
1312
1417
|
defaultChecked?: string[];
|
|
1313
1418
|
onSelect?: (ids: string[]) => void;
|
|
1314
1419
|
onCheck?: (ids: string[]) => void;
|
|
1315
1420
|
className?: string;
|
|
1316
1421
|
}
|
|
1317
|
-
declare function TreeView({ nodes, selectable, multiSelect, checkable, defaultExpanded, defaultSelected, defaultChecked, onSelect, onCheck, className, }: TreeViewProps): react_jsx_runtime.JSX.Element;
|
|
1422
|
+
declare function TreeView({ nodes, selectable, multiSelect, checkable, defaultExpanded, defaultSelected, selected: selectedProp, defaultChecked, onSelect, onCheck, className, }: TreeViewProps): react_jsx_runtime.JSX.Element;
|
|
1318
1423
|
|
|
1319
1424
|
interface CarouselProps {
|
|
1320
1425
|
children: ReactNode[];
|
|
@@ -1656,7 +1761,7 @@ interface TimeScaleOptions {
|
|
|
1656
1761
|
today?: DateInput;
|
|
1657
1762
|
/** Default 1 (Monday), as Calendar's. */
|
|
1658
1763
|
weekStartsOn?: 0 | 1;
|
|
1659
|
-
/** Default the
|
|
1764
|
+
/** Default the page's language (its `lang`, in the visitor's formats where they speak it: formatLocale). */
|
|
1660
1765
|
locale?: string;
|
|
1661
1766
|
/** Px per day at each level, where a view needs another density (the defaults fit each level's labels). */
|
|
1662
1767
|
pxPerDay?: Partial<Record<TimeZoom, number>>;
|
|
@@ -2015,7 +2120,7 @@ interface GanttProps<T extends GanttItem = GanttItem> {
|
|
|
2015
2120
|
today?: DateInput;
|
|
2016
2121
|
/** Default 1 (Monday), as Calendar's. */
|
|
2017
2122
|
weekStartsOn?: 0 | 1;
|
|
2018
|
-
/** Default the
|
|
2123
|
+
/** Default the page's language (its `lang`, in the visitor's formats where they speak it): the scale's labels and the items' dates. */
|
|
2019
2124
|
locale?: string;
|
|
2020
2125
|
/**
|
|
2021
2126
|
* Beside the title in the name column (assignees' avatars): shown, not announced (say it in `describe`), and left out
|
|
@@ -2065,11 +2170,15 @@ interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
2065
2170
|
* Render through a router link component instead of a plain anchor
|
|
2066
2171
|
* (e.g. `component={RouterLink}` from react-router or next/link). The
|
|
2067
2172
|
* component receives the same props; `href` is also passed as `to` for
|
|
2068
|
-
* react-router compatibility.
|
|
2173
|
+
* react-router compatibility. Any element type: a router's Link requires
|
|
2174
|
+
* its own props (react-router's `to`), which a narrower type refused under
|
|
2175
|
+
* strict TypeScript (Sprint 25.16 A19).
|
|
2069
2176
|
*/
|
|
2070
|
-
component?:
|
|
2071
|
-
|
|
2072
|
-
|
|
2177
|
+
component?: ElementType;
|
|
2178
|
+
/** An icon name ("info"), drawn as the theme's icon at 14 px, or an element. Not text: use children. */
|
|
2179
|
+
iconLeft?: IconSlot;
|
|
2180
|
+
/** As iconLeft, after the label. */
|
|
2181
|
+
iconRight?: IconSlot;
|
|
2073
2182
|
}
|
|
2074
2183
|
/**
|
|
2075
2184
|
* Navigation link. Renders a real <a> (or a router link via `component`) so
|
|
@@ -2276,33 +2385,6 @@ interface SettingsLayoutProps {
|
|
|
2276
2385
|
*/
|
|
2277
2386
|
declare function SettingsLayout({ sections, value, onChange, layout: layoutProp, railWidth, collapseBelow: collapseBelowProp, "aria-label": ariaLabel, children, className, }: SettingsLayoutProps): react_jsx_runtime.JSX.Element;
|
|
2278
2387
|
|
|
2279
|
-
interface BreadcrumbItem$1 {
|
|
2280
|
-
label: string;
|
|
2281
|
-
href?: string;
|
|
2282
|
-
onClick?: () => void;
|
|
2283
|
-
icon?: IconName;
|
|
2284
|
-
}
|
|
2285
|
-
type BreadcrumbsVariant = "inline" | "contained" | "pill";
|
|
2286
|
-
type BreadcrumbsSeparator = "slash" | "chevron" | "dot" | "arrow";
|
|
2287
|
-
type BreadcrumbsSize = "sm" | "md";
|
|
2288
|
-
interface BreadcrumbsProps {
|
|
2289
|
-
items: BreadcrumbItem$1[];
|
|
2290
|
-
separator?: BreadcrumbsSeparator;
|
|
2291
|
-
variant?: BreadcrumbsVariant;
|
|
2292
|
-
/** Visual treatment of individual breadcrumb items — independent of layout variant. */
|
|
2293
|
-
itemVariant?: "default" | "pill";
|
|
2294
|
-
size?: BreadcrumbsSize;
|
|
2295
|
-
showIcons?: boolean;
|
|
2296
|
-
maxItems?: number;
|
|
2297
|
-
/** Full-bleed: contained background extends edge-to-edge, breaking out of parent padding. Text stays aligned with sibling content. */
|
|
2298
|
-
bleed?: boolean;
|
|
2299
|
-
/** Max-width for bleed content alignment. Defaults to --ds-bp-xl. */
|
|
2300
|
-
contentMaxWidth?: string;
|
|
2301
|
-
className?: string;
|
|
2302
|
-
container?: Element | DocumentFragment;
|
|
2303
|
-
}
|
|
2304
|
-
declare const Breadcrumbs: react.ForwardRefExoticComponent<BreadcrumbsProps & react.RefAttributes<HTMLElement>>;
|
|
2305
|
-
|
|
2306
2388
|
interface PaginationProps {
|
|
2307
2389
|
currentPage: number;
|
|
2308
2390
|
totalPages: number;
|
|
@@ -2332,6 +2414,8 @@ interface Step {
|
|
|
2332
2414
|
label: string;
|
|
2333
2415
|
description?: string;
|
|
2334
2416
|
status?: "complete" | "error" | "loading";
|
|
2417
|
+
/** Not reached yet, so it can't be gone to: its circle can't be pressed (Sprint 25.16 A30, useFlowSteps' stepper). */
|
|
2418
|
+
disabled?: boolean;
|
|
2335
2419
|
}
|
|
2336
2420
|
interface StepperProps {
|
|
2337
2421
|
steps: Step[];
|
|
@@ -2894,7 +2978,8 @@ interface AlertAction {
|
|
|
2894
2978
|
label: string;
|
|
2895
2979
|
onClick: () => void;
|
|
2896
2980
|
variant?: "secondary" | "outline";
|
|
2897
|
-
|
|
2981
|
+
/** An icon name ("refresh"), drawn as the theme's icon at 14 px, or an element. */
|
|
2982
|
+
iconLeft?: IconSlot;
|
|
2898
2983
|
}
|
|
2899
2984
|
interface AlertProps {
|
|
2900
2985
|
variant: AlertVariant;
|
|
@@ -3135,6 +3220,14 @@ interface AppShellContextValue {
|
|
|
3135
3220
|
addUnsavedChanges: () => () => void;
|
|
3136
3221
|
/** The width every Drawer in the app takes when it is given none (Sprint 25.14 A24): AppShell's drawerWidth, 520 px by default. */
|
|
3137
3222
|
drawerWidth: string;
|
|
3223
|
+
/** The app's router (AppShell's `navigate`), or null: the library's links in the shell (a breadcrumb's crumb) and a flow's steps go through it. */
|
|
3224
|
+
navigate: ((href: string, options?: {
|
|
3225
|
+
replace?: boolean;
|
|
3226
|
+
}) => void) | null;
|
|
3227
|
+
/** A page that has left the flow is showing (<FlowSaved>, Sprint 25.16 A30): focus mode draws no exit control. */
|
|
3228
|
+
flowLeft: boolean;
|
|
3229
|
+
/** Set by FlowSaved; not for pages to call. Returns the release. */
|
|
3230
|
+
markFlowLeft: () => () => void;
|
|
3138
3231
|
}
|
|
3139
3232
|
/**
|
|
3140
3233
|
* Focus mode (Sprint 25.7, C1): a task flow the user completes before or outside the app — setup, onboarding,
|
|
@@ -3206,6 +3299,16 @@ interface AppShellProps {
|
|
|
3206
3299
|
currentPath?: string;
|
|
3207
3300
|
/** The home page's path. Default "/". */
|
|
3208
3301
|
homePath?: string;
|
|
3302
|
+
/**
|
|
3303
|
+
* The app's router: `(href, options) => navigate(href, options)` with React Router, `(href, options) =>
|
|
3304
|
+
* (options?.replace ? router.replace(href) : router.push(href))` with Next.js. The library's links in the shell — a
|
|
3305
|
+
* breadcrumb's crumb, a SplitView's path — go through it on a plain click, so the page changes with no reload, and so
|
|
3306
|
+
* do a flow's steps (useFlowSteps), which replace an address that isn't a step reached (Sprint 25.16 A19, A30).
|
|
3307
|
+
* Without it they are ordinary links. The generated layout passes it.
|
|
3308
|
+
*/
|
|
3309
|
+
navigate?: (href: string, options?: {
|
|
3310
|
+
replace?: boolean;
|
|
3311
|
+
}) => void;
|
|
3209
3312
|
/**
|
|
3210
3313
|
* Focus mode for a flow outside the navigation (setup, onboarding, checkout). The sidebar, mobile menu and bottom
|
|
3211
3314
|
* nav are not rendered, and the Navbar drops its links and search; the logo, the assistant (its launcher and its
|
|
@@ -3216,6 +3319,139 @@ interface AppShellProps {
|
|
|
3216
3319
|
}
|
|
3217
3320
|
declare const AppShell: react.ForwardRefExoticComponent<AppShellProps & react.RefAttributes<HTMLDivElement>>;
|
|
3218
3321
|
|
|
3322
|
+
interface FlowStep<A> {
|
|
3323
|
+
/** The step's name in the Stepper ("Team size"). */
|
|
3324
|
+
label: string;
|
|
3325
|
+
/** The page's title on this step ("How big is your team?"). */
|
|
3326
|
+
title: string;
|
|
3327
|
+
/** The step is shown only while this holds, so the total follows the answers ("Just me" leaves out the team's step). */
|
|
3328
|
+
when?: (answers: A) => boolean;
|
|
3329
|
+
}
|
|
3330
|
+
/**
|
|
3331
|
+
* What a flow keeps between visits: the furthest step reached, the step the user was on, and the answers so far. The
|
|
3332
|
+
* answers are kept as JSON: strings, numbers, booleans, arrays and plain objects (a Date comes back as its string).
|
|
3333
|
+
*/
|
|
3334
|
+
interface FlowProgress<A> {
|
|
3335
|
+
furthest: number;
|
|
3336
|
+
current?: number;
|
|
3337
|
+
answers: A;
|
|
3338
|
+
}
|
|
3339
|
+
type FlowNavigate = (href: string, options?: {
|
|
3340
|
+
replace?: boolean;
|
|
3341
|
+
}) => void;
|
|
3342
|
+
interface UseFlowStepsOptions<A, S extends FlowStep<A>> {
|
|
3343
|
+
/** Every step, in order; a step with `when` is shown only while it holds. */
|
|
3344
|
+
steps: readonly S[];
|
|
3345
|
+
/** The step the address names: the flow's one `:step` route parameter ("3"). */
|
|
3346
|
+
at: string | undefined;
|
|
3347
|
+
/** Step n's address, counting the steps shown from 1: (n) => `/setup/${n}`. */
|
|
3348
|
+
href: (step: number) => string;
|
|
3349
|
+
/**
|
|
3350
|
+
* The flow's name in the browser's storage, where its progress and answers are kept between visits. With sign-in,
|
|
3351
|
+
* name it for the user (`setup:${userId}`), so the next person on the browser starts afresh; pass undefined until the
|
|
3352
|
+
* user is known, and the flow waits (draws nothing, moves nothing, writes nothing).
|
|
3353
|
+
*/
|
|
3354
|
+
storageKey: string | undefined;
|
|
3355
|
+
/** The answers before the user has given any. */
|
|
3356
|
+
initialAnswers: A;
|
|
3357
|
+
/**
|
|
3358
|
+
* Where saveAndExit goes with no sign-in: a page drawing <FlowSaved> (the shell's exit, "Save and continue later",
|
|
3359
|
+
* goes there too). An app with sign-in leaves through the shell's "Save and log out" instead, and resumes on return.
|
|
3360
|
+
*/
|
|
3361
|
+
exitTo: string;
|
|
3362
|
+
/** Where Finish goes once the flow is done: the app's home. */
|
|
3363
|
+
finishTo: string;
|
|
3364
|
+
/** The app's router. Left out, the shell's (AppShell's navigate); with neither, a page load. */
|
|
3365
|
+
navigate?: FlowNavigate;
|
|
3366
|
+
}
|
|
3367
|
+
interface FlowSteps<A, S extends FlowStep<A>> {
|
|
3368
|
+
/**
|
|
3369
|
+
* False until the flow's progress has been read and the address names a step reached. Draw nothing until then: an
|
|
3370
|
+
* address not reached yet, past the last step or not a step at all is being moved to the furthest step reached.
|
|
3371
|
+
*/
|
|
3372
|
+
ready: boolean;
|
|
3373
|
+
/** This step, counting the steps shown from 1. */
|
|
3374
|
+
step: number;
|
|
3375
|
+
/** How many steps are shown, which follows the answers. */
|
|
3376
|
+
total: number;
|
|
3377
|
+
/** This step's own entry in `steps`: pick its form from it. */
|
|
3378
|
+
current: S;
|
|
3379
|
+
/** "Step 2 of 6": PageHeader's caption. */
|
|
3380
|
+
caption: string;
|
|
3381
|
+
/** This step's title: PageHeader's title. The browser tab's title follows it. */
|
|
3382
|
+
title: string;
|
|
3383
|
+
/** The answers so far, kept with the progress. */
|
|
3384
|
+
answers: A;
|
|
3385
|
+
/** Merges answers in. One that changes which steps follow this one means walking them again: they count as not reached. */
|
|
3386
|
+
setAnswers: (patch: Partial<A>) => void;
|
|
3387
|
+
/** The furthest step reached: any step up to it can be gone to. */
|
|
3388
|
+
furthest: number;
|
|
3389
|
+
isFirst: boolean;
|
|
3390
|
+
isLast: boolean;
|
|
3391
|
+
/** Goes on to the next step, which then counts as reached; answers given with it are kept in the same move. */
|
|
3392
|
+
next: (patch?: Partial<A>) => void;
|
|
3393
|
+
/** PageHeader's onBack: the step before, or undefined on the first step (no Back link there). */
|
|
3394
|
+
back: (() => void) | undefined;
|
|
3395
|
+
/** Goes to a step reached; any other is ignored. */
|
|
3396
|
+
goTo: (step: number) => void;
|
|
3397
|
+
/** The Stepper's props: the steps shown (done before the furthest, and a step past it can't be pressed), this one, and going to one. */
|
|
3398
|
+
stepper: {
|
|
3399
|
+
steps: {
|
|
3400
|
+
label: string;
|
|
3401
|
+
status?: "complete";
|
|
3402
|
+
disabled?: boolean;
|
|
3403
|
+
}[];
|
|
3404
|
+
currentStep: number;
|
|
3405
|
+
onStepChange: (index: number) => void;
|
|
3406
|
+
};
|
|
3407
|
+
/** Keeps the progress and leaves the flow, for exitTo. */
|
|
3408
|
+
saveAndExit: () => void;
|
|
3409
|
+
/** Ends the flow: its stored progress and answers go, and the user goes on to finishTo. */
|
|
3410
|
+
finish: () => void;
|
|
3411
|
+
}
|
|
3412
|
+
/** A flow's stored progress: its record under the prefix, its answers merged over the initial ones. Null when none (or unreadable). */
|
|
3413
|
+
declare function readFlowProgress<A>(storageKey: string, initialAnswers: A): FlowProgress<A> | null;
|
|
3414
|
+
/**
|
|
3415
|
+
* Sprint 25.16 A30 (R28-57, R28-58; P22): the library owns a flow's step. A flow with an address per step has one
|
|
3416
|
+
* `:step` route, and this hook reads the step from it: the step and the total, next, back and go-to, never past the
|
|
3417
|
+
* furthest step reached. An address not reached yet, past the last step or not a step at all ("/setup/9",
|
|
3418
|
+
* "/setup/abc") goes to the furthest step reached, the address changing with it: a fresh "/setup/3" lands on
|
|
3419
|
+
* "/setup/1". Steps can be conditional, so the total follows the answers. The progress (the furthest step, and the step
|
|
3420
|
+
* on screen) and the answers are kept in the browser's storage under the flow's name, so a return resumes; they go once
|
|
3421
|
+
* the flow finishes. Every caller with that name (a layout and its step, a page that mounts anew on each step, another
|
|
3422
|
+
* tab) shares one flow: its progress, its finish, the focus after a move and the tab's title. Its save-and-exit leaves
|
|
3423
|
+
* the flow (GOV.UK's save and return): with sign-in, the shell's "Save and log out", resumed after signing in; with
|
|
3424
|
+
* none, a page drawing <FlowSaved>, whose Continue resumes at the step the user was on. The focus shell's PageHeader
|
|
3425
|
+
* reads its caption, title, Stepper and Back from it; after a move the new step's heading takes focus and the browser
|
|
3426
|
+
* tab names the step.
|
|
3427
|
+
*/
|
|
3428
|
+
declare function useFlowSteps<A, S extends FlowStep<A>>(options: UseFlowStepsOptions<A, S>): FlowSteps<A, S>;
|
|
3429
|
+
|
|
3430
|
+
interface FlowSavedProps {
|
|
3431
|
+
/** The flow's storageKey, as its useFlowSteps has it. */
|
|
3432
|
+
storageKey: string;
|
|
3433
|
+
/** The flow's step addresses, as its useFlowSteps has them: Continue goes to the step the user was on. */
|
|
3434
|
+
href: (step: number) => string;
|
|
3435
|
+
/** The page's one heading. Default "Your progress has been saved". */
|
|
3436
|
+
title?: string;
|
|
3437
|
+
/** What the user should know about coming back. Default: the answers are kept in this browser. */
|
|
3438
|
+
children?: ReactNode;
|
|
3439
|
+
/** The app's router. Left out, the shell's (AppShell's navigate). */
|
|
3440
|
+
navigate?: (href: string, options?: {
|
|
3441
|
+
replace?: boolean;
|
|
3442
|
+
}) => void;
|
|
3443
|
+
}
|
|
3444
|
+
/**
|
|
3445
|
+
* Sprint 25.16 A30 (R28-58): where a flow's "Save and continue later" goes when the app has no sign-in to leave to —
|
|
3446
|
+
* save and return: a page saying the progress has been saved, whose Continue resumes at the step the user was on. It
|
|
3447
|
+
* has left the flow, so the focus shell draws no exit while it shows; its heading takes focus, as the pressed exit has
|
|
3448
|
+
* gone. A status page, as "Page not found" is: one centred message under the page's one heading. With nothing saved
|
|
3449
|
+
* (a bookmark, cleared storage) it says so, and Continue starts the flow. Continue goes back to the step when the user
|
|
3450
|
+
* has just left it for this page (so Back from the step doesn't show it twice), else replaces this page with it; the
|
|
3451
|
+
* step's heading takes focus either way.
|
|
3452
|
+
*/
|
|
3453
|
+
declare function FlowSaved({ storageKey, href, title, children, navigate }: FlowSavedProps): react_jsx_runtime.JSX.Element;
|
|
3454
|
+
|
|
3219
3455
|
interface DestructiveActionOptions {
|
|
3220
3456
|
/** The action's key as the preference lists name it ("remove_range"); derived from `title` when omitted. */
|
|
3221
3457
|
action?: string;
|
|
@@ -3290,8 +3526,9 @@ interface PageContainerProps {
|
|
|
3290
3526
|
maxWidth?: MaxWidth;
|
|
3291
3527
|
/**
|
|
3292
3528
|
* Caps the content under the header without narrowing the page: the header and tab strip keep the page's width, the
|
|
3293
|
-
* content column below is capped at this width and left-aligned. For a
|
|
3294
|
-
*
|
|
3529
|
+
* content column below is capped at this width and left-aligned. For a tab whose content is a form (round 17, 54.1)
|
|
3530
|
+
* — `contentWidth="narrow"`; a layout pattern that wraps PageContainer passes it through. A tab with lists or tables
|
|
3531
|
+
* beside its form keeps the full width: FormWrapper caps the fields itself (Sprint 25.16 A8). Never a hand-rolled
|
|
3295
3532
|
* `max-w-` wrapper around the form.
|
|
3296
3533
|
*/
|
|
3297
3534
|
contentWidth?: PageContainerWidth;
|
|
@@ -3317,6 +3554,15 @@ interface PageContainerProps {
|
|
|
3317
3554
|
* `useContentWidth("narrow")` at the top of the page; the cap lifts when the page unmounts.
|
|
3318
3555
|
*/
|
|
3319
3556
|
declare function useContentWidth(width: PageContainerWidth): void;
|
|
3557
|
+
/**
|
|
3558
|
+
* Sprint 25.16 A4 (R28-7): a page's own actions in the header its area layout draws ("Invite user" on Users, "Save" on
|
|
3559
|
+
* Roles), beside useContentWidth. Put them anywhere in the page: they render in the layout's PageHeader, as the page's
|
|
3560
|
+
* own live elements (its state and handlers, never a stale copy), and go when the page does. The layout passes no
|
|
3561
|
+
* actions per tab. Outside a PageContainer with a header they render nothing.
|
|
3562
|
+
*/
|
|
3563
|
+
declare function PageActions({ children }: {
|
|
3564
|
+
children: ReactNode;
|
|
3565
|
+
}): react.ReactPortal | null;
|
|
3320
3566
|
/**
|
|
3321
3567
|
* The page's width constraint, and — when a PageHeader is among its direct
|
|
3322
3568
|
* children — the page's composition: the header is placed inside the column
|
|
@@ -3332,6 +3578,17 @@ declare const PageContainer: react.ForwardRefExoticComponent<PageContainerProps
|
|
|
3332
3578
|
interface SectionHeadingProps {
|
|
3333
3579
|
/** Wraps onto more lines rather than being cut (an insight above a chart); a pane's title keeps one line. */
|
|
3334
3580
|
title: string;
|
|
3581
|
+
/**
|
|
3582
|
+
* Makes the title editable, for a view whose name the user changes in place (a document, a board): called with each
|
|
3583
|
+
* new title as the user types. The title shows as a field at the title's size, filling the title's line. The actions
|
|
3584
|
+
* stay beside it while it keeps about 20 characters, and move under it when it can't, as they always do on a phone,
|
|
3585
|
+
* so a phone never squeezes the name to a few letters (the owner's review of 1 October: run 71's "Sys").
|
|
3586
|
+
*/
|
|
3587
|
+
onTitleChange?: (title: string) => void;
|
|
3588
|
+
/** The editable title's name for a screen reader, what it is the title of ("Document title"). Default "Title". */
|
|
3589
|
+
titleLabel?: string;
|
|
3590
|
+
/** The heading's id, for a section named by its heading (`aria-labelledby`). */
|
|
3591
|
+
titleId?: string;
|
|
3335
3592
|
description?: string;
|
|
3336
3593
|
/** The section's buttons. Below sm they sit under the title, like PageHeader's actions. */
|
|
3337
3594
|
actions?: ReactNode;
|
|
@@ -3345,7 +3602,8 @@ interface SectionHeadingProps {
|
|
|
3345
3602
|
* "section" (default): a heading within a page, spaced below by --ds-heading-gap. "pane": the title block at the
|
|
3346
3603
|
* top of a SplitView pane on a fill page (an inbox, a library), where there is no PageHeader — a 16 px inset that
|
|
3347
3604
|
* matches the list rows under it, a rule at the bottom and no margin below (Sprint 25.4 C-9, folded in from
|
|
3348
|
-
* PaneHeader on the owner's review).
|
|
3605
|
+
* PaneHeader on the owner's review). At the top of the detail, an item's own header: there it insets at the page's
|
|
3606
|
+
* gutter, as the item's path above it does.
|
|
3349
3607
|
*/
|
|
3350
3608
|
variant?: "section" | "pane";
|
|
3351
3609
|
className?: string;
|
|
@@ -3366,6 +3624,31 @@ interface ActionPanelGroupProps {
|
|
|
3366
3624
|
}
|
|
3367
3625
|
declare const ActionPanelGroup: react.ForwardRefExoticComponent<ActionPanelGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
3368
3626
|
|
|
3627
|
+
interface DangerZoneProps {
|
|
3628
|
+
/** The section's heading. Default "Danger zone". */
|
|
3629
|
+
title?: string;
|
|
3630
|
+
/** A line under the heading ("Irreversible actions for this project"). */
|
|
3631
|
+
description?: string;
|
|
3632
|
+
/**
|
|
3633
|
+
* One ActionPanel per action: what the action does and what it costs, and its destructive Button that opens the
|
|
3634
|
+
* confirmation (destructive_actions#3).
|
|
3635
|
+
*/
|
|
3636
|
+
children: ReactNode;
|
|
3637
|
+
className?: string;
|
|
3638
|
+
}
|
|
3639
|
+
/**
|
|
3640
|
+
* A danger zone (Sprint 25.17 A39, R28-75; destructive_actions#7): the page's last section, holding its irreversible
|
|
3641
|
+
* actions. Its heading, then a frame drawn as a Card is, in the error colour, with one row per action, divided:
|
|
3642
|
+
*
|
|
3643
|
+
* <DangerZone>
|
|
3644
|
+
* <ActionPanel title="Delete project" description="Removes the project and its tasks. This can't be undone."
|
|
3645
|
+
* action={<Button variant="destructive" onClick={confirm}>Delete project</Button>} />
|
|
3646
|
+
* </DangerZone>
|
|
3647
|
+
*
|
|
3648
|
+
* The rows sit at a card's inset, so they line up with the cards above it.
|
|
3649
|
+
*/
|
|
3650
|
+
declare function DangerZone({ title, description, children, className }: DangerZoneProps): react_jsx_runtime.JSX.Element;
|
|
3651
|
+
|
|
3369
3652
|
interface TextOverflowProps {
|
|
3370
3653
|
/** Max visible lines before truncation. 1 = single-line ellipsis, >1 = line-clamp-N. */
|
|
3371
3654
|
lines?: number;
|
|
@@ -3410,4 +3693,4 @@ interface UseTextOverflowResult {
|
|
|
3410
3693
|
*/
|
|
3411
3694
|
declare function useTextOverflow(options?: UseTextOverflowOptions): UseTextOverflowResult;
|
|
3412
3695
|
|
|
3413
|
-
export { Accordion, ActionPanel, ActionPanelGroup, AddAnother, type AddAnotherProps, Alert, type AlertPlacement, AppShell, type AppShellContextValue, type AppShellFocus, AppShellPreferences, type AppShellTheme, AsidePanel, type AsidePanelProps, type AsidePanelSide, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarStatus, Badge, type BadgePaletteColor, type BadgeSeverity, type BadgeSize, type BadgeVariant, BottomNav, type BottomNavItem,
|
|
3696
|
+
export { Accordion, ActionPanel, ActionPanelGroup, AddAnother, type AddAnotherProps, Alert, type AlertPlacement, AppShell, type AppShellContextValue, type AppShellFocus, AppShellPreferences, type AppShellTheme, AsidePanel, type AsidePanelProps, type AsidePanelSide, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarStatus, Badge, type BadgePaletteColor, type BadgeSeverity, type BadgeSize, type BadgeVariant, BottomNav, type BottomNavItem, BreakpointKey, BulkActionBar, Button, ButtonSizeContext, Calendar, type CalendarDay, Card, CardContent, CardDescription, CardFooter, CardGrid, type CardGridProps, CardHeader, type CardSelectType, CardTitle, type CardVariant, Carousel, type ChatMessage, type ChatMessageAction, type ChatMessageLayout, ChatMessageList, type ChatMessageSender, type ChatMessageSource, type ChatMessageStatus, ChatPanel, type ChatPanelProps, type ChatPanelStatusTone, Checkbox, CheckboxGroup, CheckboxGroupItem, CodeBlock, Collapsible, ColorPicker, type Column, Combobox, CommandPalette, ContextMenu, type ControlSize, ControlSizeContext, CornerPanel, type CornerPanelEdge, type CornerPanelProps, DEFAULT_DATE_RANGE_PRESETS, DangerZone, type DangerZoneProps, DataList, type DateInput, DatePicker, type DateRange, DateRangePicker, type DateRangePickerProps, type DateRangePreset, type DateRangeWords, type DescriptionItem, DescriptionList, type DescriptionListOrientation, type DescriptionListSize, type DestructiveActionHandle, type DestructiveActionOptions, Dialog, Divider, Dock, Drawer, Dropdown, DropdownMenu, type DropdownMenuDivider, type DropdownMenuEntry, type DropdownMenuItem, EmptyState, EntityCell, Field, type FieldControlProps, type FieldLabel, type FieldProps, FileUpload, type FileUploadItem, type FileUploadRequestOptions, type FileUploadStatus, type FitLabelsOptions, type FittedLabel, type FlowNavigate, type FlowProgress, FlowSaved, type FlowSavedProps, type FlowStep, type FlowSteps, FormWrapper, Gantt, type GanttGroup, type GanttItem, type GanttProps, type GanttStatus, type GanttTone, type GridKeyboard, type GridKeyboardOptions, HoverCard, InlineFieldError, Input, Kbd, Label, type LabelBox, Launcher, type LauncherEdge, type LauncherProps, type LauncherVariant, type LauncherWhenOpen, Link, type LinkProps, MentionInput, type MentionInputProps, MentionSuggestion, MobileHeaderMenu, type MobileHeaderMenuItemData, type MobileHeaderMenuType, NavItem, type NavItemProps, type NavItemType, NavMenu, type NavMenuItem, Navbar, type NavbarSize, type NavbarType, type NavbarVariant, NotificationCenter, NumberInput, PageActions, PageContainer, type PageContainerWidth, PageHeader, type PageHeaderBehavior, type PageHeaderIntensity, type PageHeaderProps, type PageHeaderVariant, Pager, Pagination, PinInput, Popover, Progress, type PromiseToastMessages, RadioGroup, Rating, RelativeTime, type RelativeTimeProps, ScrollArea, SectionHeading, type SectionHeadingProps, SegmentedControl, SettingsLayout, type SettingsLayoutProps, type SettingsSection, Sheet, Sidebar, type SidebarContextValue, type SidebarItem, SidebarNav, type SidebarNavSize, type SidebarPosition, type SidebarSection, type SidebarType, Skeleton, SkipLink, SliderRange, type SortDir, Spinner, StackedList, type StackedListVariant, StatsCard, StatusDot, type StatusDotVariant, Stepper, TIME_ZOOMS, type Tab, Table, type TableDensity, type TableProps, type TableRow, TableToolbar, type TableToolbarActiveFilter, type TableToolbarFilterOption, Tabs, Tag, TagInput, type TagPaletteColor, type TagVariant, TextOverflow, type TextOverflowProps, Textarea, TimeBar, type TimeBarProps, TimePicker, TimeRow, type TimeRowProps, type TimeScale, TimeScaleHeader, type TimeScaleHeaderProps, type TimeScaleOptions, type TimeTick, type TimeValue, TimeViewport, type TimeViewportHandle, type TimeViewportLayout, type TimeViewportProps, type TimeViewportState, type TimeZoom, Timeline, TimezoneSelect, type TimezoneSelectProps, Toast, type ToastAction, type ToastApi, type ToastOptions, type ToastPosition, ToastProvider, type ToastVariant, Toggle, Tooltip, Tour, TransferList, TreeView, type Trend, type UseFlowStepsOptions, type UseTextOverflowOptions, type UseTextOverflowResult, browserTimeZone, canonicalTimeZone, dateOfDay, dayOf, endDayOf, fitLabel, fitLabels, formatDateRange, formatFullTime, formatRelativeTime, readFlowProgress, timeExtent, timeZoneOffset, useAppShell, useContentWidth, useDestructiveAction, useFittedLabels, useFlowSteps, useFormContext, useGridKeyboard, useRelativeTimeFormat, useSidebar, useTextMeasure, useTextOverflow, useTimeScale, useTimeViewport, useTimeViewportLayout, useToast, useToastOptional, useUnsavedChanges };
|