@tailor-platform/app-shell 1.1.1 → 1.3.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.css +1 -1
- package/dist/app-shell.d.ts +416 -97
- package/dist/app-shell.js +3039 -2678
- package/package.json +11 -10
- package/skills/app-shell-patterns/SKILL.md +67 -0
- package/skills/app-shell-patterns/references/fundamental/components.md +704 -0
- package/skills/app-shell-patterns/references/fundamental/design-system.md +355 -0
- package/skills/app-shell-patterns/references/fundamental/graphql.md +205 -0
- package/skills/app-shell-patterns/references/patterns/detail-hero-with-actions.md +157 -0
- package/skills/app-shell-patterns/references/patterns/form-modal.md +169 -0
- package/skills/app-shell-patterns/references/patterns/form-sectioned.md +126 -0
- package/skills/app-shell-patterns/references/patterns/form-single-page.md +105 -0
- package/skills/app-shell-patterns/references/patterns/form-wizard.md +134 -0
- package/skills/app-shell-patterns/references/patterns/interaction-confirm.md +75 -0
- package/skills/app-shell-patterns/references/patterns/interaction-multi-select.md +173 -0
- package/skills/app-shell-patterns/references/patterns/interaction-toast.md +69 -0
- package/skills/app-shell-patterns/references/patterns/list-dense-scan.md +132 -0
package/dist/app-shell.d.ts
CHANGED
|
@@ -20,9 +20,9 @@ import * as React_2 from 'react';
|
|
|
20
20
|
import { ReactNode } from 'react';
|
|
21
21
|
import { Select as Select_2 } from '@base-ui/react/select';
|
|
22
22
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
23
|
+
import { Tabs as Tabs_2 } from '@base-ui/react/tabs';
|
|
23
24
|
import { toast } from 'sonner';
|
|
24
25
|
import { Tooltip as Tooltip_2 } from '@base-ui/react/tooltip';
|
|
25
|
-
import { useFilter } from 'node_modules/@base-ui/react/esm/combobox/index.parts';
|
|
26
26
|
import { useLocation } from 'react-router';
|
|
27
27
|
import { useNavigate } from 'react-router';
|
|
28
28
|
import { useParams } from 'react-router';
|
|
@@ -503,27 +503,7 @@ export declare type AuthState = {
|
|
|
503
503
|
isReady: boolean;
|
|
504
504
|
};
|
|
505
505
|
|
|
506
|
-
export declare const Autocomplete:
|
|
507
|
-
Async: typeof AutocompleteAsyncStandalone;
|
|
508
|
-
Parts: {
|
|
509
|
-
Root: typeof AutocompleteRoot;
|
|
510
|
-
Value: AutocompleteValue;
|
|
511
|
-
InputGroup: typeof AutocompleteInputGroup;
|
|
512
|
-
Input: typeof AutocompleteInput;
|
|
513
|
-
Trigger: typeof AutocompleteTrigger;
|
|
514
|
-
Content: typeof AutocompleteContent;
|
|
515
|
-
List: typeof AutocompleteList;
|
|
516
|
-
Item: typeof AutocompleteItem;
|
|
517
|
-
Empty: typeof AutocompleteEmpty;
|
|
518
|
-
Clear: typeof AutocompleteClear;
|
|
519
|
-
Group: typeof AutocompleteGroup;
|
|
520
|
-
GroupLabel: typeof AutocompleteGroupLabel;
|
|
521
|
-
Collection: typeof AutocompleteCollection;
|
|
522
|
-
Status: AutocompleteStatus;
|
|
523
|
-
};
|
|
524
|
-
useAsync: typeof useAsync_3;
|
|
525
|
-
useFilter: getFilter;
|
|
526
|
-
};
|
|
506
|
+
export declare const Autocomplete: AutocompleteComponent;
|
|
527
507
|
|
|
528
508
|
/** Fetcher type for `Autocomplete.Async`. */
|
|
529
509
|
export declare type AutocompleteAsyncFetcher<T> = AsyncFetcher<T>;
|
|
@@ -553,6 +533,22 @@ declare namespace AutocompleteCollection {
|
|
|
553
533
|
var displayName: string;
|
|
554
534
|
}
|
|
555
535
|
|
|
536
|
+
/**
|
|
537
|
+
* Keep the exported static API type explicit instead of relying on
|
|
538
|
+
* `Object.assign(...)` inference.
|
|
539
|
+
*
|
|
540
|
+
* Why:
|
|
541
|
+
* - makes declaration rollup more stable (avoids TS2742/non-portable inferred names)
|
|
542
|
+
* - keeps public `.d.ts` output resilient to resolver/config changes
|
|
543
|
+
* - preserves consumer-side callback inference for `Autocomplete` and `Autocomplete.Async`
|
|
544
|
+
*/
|
|
545
|
+
declare type AutocompleteComponent = typeof AutocompleteStandalone & {
|
|
546
|
+
Async: typeof AutocompleteAsyncStandalone;
|
|
547
|
+
Parts: typeof AutocompleteParts;
|
|
548
|
+
useAsync: typeof useAsync_3;
|
|
549
|
+
useFilter: typeof useFilter_2;
|
|
550
|
+
};
|
|
551
|
+
|
|
556
552
|
declare function AutocompleteContent({ className, container, ...props }: React_2.ComponentProps<typeof Autocomplete_2.Popup> & {
|
|
557
553
|
container?: React_2.ComponentProps<typeof Autocomplete_2.Portal>["container"];
|
|
558
554
|
}): JSX.Element;
|
|
@@ -603,6 +599,25 @@ declare namespace AutocompleteList {
|
|
|
603
599
|
var displayName: string;
|
|
604
600
|
}
|
|
605
601
|
|
|
602
|
+
declare const AutocompleteParts: {
|
|
603
|
+
Root: typeof AutocompleteRoot;
|
|
604
|
+
Value: typeof AutocompleteValue;
|
|
605
|
+
InputGroup: typeof AutocompleteInputGroup;
|
|
606
|
+
Input: typeof AutocompleteInput;
|
|
607
|
+
Trigger: typeof AutocompleteTrigger;
|
|
608
|
+
Content: typeof AutocompleteContent;
|
|
609
|
+
List: typeof AutocompleteList;
|
|
610
|
+
Item: typeof AutocompleteItem;
|
|
611
|
+
Empty: typeof AutocompleteEmpty;
|
|
612
|
+
Clear: typeof AutocompleteClear;
|
|
613
|
+
Group: typeof AutocompleteGroup;
|
|
614
|
+
GroupLabel: typeof AutocompleteGroupLabel;
|
|
615
|
+
Collection: typeof AutocompleteCollection;
|
|
616
|
+
Status: typeof AutocompleteStatus;
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
declare type AutocompleteParts = typeof AutocompleteParts;
|
|
620
|
+
|
|
606
621
|
declare type AutocompletePickedRootProps<Value> = Pick<AutocompleteRootProps<Value>, "value" | "defaultValue" | "onValueChange" | "filter" | "disabled" | "children"> & {
|
|
607
622
|
items?: readonly Value[];
|
|
608
623
|
};
|
|
@@ -708,17 +723,42 @@ export declare const avatarVariants: (props?: ({
|
|
|
708
723
|
|
|
709
724
|
export declare function Badge({ className, variant, children, ...props }: BadgeProps): JSX.Element;
|
|
710
725
|
|
|
711
|
-
|
|
726
|
+
/** Options for `type: "badge"` cells. */
|
|
727
|
+
declare interface BadgeCellOptions extends BadgeOptions {
|
|
728
|
+
/** Maximum number of badges to display before showing a "+N" overflow indicator */
|
|
729
|
+
maxVisible?: number;
|
|
712
730
|
}
|
|
713
731
|
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
732
|
+
/**
|
|
733
|
+
* Common options for badge rendering.
|
|
734
|
+
*/
|
|
735
|
+
export declare interface BadgeOptions {
|
|
736
|
+
/**
|
|
737
|
+
* Maps each value (stringified) to a Badge variant. Values not in the
|
|
738
|
+
* map fall back to `defaultBadgeVariant`.
|
|
739
|
+
*/
|
|
740
|
+
badgeVariantMap?: Record<string, BadgeVariant>;
|
|
741
|
+
/**
|
|
742
|
+
* Maps each value (stringified) to a display label. Values not in the
|
|
743
|
+
* map render the raw value (or sentence-cased value if enabled).
|
|
744
|
+
*/
|
|
745
|
+
badgeLabelMap?: Record<string, string>;
|
|
746
|
+
/** Variant used when the value is not in `badgeVariantMap`. Default: `"outline-neutral"`. */
|
|
747
|
+
defaultBadgeVariant?: BadgeVariant;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
export declare interface BadgeProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
751
|
+
}
|
|
717
752
|
|
|
718
753
|
/**
|
|
719
|
-
*
|
|
754
|
+
* Variant union accepted by the app-shell `<Badge>` component.
|
|
755
|
+
* Shared across DataTable, DescriptionCard, and any other badge consumers.
|
|
720
756
|
*/
|
|
721
|
-
declare type
|
|
757
|
+
export declare type BadgeVariant = NonNullable<BadgeProps["variant"]>;
|
|
758
|
+
|
|
759
|
+
export declare const badgeVariants: (props?: ({
|
|
760
|
+
variant?: "default" | "error" | "success" | "warning" | "neutral" | "subtle-success" | "subtle-warning" | "subtle-error" | "outline-success" | "outline-warning" | "outline-error" | "outline-info" | "outline-neutral" | null | undefined;
|
|
761
|
+
} & ClassProp) | undefined) => string;
|
|
722
762
|
|
|
723
763
|
/** The table body section (`<tbody>`). */
|
|
724
764
|
declare function Body_2({ className, ...props }: React_2.ComponentProps<"tbody">): JSX.Element;
|
|
@@ -916,13 +956,38 @@ export declare interface CollectionVariables {
|
|
|
916
956
|
}
|
|
917
957
|
|
|
918
958
|
/**
|
|
919
|
-
* A column definition for DataTable.
|
|
959
|
+
* A column definition for DataTable. Use one of the built-in `type` values
|
|
960
|
+
* (`text`, `number`, `money`, `date`, `badge`, `link`) for automatic
|
|
961
|
+
* rendering, or pass `render` to draw the cell yourself.
|
|
962
|
+
*
|
|
963
|
+
* `Column` is a discriminated union on `type`, so wrong-shape `typeOptions`
|
|
964
|
+
* are a compile error rather than silently ignored at runtime.
|
|
965
|
+
*/
|
|
966
|
+
export declare type Column<TRow extends Record<string, unknown>> = ColumnBase<TRow> & ColumnTypeBranch<TRow>;
|
|
967
|
+
|
|
968
|
+
/**
|
|
969
|
+
* Supported area values for Layout.Column
|
|
970
|
+
*/
|
|
971
|
+
declare type ColumnArea = "left" | "main" | "right";
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* Fields shared by every `Column` regardless of `type`. Prefer `Column<TRow>`
|
|
975
|
+
* in most cases; this is exported so consumers can compose more specific
|
|
976
|
+
* column types (e.g. `type MoneyColumn<TRow> = ColumnBase<TRow> & { type: "money"; … }`).
|
|
920
977
|
*/
|
|
921
|
-
|
|
978
|
+
declare interface ColumnBase<TRow extends Record<string, unknown>> {
|
|
922
979
|
/** Column header text. Omit for action or icon-only columns. */
|
|
923
980
|
label?: string;
|
|
924
|
-
/**
|
|
925
|
-
|
|
981
|
+
/**
|
|
982
|
+
* Renders the cell content for a given row. Optional — when omitted, the
|
|
983
|
+
* built-in renderer for `type` takes over (or an `—` placeholder if no
|
|
984
|
+
* `type` is set). Always wins over the built-in renderer when both are
|
|
985
|
+
* present.
|
|
986
|
+
*
|
|
987
|
+
* Kept on the base (not per-branch) so callback contextual typing works
|
|
988
|
+
* across spread-then-override patterns like `column({ ...inferred, render })`.
|
|
989
|
+
*/
|
|
990
|
+
render?: (row: TRow) => ReactNode;
|
|
926
991
|
/**
|
|
927
992
|
* Stable identifier used for column visibility toggling and as the React key.
|
|
928
993
|
* Falls back to `label` when omitted. Set this explicitly when `label` is
|
|
@@ -932,10 +997,24 @@ export declare interface Column<TRow extends Record<string, unknown>> {
|
|
|
932
997
|
/** Fixed column width in pixels. When omitted the column sizes naturally. */
|
|
933
998
|
width?: number;
|
|
934
999
|
/**
|
|
935
|
-
*
|
|
936
|
-
*
|
|
1000
|
+
* Horizontal alignment for the header and body cell. When omitted, numeric
|
|
1001
|
+
* `type` values (`"number"` and `"money"`) default to `"right"` so digits
|
|
1002
|
+
* align along their decimal place; everything else defaults to `"left"`.
|
|
1003
|
+
* Pass `"left"` explicitly to opt a numeric column out.
|
|
937
1004
|
*/
|
|
938
|
-
|
|
1005
|
+
align?: "left" | "right";
|
|
1006
|
+
/**
|
|
1007
|
+
* When `true`, the cell content is truncated with an ellipsis when it
|
|
1008
|
+
* overflows. A `<Tooltip>` is wired up automatically when `accessor`
|
|
1009
|
+
* returns a string or number, so hovering the cell reveals the full
|
|
1010
|
+
* value.
|
|
1011
|
+
*
|
|
1012
|
+
* Truncation requires the cell to be shrinkable — the body cell sets
|
|
1013
|
+
* `max-w-0`, which collapses unless another column anchors the row width.
|
|
1014
|
+
* Pair with `width` on neighboring columns, or rely on the natural width
|
|
1015
|
+
* of fixed-size columns (selection / row actions).
|
|
1016
|
+
*/
|
|
1017
|
+
truncate?: boolean;
|
|
939
1018
|
/**
|
|
940
1019
|
* Sort configuration. When set, the column header becomes clickable and
|
|
941
1020
|
* cycles through `Asc → Desc → undefined`.
|
|
@@ -950,11 +1029,6 @@ export declare interface Column<TRow extends Record<string, unknown>> {
|
|
|
950
1029
|
filter?: FilterConfig;
|
|
951
1030
|
}
|
|
952
1031
|
|
|
953
|
-
/**
|
|
954
|
-
* Supported area values for Layout.Column
|
|
955
|
-
*/
|
|
956
|
-
declare type ColumnArea = "left" | "main" | "right";
|
|
957
|
-
|
|
958
1032
|
/**
|
|
959
1033
|
* Supported column count options
|
|
960
1034
|
*/
|
|
@@ -1011,7 +1085,7 @@ declare interface ColumnHelper<TRow extends Record<string, unknown>> {
|
|
|
1011
1085
|
* @param options - Optional per-column overrides (label, width, sort, filter).
|
|
1012
1086
|
* @throws {Error} If `dataKey` is not found in the metadata passed to `inferColumns`.
|
|
1013
1087
|
*/
|
|
1014
|
-
declare type ColumnInferFn<TRow extends Record<string, unknown>, TTable extends TableMetadata = TableMetadata> = (dataKey: TableFieldName<TTable>, options?: MetadataFieldOptions) =>
|
|
1088
|
+
declare type ColumnInferFn<TRow extends Record<string, unknown>, TTable extends TableMetadata = TableMetadata> = (dataKey: TableFieldName<TTable>, options?: MetadataFieldOptions) => InferredColumn<TRow>;
|
|
1015
1089
|
|
|
1016
1090
|
/**
|
|
1017
1091
|
* Props for individual Layout.Column component
|
|
@@ -1038,32 +1112,56 @@ declare interface ColumnProps {
|
|
|
1038
1112
|
*/
|
|
1039
1113
|
declare type Columns = 3 | 4;
|
|
1040
1114
|
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1115
|
+
/**
|
|
1116
|
+
* Discriminated branches keyed off `type`. Each branch narrows `typeOptions`
|
|
1117
|
+
* and `accessor`'s return type to the values its renderer can display.
|
|
1118
|
+
*
|
|
1119
|
+
* - `type: "link"` requires `typeOptions.href`.
|
|
1120
|
+
* - `type: "text"` rejects `typeOptions` entirely.
|
|
1121
|
+
*
|
|
1122
|
+
* `accessor` lives on each branch (rather than `ColumnBase`) so the built-in
|
|
1123
|
+
* renderers can constrain what a column produces. Returning an array or a
|
|
1124
|
+
* non-Date object is a compile error on a typed branch, instead of silently
|
|
1125
|
+
* rendering `[object Object]`. Untyped columns (`type?: undefined`) still
|
|
1126
|
+
* accept `unknown` — they're rendered by an explicit `render`. `null` and
|
|
1127
|
+
* `undefined` are always allowed: every built-in renderer maps them to the
|
|
1128
|
+
* `—` placeholder.
|
|
1129
|
+
*
|
|
1130
|
+
* Prefer `Column<TRow>` in most cases; this is exported so consumers can
|
|
1131
|
+
* compose more specific column types.
|
|
1132
|
+
*/
|
|
1133
|
+
declare type ColumnTypeBranch<TRow extends Record<string, unknown>> = {
|
|
1134
|
+
type?: undefined;
|
|
1135
|
+
typeOptions?: never;
|
|
1136
|
+
accessor?: (row: TRow) => unknown;
|
|
1137
|
+
} | {
|
|
1138
|
+
type: "text";
|
|
1139
|
+
typeOptions?: never;
|
|
1140
|
+
accessor?: (row: TRow) => string | number | boolean | bigint | null | undefined;
|
|
1141
|
+
} | {
|
|
1142
|
+
type: "number";
|
|
1143
|
+
typeOptions?: NumberCellOptions;
|
|
1144
|
+
accessor?: (row: TRow) => number | null | undefined;
|
|
1145
|
+
} | {
|
|
1146
|
+
type: "money";
|
|
1147
|
+
typeOptions?: MoneyCellOptions<TRow>;
|
|
1148
|
+
accessor?: (row: TRow) => number | null | undefined;
|
|
1149
|
+
} | {
|
|
1150
|
+
type: "date";
|
|
1151
|
+
typeOptions?: DateCellOptions;
|
|
1152
|
+
accessor?: (row: TRow) => Date | string | number | null | undefined;
|
|
1153
|
+
} | {
|
|
1154
|
+
type: "badge";
|
|
1155
|
+
typeOptions?: BadgeCellOptions;
|
|
1156
|
+
accessor?: (row: TRow) => string | string[] | number | boolean | null | undefined;
|
|
1157
|
+
} | {
|
|
1158
|
+
type: "link";
|
|
1159
|
+
typeOptions: LinkCellOptions<TRow>;
|
|
1160
|
+
accessor?: (row: TRow) => string | number | boolean | null | undefined;
|
|
1065
1161
|
};
|
|
1066
1162
|
|
|
1163
|
+
export declare const Combobox: ComboboxComponent;
|
|
1164
|
+
|
|
1067
1165
|
declare type ComboboxAsyncCreatableProps<T extends object> = (ComboboxAsyncOwnProps<T> & CreatableProps<T> & Omit<ComboboxPropsSingle<T>, "mapItem">) | (ComboboxAsyncOwnProps<T> & CreatableProps<T> & Omit<ComboboxPropsMultiple<T>, "mapItem">);
|
|
1068
1166
|
|
|
1069
1167
|
/** Fetcher type for `Combobox.Async`. */
|
|
@@ -1112,6 +1210,23 @@ declare namespace ComboboxCollection {
|
|
|
1112
1210
|
var displayName: string;
|
|
1113
1211
|
}
|
|
1114
1212
|
|
|
1213
|
+
/**
|
|
1214
|
+
* Keep the exported static API type explicit instead of relying on
|
|
1215
|
+
* `Object.assign(...)` inference.
|
|
1216
|
+
*
|
|
1217
|
+
* Why:
|
|
1218
|
+
* - makes declaration rollup more stable (avoids TS2742/non-portable inferred names)
|
|
1219
|
+
* - keeps public `.d.ts` output resilient to resolver/config changes
|
|
1220
|
+
* - preserves consumer-side callback inference for `Combobox` and `Combobox.Async`
|
|
1221
|
+
*/
|
|
1222
|
+
declare type ComboboxComponent = typeof ComboboxStandalone & {
|
|
1223
|
+
Async: typeof ComboboxAsyncStandalone;
|
|
1224
|
+
Parts: typeof ComboboxParts;
|
|
1225
|
+
useAsync: typeof useAsync_2;
|
|
1226
|
+
useFilter: typeof useFilter;
|
|
1227
|
+
useCreatable: typeof useCreatable;
|
|
1228
|
+
};
|
|
1229
|
+
|
|
1115
1230
|
declare function ComboboxContent({ className, container, ...props }: React_2.ComponentProps<typeof Combobox_2.Popup> & {
|
|
1116
1231
|
container?: React_2.ComponentProps<typeof Combobox_2.Portal>["container"];
|
|
1117
1232
|
}): JSX.Element;
|
|
@@ -1162,6 +1277,28 @@ declare namespace ComboboxList {
|
|
|
1162
1277
|
var displayName: string;
|
|
1163
1278
|
}
|
|
1164
1279
|
|
|
1280
|
+
declare const ComboboxParts: {
|
|
1281
|
+
Root: typeof ComboboxRoot;
|
|
1282
|
+
InputGroup: typeof ComboboxInputGroup;
|
|
1283
|
+
Input: typeof ComboboxInput;
|
|
1284
|
+
Trigger: typeof ComboboxTrigger;
|
|
1285
|
+
Content: typeof ComboboxContent;
|
|
1286
|
+
List: typeof ComboboxList;
|
|
1287
|
+
Item: typeof ComboboxItem;
|
|
1288
|
+
Empty: typeof ComboboxEmpty;
|
|
1289
|
+
Group: typeof ComboboxGroup;
|
|
1290
|
+
GroupLabel: typeof ComboboxGroupLabel;
|
|
1291
|
+
Clear: typeof ComboboxClear;
|
|
1292
|
+
Chips: typeof ComboboxChips;
|
|
1293
|
+
Chip: typeof ComboboxChip;
|
|
1294
|
+
ChipRemove: typeof ComboboxChipRemove;
|
|
1295
|
+
Value: typeof ComboboxValue;
|
|
1296
|
+
Collection: typeof ComboboxCollection;
|
|
1297
|
+
Status: typeof ComboboxStatus;
|
|
1298
|
+
};
|
|
1299
|
+
|
|
1300
|
+
declare type ComboboxParts = typeof ComboboxParts;
|
|
1301
|
+
|
|
1165
1302
|
declare interface ComboboxPropsBase<T> {
|
|
1166
1303
|
/** Placeholder text for the input */
|
|
1167
1304
|
placeholder?: string;
|
|
@@ -1821,6 +1958,17 @@ declare namespace DataTableToolbar {
|
|
|
1821
1958
|
var displayName: string;
|
|
1822
1959
|
}
|
|
1823
1960
|
|
|
1961
|
+
/** Options for `type: "date"` cells. */
|
|
1962
|
+
declare interface DateCellOptions {
|
|
1963
|
+
/**
|
|
1964
|
+
* Format style. `"short"` → `Apr 9, 2026`; `"long"` → `April 9, 2026`;
|
|
1965
|
+
* `"datetime"` → `Apr 9, 2026, 3:45 PM`. Default: `"short"`.
|
|
1966
|
+
*/
|
|
1967
|
+
dateFormat?: "short" | "long" | "datetime";
|
|
1968
|
+
/** BCP 47 locale tag. Defaults to the runtime locale. */
|
|
1969
|
+
locale?: string;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1824
1972
|
/**
|
|
1825
1973
|
* Date format options
|
|
1826
1974
|
*/
|
|
@@ -2364,9 +2512,18 @@ declare interface FieldMeta {
|
|
|
2364
2512
|
/** Show copy button for this field */
|
|
2365
2513
|
copyable?: boolean;
|
|
2366
2514
|
/** Map field values to badge variants */
|
|
2367
|
-
badgeVariantMap?: Record<string,
|
|
2515
|
+
badgeVariantMap?: Record<string, BadgeVariant>;
|
|
2516
|
+
/**
|
|
2517
|
+
* Maps each value (stringified) to a display label. Values not in the
|
|
2518
|
+
* map render the raw value (or sentence-cased value if enabled).
|
|
2519
|
+
*/
|
|
2520
|
+
badgeLabelMap?: Record<string, string>;
|
|
2521
|
+
/** Variant used when the value is not in `badgeVariantMap`. Default: `"outline-neutral"` (from shared `resolveBadgeVariant`). */
|
|
2522
|
+
defaultBadgeVariant?: BadgeVariant;
|
|
2368
2523
|
/** Render badge labels in sentence case by default; set false to keep the original value */
|
|
2369
2524
|
sentenceCaseBadges?: boolean;
|
|
2525
|
+
/** Maximum number of badges to display before showing a "+N" overflow indicator */
|
|
2526
|
+
maxVisible?: number;
|
|
2370
2527
|
/** Key path to currency code in data object (for money fields) */
|
|
2371
2528
|
currencyKey?: string;
|
|
2372
2529
|
/** Key path to href in data object (for link fields) */
|
|
@@ -2828,6 +2985,16 @@ export declare type InferCsvRow<T extends CsvSchema> = {
|
|
|
2828
2985
|
} ? O : unknown;
|
|
2829
2986
|
};
|
|
2830
2987
|
|
|
2988
|
+
/**
|
|
2989
|
+
* The return type of an infer function — contains the base column fields
|
|
2990
|
+
* without the discriminated `type`/`typeOptions`/`accessor` branches.
|
|
2991
|
+
*
|
|
2992
|
+
* This makes spread-then-override patterns like
|
|
2993
|
+
* `column({ ...infer("stock"), type: "number" })` type-safe without
|
|
2994
|
+
* requiring an explicit accessor cast.
|
|
2995
|
+
*/
|
|
2996
|
+
declare type InferredColumn<TRow extends Record<string, unknown>> = ColumnBase<TRow>;
|
|
2997
|
+
|
|
2831
2998
|
/**
|
|
2832
2999
|
* A styled input component.
|
|
2833
3000
|
*
|
|
@@ -3009,6 +3176,15 @@ declare namespace Legend {
|
|
|
3009
3176
|
|
|
3010
3177
|
export { Link }
|
|
3011
3178
|
|
|
3179
|
+
/** Options for `type: "link"` cells. `href` is required. */
|
|
3180
|
+
declare interface LinkCellOptions<TRow extends Record<string, unknown>> {
|
|
3181
|
+
/**
|
|
3182
|
+
* Extracts the link target. Returning `null` / `undefined` renders the cell
|
|
3183
|
+
* value as plain text instead of a link.
|
|
3184
|
+
*/
|
|
3185
|
+
href: (row: TRow) => string | null | undefined;
|
|
3186
|
+
}
|
|
3187
|
+
|
|
3012
3188
|
/** A link item in the menu that can be used to navigate to a different page. */
|
|
3013
3189
|
declare function LinkItem({ className, ...props }: React_2.ComponentProps<typeof Menu_2.LinkItem>): JSX.Element;
|
|
3014
3190
|
|
|
@@ -3016,6 +3192,13 @@ declare namespace LinkItem {
|
|
|
3016
3192
|
var displayName: string;
|
|
3017
3193
|
}
|
|
3018
3194
|
|
|
3195
|
+
/** Groups the individual tab buttons. */
|
|
3196
|
+
declare function List({ className, children, ...props }: React_2.ComponentProps<typeof Tabs_2.List>): JSX.Element;
|
|
3197
|
+
|
|
3198
|
+
declare namespace List {
|
|
3199
|
+
var displayName: string;
|
|
3200
|
+
}
|
|
3201
|
+
|
|
3019
3202
|
declare type LoaderHandler = (args: LoaderFunctionArgs) => Promise<unknown> | unknown;
|
|
3020
3203
|
|
|
3021
3204
|
declare type LocalizedString = string | ((locale: string) => string);
|
|
@@ -3148,6 +3331,23 @@ declare type Module = Omit<CommonPageResource, "meta"> & {
|
|
|
3148
3331
|
|
|
3149
3332
|
declare type Modules = Array<Module>;
|
|
3150
3333
|
|
|
3334
|
+
/** Options for `type: "money"` cells. */
|
|
3335
|
+
declare interface MoneyCellOptions<TRow extends Record<string, unknown>> {
|
|
3336
|
+
/**
|
|
3337
|
+
* ISO 4217 currency code. Pass a string for a static currency or a function
|
|
3338
|
+
* to read it from the row. Default: `"USD"`.
|
|
3339
|
+
*/
|
|
3340
|
+
currency?: string | ((row: TRow) => string);
|
|
3341
|
+
/**
|
|
3342
|
+
* Maximum decimals. Raises the cap above the currency default while keeping
|
|
3343
|
+
* the minimum at the currency default (e.g. USD stays at ≥2, but a price
|
|
3344
|
+
* column can show up to 4).
|
|
3345
|
+
*/
|
|
3346
|
+
maxDecimals?: number;
|
|
3347
|
+
/** BCP 47 locale tag. Defaults to the runtime locale. */
|
|
3348
|
+
locale?: string;
|
|
3349
|
+
}
|
|
3350
|
+
|
|
3151
3351
|
/**
|
|
3152
3352
|
* Extract the node type from a cursor connection result.
|
|
3153
3353
|
*/
|
|
@@ -3157,6 +3357,16 @@ export declare type NodeType<T extends {
|
|
|
3157
3357
|
}[];
|
|
3158
3358
|
} | null | undefined> = NonNullable<T>["edges"][number]["node"];
|
|
3159
3359
|
|
|
3360
|
+
/** Options for `type: "number"` cells. */
|
|
3361
|
+
declare interface NumberCellOptions {
|
|
3362
|
+
/** Minimum decimal places. Default: `0`. */
|
|
3363
|
+
minDecimals?: number;
|
|
3364
|
+
/** Maximum decimal places. Default: `minDecimals` (or `0`). */
|
|
3365
|
+
maxDecimals?: number;
|
|
3366
|
+
/** BCP 47 locale tag. Defaults to the runtime locale. */
|
|
3367
|
+
locale?: string;
|
|
3368
|
+
}
|
|
3369
|
+
|
|
3160
3370
|
/**
|
|
3161
3371
|
* Resolve the operator union for a specific field within a filter type.
|
|
3162
3372
|
*/
|
|
@@ -3247,6 +3457,13 @@ export declare interface PaginationVariables {
|
|
|
3247
3457
|
before?: string | null;
|
|
3248
3458
|
}
|
|
3249
3459
|
|
|
3460
|
+
/** A panel displayed when the corresponding tab is active. */
|
|
3461
|
+
declare function Panel({ className, children, ...props }: React_2.ComponentProps<typeof Tabs_2.Panel>): JSX.Element;
|
|
3462
|
+
|
|
3463
|
+
declare namespace Panel {
|
|
3464
|
+
var displayName: string;
|
|
3465
|
+
}
|
|
3466
|
+
|
|
3250
3467
|
/** The row data passed to `onValidate`, after transforms have been applied. */
|
|
3251
3468
|
export declare type ParsedRow = {
|
|
3252
3469
|
/** 0-based row index, stable across edits. */
|
|
@@ -3365,6 +3582,29 @@ declare namespace Root {
|
|
|
3365
3582
|
var displayName: string;
|
|
3366
3583
|
}
|
|
3367
3584
|
|
|
3585
|
+
/**
|
|
3586
|
+
* The root component that manages tab selection state.
|
|
3587
|
+
*
|
|
3588
|
+
* @example
|
|
3589
|
+
* ```tsx
|
|
3590
|
+
* <Tabs.Root defaultValue="overview">
|
|
3591
|
+
* <Tabs.List>
|
|
3592
|
+
* <Tabs.Tab value="overview">Overview</Tabs.Tab>
|
|
3593
|
+
* <Tabs.Tab value="projects">Projects</Tabs.Tab>
|
|
3594
|
+
* <Tabs.Tab value="account">Account</Tabs.Tab>
|
|
3595
|
+
* </Tabs.List>
|
|
3596
|
+
* <Tabs.Panel value="overview">Overview content</Tabs.Panel>
|
|
3597
|
+
* <Tabs.Panel value="projects">Projects content</Tabs.Panel>
|
|
3598
|
+
* <Tabs.Panel value="account">Account content</Tabs.Panel>
|
|
3599
|
+
* </Tabs.Root>
|
|
3600
|
+
* ```
|
|
3601
|
+
*/
|
|
3602
|
+
declare function Root_10({ className, children, variant, ...props }: RootProps_2): JSX.Element;
|
|
3603
|
+
|
|
3604
|
+
declare namespace Root_10 {
|
|
3605
|
+
var displayName: string;
|
|
3606
|
+
}
|
|
3607
|
+
|
|
3368
3608
|
/**
|
|
3369
3609
|
* The root component that manages tooltip open/close state.
|
|
3370
3610
|
*
|
|
@@ -3378,9 +3618,9 @@ declare namespace Root {
|
|
|
3378
3618
|
* </Tooltip.Root>
|
|
3379
3619
|
* ```
|
|
3380
3620
|
*/
|
|
3381
|
-
declare function
|
|
3621
|
+
declare function Root_11({ children, ...props }: TooltipRootProps): JSX.Element;
|
|
3382
3622
|
|
|
3383
|
-
declare namespace
|
|
3623
|
+
declare namespace Root_11 {
|
|
3384
3624
|
var displayName: string;
|
|
3385
3625
|
}
|
|
3386
3626
|
|
|
@@ -3586,6 +3826,12 @@ declare type RootProps = React_2.ComponentProps<"table"> & {
|
|
|
3586
3826
|
containerClassName?: string;
|
|
3587
3827
|
};
|
|
3588
3828
|
|
|
3829
|
+
declare type RootProps_2 = Pick<React_2.ComponentProps<typeof Tabs_2.Root>, "defaultValue" | "value" | "onValueChange"> & {
|
|
3830
|
+
children: React_2.ReactNode;
|
|
3831
|
+
className?: string;
|
|
3832
|
+
variant?: TabsVariant;
|
|
3833
|
+
};
|
|
3834
|
+
|
|
3589
3835
|
/**
|
|
3590
3836
|
* Route parameters type inferred from AppShellRegister.
|
|
3591
3837
|
* Falls back to Record<string, Record<string, string>> if not augmented.
|
|
@@ -3634,34 +3880,7 @@ export declare type SearchSource = {
|
|
|
3634
3880
|
}) => Promise<CommandPaletteSearchResult[]>;
|
|
3635
3881
|
};
|
|
3636
3882
|
|
|
3637
|
-
export declare const Select:
|
|
3638
|
-
/**
|
|
3639
|
-
* Async select that fetches items when the dropdown opens.
|
|
3640
|
-
*
|
|
3641
|
-
* **Limitation:** This component defaults to `modal={false}` and
|
|
3642
|
-
* `alignItemWithTrigger={false}` to work around Base UI scroll-lock bugs
|
|
3643
|
-
* with dynamically loaded items. As a result, it may not function correctly
|
|
3644
|
-
* inside focus-trapping containers such as `Dialog` or `Sheet` — the
|
|
3645
|
-
* focus trap can block interaction with the dropdown, or the portal may
|
|
3646
|
-
* render outside the modal's visible area.
|
|
3647
|
-
*
|
|
3648
|
-
* If you need an async dropdown inside a `Dialog` or `Sheet`, prefer
|
|
3649
|
-
* `Combobox.Async` which uses Popover-based positioning and does not
|
|
3650
|
-
* suffer from these constraints.
|
|
3651
|
-
*/
|
|
3652
|
-
Async: typeof SelectAsyncStandalone;
|
|
3653
|
-
Parts: {
|
|
3654
|
-
Root: typeof SelectRoot;
|
|
3655
|
-
Trigger: typeof SelectTrigger;
|
|
3656
|
-
Value: typeof SelectValue;
|
|
3657
|
-
Content: typeof SelectContent;
|
|
3658
|
-
Item: typeof SelectItem;
|
|
3659
|
-
Group: typeof SelectGroup;
|
|
3660
|
-
GroupLabel: typeof SelectGroupLabel;
|
|
3661
|
-
Separator: SelectSeparator;
|
|
3662
|
-
};
|
|
3663
|
-
useAsync: typeof useAsync;
|
|
3664
|
-
};
|
|
3883
|
+
export declare const Select: SelectComponent;
|
|
3665
3884
|
|
|
3666
3885
|
/**
|
|
3667
3886
|
* Fetcher type for `Select.Async`.
|
|
@@ -3711,6 +3930,21 @@ declare type SelectAsyncProps<T> = (SelectAsyncOwnProps<T> & SelectPropsSingle<T
|
|
|
3711
3930
|
|
|
3712
3931
|
declare function SelectAsyncStandalone<T>(props: SelectAsyncProps<T>): JSX.Element;
|
|
3713
3932
|
|
|
3933
|
+
/**
|
|
3934
|
+
* Keep the exported static API type explicit instead of relying on
|
|
3935
|
+
* `Object.assign(...)` inference.
|
|
3936
|
+
*
|
|
3937
|
+
* Why:
|
|
3938
|
+
* - makes declaration rollup more stable (avoids TS2742/non-portable inferred names)
|
|
3939
|
+
* - keeps public `.d.ts` output resilient to resolver/config changes
|
|
3940
|
+
* - preserves consumer-side callback inference for `Select` and `Select.Async`
|
|
3941
|
+
*/
|
|
3942
|
+
declare type SelectComponent = typeof SelectStandalone & {
|
|
3943
|
+
Async: typeof SelectAsyncStandalone;
|
|
3944
|
+
Parts: typeof SelectParts;
|
|
3945
|
+
useAsync: typeof useAsync;
|
|
3946
|
+
};
|
|
3947
|
+
|
|
3714
3948
|
declare function SelectContent({ className, container, alignItemWithTrigger, ...props }: React_2.ComponentProps<typeof Select_2.Popup> & {
|
|
3715
3949
|
container?: React_2.ComponentProps<typeof Select_2.Portal>["container"];
|
|
3716
3950
|
alignItemWithTrigger?: React_2.ComponentProps<typeof Select_2.Positioner>["alignItemWithTrigger"];
|
|
@@ -3746,6 +3980,19 @@ export declare interface SelectOption {
|
|
|
3746
3980
|
label: string;
|
|
3747
3981
|
}
|
|
3748
3982
|
|
|
3983
|
+
declare const SelectParts: {
|
|
3984
|
+
Root: typeof SelectRoot;
|
|
3985
|
+
Trigger: typeof SelectTrigger;
|
|
3986
|
+
Value: typeof SelectValue;
|
|
3987
|
+
Content: typeof SelectContent;
|
|
3988
|
+
Item: typeof SelectItem;
|
|
3989
|
+
Group: typeof SelectGroup;
|
|
3990
|
+
GroupLabel: typeof SelectGroupLabel;
|
|
3991
|
+
Separator: typeof SelectSeparator;
|
|
3992
|
+
};
|
|
3993
|
+
|
|
3994
|
+
declare type SelectParts = typeof SelectParts;
|
|
3995
|
+
|
|
3749
3996
|
declare interface SelectPropsBase<T> {
|
|
3750
3997
|
/** Placeholder text shown when no value is selected */
|
|
3751
3998
|
placeholder?: string;
|
|
@@ -4150,6 +4397,20 @@ export declare type SidebarLayoutProps = {
|
|
|
4150
4397
|
* ```
|
|
4151
4398
|
*/
|
|
4152
4399
|
sidebar?: React.ReactNode;
|
|
4400
|
+
/**
|
|
4401
|
+
* Whether the sidebar is open by default on desktop.
|
|
4402
|
+
*
|
|
4403
|
+
* @default true
|
|
4404
|
+
*/
|
|
4405
|
+
defaultOpen?: boolean;
|
|
4406
|
+
/**
|
|
4407
|
+
* Whether the sidebar can be collapsed.
|
|
4408
|
+
* When set to `false`, the sidebar is always visible and cannot be toggled.
|
|
4409
|
+
* `defaultOpen` is ignored when this is `false`.
|
|
4410
|
+
*
|
|
4411
|
+
* @default true
|
|
4412
|
+
*/
|
|
4413
|
+
collapsible?: boolean;
|
|
4153
4414
|
};
|
|
4154
4415
|
|
|
4155
4416
|
/**
|
|
@@ -4211,6 +4472,13 @@ declare namespace SubmenuTrigger {
|
|
|
4211
4472
|
var displayName: string;
|
|
4212
4473
|
}
|
|
4213
4474
|
|
|
4475
|
+
/** An individual interactive tab button that toggles the corresponding panel. */
|
|
4476
|
+
declare function Tab({ className, children, ...props }: React_2.ComponentProps<typeof Tabs_2.Tab>): JSX.Element;
|
|
4477
|
+
|
|
4478
|
+
declare namespace Tab {
|
|
4479
|
+
var displayName: string;
|
|
4480
|
+
}
|
|
4481
|
+
|
|
4214
4482
|
export declare const Table: {
|
|
4215
4483
|
Root: typeof Root_3;
|
|
4216
4484
|
Header: typeof Header_2;
|
|
@@ -4274,6 +4542,15 @@ export declare type TableOrderableFieldName<TTable extends TableMetadata> = Extr
|
|
|
4274
4542
|
readonly name: infer N;
|
|
4275
4543
|
} ? N extends string ? N : never : never;
|
|
4276
4544
|
|
|
4545
|
+
export declare const Tabs: {
|
|
4546
|
+
Root: typeof Root_10;
|
|
4547
|
+
List: typeof List;
|
|
4548
|
+
Tab: typeof Tab;
|
|
4549
|
+
Panel: typeof Panel;
|
|
4550
|
+
};
|
|
4551
|
+
|
|
4552
|
+
declare type TabsVariant = "default" | "line" | "capsule";
|
|
4553
|
+
|
|
4277
4554
|
declare type Theme = "dark" | "light" | "system";
|
|
4278
4555
|
|
|
4279
4556
|
declare type ThemeProviderState = {
|
|
@@ -4297,7 +4574,7 @@ declare namespace Title_2 {
|
|
|
4297
4574
|
}
|
|
4298
4575
|
|
|
4299
4576
|
export declare const Tooltip: {
|
|
4300
|
-
Root: typeof
|
|
4577
|
+
Root: typeof Root_11;
|
|
4301
4578
|
Trigger: typeof Trigger_4;
|
|
4302
4579
|
Content: typeof Content_5;
|
|
4303
4580
|
Provider: typeof Provider;
|
|
@@ -5067,6 +5344,48 @@ export declare interface UseDataTableReturn<TRow extends Record<string, unknown>
|
|
|
5067
5344
|
isIndeterminate: boolean;
|
|
5068
5345
|
}
|
|
5069
5346
|
|
|
5347
|
+
/**
|
|
5348
|
+
* Hook for robust string matching using `Intl.Collator`.
|
|
5349
|
+
*
|
|
5350
|
+
* Returns an object with `contains`, `startsWith`, and `endsWith` methods
|
|
5351
|
+
* that can be passed to the `filter` prop of `<Combobox.Parts.Root>`
|
|
5352
|
+
* to customize how items are filtered against the input value.
|
|
5353
|
+
*
|
|
5354
|
+
* Accepts `Intl.CollatorOptions` (e.g. `sensitivity`, `usage`) plus
|
|
5355
|
+
* an optional `locale` for locale-aware matching.
|
|
5356
|
+
*
|
|
5357
|
+
* @example
|
|
5358
|
+
* ```tsx
|
|
5359
|
+
* const filter = Combobox.useFilter({ sensitivity: "base" });
|
|
5360
|
+
*
|
|
5361
|
+
* <Combobox.Parts.Root filter={filter.contains}>
|
|
5362
|
+
* ...
|
|
5363
|
+
* </Combobox.Parts.Root>
|
|
5364
|
+
* ```
|
|
5365
|
+
*/
|
|
5366
|
+
declare const useFilter: typeof Combobox_2.useFilter;
|
|
5367
|
+
|
|
5368
|
+
/**
|
|
5369
|
+
* Hook for robust string matching using `Intl.Collator`.
|
|
5370
|
+
*
|
|
5371
|
+
* Returns an object with `contains`, `startsWith`, and `endsWith` methods
|
|
5372
|
+
* that can be passed to the `filter` prop of `<Autocomplete.Parts.Root>`
|
|
5373
|
+
* to customize how suggestions are filtered against the input value.
|
|
5374
|
+
*
|
|
5375
|
+
* Accepts `Intl.CollatorOptions` (e.g. `sensitivity`, `usage`) plus
|
|
5376
|
+
* an optional `locale` for locale-aware matching.
|
|
5377
|
+
*
|
|
5378
|
+
* @example
|
|
5379
|
+
* ```tsx
|
|
5380
|
+
* const filter = Autocomplete.useFilter({ sensitivity: "base" });
|
|
5381
|
+
*
|
|
5382
|
+
* <Autocomplete.Parts.Root filter={filter.contains}>
|
|
5383
|
+
* ...
|
|
5384
|
+
* </Autocomplete.Parts.Root>
|
|
5385
|
+
* ```
|
|
5386
|
+
*/
|
|
5387
|
+
declare const useFilter_2: getFilter;
|
|
5388
|
+
|
|
5070
5389
|
export { useLocation }
|
|
5071
5390
|
|
|
5072
5391
|
export { useNavigate }
|