@tailor-platform/app-shell 1.1.1 → 1.2.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 +333 -89
- package/dist/app-shell.js +2601 -2446
- package/package.json +1 -1
package/dist/app-shell.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ import { Select as Select_2 } from '@base-ui/react/select';
|
|
|
22
22
|
import { StandardSchemaV1 } from '@standard-schema/spec';
|
|
23
23
|
import { toast } from 'sonner';
|
|
24
24
|
import { Tooltip as Tooltip_2 } from '@base-ui/react/tooltip';
|
|
25
|
-
import { useFilter } from 'node_modules/@base-ui/react/esm/combobox/index.parts';
|
|
26
25
|
import { useLocation } from 'react-router';
|
|
27
26
|
import { useNavigate } from 'react-router';
|
|
28
27
|
import { useParams } from 'react-router';
|
|
@@ -503,27 +502,7 @@ export declare type AuthState = {
|
|
|
503
502
|
isReady: boolean;
|
|
504
503
|
};
|
|
505
504
|
|
|
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
|
-
};
|
|
505
|
+
export declare const Autocomplete: AutocompleteComponent;
|
|
527
506
|
|
|
528
507
|
/** Fetcher type for `Autocomplete.Async`. */
|
|
529
508
|
export declare type AutocompleteAsyncFetcher<T> = AsyncFetcher<T>;
|
|
@@ -553,6 +532,22 @@ declare namespace AutocompleteCollection {
|
|
|
553
532
|
var displayName: string;
|
|
554
533
|
}
|
|
555
534
|
|
|
535
|
+
/**
|
|
536
|
+
* Keep the exported static API type explicit instead of relying on
|
|
537
|
+
* `Object.assign(...)` inference.
|
|
538
|
+
*
|
|
539
|
+
* Why:
|
|
540
|
+
* - makes declaration rollup more stable (avoids TS2742/non-portable inferred names)
|
|
541
|
+
* - keeps public `.d.ts` output resilient to resolver/config changes
|
|
542
|
+
* - preserves consumer-side callback inference for `Autocomplete` and `Autocomplete.Async`
|
|
543
|
+
*/
|
|
544
|
+
declare type AutocompleteComponent = typeof AutocompleteStandalone & {
|
|
545
|
+
Async: typeof AutocompleteAsyncStandalone;
|
|
546
|
+
Parts: typeof AutocompleteParts;
|
|
547
|
+
useAsync: typeof useAsync_3;
|
|
548
|
+
useFilter: typeof useFilter_2;
|
|
549
|
+
};
|
|
550
|
+
|
|
556
551
|
declare function AutocompleteContent({ className, container, ...props }: React_2.ComponentProps<typeof Autocomplete_2.Popup> & {
|
|
557
552
|
container?: React_2.ComponentProps<typeof Autocomplete_2.Portal>["container"];
|
|
558
553
|
}): JSX.Element;
|
|
@@ -603,6 +598,25 @@ declare namespace AutocompleteList {
|
|
|
603
598
|
var displayName: string;
|
|
604
599
|
}
|
|
605
600
|
|
|
601
|
+
declare const AutocompleteParts: {
|
|
602
|
+
Root: typeof AutocompleteRoot;
|
|
603
|
+
Value: typeof AutocompleteValue;
|
|
604
|
+
InputGroup: typeof AutocompleteInputGroup;
|
|
605
|
+
Input: typeof AutocompleteInput;
|
|
606
|
+
Trigger: typeof AutocompleteTrigger;
|
|
607
|
+
Content: typeof AutocompleteContent;
|
|
608
|
+
List: typeof AutocompleteList;
|
|
609
|
+
Item: typeof AutocompleteItem;
|
|
610
|
+
Empty: typeof AutocompleteEmpty;
|
|
611
|
+
Clear: typeof AutocompleteClear;
|
|
612
|
+
Group: typeof AutocompleteGroup;
|
|
613
|
+
GroupLabel: typeof AutocompleteGroupLabel;
|
|
614
|
+
Collection: typeof AutocompleteCollection;
|
|
615
|
+
Status: typeof AutocompleteStatus;
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
declare type AutocompleteParts = typeof AutocompleteParts;
|
|
619
|
+
|
|
606
620
|
declare type AutocompletePickedRootProps<Value> = Pick<AutocompleteRootProps<Value>, "value" | "defaultValue" | "onValueChange" | "filter" | "disabled" | "children"> & {
|
|
607
621
|
items?: readonly Value[];
|
|
608
622
|
};
|
|
@@ -708,17 +722,36 @@ export declare const avatarVariants: (props?: ({
|
|
|
708
722
|
|
|
709
723
|
export declare function Badge({ className, variant, children, ...props }: BadgeProps): JSX.Element;
|
|
710
724
|
|
|
725
|
+
/** Options for `type: "badge"` cells. */
|
|
726
|
+
declare interface BadgeCellOptions {
|
|
727
|
+
/**
|
|
728
|
+
* Maps each cell value (stringified) to a Badge variant. Values not in the
|
|
729
|
+
* map fall back to `defaultBadgeVariant`.
|
|
730
|
+
*/
|
|
731
|
+
badgeVariantMap?: Record<string, BadgeVariant>;
|
|
732
|
+
/**
|
|
733
|
+
* Maps each cell value (stringified) to a display label. Values not in the
|
|
734
|
+
* map render the raw cell value.
|
|
735
|
+
*/
|
|
736
|
+
badgeLabelMap?: Record<string, string>;
|
|
737
|
+
/** Variant used when the value is not in `badgeVariantMap`. Default: `"neutral"`. */
|
|
738
|
+
defaultBadgeVariant?: BadgeVariant;
|
|
739
|
+
}
|
|
740
|
+
|
|
711
741
|
export declare interface BadgeProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
712
742
|
}
|
|
713
743
|
|
|
744
|
+
/** Variant union accepted by the app-shell `<Badge>` component. */
|
|
745
|
+
declare type BadgeVariant = NonNullable<BadgeProps["variant"]>;
|
|
746
|
+
|
|
714
747
|
export declare const badgeVariants: (props?: ({
|
|
715
|
-
variant?: "default" | "error" | "success" | "warning" | "neutral" | "outline-success" | "outline-warning" | "outline-error" | "outline-info" | "outline-neutral" | null | undefined;
|
|
748
|
+
variant?: "default" | "error" | "success" | "warning" | "neutral" | "subtle-success" | "subtle-warning" | "subtle-error" | "outline-success" | "outline-warning" | "outline-error" | "outline-info" | "outline-neutral" | null | undefined;
|
|
716
749
|
} & ClassProp) | undefined) => string;
|
|
717
750
|
|
|
718
751
|
/**
|
|
719
752
|
* Badge variant mapping for automatic status coloring
|
|
720
753
|
*/
|
|
721
|
-
declare type BadgeVariantType = "default" | "success" | "warning" | "error" | "neutral" | "outline-success" | "outline-warning" | "outline-error" | "outline-info" | "outline-neutral";
|
|
754
|
+
declare type BadgeVariantType = "default" | "success" | "warning" | "error" | "neutral" | "subtle-success" | "subtle-warning" | "subtle-error" | "outline-success" | "outline-warning" | "outline-error" | "outline-info" | "outline-neutral";
|
|
722
755
|
|
|
723
756
|
/** The table body section (`<tbody>`). */
|
|
724
757
|
declare function Body_2({ className, ...props }: React_2.ComponentProps<"tbody">): JSX.Element;
|
|
@@ -916,13 +949,38 @@ export declare interface CollectionVariables {
|
|
|
916
949
|
}
|
|
917
950
|
|
|
918
951
|
/**
|
|
919
|
-
* A column definition for DataTable.
|
|
952
|
+
* A column definition for DataTable. Use one of the built-in `type` values
|
|
953
|
+
* (`text`, `number`, `money`, `date`, `badge`, `link`) for automatic
|
|
954
|
+
* rendering, or pass `render` to draw the cell yourself.
|
|
955
|
+
*
|
|
956
|
+
* `Column` is a discriminated union on `type`, so wrong-shape `typeOptions`
|
|
957
|
+
* are a compile error rather than silently ignored at runtime.
|
|
958
|
+
*/
|
|
959
|
+
export declare type Column<TRow extends Record<string, unknown>> = ColumnBase<TRow> & ColumnTypeBranch<TRow>;
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* Supported area values for Layout.Column
|
|
963
|
+
*/
|
|
964
|
+
declare type ColumnArea = "left" | "main" | "right";
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* Fields shared by every `Column` regardless of `type`. Prefer `Column<TRow>`
|
|
968
|
+
* in most cases; this is exported so consumers can compose more specific
|
|
969
|
+
* column types (e.g. `type MoneyColumn<TRow> = ColumnBase<TRow> & { type: "money"; … }`).
|
|
920
970
|
*/
|
|
921
|
-
|
|
971
|
+
declare interface ColumnBase<TRow extends Record<string, unknown>> {
|
|
922
972
|
/** Column header text. Omit for action or icon-only columns. */
|
|
923
973
|
label?: string;
|
|
924
|
-
/**
|
|
925
|
-
|
|
974
|
+
/**
|
|
975
|
+
* Renders the cell content for a given row. Optional — when omitted, the
|
|
976
|
+
* built-in renderer for `type` takes over (or an `—` placeholder if no
|
|
977
|
+
* `type` is set). Always wins over the built-in renderer when both are
|
|
978
|
+
* present.
|
|
979
|
+
*
|
|
980
|
+
* Kept on the base (not per-branch) so callback contextual typing works
|
|
981
|
+
* across spread-then-override patterns like `column({ ...inferred, render })`.
|
|
982
|
+
*/
|
|
983
|
+
render?: (row: TRow) => ReactNode;
|
|
926
984
|
/**
|
|
927
985
|
* Stable identifier used for column visibility toggling and as the React key.
|
|
928
986
|
* Falls back to `label` when omitted. Set this explicitly when `label` is
|
|
@@ -932,10 +990,24 @@ export declare interface Column<TRow extends Record<string, unknown>> {
|
|
|
932
990
|
/** Fixed column width in pixels. When omitted the column sizes naturally. */
|
|
933
991
|
width?: number;
|
|
934
992
|
/**
|
|
935
|
-
*
|
|
936
|
-
*
|
|
993
|
+
* Horizontal alignment for the header and body cell. When omitted, numeric
|
|
994
|
+
* `type` values (`"number"` and `"money"`) default to `"right"` so digits
|
|
995
|
+
* align along their decimal place; everything else defaults to `"left"`.
|
|
996
|
+
* Pass `"left"` explicitly to opt a numeric column out.
|
|
937
997
|
*/
|
|
938
|
-
|
|
998
|
+
align?: "left" | "right";
|
|
999
|
+
/**
|
|
1000
|
+
* When `true`, the cell content is truncated with an ellipsis when it
|
|
1001
|
+
* overflows. A `<Tooltip>` is wired up automatically when `accessor`
|
|
1002
|
+
* returns a string or number, so hovering the cell reveals the full
|
|
1003
|
+
* value.
|
|
1004
|
+
*
|
|
1005
|
+
* Truncation requires the cell to be shrinkable — the body cell sets
|
|
1006
|
+
* `max-w-0`, which collapses unless another column anchors the row width.
|
|
1007
|
+
* Pair with `width` on neighboring columns, or rely on the natural width
|
|
1008
|
+
* of fixed-size columns (selection / row actions).
|
|
1009
|
+
*/
|
|
1010
|
+
truncate?: boolean;
|
|
939
1011
|
/**
|
|
940
1012
|
* Sort configuration. When set, the column header becomes clickable and
|
|
941
1013
|
* cycles through `Asc → Desc → undefined`.
|
|
@@ -950,11 +1022,6 @@ export declare interface Column<TRow extends Record<string, unknown>> {
|
|
|
950
1022
|
filter?: FilterConfig;
|
|
951
1023
|
}
|
|
952
1024
|
|
|
953
|
-
/**
|
|
954
|
-
* Supported area values for Layout.Column
|
|
955
|
-
*/
|
|
956
|
-
declare type ColumnArea = "left" | "main" | "right";
|
|
957
|
-
|
|
958
1025
|
/**
|
|
959
1026
|
* Supported column count options
|
|
960
1027
|
*/
|
|
@@ -1011,7 +1078,7 @@ declare interface ColumnHelper<TRow extends Record<string, unknown>> {
|
|
|
1011
1078
|
* @param options - Optional per-column overrides (label, width, sort, filter).
|
|
1012
1079
|
* @throws {Error} If `dataKey` is not found in the metadata passed to `inferColumns`.
|
|
1013
1080
|
*/
|
|
1014
|
-
declare type ColumnInferFn<TRow extends Record<string, unknown>, TTable extends TableMetadata = TableMetadata> = (dataKey: TableFieldName<TTable>, options?: MetadataFieldOptions) =>
|
|
1081
|
+
declare type ColumnInferFn<TRow extends Record<string, unknown>, TTable extends TableMetadata = TableMetadata> = (dataKey: TableFieldName<TTable>, options?: MetadataFieldOptions) => InferredColumn<TRow>;
|
|
1015
1082
|
|
|
1016
1083
|
/**
|
|
1017
1084
|
* Props for individual Layout.Column component
|
|
@@ -1038,32 +1105,56 @@ declare interface ColumnProps {
|
|
|
1038
1105
|
*/
|
|
1039
1106
|
declare type Columns = 3 | 4;
|
|
1040
1107
|
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1108
|
+
/**
|
|
1109
|
+
* Discriminated branches keyed off `type`. Each branch narrows `typeOptions`
|
|
1110
|
+
* and `accessor`'s return type to the values its renderer can display.
|
|
1111
|
+
*
|
|
1112
|
+
* - `type: "link"` requires `typeOptions.href`.
|
|
1113
|
+
* - `type: "text"` rejects `typeOptions` entirely.
|
|
1114
|
+
*
|
|
1115
|
+
* `accessor` lives on each branch (rather than `ColumnBase`) so the built-in
|
|
1116
|
+
* renderers can constrain what a column produces. Returning an array or a
|
|
1117
|
+
* non-Date object is a compile error on a typed branch, instead of silently
|
|
1118
|
+
* rendering `[object Object]`. Untyped columns (`type?: undefined`) still
|
|
1119
|
+
* accept `unknown` — they're rendered by an explicit `render`. `null` and
|
|
1120
|
+
* `undefined` are always allowed: every built-in renderer maps them to the
|
|
1121
|
+
* `—` placeholder.
|
|
1122
|
+
*
|
|
1123
|
+
* Prefer `Column<TRow>` in most cases; this is exported so consumers can
|
|
1124
|
+
* compose more specific column types.
|
|
1125
|
+
*/
|
|
1126
|
+
declare type ColumnTypeBranch<TRow extends Record<string, unknown>> = {
|
|
1127
|
+
type?: undefined;
|
|
1128
|
+
typeOptions?: never;
|
|
1129
|
+
accessor?: (row: TRow) => unknown;
|
|
1130
|
+
} | {
|
|
1131
|
+
type: "text";
|
|
1132
|
+
typeOptions?: never;
|
|
1133
|
+
accessor?: (row: TRow) => string | number | boolean | bigint | null | undefined;
|
|
1134
|
+
} | {
|
|
1135
|
+
type: "number";
|
|
1136
|
+
typeOptions?: NumberCellOptions;
|
|
1137
|
+
accessor?: (row: TRow) => number | null | undefined;
|
|
1138
|
+
} | {
|
|
1139
|
+
type: "money";
|
|
1140
|
+
typeOptions?: MoneyCellOptions<TRow>;
|
|
1141
|
+
accessor?: (row: TRow) => number | null | undefined;
|
|
1142
|
+
} | {
|
|
1143
|
+
type: "date";
|
|
1144
|
+
typeOptions?: DateCellOptions;
|
|
1145
|
+
accessor?: (row: TRow) => Date | string | number | null | undefined;
|
|
1146
|
+
} | {
|
|
1147
|
+
type: "badge";
|
|
1148
|
+
typeOptions?: BadgeCellOptions;
|
|
1149
|
+
accessor?: (row: TRow) => string | number | boolean | null | undefined;
|
|
1150
|
+
} | {
|
|
1151
|
+
type: "link";
|
|
1152
|
+
typeOptions: LinkCellOptions<TRow>;
|
|
1153
|
+
accessor?: (row: TRow) => string | number | boolean | null | undefined;
|
|
1065
1154
|
};
|
|
1066
1155
|
|
|
1156
|
+
export declare const Combobox: ComboboxComponent;
|
|
1157
|
+
|
|
1067
1158
|
declare type ComboboxAsyncCreatableProps<T extends object> = (ComboboxAsyncOwnProps<T> & CreatableProps<T> & Omit<ComboboxPropsSingle<T>, "mapItem">) | (ComboboxAsyncOwnProps<T> & CreatableProps<T> & Omit<ComboboxPropsMultiple<T>, "mapItem">);
|
|
1068
1159
|
|
|
1069
1160
|
/** Fetcher type for `Combobox.Async`. */
|
|
@@ -1112,6 +1203,23 @@ declare namespace ComboboxCollection {
|
|
|
1112
1203
|
var displayName: string;
|
|
1113
1204
|
}
|
|
1114
1205
|
|
|
1206
|
+
/**
|
|
1207
|
+
* Keep the exported static API type explicit instead of relying on
|
|
1208
|
+
* `Object.assign(...)` inference.
|
|
1209
|
+
*
|
|
1210
|
+
* Why:
|
|
1211
|
+
* - makes declaration rollup more stable (avoids TS2742/non-portable inferred names)
|
|
1212
|
+
* - keeps public `.d.ts` output resilient to resolver/config changes
|
|
1213
|
+
* - preserves consumer-side callback inference for `Combobox` and `Combobox.Async`
|
|
1214
|
+
*/
|
|
1215
|
+
declare type ComboboxComponent = typeof ComboboxStandalone & {
|
|
1216
|
+
Async: typeof ComboboxAsyncStandalone;
|
|
1217
|
+
Parts: typeof ComboboxParts;
|
|
1218
|
+
useAsync: typeof useAsync_2;
|
|
1219
|
+
useFilter: typeof useFilter;
|
|
1220
|
+
useCreatable: typeof useCreatable;
|
|
1221
|
+
};
|
|
1222
|
+
|
|
1115
1223
|
declare function ComboboxContent({ className, container, ...props }: React_2.ComponentProps<typeof Combobox_2.Popup> & {
|
|
1116
1224
|
container?: React_2.ComponentProps<typeof Combobox_2.Portal>["container"];
|
|
1117
1225
|
}): JSX.Element;
|
|
@@ -1162,6 +1270,28 @@ declare namespace ComboboxList {
|
|
|
1162
1270
|
var displayName: string;
|
|
1163
1271
|
}
|
|
1164
1272
|
|
|
1273
|
+
declare const ComboboxParts: {
|
|
1274
|
+
Root: typeof ComboboxRoot;
|
|
1275
|
+
InputGroup: typeof ComboboxInputGroup;
|
|
1276
|
+
Input: typeof ComboboxInput;
|
|
1277
|
+
Trigger: typeof ComboboxTrigger;
|
|
1278
|
+
Content: typeof ComboboxContent;
|
|
1279
|
+
List: typeof ComboboxList;
|
|
1280
|
+
Item: typeof ComboboxItem;
|
|
1281
|
+
Empty: typeof ComboboxEmpty;
|
|
1282
|
+
Group: typeof ComboboxGroup;
|
|
1283
|
+
GroupLabel: typeof ComboboxGroupLabel;
|
|
1284
|
+
Clear: typeof ComboboxClear;
|
|
1285
|
+
Chips: typeof ComboboxChips;
|
|
1286
|
+
Chip: typeof ComboboxChip;
|
|
1287
|
+
ChipRemove: typeof ComboboxChipRemove;
|
|
1288
|
+
Value: typeof ComboboxValue;
|
|
1289
|
+
Collection: typeof ComboboxCollection;
|
|
1290
|
+
Status: typeof ComboboxStatus;
|
|
1291
|
+
};
|
|
1292
|
+
|
|
1293
|
+
declare type ComboboxParts = typeof ComboboxParts;
|
|
1294
|
+
|
|
1165
1295
|
declare interface ComboboxPropsBase<T> {
|
|
1166
1296
|
/** Placeholder text for the input */
|
|
1167
1297
|
placeholder?: string;
|
|
@@ -1821,6 +1951,17 @@ declare namespace DataTableToolbar {
|
|
|
1821
1951
|
var displayName: string;
|
|
1822
1952
|
}
|
|
1823
1953
|
|
|
1954
|
+
/** Options for `type: "date"` cells. */
|
|
1955
|
+
declare interface DateCellOptions {
|
|
1956
|
+
/**
|
|
1957
|
+
* Format style. `"short"` → `Apr 9, 2026`; `"long"` → `April 9, 2026`;
|
|
1958
|
+
* `"datetime"` → `Apr 9, 2026, 3:45 PM`. Default: `"short"`.
|
|
1959
|
+
*/
|
|
1960
|
+
dateFormat?: "short" | "long" | "datetime";
|
|
1961
|
+
/** BCP 47 locale tag. Defaults to the runtime locale. */
|
|
1962
|
+
locale?: string;
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1824
1965
|
/**
|
|
1825
1966
|
* Date format options
|
|
1826
1967
|
*/
|
|
@@ -2828,6 +2969,16 @@ export declare type InferCsvRow<T extends CsvSchema> = {
|
|
|
2828
2969
|
} ? O : unknown;
|
|
2829
2970
|
};
|
|
2830
2971
|
|
|
2972
|
+
/**
|
|
2973
|
+
* The return type of an infer function — contains the base column fields
|
|
2974
|
+
* without the discriminated `type`/`typeOptions`/`accessor` branches.
|
|
2975
|
+
*
|
|
2976
|
+
* This makes spread-then-override patterns like
|
|
2977
|
+
* `column({ ...infer("stock"), type: "number" })` type-safe without
|
|
2978
|
+
* requiring an explicit accessor cast.
|
|
2979
|
+
*/
|
|
2980
|
+
declare type InferredColumn<TRow extends Record<string, unknown>> = ColumnBase<TRow>;
|
|
2981
|
+
|
|
2831
2982
|
/**
|
|
2832
2983
|
* A styled input component.
|
|
2833
2984
|
*
|
|
@@ -3009,6 +3160,15 @@ declare namespace Legend {
|
|
|
3009
3160
|
|
|
3010
3161
|
export { Link }
|
|
3011
3162
|
|
|
3163
|
+
/** Options for `type: "link"` cells. `href` is required. */
|
|
3164
|
+
declare interface LinkCellOptions<TRow extends Record<string, unknown>> {
|
|
3165
|
+
/**
|
|
3166
|
+
* Extracts the link target. Returning `null` / `undefined` renders the cell
|
|
3167
|
+
* value as plain text instead of a link.
|
|
3168
|
+
*/
|
|
3169
|
+
href: (row: TRow) => string | null | undefined;
|
|
3170
|
+
}
|
|
3171
|
+
|
|
3012
3172
|
/** A link item in the menu that can be used to navigate to a different page. */
|
|
3013
3173
|
declare function LinkItem({ className, ...props }: React_2.ComponentProps<typeof Menu_2.LinkItem>): JSX.Element;
|
|
3014
3174
|
|
|
@@ -3148,6 +3308,23 @@ declare type Module = Omit<CommonPageResource, "meta"> & {
|
|
|
3148
3308
|
|
|
3149
3309
|
declare type Modules = Array<Module>;
|
|
3150
3310
|
|
|
3311
|
+
/** Options for `type: "money"` cells. */
|
|
3312
|
+
declare interface MoneyCellOptions<TRow extends Record<string, unknown>> {
|
|
3313
|
+
/**
|
|
3314
|
+
* ISO 4217 currency code. Pass a string for a static currency or a function
|
|
3315
|
+
* to read it from the row. Default: `"USD"`.
|
|
3316
|
+
*/
|
|
3317
|
+
currency?: string | ((row: TRow) => string);
|
|
3318
|
+
/**
|
|
3319
|
+
* Maximum decimals. Raises the cap above the currency default while keeping
|
|
3320
|
+
* the minimum at the currency default (e.g. USD stays at ≥2, but a price
|
|
3321
|
+
* column can show up to 4).
|
|
3322
|
+
*/
|
|
3323
|
+
maxDecimals?: number;
|
|
3324
|
+
/** BCP 47 locale tag. Defaults to the runtime locale. */
|
|
3325
|
+
locale?: string;
|
|
3326
|
+
}
|
|
3327
|
+
|
|
3151
3328
|
/**
|
|
3152
3329
|
* Extract the node type from a cursor connection result.
|
|
3153
3330
|
*/
|
|
@@ -3157,6 +3334,16 @@ export declare type NodeType<T extends {
|
|
|
3157
3334
|
}[];
|
|
3158
3335
|
} | null | undefined> = NonNullable<T>["edges"][number]["node"];
|
|
3159
3336
|
|
|
3337
|
+
/** Options for `type: "number"` cells. */
|
|
3338
|
+
declare interface NumberCellOptions {
|
|
3339
|
+
/** Minimum decimal places. Default: `0`. */
|
|
3340
|
+
minDecimals?: number;
|
|
3341
|
+
/** Maximum decimal places. Default: `minDecimals` (or `0`). */
|
|
3342
|
+
maxDecimals?: number;
|
|
3343
|
+
/** BCP 47 locale tag. Defaults to the runtime locale. */
|
|
3344
|
+
locale?: string;
|
|
3345
|
+
}
|
|
3346
|
+
|
|
3160
3347
|
/**
|
|
3161
3348
|
* Resolve the operator union for a specific field within a filter type.
|
|
3162
3349
|
*/
|
|
@@ -3634,34 +3821,7 @@ export declare type SearchSource = {
|
|
|
3634
3821
|
}) => Promise<CommandPaletteSearchResult[]>;
|
|
3635
3822
|
};
|
|
3636
3823
|
|
|
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
|
-
};
|
|
3824
|
+
export declare const Select: SelectComponent;
|
|
3665
3825
|
|
|
3666
3826
|
/**
|
|
3667
3827
|
* Fetcher type for `Select.Async`.
|
|
@@ -3711,6 +3871,21 @@ declare type SelectAsyncProps<T> = (SelectAsyncOwnProps<T> & SelectPropsSingle<T
|
|
|
3711
3871
|
|
|
3712
3872
|
declare function SelectAsyncStandalone<T>(props: SelectAsyncProps<T>): JSX.Element;
|
|
3713
3873
|
|
|
3874
|
+
/**
|
|
3875
|
+
* Keep the exported static API type explicit instead of relying on
|
|
3876
|
+
* `Object.assign(...)` inference.
|
|
3877
|
+
*
|
|
3878
|
+
* Why:
|
|
3879
|
+
* - makes declaration rollup more stable (avoids TS2742/non-portable inferred names)
|
|
3880
|
+
* - keeps public `.d.ts` output resilient to resolver/config changes
|
|
3881
|
+
* - preserves consumer-side callback inference for `Select` and `Select.Async`
|
|
3882
|
+
*/
|
|
3883
|
+
declare type SelectComponent = typeof SelectStandalone & {
|
|
3884
|
+
Async: typeof SelectAsyncStandalone;
|
|
3885
|
+
Parts: typeof SelectParts;
|
|
3886
|
+
useAsync: typeof useAsync;
|
|
3887
|
+
};
|
|
3888
|
+
|
|
3714
3889
|
declare function SelectContent({ className, container, alignItemWithTrigger, ...props }: React_2.ComponentProps<typeof Select_2.Popup> & {
|
|
3715
3890
|
container?: React_2.ComponentProps<typeof Select_2.Portal>["container"];
|
|
3716
3891
|
alignItemWithTrigger?: React_2.ComponentProps<typeof Select_2.Positioner>["alignItemWithTrigger"];
|
|
@@ -3746,6 +3921,19 @@ export declare interface SelectOption {
|
|
|
3746
3921
|
label: string;
|
|
3747
3922
|
}
|
|
3748
3923
|
|
|
3924
|
+
declare const SelectParts: {
|
|
3925
|
+
Root: typeof SelectRoot;
|
|
3926
|
+
Trigger: typeof SelectTrigger;
|
|
3927
|
+
Value: typeof SelectValue;
|
|
3928
|
+
Content: typeof SelectContent;
|
|
3929
|
+
Item: typeof SelectItem;
|
|
3930
|
+
Group: typeof SelectGroup;
|
|
3931
|
+
GroupLabel: typeof SelectGroupLabel;
|
|
3932
|
+
Separator: typeof SelectSeparator;
|
|
3933
|
+
};
|
|
3934
|
+
|
|
3935
|
+
declare type SelectParts = typeof SelectParts;
|
|
3936
|
+
|
|
3749
3937
|
declare interface SelectPropsBase<T> {
|
|
3750
3938
|
/** Placeholder text shown when no value is selected */
|
|
3751
3939
|
placeholder?: string;
|
|
@@ -4150,6 +4338,20 @@ export declare type SidebarLayoutProps = {
|
|
|
4150
4338
|
* ```
|
|
4151
4339
|
*/
|
|
4152
4340
|
sidebar?: React.ReactNode;
|
|
4341
|
+
/**
|
|
4342
|
+
* Whether the sidebar is open by default on desktop.
|
|
4343
|
+
*
|
|
4344
|
+
* @default true
|
|
4345
|
+
*/
|
|
4346
|
+
defaultOpen?: boolean;
|
|
4347
|
+
/**
|
|
4348
|
+
* Whether the sidebar can be collapsed.
|
|
4349
|
+
* When set to `false`, the sidebar is always visible and cannot be toggled.
|
|
4350
|
+
* `defaultOpen` is ignored when this is `false`.
|
|
4351
|
+
*
|
|
4352
|
+
* @default true
|
|
4353
|
+
*/
|
|
4354
|
+
collapsible?: boolean;
|
|
4153
4355
|
};
|
|
4154
4356
|
|
|
4155
4357
|
/**
|
|
@@ -5067,6 +5269,48 @@ export declare interface UseDataTableReturn<TRow extends Record<string, unknown>
|
|
|
5067
5269
|
isIndeterminate: boolean;
|
|
5068
5270
|
}
|
|
5069
5271
|
|
|
5272
|
+
/**
|
|
5273
|
+
* Hook for robust string matching using `Intl.Collator`.
|
|
5274
|
+
*
|
|
5275
|
+
* Returns an object with `contains`, `startsWith`, and `endsWith` methods
|
|
5276
|
+
* that can be passed to the `filter` prop of `<Combobox.Parts.Root>`
|
|
5277
|
+
* to customize how items are filtered against the input value.
|
|
5278
|
+
*
|
|
5279
|
+
* Accepts `Intl.CollatorOptions` (e.g. `sensitivity`, `usage`) plus
|
|
5280
|
+
* an optional `locale` for locale-aware matching.
|
|
5281
|
+
*
|
|
5282
|
+
* @example
|
|
5283
|
+
* ```tsx
|
|
5284
|
+
* const filter = Combobox.useFilter({ sensitivity: "base" });
|
|
5285
|
+
*
|
|
5286
|
+
* <Combobox.Parts.Root filter={filter.contains}>
|
|
5287
|
+
* ...
|
|
5288
|
+
* </Combobox.Parts.Root>
|
|
5289
|
+
* ```
|
|
5290
|
+
*/
|
|
5291
|
+
declare const useFilter: typeof Combobox_2.useFilter;
|
|
5292
|
+
|
|
5293
|
+
/**
|
|
5294
|
+
* Hook for robust string matching using `Intl.Collator`.
|
|
5295
|
+
*
|
|
5296
|
+
* Returns an object with `contains`, `startsWith`, and `endsWith` methods
|
|
5297
|
+
* that can be passed to the `filter` prop of `<Autocomplete.Parts.Root>`
|
|
5298
|
+
* to customize how suggestions are filtered against the input value.
|
|
5299
|
+
*
|
|
5300
|
+
* Accepts `Intl.CollatorOptions` (e.g. `sensitivity`, `usage`) plus
|
|
5301
|
+
* an optional `locale` for locale-aware matching.
|
|
5302
|
+
*
|
|
5303
|
+
* @example
|
|
5304
|
+
* ```tsx
|
|
5305
|
+
* const filter = Autocomplete.useFilter({ sensitivity: "base" });
|
|
5306
|
+
*
|
|
5307
|
+
* <Autocomplete.Parts.Root filter={filter.contains}>
|
|
5308
|
+
* ...
|
|
5309
|
+
* </Autocomplete.Parts.Root>
|
|
5310
|
+
* ```
|
|
5311
|
+
*/
|
|
5312
|
+
declare const useFilter_2: getFilter;
|
|
5313
|
+
|
|
5070
5314
|
export { useLocation }
|
|
5071
5315
|
|
|
5072
5316
|
export { useNavigate }
|