@tailor-platform/app-shell 1.8.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-shell-core.css +1 -1
- package/dist/app-shell.d.ts +718 -26
- package/dist/app-shell.js +6770 -4764
- package/dist/themes/bloom.css +2 -1
- package/dist/themes/cream.css +2 -1
- package/package.json +2 -2
- package/skills/app-shell-patterns/SKILL.md +32 -20
- package/skills/app-shell-patterns/references/fundamental/components.md +120 -23
- package/skills/app-shell-patterns/references/fundamental/design-system.md +24 -0
- package/skills/app-shell-patterns/references/fundamental/graphql.md +1 -1
- package/skills/app-shell-patterns/references/patterns/detail-hero-with-actions.md +51 -7
- package/skills/app-shell-patterns/references/patterns/list-dense-scan.md +12 -5
package/dist/app-shell.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { AutocompleteRootProps } from '@base-ui/react/autocomplete';
|
|
|
4
4
|
import { Avatar as Avatar_2 } from '@base-ui/react/avatar';
|
|
5
5
|
import { CalendarDate } from '@internationalized/date';
|
|
6
6
|
import { CalendarDateTime } from '@internationalized/date';
|
|
7
|
+
import { Checkbox as Checkbox_2 } from '@base-ui/react/checkbox';
|
|
7
8
|
import { ClassProp } from 'class-variance-authority/types';
|
|
8
9
|
import { Combobox as Combobox_2 } from '@base-ui/react/combobox';
|
|
9
10
|
import { CSSProperties } from 'react';
|
|
@@ -248,12 +249,26 @@ export declare const alertVariants: (props?: ({
|
|
|
248
249
|
variant?: "error" | "neutral" | "success" | "warning" | "info" | null | undefined;
|
|
249
250
|
} & ClassProp) | undefined) => string;
|
|
250
251
|
|
|
252
|
+
declare type Anchor = "start" | "center" | "end";
|
|
253
|
+
|
|
251
254
|
/**
|
|
252
255
|
* Appearance menu. The end-user controls **color theme** (light / dark / system);
|
|
253
256
|
* the color palette/brand is a developer configuration, so it is not shown here.
|
|
254
257
|
*/
|
|
255
258
|
export declare function AppearanceSwitcher(): JSX.Element;
|
|
256
259
|
|
|
260
|
+
export declare type AppInfo = {
|
|
261
|
+
/** Additional app-defined rows shown on the built-in "/__appinfo" page. */
|
|
262
|
+
metadata?: readonly AppInfoEntry[];
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
export declare type AppInfoEntry = {
|
|
266
|
+
/** Display label shown on the built-in "/__appinfo" page. */
|
|
267
|
+
label: string;
|
|
268
|
+
/** Primitive value rendered as text. Format complex values before passing them in. */
|
|
269
|
+
value: string | number | boolean | null | undefined;
|
|
270
|
+
};
|
|
271
|
+
|
|
257
272
|
export declare const AppShell: {
|
|
258
273
|
(props: AppShellProps): JSX.Element | null;
|
|
259
274
|
WithPages(pages: PageEntry[]): FC<AppShellProps>;
|
|
@@ -267,6 +282,7 @@ declare type AppShellConfigContextType = {
|
|
|
267
282
|
title?: string;
|
|
268
283
|
icon?: ReactNode;
|
|
269
284
|
favicon?: string;
|
|
285
|
+
appInfo?: AppInfo;
|
|
270
286
|
configurations: RootConfiguration;
|
|
271
287
|
};
|
|
272
288
|
|
|
@@ -424,10 +440,12 @@ declare type AsyncFetcher<T> = AsyncFetcherFn<T> | {
|
|
|
424
440
|
* this one — pass it through to `fetch()` so the browser cancels the
|
|
425
441
|
* in-flight HTTP request automatically.
|
|
426
442
|
*
|
|
427
|
-
* **Error handling:**
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
443
|
+
* **Error handling:** If the fetcher throws or rejects, the component renders
|
|
444
|
+
* a built-in inline error state (with a Retry affordance) in place of the
|
|
445
|
+
* empty state — the failure is no longer silently swallowed. Aborted/superseded
|
|
446
|
+
* requests are ignored. To run a side effect on failure (logging, error
|
|
447
|
+
* tracking, a toast), pass `onFetchError`; it fires once per outage rather
|
|
448
|
+
* than once per failed keystroke.
|
|
431
449
|
*
|
|
432
450
|
* The `query` parameter is `null` when the user has not typed anything
|
|
433
451
|
* (e.g. the dropdown was just opened). Return initial / default items
|
|
@@ -584,6 +602,20 @@ declare interface AutocompleteAsyncStandaloneProps<T> extends AutocompletePropsB
|
|
|
584
602
|
fetcher: AutocompleteAsyncFetcher<T>;
|
|
585
603
|
/** Text shown while loading. @default "Loading..." */
|
|
586
604
|
loadingText?: string;
|
|
605
|
+
/**
|
|
606
|
+
* Message shown in the popover when the fetcher fails, alongside a Retry
|
|
607
|
+
* affordance. Replaces the misleading empty state.
|
|
608
|
+
* @default "Couldn't load results."
|
|
609
|
+
*/
|
|
610
|
+
errorText?: string;
|
|
611
|
+
/** Label for the retry button in the error state. @default "Retry" */
|
|
612
|
+
retryText?: string;
|
|
613
|
+
/**
|
|
614
|
+
* Called when a fetch fails. Fires once per outage (not per failed keystroke)
|
|
615
|
+
* and re-arms after the next success. Use for logging or error tracking — the
|
|
616
|
+
* inline error state is shown regardless.
|
|
617
|
+
*/
|
|
618
|
+
onFetchError?: (error: unknown) => void;
|
|
587
619
|
}
|
|
588
620
|
|
|
589
621
|
declare function AutocompleteClear({ className, children, ...props }: React_2.ComponentProps<typeof Autocomplete_2.Clear>): JSX.Element;
|
|
@@ -777,6 +809,8 @@ declare interface AutocompleteUseAsyncReturn<T> {
|
|
|
777
809
|
value: string;
|
|
778
810
|
/** The error thrown by the last fetch, if any */
|
|
779
811
|
error: unknown;
|
|
812
|
+
/** Re-runs the most recent fetch immediately (no debounce). Use for a Retry affordance. */
|
|
813
|
+
retry: () => void;
|
|
780
814
|
/** Value change handler — pass to the Root `onValueChange` prop. */
|
|
781
815
|
onValueChange: (value: string) => void;
|
|
782
816
|
}
|
|
@@ -796,7 +830,7 @@ export declare const Avatar: {
|
|
|
796
830
|
export declare type AvatarProps = React_2.ComponentProps<typeof Avatar_2.Root> & VariantProps<typeof avatarVariants>;
|
|
797
831
|
|
|
798
832
|
export declare const avatarVariants: (props?: ({
|
|
799
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
833
|
+
size?: "default" | "xs" | "sm" | "lg" | null | undefined;
|
|
800
834
|
} & ClassProp) | undefined) => string;
|
|
801
835
|
|
|
802
836
|
export declare function Badge({ className, variant, children, ...props }: BadgeProps): JSX.Element;
|
|
@@ -960,6 +994,60 @@ declare type CellProps = React_2.ComponentProps<"td"> & {
|
|
|
960
994
|
align?: CellAlign;
|
|
961
995
|
};
|
|
962
996
|
|
|
997
|
+
/**
|
|
998
|
+
* A styled checkbox for boolean form fields.
|
|
999
|
+
*
|
|
1000
|
+
* Wraps Base UI's `Checkbox`, so it works with `Field` and React Hook Form the
|
|
1001
|
+
* same way `Input`, `Select`, and `Combobox` do — placed inside a `Field.Root`
|
|
1002
|
+
* it inherits label association, `aria-describedby`, `disabled`, and the
|
|
1003
|
+
* `data-invalid` error state automatically (no `error` prop of its own).
|
|
1004
|
+
*
|
|
1005
|
+
* Supports controlled (`checked`) and uncontrolled (`defaultChecked`) use, plus
|
|
1006
|
+
* an `indeterminate` "partially selected" state.
|
|
1007
|
+
*
|
|
1008
|
+
* @example
|
|
1009
|
+
* ### Standalone with an inline label
|
|
1010
|
+
* ```tsx
|
|
1011
|
+
* const [checked, setChecked] = React.useState(false);
|
|
1012
|
+
*
|
|
1013
|
+
* <Checkbox label="Subscribe to updates" checked={checked} onCheckedChange={setChecked} />
|
|
1014
|
+
* ```
|
|
1015
|
+
*
|
|
1016
|
+
* @example
|
|
1017
|
+
* ### Inside a Field with React Hook Form
|
|
1018
|
+
* ```tsx
|
|
1019
|
+
* <Controller
|
|
1020
|
+
* name="acceptTerms"
|
|
1021
|
+
* control={control}
|
|
1022
|
+
* rules={{ required: "You must accept the terms." }}
|
|
1023
|
+
* render={({ field, fieldState }) => (
|
|
1024
|
+
* <Field.Root name={field.name} {...fieldState}>
|
|
1025
|
+
* <Checkbox
|
|
1026
|
+
* label="I accept the terms and conditions"
|
|
1027
|
+
* checked={field.value}
|
|
1028
|
+
* onCheckedChange={field.onChange}
|
|
1029
|
+
* onBlur={field.onBlur}
|
|
1030
|
+
* inputRef={field.ref}
|
|
1031
|
+
* />
|
|
1032
|
+
* <Field.Error />
|
|
1033
|
+
* </Field.Root>
|
|
1034
|
+
* )}
|
|
1035
|
+
* />
|
|
1036
|
+
* ```
|
|
1037
|
+
*
|
|
1038
|
+
* @example
|
|
1039
|
+
* ### Indeterminate ("select all")
|
|
1040
|
+
* ```tsx
|
|
1041
|
+
* <Checkbox
|
|
1042
|
+
* aria-label="Select all rows"
|
|
1043
|
+
* checked={allSelected}
|
|
1044
|
+
* indeterminate={someSelected && !allSelected}
|
|
1045
|
+
* onCheckedChange={(checked) => (checked ? selectAll() : clearAll())}
|
|
1046
|
+
* />
|
|
1047
|
+
* ```
|
|
1048
|
+
*/
|
|
1049
|
+
export declare function Checkbox({ className, label, ...props }: CheckboxProps): JSX.Element;
|
|
1050
|
+
|
|
963
1051
|
/** A menu item that toggles a setting on or off. */
|
|
964
1052
|
declare function CheckboxItem({ className, ...props }: React_2.ComponentProps<typeof Menu_2.CheckboxItem>): JSX.Element;
|
|
965
1053
|
|
|
@@ -974,6 +1062,16 @@ declare namespace CheckboxItemIndicator {
|
|
|
974
1062
|
var displayName: string;
|
|
975
1063
|
}
|
|
976
1064
|
|
|
1065
|
+
export declare type CheckboxProps = Omit<React_2.ComponentProps<typeof Checkbox_2.Root>, "children" | "render"> & {
|
|
1066
|
+
/**
|
|
1067
|
+
* Optional inline label rendered next to the box. When provided, the box and
|
|
1068
|
+
* text are wrapped in an enclosing `<label>` so clicking the text toggles the
|
|
1069
|
+
* checkbox. Omit it to render the bare box (e.g. a row-select cell with an
|
|
1070
|
+
* `aria-label`, or a `Field.Label` sibling for the stacked form layout).
|
|
1071
|
+
*/
|
|
1072
|
+
label?: React_2.ReactNode;
|
|
1073
|
+
};
|
|
1074
|
+
|
|
977
1075
|
/** A button that closes the dialog. */
|
|
978
1076
|
declare function Close({ ...props }: React_2.ComponentProps<typeof Dialog_2.Close>): JSX.Element;
|
|
979
1077
|
|
|
@@ -1144,7 +1242,10 @@ declare type ColumnArea = "left" | "main" | "right";
|
|
|
1144
1242
|
* column types (e.g. `type MoneyColumn<TRow> = ColumnBase<TRow> & { type: "money"; … }`).
|
|
1145
1243
|
*/
|
|
1146
1244
|
declare interface ColumnBase<TRow extends Record<string, unknown>> {
|
|
1147
|
-
/**
|
|
1245
|
+
/**
|
|
1246
|
+
* Column header text. Used as the default header content and passed to
|
|
1247
|
+
* custom `header` renderers.
|
|
1248
|
+
*/
|
|
1148
1249
|
label?: string;
|
|
1149
1250
|
/**
|
|
1150
1251
|
* Renders the cell content for a given row. Optional — when omitted, the
|
|
@@ -1156,6 +1257,16 @@ declare interface ColumnBase<TRow extends Record<string, unknown>> {
|
|
|
1156
1257
|
* across spread-then-override patterns like `column({ ...inferred, render })`.
|
|
1157
1258
|
*/
|
|
1158
1259
|
render?: (row: TRow) => ReactNode;
|
|
1260
|
+
/**
|
|
1261
|
+
* Custom header renderer.
|
|
1262
|
+
*
|
|
1263
|
+
* When omitted, the built-in header renders `label` and, for sortable
|
|
1264
|
+
* columns, owns the sort button and indicator. When provided, the return
|
|
1265
|
+
* value replaces the built-in header entirely. Sortable custom headers
|
|
1266
|
+
* receive `sortDirection` and `activateSort()` and must render their own
|
|
1267
|
+
* click surface and sort indicator.
|
|
1268
|
+
*/
|
|
1269
|
+
header?: (ctx: HeaderRenderContext) => ReactNode;
|
|
1159
1270
|
/**
|
|
1160
1271
|
* Stable identifier used for column visibility toggling and as the React key.
|
|
1161
1272
|
* Falls back to `label` when omitted. Set this explicitly when `label` is
|
|
@@ -1164,6 +1275,17 @@ declare interface ColumnBase<TRow extends Record<string, unknown>> {
|
|
|
1164
1275
|
id?: string;
|
|
1165
1276
|
/** Fixed column width in pixels. When omitted the column sizes naturally. */
|
|
1166
1277
|
width?: number;
|
|
1278
|
+
/**
|
|
1279
|
+
* Freeze this column to the left or right edge so it stays visible while the
|
|
1280
|
+
* table scrolls horizontally. This is the **default** pin; the user can
|
|
1281
|
+
* override it at runtime via the toolbar's `columnSettings` control (persisted when
|
|
1282
|
+
* `tableId` is set).
|
|
1283
|
+
*
|
|
1284
|
+
* Sticky offsets for stacked pinned columns are measured from the rendered
|
|
1285
|
+
* layout, so a `width` is not required — but setting `width` on pinned columns
|
|
1286
|
+
* is recommended so their size stays stable as row content changes.
|
|
1287
|
+
*/
|
|
1288
|
+
pin?: "left" | "right";
|
|
1167
1289
|
/**
|
|
1168
1290
|
* Horizontal alignment for the header and body cell. When omitted, numeric
|
|
1169
1291
|
* `type` values (`"number"` and `"money"`) default to `"right"` so digits
|
|
@@ -1340,6 +1462,20 @@ declare interface ComboboxAsyncOwnProps<T> {
|
|
|
1340
1462
|
fetcher: ComboboxAsyncFetcher<T>;
|
|
1341
1463
|
/** Text shown while loading. @default "Loading..." */
|
|
1342
1464
|
loadingText?: string;
|
|
1465
|
+
/**
|
|
1466
|
+
* Message shown in the popover when the fetcher fails, alongside a Retry
|
|
1467
|
+
* affordance. Replaces the misleading empty state.
|
|
1468
|
+
* @default "Couldn't load results."
|
|
1469
|
+
*/
|
|
1470
|
+
errorText?: string;
|
|
1471
|
+
/** Label for the retry button in the error state. @default "Retry" */
|
|
1472
|
+
retryText?: string;
|
|
1473
|
+
/**
|
|
1474
|
+
* Called when a fetch fails. Fires once per outage (not per failed keystroke)
|
|
1475
|
+
* and re-arms after the next success. Use for logging or error tracking — the
|
|
1476
|
+
* inline error state is shown regardless.
|
|
1477
|
+
*/
|
|
1478
|
+
onFetchError?: (error: unknown) => void;
|
|
1343
1479
|
}
|
|
1344
1480
|
|
|
1345
1481
|
declare type ComboboxAsyncPlainProps<T> = (ComboboxAsyncOwnProps<T> & ComboboxPropsSingle<T>) | (ComboboxAsyncOwnProps<T> & ComboboxPropsMultiple<T>);
|
|
@@ -1689,8 +1825,9 @@ declare namespace Content_4 {
|
|
|
1689
1825
|
}
|
|
1690
1826
|
|
|
1691
1827
|
/** The tooltip popup that displays additional information. */
|
|
1692
|
-
declare function Content_5({ className, position, side: _side, align: _align, sideOffset: _sideOffset, children, ...restProps }: React_2.ComponentProps<typeof Tooltip_2.Popup> & {
|
|
1828
|
+
declare function Content_5({ className, position, side: _side, align: _align, sideOffset: _sideOffset, noArrow, children, ...restProps }: React_2.ComponentProps<typeof Tooltip_2.Popup> & {
|
|
1693
1829
|
position?: PositionProps;
|
|
1830
|
+
noArrow?: boolean;
|
|
1694
1831
|
/** @deprecated Use `position={{ side }}` instead. */
|
|
1695
1832
|
side?: PositionProps["side"];
|
|
1696
1833
|
/** @deprecated Use `position={{ align }}` instead. */
|
|
@@ -1976,8 +2113,9 @@ export declare const DataTable: {
|
|
|
1976
2113
|
*/
|
|
1977
2114
|
readonly Root: typeof DataTableRoot;
|
|
1978
2115
|
/**
|
|
1979
|
-
* Container for toolbar content (
|
|
1980
|
-
*
|
|
2116
|
+
* Container for toolbar content (filters, search, etc.). Place inside
|
|
2117
|
+
* `DataTable.Root`, before `DataTable.Table`. Pass `columnSettings` to render
|
|
2118
|
+
* the built-in "Columns" control (show/hide, reorder, pin) at the top-right.
|
|
1981
2119
|
*/
|
|
1982
2120
|
readonly Toolbar: typeof DataTableToolbar;
|
|
1983
2121
|
/**
|
|
@@ -2054,6 +2192,11 @@ export declare interface DataTableContextValue<TRow extends Record<string, unkno
|
|
|
2054
2192
|
showAllColumns: () => void;
|
|
2055
2193
|
hideAllColumns: () => void;
|
|
2056
2194
|
isColumnVisible: (fieldOrId: string) => boolean;
|
|
2195
|
+
columnOrder: string[];
|
|
2196
|
+
moveColumn: (key: string, toIndex: number) => void;
|
|
2197
|
+
setColumnOrder: (keys: string[]) => void;
|
|
2198
|
+
pinnedColumns: Record<string, "left" | "right" | "none">;
|
|
2199
|
+
setPin: (key: string, side: "left" | "right" | "none" | null) => void;
|
|
2057
2200
|
onClickRow?: (row: TRow) => void;
|
|
2058
2201
|
rowActions?: RowAction<TRow>[];
|
|
2059
2202
|
selectedIds: string[];
|
|
@@ -2079,8 +2222,20 @@ export declare interface DataTableData<TRow> {
|
|
|
2079
2222
|
}
|
|
2080
2223
|
|
|
2081
2224
|
/** Use `DataTable.Filters` instead of calling this directly. */
|
|
2082
|
-
declare function DataTableFilters({ className }: {
|
|
2225
|
+
declare function DataTableFilters({ className, slot, addIconOnly, }: {
|
|
2083
2226
|
className?: string;
|
|
2227
|
+
/**
|
|
2228
|
+
* Which part to render, for custom toolbar layouts:
|
|
2229
|
+
* - `"all"` (default) — active filter chips plus the **Add filter** trigger.
|
|
2230
|
+
* - `"chips"` — only the active filter chips (renders nothing when there are none).
|
|
2231
|
+
* - `"add"` — only the **Add filter** trigger.
|
|
2232
|
+
*
|
|
2233
|
+
* Render `"add"` and `"chips"` separately to place the trigger and the chips on
|
|
2234
|
+
* different rows (e.g. the trigger in a header row, chips on the row below).
|
|
2235
|
+
*/
|
|
2236
|
+
slot?: "all" | "chips" | "add";
|
|
2237
|
+
/** Render the **Add filter** trigger as an icon-only button (label → `aria-label`). */
|
|
2238
|
+
addIconOnly?: boolean;
|
|
2084
2239
|
}): JSX.Element | null;
|
|
2085
2240
|
|
|
2086
2241
|
declare namespace DataTableFilters {
|
|
@@ -2135,8 +2290,15 @@ declare namespace DataTableTable {
|
|
|
2135
2290
|
}
|
|
2136
2291
|
|
|
2137
2292
|
/** Use `DataTable.Toolbar` instead of calling this directly. */
|
|
2138
|
-
declare function DataTableToolbar({ children, className }: {
|
|
2139
|
-
children
|
|
2293
|
+
declare function DataTableToolbar({ children, columnSettings, className, }: {
|
|
2294
|
+
children?: ReactNode;
|
|
2295
|
+
/**
|
|
2296
|
+
* Render the built-in column-settings control (a "Columns" button that opens
|
|
2297
|
+
* the show/hide + reorder + pin popover) anchored to the top-right of the
|
|
2298
|
+
* toolbar. The button always lives in the same place, so it's a prop rather
|
|
2299
|
+
* than a separately-composed sub-component.
|
|
2300
|
+
*/
|
|
2301
|
+
columnSettings?: boolean;
|
|
2140
2302
|
className?: string;
|
|
2141
2303
|
}): JSX.Element;
|
|
2142
2304
|
|
|
@@ -2160,6 +2322,11 @@ declare interface DateBehaviorProps<T extends DateValue> {
|
|
|
2160
2322
|
hourCycle?: HourCycle;
|
|
2161
2323
|
hideTimeZone?: boolean;
|
|
2162
2324
|
placeholderValue?: DateValue;
|
|
2325
|
+
/**
|
|
2326
|
+
* First day of the week (0 = Sunday … 6 = Saturday); defaults to the locale.
|
|
2327
|
+
* Only affects the `w`/`k` (start/end of week) keyboard shortcuts here.
|
|
2328
|
+
*/
|
|
2329
|
+
firstDayOfWeek?: FirstDayOfWeek;
|
|
2163
2330
|
name?: string;
|
|
2164
2331
|
/** Accessible name when no visible `label` is provided (e.g. a compact filter input). */
|
|
2165
2332
|
"aria-label"?: string;
|
|
@@ -2189,7 +2356,7 @@ declare interface DateCellOptions {
|
|
|
2189
2356
|
* <DateField label="Created at" granularity="minute" />
|
|
2190
2357
|
* ```
|
|
2191
2358
|
*/
|
|
2192
|
-
export declare function DateField<T extends DateValue = DateValue>({ label, description, errorMessage, className, locale: localeProp, value, defaultValue, onChange, granularity, hourCycle, placeholderValue, isDisabled, isReadOnly, isInvalid, isRequired, autoFocus, name, "aria-label": ariaLabel, }: DateFieldProps<T>): JSX.Element;
|
|
2359
|
+
export declare function DateField<T extends DateValue = DateValue>({ label, description, errorMessage, className, locale: localeProp, value, defaultValue, onChange, granularity, hourCycle, placeholderValue, minValue, maxValue, isDateUnavailable, isDisabled, isReadOnly, isInvalid, isRequired, autoFocus, firstDayOfWeek, name, "aria-label": ariaLabel, }: DateFieldProps<T>): JSX.Element;
|
|
2193
2360
|
|
|
2194
2361
|
declare interface DateFieldMetaProps {
|
|
2195
2362
|
label?: LocalizedString;
|
|
@@ -2223,7 +2390,6 @@ declare type DateFormat = "short" | "medium" | "long" | "relative";
|
|
|
2223
2390
|
export declare function DatePicker<T extends DateValue = DateValue>({ label, description, errorMessage, className, locale: localeProp, timeZone: timeZoneProp, value, defaultValue, onChange, granularity, hourCycle, placeholderValue, minValue, maxValue, isDateUnavailable, isDisabled, isReadOnly, isInvalid, isRequired, autoFocus, firstDayOfWeek, name, "aria-label": ariaLabel, }: DatePickerProps<T>): JSX.Element;
|
|
2224
2391
|
|
|
2225
2392
|
export declare type DatePickerProps<T extends DateValue = DateValue> = DateFieldProps<T> & {
|
|
2226
|
-
firstDayOfWeek?: FirstDayOfWeek;
|
|
2227
2393
|
/** IANA timezone; defaults to the AppShell `timeZone`. */
|
|
2228
2394
|
timeZone?: string;
|
|
2229
2395
|
};
|
|
@@ -3087,10 +3253,9 @@ declare type FilterInputForFieldType<TFilterConfigType extends FilterConfig["typ
|
|
|
3087
3253
|
export declare type FilterOperator = OperatorForFilterType[FilterConfig["type"]];
|
|
3088
3254
|
|
|
3089
3255
|
/**
|
|
3090
|
-
*
|
|
3091
|
-
*
|
|
3092
|
-
*
|
|
3093
|
-
* (arrows, Home/End, PageUp/Down, Shift+PageUp/Down).
|
|
3256
|
+
* Week-start override for the `weekStart`/`weekEnd` shortcuts (and the calendar
|
|
3257
|
+
* grid). Defined here — with the resolver that consumes it — so the field and
|
|
3258
|
+
* calendar engines share one source of truth.
|
|
3094
3259
|
*/
|
|
3095
3260
|
declare type FirstDayOfWeek = "sun" | "mon" | "tue" | "wed" | "thu" | "fri" | "sat";
|
|
3096
3261
|
|
|
@@ -3412,6 +3577,11 @@ declare type HeaderProps = Omit<React_2.ComponentProps<"div">, "title"> & {
|
|
|
3412
3577
|
description?: React_2.ReactNode;
|
|
3413
3578
|
};
|
|
3414
3579
|
|
|
3580
|
+
/**
|
|
3581
|
+
* Context passed to custom `header` renderers.
|
|
3582
|
+
*/
|
|
3583
|
+
export declare type HeaderRenderContext = NonSortableHeaderRenderContext | SortableHeaderRenderContext;
|
|
3584
|
+
|
|
3415
3585
|
declare type HeadProps = React_2.ComponentProps<"th"> & {
|
|
3416
3586
|
align?: CellAlign;
|
|
3417
3587
|
};
|
|
@@ -3482,6 +3652,15 @@ export declare function Input({ className, type, ...props }: InputProps): JSX.El
|
|
|
3482
3652
|
|
|
3483
3653
|
export declare type InputProps = React_2.ComponentProps<"input">;
|
|
3484
3654
|
|
|
3655
|
+
/**
|
|
3656
|
+
* Positions content across a time range inside a row.
|
|
3657
|
+
*/
|
|
3658
|
+
declare function Interval({ start, end, children, id, insetY, className, style, }: TimelineIntervalProps): JSX.Element;
|
|
3659
|
+
|
|
3660
|
+
declare namespace Interval {
|
|
3661
|
+
var displayName: string;
|
|
3662
|
+
}
|
|
3663
|
+
|
|
3485
3664
|
/**
|
|
3486
3665
|
* Check if an object type has no keys.
|
|
3487
3666
|
*/
|
|
@@ -3666,6 +3845,17 @@ declare namespace Legend {
|
|
|
3666
3845
|
|
|
3667
3846
|
export { Link }
|
|
3668
3847
|
|
|
3848
|
+
/**
|
|
3849
|
+
* Draws an orthogonal connector between two row items.
|
|
3850
|
+
*
|
|
3851
|
+
* If either referenced `Timeline.Interval` id is unresolved, nothing is rendered.
|
|
3852
|
+
*/
|
|
3853
|
+
declare function Link_2({ from, to, fromAnchor, toAnchor, arrow, gap, className, style, strokeWidth, }: TimelineLinkProps): React_2.ReactPortal | null;
|
|
3854
|
+
|
|
3855
|
+
declare namespace Link_2 {
|
|
3856
|
+
var displayName: string;
|
|
3857
|
+
}
|
|
3858
|
+
|
|
3669
3859
|
/** Options for `type: "link"` cells. `href` is required. */
|
|
3670
3860
|
declare interface LinkCellOptions<TRow extends Record<string, unknown>> {
|
|
3671
3861
|
/**
|
|
@@ -3847,6 +4037,14 @@ export declare type NodeType<T extends {
|
|
|
3847
4037
|
}[];
|
|
3848
4038
|
} | null | undefined> = NonNullable<T>["edges"][number]["node"];
|
|
3849
4039
|
|
|
4040
|
+
/**
|
|
4041
|
+
* Header render context for non-sortable columns.
|
|
4042
|
+
*/
|
|
4043
|
+
declare interface NonSortableHeaderRenderContext {
|
|
4044
|
+
label?: string;
|
|
4045
|
+
sortable: false;
|
|
4046
|
+
}
|
|
4047
|
+
|
|
3850
4048
|
/** Options for `type: "number"` cells. */
|
|
3851
4049
|
declare interface NumberCellOptions {
|
|
3852
4050
|
/** Minimum decimal places. Default: `0`. */
|
|
@@ -3857,6 +4055,11 @@ declare interface NumberCellOptions {
|
|
|
3857
4055
|
locale?: string;
|
|
3858
4056
|
}
|
|
3859
4057
|
|
|
4058
|
+
export declare type OpenCommandPaletteOptions = {
|
|
4059
|
+
/** Optional initial text to prefill into the palette input. */
|
|
4060
|
+
search?: string;
|
|
4061
|
+
};
|
|
4062
|
+
|
|
3860
4063
|
/**
|
|
3861
4064
|
* Resolve the operator union for a specific field within a filter type.
|
|
3862
4065
|
*/
|
|
@@ -4163,6 +4366,26 @@ declare namespace Root_12 {
|
|
|
4163
4366
|
var displayName: string;
|
|
4164
4367
|
}
|
|
4165
4368
|
|
|
4369
|
+
/**
|
|
4370
|
+
* Provides the shared time range used by all timeline primitives.
|
|
4371
|
+
*
|
|
4372
|
+
* Example:
|
|
4373
|
+
* ```tsx
|
|
4374
|
+
* <Timeline.Root start={projectStart} end={projectEnd}>
|
|
4375
|
+
* <Timeline.Viewport axis={axis}>
|
|
4376
|
+
* <Timeline.Row height={40}>
|
|
4377
|
+
* <Timeline.Interval start={task.start} end={task.end}>…</Timeline.Interval>
|
|
4378
|
+
* </Timeline.Row>
|
|
4379
|
+
* </Timeline.Viewport>
|
|
4380
|
+
* </Timeline.Root>
|
|
4381
|
+
* ```
|
|
4382
|
+
*/
|
|
4383
|
+
declare function Root_13({ start, end, children, className, style }: TimelineRootProps): JSX.Element;
|
|
4384
|
+
|
|
4385
|
+
declare namespace Root_13 {
|
|
4386
|
+
var displayName: string;
|
|
4387
|
+
}
|
|
4388
|
+
|
|
4166
4389
|
declare function Root_2<T extends ActivityCardBaseItem>({ items, title, maxVisible, overflowLabel, groupBy, className, children, }: ActivityCardRootProps<T>): JSX.Element;
|
|
4167
4390
|
|
|
4168
4391
|
declare namespace Root_2 {
|
|
@@ -4211,7 +4434,7 @@ declare namespace Root_3 {
|
|
|
4211
4434
|
* </Table.Root>
|
|
4212
4435
|
* ```
|
|
4213
4436
|
*/
|
|
4214
|
-
declare function Root_4({ className, containerClassName, ...props }: RootProps_2): JSX.Element;
|
|
4437
|
+
declare function Root_4({ className, containerClassName, containerRef, ...props }: RootProps_2): JSX.Element;
|
|
4215
4438
|
|
|
4216
4439
|
declare namespace Root_4 {
|
|
4217
4440
|
var displayName: string;
|
|
@@ -4353,6 +4576,8 @@ declare type RootProps = React_2.ComponentProps<"div"> & VariantProps<typeof ale
|
|
|
4353
4576
|
declare type RootProps_2 = React_2.ComponentProps<"table"> & {
|
|
4354
4577
|
/** Additional CSS classes for the outer scrollable `<div>` container. Use this to control height, overflow, or container-level layout. */
|
|
4355
4578
|
containerClassName?: string;
|
|
4579
|
+
/** Ref to the outer scrollable `<div>` container (e.g. to attach a scroll listener). */
|
|
4580
|
+
containerRef?: React_2.Ref<HTMLDivElement>;
|
|
4356
4581
|
};
|
|
4357
4582
|
|
|
4358
4583
|
declare type RootProps_3 = Pick<React_2.ComponentProps<typeof Tabs_2.Root>, "defaultValue" | "value" | "onValueChange"> & {
|
|
@@ -4383,6 +4608,25 @@ declare namespace Row {
|
|
|
4383
4608
|
var displayName: string;
|
|
4384
4609
|
}
|
|
4385
4610
|
|
|
4611
|
+
/**
|
|
4612
|
+
* A single body row.
|
|
4613
|
+
*
|
|
4614
|
+
* Rows control vertical sizing and can optionally provide a background layer:
|
|
4615
|
+
* ```tsx
|
|
4616
|
+
* <Timeline.Row
|
|
4617
|
+
* height={40}
|
|
4618
|
+
* background={{ style: { background: "var(--muted)" } }}
|
|
4619
|
+
* >
|
|
4620
|
+
* <Timeline.Interval start={task.start} end={task.end}>…</Timeline.Interval>
|
|
4621
|
+
* </Timeline.Row>
|
|
4622
|
+
* ```
|
|
4623
|
+
*/
|
|
4624
|
+
declare function Row_2({ children, className, style, height, background }: TimelineRowProps): JSX.Element;
|
|
4625
|
+
|
|
4626
|
+
declare namespace Row_2 {
|
|
4627
|
+
var displayName: string;
|
|
4628
|
+
}
|
|
4629
|
+
|
|
4386
4630
|
/**
|
|
4387
4631
|
* A single row action definition for the actions column.
|
|
4388
4632
|
*/
|
|
@@ -4444,10 +4688,10 @@ export declare const Select: SelectComponent;
|
|
|
4444
4688
|
* If caching or deduplication is needed, implement it in the fetcher
|
|
4445
4689
|
* (e.g. via a query library or a simple cache layer).
|
|
4446
4690
|
*
|
|
4447
|
-
* **Error handling:**
|
|
4448
|
-
*
|
|
4449
|
-
* item list —
|
|
4450
|
-
*
|
|
4691
|
+
* **Error handling:** If the fetcher throws or rejects, the component renders
|
|
4692
|
+
* a built-in inline error state (with a Retry affordance) in place of the
|
|
4693
|
+
* empty item list — the failure is no longer silently swallowed. To run a side
|
|
4694
|
+
* effect on failure (logging, error tracking, a toast), pass `onFetchError`.
|
|
4451
4695
|
*/
|
|
4452
4696
|
export declare type SelectAsyncFetcher<T> = (options: {
|
|
4453
4697
|
signal: AbortSignal;
|
|
@@ -4458,6 +4702,20 @@ declare interface SelectAsyncOwnProps<T> {
|
|
|
4458
4702
|
fetcher: SelectAsyncFetcher<T>;
|
|
4459
4703
|
/** Text shown while loading. @default "Loading..." */
|
|
4460
4704
|
loadingText?: string;
|
|
4705
|
+
/**
|
|
4706
|
+
* Message shown in the dropdown when the fetcher fails, alongside a Retry
|
|
4707
|
+
* affordance. Replaces the misleading empty state.
|
|
4708
|
+
* @default "Couldn't load results."
|
|
4709
|
+
*/
|
|
4710
|
+
errorText?: string;
|
|
4711
|
+
/** Label for the retry button in the error state. @default "Retry" */
|
|
4712
|
+
retryText?: string;
|
|
4713
|
+
/**
|
|
4714
|
+
* Called when a fetch fails. Fires once per outage (not on every re-open
|
|
4715
|
+
* while broken) and re-arms after the next success. Use for logging or error
|
|
4716
|
+
* tracking — the inline error state is shown regardless.
|
|
4717
|
+
*/
|
|
4718
|
+
onFetchError?: (error: unknown) => void;
|
|
4461
4719
|
/**
|
|
4462
4720
|
* Whether the select behaves as a modal (traps focus).
|
|
4463
4721
|
* Set to `true` when rendering inside a Dialog or Sheet to preserve focus-trap.
|
|
@@ -4660,6 +4918,13 @@ declare type SharedAppShellProps = React.PropsWithChildren<{
|
|
|
4660
4918
|
* `<link rel="icon">` in `index.html`.
|
|
4661
4919
|
*/
|
|
4662
4920
|
favicon?: string;
|
|
4921
|
+
/**
|
|
4922
|
+
* Additional application metadata shown on the built-in `/__appinfo` page.
|
|
4923
|
+
*
|
|
4924
|
+
* AppShell always includes its own version there; use this prop to append
|
|
4925
|
+
* app-defined rows such as environment, release, or commit.
|
|
4926
|
+
*/
|
|
4927
|
+
appInfo?: AppInfo;
|
|
4663
4928
|
/**
|
|
4664
4929
|
* Base path for the app shell
|
|
4665
4930
|
*/
|
|
@@ -5063,6 +5328,16 @@ export declare const SidebarSeparator: () => JSX.Element;
|
|
|
5063
5328
|
|
|
5064
5329
|
declare type Size = "sm" | "md" | "lg" | "xl" | "full";
|
|
5065
5330
|
|
|
5331
|
+
/**
|
|
5332
|
+
* Header render context for sortable columns.
|
|
5333
|
+
*/
|
|
5334
|
+
declare interface SortableHeaderRenderContext {
|
|
5335
|
+
label?: string;
|
|
5336
|
+
sortable: true;
|
|
5337
|
+
sortDirection: "Asc" | "Desc" | undefined;
|
|
5338
|
+
activateSort: () => void;
|
|
5339
|
+
}
|
|
5340
|
+
|
|
5066
5341
|
/**
|
|
5067
5342
|
* Sort configuration for a column.
|
|
5068
5343
|
* The `type` determines how values are compared when sorting.
|
|
@@ -5191,6 +5466,344 @@ declare type TabsVariant = "default" | "line" | "capsule";
|
|
|
5191
5466
|
|
|
5192
5467
|
export { Time }
|
|
5193
5468
|
|
|
5469
|
+
/**
|
|
5470
|
+
* Timeline primitives for building app-specific schedule, trace, and dependency UIs.
|
|
5471
|
+
*
|
|
5472
|
+
* Typical usage:
|
|
5473
|
+
* ```tsx
|
|
5474
|
+
* <Timeline.Root start={start} end={end}>
|
|
5475
|
+
* <Timeline.Viewport axis={axis} decorations={decorations}>
|
|
5476
|
+
* <Timeline.Row height={40} background={{ style: { background: "var(--muted)" } }}>
|
|
5477
|
+
* <Timeline.Interval id="task-1" start={task.start} end={task.end}>…</Timeline.Interval>
|
|
5478
|
+
* </Timeline.Row>
|
|
5479
|
+
* <Timeline.Link from="task-1" to="task-2" />
|
|
5480
|
+
* </Timeline.Viewport>
|
|
5481
|
+
* </Timeline.Root>
|
|
5482
|
+
* ```
|
|
5483
|
+
*/
|
|
5484
|
+
export declare const Timeline: {
|
|
5485
|
+
Root: typeof Root_13;
|
|
5486
|
+
Viewport: typeof Viewport;
|
|
5487
|
+
Row: typeof Row_2;
|
|
5488
|
+
Interval: typeof Interval;
|
|
5489
|
+
Link: typeof Link_2;
|
|
5490
|
+
};
|
|
5491
|
+
|
|
5492
|
+
/**
|
|
5493
|
+
* Axis configuration owned by `Timeline.Viewport`.
|
|
5494
|
+
*
|
|
5495
|
+
* Example:
|
|
5496
|
+
* ```tsx
|
|
5497
|
+
* axis={{
|
|
5498
|
+
* guides: boundaries.map((at) => ({
|
|
5499
|
+
* at,
|
|
5500
|
+
* axisStyle: { background: "var(--border)" },
|
|
5501
|
+
* bodyStyle: { background: "var(--border)" },
|
|
5502
|
+
* })),
|
|
5503
|
+
* levels: [
|
|
5504
|
+
* {
|
|
5505
|
+
* kind: "spans",
|
|
5506
|
+
* items: timeboxes,
|
|
5507
|
+
* },
|
|
5508
|
+
* ],
|
|
5509
|
+
* }}
|
|
5510
|
+
* ```
|
|
5511
|
+
*/
|
|
5512
|
+
export declare interface TimelineAxis {
|
|
5513
|
+
/** Boundary lines rendered in the axis and/or body. */
|
|
5514
|
+
guides?: TimelineGuide[];
|
|
5515
|
+
/** Stacked header levels rendered above the body. Defaults to `[]` when omitted. */
|
|
5516
|
+
levels?: TimelineAxisLevel[];
|
|
5517
|
+
/** Optional class applied to the axis container. */
|
|
5518
|
+
className?: string;
|
|
5519
|
+
}
|
|
5520
|
+
|
|
5521
|
+
/**
|
|
5522
|
+
* One stacked axis level.
|
|
5523
|
+
*
|
|
5524
|
+
* Levels let an app compose multi-level headers such as year → month or a
|
|
5525
|
+
* single timebox row such as half-hour slots.
|
|
5526
|
+
*/
|
|
5527
|
+
export declare type TimelineAxisLevel = (TimelineAxisLevelBase & {
|
|
5528
|
+
/** Interval labels rendered across a time range. */
|
|
5529
|
+
kind: "spans";
|
|
5530
|
+
/** Span items to render in this level. */
|
|
5531
|
+
items: TimelineAxisSpan[];
|
|
5532
|
+
/** Optional class applied to every span in the level. */
|
|
5533
|
+
itemClassName?: string;
|
|
5534
|
+
/** Optional style applied to every span in the level. */
|
|
5535
|
+
itemStyle?: React_2.CSSProperties;
|
|
5536
|
+
}) | (TimelineAxisLevelBase & {
|
|
5537
|
+
/** Point labels rendered at specific times. */
|
|
5538
|
+
kind: "ticks";
|
|
5539
|
+
/** Tick items to render in this level. */
|
|
5540
|
+
items: TimelineAxisTick[];
|
|
5541
|
+
/** Horizontal anchor used when placing each tick label. */
|
|
5542
|
+
labelAlign?: Anchor;
|
|
5543
|
+
});
|
|
5544
|
+
|
|
5545
|
+
declare type TimelineAxisLevelBase = {
|
|
5546
|
+
/** Height of this axis level in pixels. Defaults to `28`. */
|
|
5547
|
+
height?: number;
|
|
5548
|
+
/** Optional class applied to the level container. */
|
|
5549
|
+
className?: string;
|
|
5550
|
+
};
|
|
5551
|
+
|
|
5552
|
+
/**
|
|
5553
|
+
* A labeled time range rendered inside an axis level.
|
|
5554
|
+
*
|
|
5555
|
+
* Use spans for "timeboxes" such as months, half-hours, sprints, or any
|
|
5556
|
+
* other interval that should be labeled between boundary guides.
|
|
5557
|
+
*/
|
|
5558
|
+
export declare interface TimelineAxisSpan {
|
|
5559
|
+
/** Stable React key. Falls back to a start/end-based key when omitted. */
|
|
5560
|
+
key?: React_2.Key;
|
|
5561
|
+
/** Start of the timebox. Accepts a `Date` or a millisecond timestamp. */
|
|
5562
|
+
start: TimeValue;
|
|
5563
|
+
/** End of the timebox. Accepts a `Date` or a millisecond timestamp. */
|
|
5564
|
+
end: TimeValue;
|
|
5565
|
+
/** Label rendered inside the span. */
|
|
5566
|
+
label?: React_2.ReactNode;
|
|
5567
|
+
/** Optional class applied to the positioned span element. */
|
|
5568
|
+
className?: string;
|
|
5569
|
+
/** Optional inline style applied to the positioned span element. */
|
|
5570
|
+
style?: React_2.CSSProperties;
|
|
5571
|
+
}
|
|
5572
|
+
|
|
5573
|
+
/**
|
|
5574
|
+
* A labeled point in an axis level.
|
|
5575
|
+
*
|
|
5576
|
+
* Ticks are useful for point-in-time labels such as milestones or specific
|
|
5577
|
+
* timestamps. For boxed labels between boundaries, prefer `TimelineAxisSpan`.
|
|
5578
|
+
*/
|
|
5579
|
+
export declare interface TimelineAxisTick {
|
|
5580
|
+
/** Stable React key. Falls back to an `at`-based key when omitted. */
|
|
5581
|
+
key?: React_2.Key;
|
|
5582
|
+
/** Point in time represented by this tick. */
|
|
5583
|
+
at: TimeValue;
|
|
5584
|
+
/** Label rendered for the tick. */
|
|
5585
|
+
label?: React_2.ReactNode;
|
|
5586
|
+
/**
|
|
5587
|
+
* Optional custom label position.
|
|
5588
|
+
*
|
|
5589
|
+
* Defaults to `at`. Use this when the tick represents one time but its label
|
|
5590
|
+
* should be positioned elsewhere.
|
|
5591
|
+
*/
|
|
5592
|
+
labelAt?: TimeValue;
|
|
5593
|
+
/** Optional class applied to the tick container. */
|
|
5594
|
+
className?: string;
|
|
5595
|
+
/** Optional inline style applied to the tick container. */
|
|
5596
|
+
style?: React_2.CSSProperties;
|
|
5597
|
+
}
|
|
5598
|
+
|
|
5599
|
+
/**
|
|
5600
|
+
* A decorative band rendered behind the timeline body.
|
|
5601
|
+
*
|
|
5602
|
+
* Useful for blackout windows, maintenance ranges, release freezes, or any
|
|
5603
|
+
* other highlighted interval.
|
|
5604
|
+
*/
|
|
5605
|
+
export declare interface TimelineBand {
|
|
5606
|
+
/** Stable React key. Falls back to a start/end-based key when omitted. */
|
|
5607
|
+
key?: React_2.Key;
|
|
5608
|
+
/** Start of the band. */
|
|
5609
|
+
start: TimeValue;
|
|
5610
|
+
/** End of the band. */
|
|
5611
|
+
end: TimeValue;
|
|
5612
|
+
/** Optional background color convenience prop. */
|
|
5613
|
+
color?: string;
|
|
5614
|
+
/** Optional class applied to the band element. */
|
|
5615
|
+
className?: string;
|
|
5616
|
+
/** Optional inline style applied to the band element. */
|
|
5617
|
+
style?: React_2.CSSProperties;
|
|
5618
|
+
}
|
|
5619
|
+
|
|
5620
|
+
/**
|
|
5621
|
+
* Decorative layers rendered by `Timeline.Viewport`.
|
|
5622
|
+
*/
|
|
5623
|
+
export declare interface TimelineDecorations {
|
|
5624
|
+
/** Background range highlights rendered behind rows. */
|
|
5625
|
+
bands?: TimelineBand[];
|
|
5626
|
+
/** Vertical markers rendered in the axis and/or body. */
|
|
5627
|
+
markers?: TimelineMarker[];
|
|
5628
|
+
}
|
|
5629
|
+
|
|
5630
|
+
/**
|
|
5631
|
+
* A vertical guide line projected onto the axis and/or the timeline body.
|
|
5632
|
+
*
|
|
5633
|
+
* Guides are the timeline's "boundaries". Apps usually derive them from their
|
|
5634
|
+
* own scale logic, then pair them with axis spans to label the ranges between
|
|
5635
|
+
* those boundaries.
|
|
5636
|
+
*/
|
|
5637
|
+
export declare interface TimelineGuide {
|
|
5638
|
+
/** Stable React key. Falls back to an `at`-based key when omitted. */
|
|
5639
|
+
key?: React_2.Key;
|
|
5640
|
+
/** Time position for the guide line. */
|
|
5641
|
+
at: TimeValue;
|
|
5642
|
+
/** Optional class applied to the guide inside the axis area. */
|
|
5643
|
+
axisClassName?: string;
|
|
5644
|
+
/** Optional inline style applied to the guide inside the axis area. */
|
|
5645
|
+
axisStyle?: React_2.CSSProperties;
|
|
5646
|
+
/** Optional class applied to the guide inside the body area. */
|
|
5647
|
+
bodyClassName?: string;
|
|
5648
|
+
/** Optional inline style applied to the guide inside the body area. */
|
|
5649
|
+
bodyStyle?: React_2.CSSProperties;
|
|
5650
|
+
}
|
|
5651
|
+
|
|
5652
|
+
export declare type TimelineIntervalProps = {
|
|
5653
|
+
/** Start of the interval. */
|
|
5654
|
+
start: TimeValue;
|
|
5655
|
+
/** End of the interval. */
|
|
5656
|
+
end: TimeValue;
|
|
5657
|
+
/** Rendered content for the interval. */
|
|
5658
|
+
children: React_2.ReactNode;
|
|
5659
|
+
/** Optional stable id used by `Timeline.Link`. */
|
|
5660
|
+
id?: string;
|
|
5661
|
+
/** Top and bottom inset in pixels within the row. Defaults to `0`. */
|
|
5662
|
+
insetY?: number;
|
|
5663
|
+
/** Optional class applied to the positioned interval container. */
|
|
5664
|
+
className?: string;
|
|
5665
|
+
/** Optional inline style applied to the positioned interval container. */
|
|
5666
|
+
style?: React_2.CSSProperties;
|
|
5667
|
+
};
|
|
5668
|
+
|
|
5669
|
+
/**
|
|
5670
|
+
* Shared defaults for `Timeline.Link` instances inside one viewport.
|
|
5671
|
+
*/
|
|
5672
|
+
export declare interface TimelineLinkDefaults {
|
|
5673
|
+
/** Link routing strategy. Only orthogonal routing is currently supported. */
|
|
5674
|
+
routing?: "orthogonal";
|
|
5675
|
+
/** Whether links end with an arrow marker. Defaults to `true`. */
|
|
5676
|
+
arrow?: boolean;
|
|
5677
|
+
/** Horizontal gap used when routing out of and into items. Defaults to `16`. */
|
|
5678
|
+
gap?: number;
|
|
5679
|
+
/** Optional class applied to each link SVG when the link does not override it. */
|
|
5680
|
+
className?: string;
|
|
5681
|
+
/**
|
|
5682
|
+
* Optional inline style applied to each link SVG when the link does not override it.
|
|
5683
|
+
*
|
|
5684
|
+
* Prefer an opaque `color` here over alpha-based text colors when overlapping links
|
|
5685
|
+
* should not appear darker.
|
|
5686
|
+
*/
|
|
5687
|
+
style?: React_2.CSSProperties;
|
|
5688
|
+
/** Optional stroke width used by each link when the link does not override it. */
|
|
5689
|
+
strokeWidth?: number;
|
|
5690
|
+
}
|
|
5691
|
+
|
|
5692
|
+
export declare type TimelineLinkProps = {
|
|
5693
|
+
/** Source `Timeline.Interval` id. */
|
|
5694
|
+
from: string;
|
|
5695
|
+
/** Target `Timeline.Interval` id. */
|
|
5696
|
+
to: string;
|
|
5697
|
+
/** Source anchor used for routing. Defaults to `"end"`. */
|
|
5698
|
+
fromAnchor?: Anchor;
|
|
5699
|
+
/** Target anchor used for routing. Defaults to `"start"`. */
|
|
5700
|
+
toAnchor?: Anchor;
|
|
5701
|
+
/** Overrides the viewport default arrow visibility. */
|
|
5702
|
+
arrow?: boolean;
|
|
5703
|
+
/** Overrides the viewport default routing gap. */
|
|
5704
|
+
gap?: number;
|
|
5705
|
+
/** Optional class applied to the link SVG. */
|
|
5706
|
+
className?: string;
|
|
5707
|
+
/** Optional inline style applied to the link SVG. */
|
|
5708
|
+
style?: React_2.CSSProperties;
|
|
5709
|
+
/** Optional stroke width for the link path. */
|
|
5710
|
+
strokeWidth?: number;
|
|
5711
|
+
};
|
|
5712
|
+
|
|
5713
|
+
/**
|
|
5714
|
+
* A decorative vertical marker rendered in the axis and/or body.
|
|
5715
|
+
*/
|
|
5716
|
+
export declare interface TimelineMarker {
|
|
5717
|
+
/** Stable React key. Falls back to an `at`-based key when omitted. */
|
|
5718
|
+
key?: React_2.Key;
|
|
5719
|
+
/** Time position for the marker. */
|
|
5720
|
+
at: TimeValue;
|
|
5721
|
+
/** Optional line color convenience prop. */
|
|
5722
|
+
color?: string;
|
|
5723
|
+
/** Optional marker label. */
|
|
5724
|
+
label?: React_2.ReactNode;
|
|
5725
|
+
/** Optional class applied to the outer marker wrapper. */
|
|
5726
|
+
className?: string;
|
|
5727
|
+
/** Optional inline style applied to the outer marker wrapper. */
|
|
5728
|
+
style?: React_2.CSSProperties;
|
|
5729
|
+
/** Optional class applied to the marker line. */
|
|
5730
|
+
lineClassName?: string;
|
|
5731
|
+
/** Optional inline style applied to the marker line. */
|
|
5732
|
+
lineStyle?: React_2.CSSProperties;
|
|
5733
|
+
/** Optional class applied to the marker label. */
|
|
5734
|
+
labelClassName?: string;
|
|
5735
|
+
/** Optional inline style applied to the marker label. */
|
|
5736
|
+
labelStyle?: React_2.CSSProperties;
|
|
5737
|
+
/** Controls where the marker is rendered. Defaults to `"body"`. */
|
|
5738
|
+
placement?: "axis" | "body" | "both";
|
|
5739
|
+
}
|
|
5740
|
+
|
|
5741
|
+
export declare type TimelineRootProps = {
|
|
5742
|
+
/** Inclusive start of the overall timeline range. */
|
|
5743
|
+
start: TimeValue;
|
|
5744
|
+
/** Inclusive end of the overall timeline range. */
|
|
5745
|
+
end: TimeValue;
|
|
5746
|
+
/** Timeline subtree. Usually contains one `Timeline.Viewport`. */
|
|
5747
|
+
children: React_2.ReactNode;
|
|
5748
|
+
/** Optional class applied to the root container. */
|
|
5749
|
+
className?: string;
|
|
5750
|
+
/** Optional inline style applied to the root container. */
|
|
5751
|
+
style?: React_2.CSSProperties;
|
|
5752
|
+
};
|
|
5753
|
+
|
|
5754
|
+
/**
|
|
5755
|
+
* Background content rendered for a `Timeline.Row` in a dedicated layer.
|
|
5756
|
+
*
|
|
5757
|
+
* Use this when a row background should sit behind guides but in front of body
|
|
5758
|
+
* bands. This is different from `Timeline.Row`'s own `style`, which affects the
|
|
5759
|
+
* row content container itself.
|
|
5760
|
+
*/
|
|
5761
|
+
export declare interface TimelineRowBackground {
|
|
5762
|
+
/** Optional class applied to the background layer element. */
|
|
5763
|
+
className?: string;
|
|
5764
|
+
/** Optional inline style applied to the background layer element. */
|
|
5765
|
+
style?: React_2.CSSProperties;
|
|
5766
|
+
}
|
|
5767
|
+
|
|
5768
|
+
export declare type TimelineRowProps = {
|
|
5769
|
+
/** Row contents, typically intervals. */
|
|
5770
|
+
children: React_2.ReactNode;
|
|
5771
|
+
/** Optional class applied to the row content container. */
|
|
5772
|
+
className?: string;
|
|
5773
|
+
/** Optional inline style applied to the row content container. */
|
|
5774
|
+
style?: React_2.CSSProperties;
|
|
5775
|
+
/** Row height in pixels. Defaults to `32`. */
|
|
5776
|
+
height?: number;
|
|
5777
|
+
/**
|
|
5778
|
+
* Optional background rendered in a dedicated layer.
|
|
5779
|
+
*
|
|
5780
|
+
* Use this instead of `style.background` when guides should remain visible in
|
|
5781
|
+
* front of the row background.
|
|
5782
|
+
*/
|
|
5783
|
+
background?: TimelineRowBackground | null;
|
|
5784
|
+
};
|
|
5785
|
+
|
|
5786
|
+
export declare type TimelineViewportProps = {
|
|
5787
|
+
/** Timeline content. Rows and links can be passed in any order. */
|
|
5788
|
+
children: React_2.ReactNode;
|
|
5789
|
+
/** Optional fixed canvas width in pixels for horizontally scrollable timelines. */
|
|
5790
|
+
canvasWidth?: number;
|
|
5791
|
+
/** Keeps the axis pinned to the top of the viewport when scrolling vertically. */
|
|
5792
|
+
stickyAxis?: boolean;
|
|
5793
|
+
/** Axis configuration for guides and header levels. */
|
|
5794
|
+
axis?: TimelineAxis;
|
|
5795
|
+
/** Decorative layers such as bands and markers. */
|
|
5796
|
+
decorations?: TimelineDecorations;
|
|
5797
|
+
/** Shared defaults applied to `Timeline.Link` nodes inside this viewport. */
|
|
5798
|
+
linkDefaults?: TimelineLinkDefaults;
|
|
5799
|
+
/** Optional class applied to the scroll viewport. */
|
|
5800
|
+
className?: string;
|
|
5801
|
+
/** Optional inline style applied to the scroll viewport. */
|
|
5802
|
+
style?: React_2.CSSProperties;
|
|
5803
|
+
};
|
|
5804
|
+
|
|
5805
|
+
declare type TimeValue = Date | number;
|
|
5806
|
+
|
|
5194
5807
|
/**
|
|
5195
5808
|
* Resolved timezone object with helpers bound to the configured timezone.
|
|
5196
5809
|
*/
|
|
@@ -5327,6 +5940,7 @@ export declare const useAppShell: () => {
|
|
|
5327
5940
|
title?: string;
|
|
5328
5941
|
icon?: ReactNode;
|
|
5329
5942
|
favicon?: string;
|
|
5943
|
+
appInfo?: AppInfo;
|
|
5330
5944
|
configurations: RootConfiguration;
|
|
5331
5945
|
};
|
|
5332
5946
|
|
|
@@ -5410,7 +6024,7 @@ export declare function useAppShellScrollContainer(): RefObject<HTMLElement | nu
|
|
|
5410
6024
|
* </Select.Parts.Root>
|
|
5411
6025
|
* ```
|
|
5412
6026
|
*/
|
|
5413
|
-
declare function useAsync<T>({ fetcher }: UseSelectAsyncOptions<T>): UseSelectAsyncReturn<T>;
|
|
6027
|
+
declare function useAsync<T>({ fetcher, onFetchError }: UseSelectAsyncOptions<T>): UseSelectAsyncReturn<T>;
|
|
5414
6028
|
|
|
5415
6029
|
/**
|
|
5416
6030
|
* Hook that encapsulates the async combobox pattern — debounced fetching,
|
|
@@ -5447,7 +6061,11 @@ declare function useAsync<T>({ fetcher }: UseSelectAsyncOptions<T>): UseSelectAs
|
|
|
5447
6061
|
* >
|
|
5448
6062
|
* ...
|
|
5449
6063
|
* <Combobox.Empty>
|
|
5450
|
-
* {countries.loading
|
|
6064
|
+
* {countries.loading
|
|
6065
|
+
* ? "Loading..."
|
|
6066
|
+
* : countries.error
|
|
6067
|
+
* ? <button onClick={countries.retry}>Couldn't load results. Retry</button>
|
|
6068
|
+
* : "No results."}
|
|
5451
6069
|
* </Combobox.Empty>
|
|
5452
6070
|
* </Combobox.Root>
|
|
5453
6071
|
* ```
|
|
@@ -5491,7 +6109,11 @@ declare function useAsync_2<T>(options: UseAsyncItemsOptions<T>): UseAsyncItemsR
|
|
|
5491
6109
|
* >
|
|
5492
6110
|
* ...
|
|
5493
6111
|
* <Autocomplete.Empty>
|
|
5494
|
-
* {movies.loading
|
|
6112
|
+
* {movies.loading
|
|
6113
|
+
* ? "Loading..."
|
|
6114
|
+
* : movies.error
|
|
6115
|
+
* ? <button onClick={movies.retry}>Couldn't load results. Retry</button>
|
|
6116
|
+
* : "No results."}
|
|
5495
6117
|
* </Autocomplete.Empty>
|
|
5496
6118
|
* </Autocomplete.Root>
|
|
5497
6119
|
* ```
|
|
@@ -5521,6 +6143,16 @@ declare interface UseAsyncItemsOptions<T> {
|
|
|
5521
6143
|
* ```
|
|
5522
6144
|
*/
|
|
5523
6145
|
fetcher: AsyncFetcher<T>;
|
|
6146
|
+
/**
|
|
6147
|
+
* Called when a fetch fails (the fetcher throws or rejects with something
|
|
6148
|
+
* other than an abort of a superseded request).
|
|
6149
|
+
*
|
|
6150
|
+
* Fires **once per outage** — i.e. on the transition into the error state,
|
|
6151
|
+
* not on every failed keystroke — and re-arms after the next successful
|
|
6152
|
+
* fetch. Use it for side effects like logging or error tracking; the inline
|
|
6153
|
+
* error state is rendered regardless.
|
|
6154
|
+
*/
|
|
6155
|
+
onFetchError?: (error: unknown) => void;
|
|
5524
6156
|
}
|
|
5525
6157
|
|
|
5526
6158
|
declare interface UseAsyncItemsReturn<T> {
|
|
@@ -5532,6 +6164,8 @@ declare interface UseAsyncItemsReturn<T> {
|
|
|
5532
6164
|
query: string;
|
|
5533
6165
|
/** The error thrown by the last fetch, if any */
|
|
5534
6166
|
error: unknown;
|
|
6167
|
+
/** Re-runs the most recent fetch immediately (no debounce). Use for a Retry affordance. */
|
|
6168
|
+
retry: () => void;
|
|
5535
6169
|
/** Input change handler — pass to the Root `onInputValueChange` prop */
|
|
5536
6170
|
onInputValueChange: (value: string) => void;
|
|
5537
6171
|
/** Open change handler — pass to the Root `onOpenChange` prop to fetch initial items on open */
|
|
@@ -5953,6 +6587,12 @@ export declare type UseDataTableOptions<TRow extends Record<string, unknown>, TF
|
|
|
5953
6587
|
* using `DataTable.Pagination` or `DataTable.Filters`.
|
|
5954
6588
|
*/
|
|
5955
6589
|
control?: CollectionControl<TFieldName, TFilter>;
|
|
6590
|
+
/**
|
|
6591
|
+
* Stable id used to persist per-user column layout (visibility, order, and
|
|
6592
|
+
* pinning) to `localStorage`, keyed by this id. When omitted, column layout is
|
|
6593
|
+
* in-memory only and resets on reload.
|
|
6594
|
+
*/
|
|
6595
|
+
tableId?: string;
|
|
5956
6596
|
/** Called when the user clicks a row. Adds a pointer cursor to rows. */
|
|
5957
6597
|
onClickRow?: (row: TRow) => void;
|
|
5958
6598
|
/**
|
|
@@ -6016,6 +6656,20 @@ export declare interface UseDataTableReturn<TRow extends Record<string, unknown>
|
|
|
6016
6656
|
showAllColumns: () => void;
|
|
6017
6657
|
hideAllColumns: () => void;
|
|
6018
6658
|
isColumnVisible: (fieldOrId: string) => boolean;
|
|
6659
|
+
/** Column keys in display order (visible and hidden). */
|
|
6660
|
+
columnOrder: string[];
|
|
6661
|
+
/** Move the column with `key` to `toIndex` within the ordered column list. */
|
|
6662
|
+
moveColumn: (key: string, toIndex: number) => void;
|
|
6663
|
+
/** Replace the full column order with `keys`. */
|
|
6664
|
+
setColumnOrder: (keys: string[]) => void;
|
|
6665
|
+
/** Per-user pin overrides, keyed by column key (`"none"` = explicitly unpinned). */
|
|
6666
|
+
pinnedColumns: Record<string, "left" | "right" | "none">;
|
|
6667
|
+
/**
|
|
6668
|
+
* Set the pin for the column with `key`: `"left"`/`"right"` to pin, `"none"` to
|
|
6669
|
+
* explicitly unpin (overriding a default `pin`), or `null` to clear the override
|
|
6670
|
+
* and fall back to the column's default.
|
|
6671
|
+
*/
|
|
6672
|
+
setPin: (key: string, side: "left" | "right" | "none" | null) => void;
|
|
6019
6673
|
/**
|
|
6020
6674
|
* The resolved page size derived from the collection control.
|
|
6021
6675
|
* `0` when no control (or `pageSize`) is configured.
|
|
@@ -6090,6 +6744,14 @@ export { useLocation }
|
|
|
6090
6744
|
|
|
6091
6745
|
export { useNavigate }
|
|
6092
6746
|
|
|
6747
|
+
/**
|
|
6748
|
+
* Returns a function that opens the CommandPalette.
|
|
6749
|
+
*
|
|
6750
|
+
* Optionally accepts an initial search string, including prefix-activated
|
|
6751
|
+
* search modes such as `PO: alice`.
|
|
6752
|
+
*/
|
|
6753
|
+
export declare function useOpenCommandPalette(): (options?: OpenCommandPaletteOptions) => void;
|
|
6754
|
+
|
|
6093
6755
|
/**
|
|
6094
6756
|
* Override the breadcrumb title for the current page.
|
|
6095
6757
|
*
|
|
@@ -6168,6 +6830,12 @@ export { useSearchParams }
|
|
|
6168
6830
|
declare interface UseSelectAsyncOptions<T> {
|
|
6169
6831
|
/** Fetcher for async item loading. Called each time the dropdown is opened. */
|
|
6170
6832
|
fetcher: SelectAsyncFetcher<T>;
|
|
6833
|
+
/**
|
|
6834
|
+
* Called when a fetch fails. Fires once per outage (not on every re-open
|
|
6835
|
+
* while broken) and re-arms after the next success. Use for logging or error
|
|
6836
|
+
* tracking; the inline error state is shown regardless.
|
|
6837
|
+
*/
|
|
6838
|
+
onFetchError?: (error: unknown) => void;
|
|
6171
6839
|
}
|
|
6172
6840
|
|
|
6173
6841
|
declare interface UseSelectAsyncReturn<T> {
|
|
@@ -6177,6 +6845,8 @@ declare interface UseSelectAsyncReturn<T> {
|
|
|
6177
6845
|
loading: boolean;
|
|
6178
6846
|
/** The error thrown by the last fetch, if any */
|
|
6179
6847
|
error: unknown;
|
|
6848
|
+
/** Re-runs the fetch immediately. Use for a Retry affordance. */
|
|
6849
|
+
retry: () => void;
|
|
6180
6850
|
/** Open change handler — pass to the Root `onOpenChange` prop */
|
|
6181
6851
|
onOpenChange: (open: boolean) => void;
|
|
6182
6852
|
}
|
|
@@ -6278,6 +6948,28 @@ declare namespace Validity {
|
|
|
6278
6948
|
var displayName: string;
|
|
6279
6949
|
}
|
|
6280
6950
|
|
|
6951
|
+
/**
|
|
6952
|
+
* Owns scrolling, axis rendering, decoration layers, and link layering.
|
|
6953
|
+
*
|
|
6954
|
+
* Example:
|
|
6955
|
+
* ```tsx
|
|
6956
|
+
* <Timeline.Viewport
|
|
6957
|
+
* canvasWidth={1200}
|
|
6958
|
+
* axis={{ guides, levels }}
|
|
6959
|
+
* decorations={{ bands }}
|
|
6960
|
+
* linkDefaults={{ style: { color: "var(--muted-foreground)" }, strokeWidth: 1.5 }}
|
|
6961
|
+
* >
|
|
6962
|
+
* {rows}
|
|
6963
|
+
* {links}
|
|
6964
|
+
* </Timeline.Viewport>
|
|
6965
|
+
* ```
|
|
6966
|
+
*/
|
|
6967
|
+
declare function Viewport({ children, canvasWidth, stickyAxis, axis, decorations, linkDefaults, className, style, }: TimelineViewportProps): JSX.Element;
|
|
6968
|
+
|
|
6969
|
+
declare namespace Viewport {
|
|
6970
|
+
var displayName: string;
|
|
6971
|
+
}
|
|
6972
|
+
|
|
6281
6973
|
/**
|
|
6282
6974
|
* Conditionally render children based on guard evaluation.
|
|
6283
6975
|
*
|