@tailor-platform/app-shell 0.31.1 → 0.33.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.
@@ -3,12 +3,16 @@ import { Autocomplete as Autocomplete_2 } from '@base-ui/react/autocomplete';
3
3
  import { AutocompleteFilter } from '@base-ui/react';
4
4
  import { AutocompleteFilterOptions } from '@base-ui/react';
5
5
  import { AutocompleteRootProps } from '@base-ui/react/autocomplete';
6
+ import { Avatar as Avatar_2 } from '@base-ui/react/avatar';
6
7
  import { ClassProp } from 'class-variance-authority/types';
7
8
  import { Combobox as Combobox_2 } from '@base-ui/react/combobox';
8
9
  import { CSSProperties } from 'react';
9
10
  import { Dialog as Dialog_2 } from '@base-ui/react/dialog';
10
11
  import { Drawer } from '@base-ui/react/drawer';
11
12
  import { FC } from 'react';
13
+ import { Field as Field_2 } from '@base-ui/react/field';
14
+ import { Fieldset as Fieldset_2 } from '@base-ui/react/fieldset';
15
+ import { Form as Form_2 } from '@base-ui/react/form';
12
16
  import { JSX } from 'react/jsx-runtime';
13
17
  import { Link } from 'react-router';
14
18
  import { LoaderFunctionArgs } from 'react-router';
@@ -82,9 +86,100 @@ export declare interface ActionPanelProps {
82
86
  className?: string;
83
87
  }
84
88
 
89
+ export declare const ActivityCard: typeof ActivityCardStandalone & {
90
+ Root: typeof Root;
91
+ Items: typeof Items;
92
+ Item: typeof Item;
93
+ };
94
+
95
+ /**
96
+ * Minimum shape required for items passed to ActivityCard.
97
+ * Consumers can extend this with any additional fields.
98
+ */
99
+ export declare interface ActivityCardBaseItem {
100
+ id: string;
101
+ timestamp: Date | string;
102
+ }
103
+
104
+ /**
105
+ * A single activity entry used by the standalone ActivityCard component.
106
+ */
107
+ export declare interface ActivityCardItem extends ActivityCardBaseItem {
108
+ /**
109
+ * The subject of the activity. Optional — omit for system events with no specific actor
110
+ * (e.g. "Status automatically changed to EXPIRED").
111
+ */
112
+ actor?: {
113
+ /** Display name of the actor (user, bot, service account, etc.). */
114
+ name: string;
115
+ /** Avatar image URL. Falls back to initials derived from `name`. */
116
+ avatarUrl?: string;
117
+ };
118
+ description: string;
119
+ }
120
+
121
+ /**
122
+ * Props for ActivityCard.Item — a single row in the timeline.
123
+ */
124
+ export declare interface ActivityCardItemProps {
125
+ /** Element rendered in the left column (e.g. Avatar, Icon). The timeline connector line
126
+ * passes through the center of this element. Omit for rows without a connector. */
127
+ indicator?: React_2.ReactNode;
128
+ children: React_2.ReactNode;
129
+ className?: string;
130
+ }
131
+
132
+ /**
133
+ * Props for ActivityCard.Items — iterates over items and renders each via children render function.
134
+ */
135
+ export declare interface ActivityCardItemsProps<T extends ActivityCardBaseItem> {
136
+ children: (item: T) => React_2.ReactNode;
137
+ }
138
+
139
+ /**
140
+ * Props for the standalone (pre-assembled) ActivityCard component.
141
+ */
142
+ export declare interface ActivityCardProps {
143
+ /** List of items (newest first). */
144
+ items: ActivityCardItem[];
145
+ /** Card title, e.g. "Updates". */
146
+ title?: string;
147
+ /** Max number of activities shown in the card before overflow. Default 6. */
148
+ maxVisible?: number;
149
+ /** Overflow label style: "more" = "N more activities", "count" = "+N". Default "more". */
150
+ overflowLabel?: "more" | "count";
151
+ /** Optional grouping by day (TODAY / YESTERDAY / date). */
152
+ groupBy?: "none" | "day";
153
+ className?: string;
154
+ }
155
+
156
+ /**
157
+ * Props for ActivityCard.Root — the outermost card container.
158
+ */
159
+ export declare interface ActivityCardRootProps<T extends ActivityCardBaseItem> {
160
+ /** List of items (newest first). */
161
+ items: T[];
162
+ /** Card title, e.g. "Updates". */
163
+ title?: string;
164
+ /** Max number of activities shown in the card before overflow. Default 6. */
165
+ maxVisible?: number;
166
+ /** Overflow label style: "more" = "N more activities", "count" = "+N". Default "more". */
167
+ overflowLabel?: "more" | "count";
168
+ /** Optional grouping by day (TODAY / YESTERDAY / date). */
169
+ groupBy?: "none" | "day";
170
+ className?: string;
171
+ children: React_2.ReactNode;
172
+ }
173
+
174
+ /**
175
+ * Pre-assembled ActivityCard that renders activities with avatars, descriptions,
176
+ * and timestamps. For custom item rendering, use ActivityCard.Root / .Items / .Item.
177
+ */
178
+ declare function ActivityCardStandalone({ items, title, maxVisible, overflowLabel, groupBy, className, }: ActivityCardProps): JSX.Element;
179
+
85
180
  export declare const AppShell: {
86
181
  (props: AppShellProps): JSX.Element | null;
87
- /* Excluded from this release type: WithPages */
182
+ WithPages(pages: PageEntry[]): FC<AppShellProps>;
88
183
  };
89
184
 
90
185
  /**
@@ -134,6 +229,11 @@ export declare type AppShellPageProps = {
134
229
  * Icon displayed alongside the title in navigation.
135
230
  */
136
231
  icon?: ReactNode;
232
+ /**
233
+ * Custom breadcrumb segment title for this page.
234
+ * Can be a static string or a function that receives the URL segment.
235
+ */
236
+ breadcrumbTitle?: string | ((segment: string) => string);
137
237
  };
138
238
  /**
139
239
  * Guards to control access to this page.
@@ -224,14 +324,14 @@ export declare interface AppShellRegister {
224
324
  * ```tsx
225
325
  * // Plain function (default 300ms debounce)
226
326
  * fetcher: async (query, { signal }) => {
227
- * const res = await fetch(`/api/search?q=${query}`, { signal });
327
+ * const res = await fetch(`/api/search?q=${query ?? ""}`, { signal });
228
328
  * return res.json();
229
329
  * }
230
330
  *
231
331
  * // Object with custom debounce
232
332
  * fetcher: {
233
333
  * fn: async (query, { signal }) => {
234
- * const res = await fetch(`/api/search?q=${query}`, { signal });
334
+ * const res = await fetch(`/api/search?q=${query ?? ""}`, { signal });
235
335
  * return res.json();
236
336
  * },
237
337
  * debounceMs: 500,
@@ -254,8 +354,13 @@ declare type AsyncFetcher<T> = AsyncFetcherFn<T> | {
254
354
  * If the fetcher throws, the component silently falls back to an empty
255
355
  * item list — there is no `onError` callback. Catch errors in the
256
356
  * fetcher to show toasts, log to error tracking, or return fallback data.
357
+ *
358
+ * The `query` parameter is `null` when the user has not typed anything
359
+ * (e.g. the dropdown was just opened). Return initial / default items
360
+ * for `null`, or return an empty array to show nothing until the user
361
+ * starts typing.
257
362
  */
258
- declare type AsyncFetcherFn<T> = (query: string, options: {
363
+ declare type AsyncFetcherFn<T> = (query: string | null, options: {
259
364
  signal: AbortSignal;
260
365
  }) => Promise<T[]>;
261
366
 
@@ -498,6 +603,13 @@ declare namespace AutocompleteTrigger {
498
603
  var displayName: string;
499
604
  }
500
605
 
606
+ /**
607
+ * Return type of `Autocomplete.useAsync`.
608
+ *
609
+ * Unlike `Combobox.useAsync`, this does **not** include `onOpenChange`.
610
+ * Autocomplete is driven by focus and typing — not by an explicit open/close
611
+ * toggle — so `onOpenChange` is intentionally omitted.
612
+ */
501
613
  declare interface AutocompleteUseAsyncReturn<T> {
502
614
  /** Fetched items — pass to the Root `items` prop */
503
615
  items: T[];
@@ -517,6 +629,18 @@ declare namespace AutocompleteValue {
517
629
  var displayName: string;
518
630
  }
519
631
 
632
+ export declare const Avatar: {
633
+ Root: typeof Root_2;
634
+ Image: typeof Image_2;
635
+ Fallback: typeof Fallback;
636
+ };
637
+
638
+ export declare type AvatarProps = React_2.ComponentProps<typeof Avatar_2.Root> & VariantProps<typeof avatarVariants>;
639
+
640
+ export declare const avatarVariants: (props?: ({
641
+ size?: "default" | "sm" | "lg" | null | undefined;
642
+ } & ClassProp) | undefined) => string;
643
+
520
644
  export declare function Badge({ className, variant, children, ...props }: BadgeProps): JSX.Element;
521
645
 
522
646
  export declare interface BadgeProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
@@ -558,7 +682,7 @@ export declare type ButtonProps = React_2.ComponentProps<"button"> & VariantProp
558
682
 
559
683
  export declare const buttonVariants: (props?: ({
560
684
  variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
561
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
685
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | null | undefined;
562
686
  } & ClassProp) | undefined) => string;
563
687
 
564
688
  /** A table caption element. */
@@ -568,6 +692,12 @@ declare namespace Caption {
568
692
  var displayName: string;
569
693
  }
570
694
 
695
+ export declare const Card: {
696
+ Root: typeof Root_4;
697
+ Header: typeof Header_3;
698
+ Content: typeof Content;
699
+ };
700
+
571
701
  /** A table data cell (`<td>`). */
572
702
  declare function Cell({ className, ...props }: React_2.ComponentProps<"td">): JSX.Element;
573
703
 
@@ -799,7 +929,7 @@ declare namespace ComboboxRoot {
799
929
  var displayName: string;
800
930
  }
801
931
 
802
- declare type ComboboxRootProps<Value, Multiple extends boolean | undefined = false> = Pick<React_2.ComponentProps<typeof Combobox_2.Root<Value, Multiple>>, "items" | "value" | "defaultValue" | "onValueChange" | "multiple" | "filter" | "inputValue" | "onInputValueChange" | "itemToStringLabel" | "itemToStringValue" | "disabled" | "children">;
932
+ declare type ComboboxRootProps<Value, Multiple extends boolean | undefined = false> = Pick<React_2.ComponentProps<typeof Combobox_2.Root<Value, Multiple>>, "items" | "value" | "defaultValue" | "onValueChange" | "multiple" | "filter" | "inputValue" | "onInputValueChange" | "onOpenChange" | "itemToStringLabel" | "itemToStringValue" | "disabled" | "children">;
803
933
 
804
934
  declare function ComboboxStandalone<T extends object>(props: ComboboxStaticCreatableProps<T>): React_2.JSX.Element;
805
935
 
@@ -863,6 +993,7 @@ declare type CommonPageResource = {
863
993
  meta: {
864
994
  title: LocalizedString;
865
995
  icon?: ReactNode;
996
+ breadcrumbTitle?: string | ((segment: string) => string);
866
997
  };
867
998
  };
868
999
 
@@ -894,31 +1025,37 @@ declare type CommonProps = {
894
1025
  guards?: Guard[];
895
1026
  };
896
1027
 
897
- /** The main dialog panel that contains the dialog content. Automatically includes a close button and overlay. */
898
- declare function Content({ className, children, ...props }: React_2.ComponentProps<typeof Dialog_2.Popup>): JSX.Element;
1028
+ declare function Content({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
899
1029
 
900
1030
  declare namespace Content {
901
1031
  var displayName: string;
902
1032
  }
903
1033
 
1034
+ /** The main dialog panel that contains the dialog content. Automatically includes a close button and overlay. */
1035
+ declare function Content_2({ className, children, ...props }: React_2.ComponentProps<typeof Dialog_2.Popup>): JSX.Element;
1036
+
1037
+ declare namespace Content_2 {
1038
+ var displayName: string;
1039
+ }
1040
+
904
1041
  /** The menu popup that displays menu items. */
905
- declare function Content_2({ className, position, children, ...restProps }: React_2.ComponentProps<typeof Menu_2.Popup> & {
1042
+ declare function Content_3({ className, position, children, ...restProps }: React_2.ComponentProps<typeof Menu_2.Popup> & {
906
1043
  position?: PositionProps;
907
1044
  }): JSX.Element;
908
1045
 
909
- declare namespace Content_2 {
1046
+ declare namespace Content_3 {
910
1047
  var displayName: string;
911
1048
  }
912
1049
 
913
1050
  /** The main sheet panel. The `side` is inherited from `Sheet.Root` via context. */
914
- declare function Content_3({ className, children, ...props }: React_2.ComponentProps<typeof Drawer.Popup>): JSX.Element;
1051
+ declare function Content_4({ className, children, ...props }: React_2.ComponentProps<typeof Drawer.Popup>): JSX.Element;
915
1052
 
916
- declare namespace Content_3 {
1053
+ declare namespace Content_4 {
917
1054
  var displayName: string;
918
1055
  }
919
1056
 
920
1057
  /** The tooltip popup that displays additional information. */
921
- declare function Content_4({ className, position, side: _side, align: _align, sideOffset: _sideOffset, children, ...restProps }: React_2.ComponentProps<typeof Tooltip_2.Popup> & {
1058
+ declare function Content_5({ className, position, side: _side, align: _align, sideOffset: _sideOffset, children, ...restProps }: React_2.ComponentProps<typeof Tooltip_2.Popup> & {
922
1059
  position?: PositionProps;
923
1060
  /** @deprecated Use `position={{ side }}` instead. */
924
1061
  side?: PositionProps["side"];
@@ -928,7 +1065,7 @@ declare function Content_4({ className, position, side: _side, align: _align, si
928
1065
  sideOffset?: PositionProps["sideOffset"];
929
1066
  }): JSX.Element;
930
1067
 
931
- declare namespace Content_4 {
1068
+ declare namespace Content_5 {
932
1069
  var displayName: string;
933
1070
  }
934
1071
 
@@ -940,6 +1077,19 @@ export declare type ContextData = AppShellRegister extends {
940
1077
  contextData: infer T;
941
1078
  } ? T : Record<string, unknown>;
942
1079
 
1080
+ /**
1081
+ * A styled input control for the field.
1082
+ *
1083
+ * Can be omitted when using another Base UI-backed AppShell input component
1084
+ * (e.g. Select, Combobox, Autocomplete) as a sibling — those components
1085
+ * register themselves with the Field context automatically.
1086
+ */
1087
+ declare function Control({ className, ...props }: React_2.ComponentProps<typeof Field_2.Control>): JSX.Element;
1088
+
1089
+ declare namespace Control {
1090
+ var displayName: string;
1091
+ }
1092
+
943
1093
  /**
944
1094
  * Creatable opt-in props. When `onCreateItem` is provided, the combobox allows
945
1095
  * users to create new items on-the-fly.
@@ -1295,13 +1445,25 @@ declare namespace Description {
1295
1445
  var displayName: string;
1296
1446
  }
1297
1447
 
1298
- /** A description that provides additional context for the sheet. */
1299
- declare function Description_2({ className, ...props }: React_2.ComponentProps<typeof Drawer.Description>): JSX.Element;
1448
+ /**
1449
+ * A paragraph with additional information about the field.
1450
+ *
1451
+ * Its ID is registered with the Field context so that the control
1452
+ * automatically receives a matching `aria-describedby` attribute.
1453
+ */
1454
+ declare function Description_2({ className, ...props }: React_2.ComponentProps<typeof Field_2.Description>): JSX.Element;
1300
1455
 
1301
1456
  declare namespace Description_2 {
1302
1457
  var displayName: string;
1303
1458
  }
1304
1459
 
1460
+ /** A description that provides additional context for the sheet. */
1461
+ declare function Description_3({ className, ...props }: React_2.ComponentProps<typeof Drawer.Description>): JSX.Element;
1462
+
1463
+ declare namespace Description_3 {
1464
+ var displayName: string;
1465
+ }
1466
+
1305
1467
  /**
1306
1468
  * DescriptionCard - ERP document display component
1307
1469
  *
@@ -1345,12 +1507,12 @@ export declare interface DescriptionCardProps {
1345
1507
  }
1346
1508
 
1347
1509
  export declare const Dialog: {
1348
- Root: typeof Root_2;
1510
+ Root: typeof Root_5;
1349
1511
  Close: typeof Close;
1350
- Content: typeof Content;
1512
+ Content: typeof Content_2;
1351
1513
  Description: typeof Description;
1352
1514
  Footer: typeof Footer_2;
1353
- Header: typeof Header_3;
1515
+ Header: typeof Header_4;
1354
1516
  Title: typeof Title;
1355
1517
  Trigger: typeof Trigger;
1356
1518
  };
@@ -1383,6 +1545,62 @@ export declare interface EnhancedAuthClient extends AuthClient {
1383
1545
  fetch: AuthClient["fetch"];
1384
1546
  }
1385
1547
 
1548
+ /**
1549
+ * An error message displayed if the field control fails validation.
1550
+ *
1551
+ * Its ID is registered with the Field context and appended to the control's
1552
+ * `aria-describedby`. Use the `match` prop to show the message only for a
1553
+ * specific `ValidityState` key (e.g. `"valueMissing"`, `"typeMismatch"`).
1554
+ * Omitting `match` shows the browser's default validation message.
1555
+ *
1556
+ * Multiple `Field.Error` elements can be placed in the same `Field.Root` to
1557
+ * handle different validation failures independently.
1558
+ *
1559
+ * @example
1560
+ * ### Single catch-all error
1561
+ * ```tsx
1562
+ * <Field.Root name="name">
1563
+ * <Field.Label>Name</Field.Label>
1564
+ * <Field.Control required />
1565
+ * <Field.Error>This field is required.</Field.Error>
1566
+ * </Field.Root>
1567
+ * ```
1568
+ *
1569
+ * @example
1570
+ * ### Multiple errors for different validity states
1571
+ * ```tsx
1572
+ * <Field.Root name="email">
1573
+ * <Field.Label>Email</Field.Label>
1574
+ * <Field.Control type="email" required />
1575
+ * <Field.Error match="valueMissing">Email is required.</Field.Error>
1576
+ * <Field.Error match="typeMismatch">Please enter a valid email address.</Field.Error>
1577
+ * </Field.Root>
1578
+ * ```
1579
+ *
1580
+ * @example
1581
+ * ### With React Hook Form error
1582
+ * ```tsx
1583
+ * <Controller
1584
+ * name="email"
1585
+ * control={control}
1586
+ * render={({ field, fieldState }) => (
1587
+ * <Field.Root {...fieldState}>
1588
+ * <Field.Label>Email</Field.Label>
1589
+ * <Field.Control {...field} />
1590
+ * <Field.Error match={!!fieldState.error}>
1591
+ * {fieldState.error?.message}
1592
+ * </Field.Error>
1593
+ * </Field.Root>
1594
+ * )}
1595
+ * />
1596
+ * ```
1597
+ */
1598
+ declare function Error_2({ className, ...props }: React_2.ComponentProps<typeof Field_2.Error>): JSX.Element;
1599
+
1600
+ declare namespace Error_2 {
1601
+ var displayName: string;
1602
+ }
1603
+
1386
1604
  /**
1387
1605
  * Error boundary element type for route error handling.
1388
1606
  *
@@ -1448,6 +1666,22 @@ declare type ExtractBasePath<T extends string> = T extends `${infer Base}?${stri
1448
1666
  /** Extracts the item type from a possibly-grouped items array element. */
1449
1667
  declare type ExtractItem<I> = I extends ItemGroup<infer T> ? T : I;
1450
1668
 
1669
+ /** Shown when there is no image or the image failed to load. */
1670
+ declare function Fallback({ className, ...props }: React_2.ComponentProps<typeof Avatar_2.Fallback>): JSX.Element;
1671
+
1672
+ declare namespace Fallback {
1673
+ var displayName: string;
1674
+ }
1675
+
1676
+ export declare const Field: {
1677
+ Root: typeof Root_6;
1678
+ Label: typeof Label;
1679
+ Control: typeof Control;
1680
+ Description: typeof Description_2;
1681
+ Error: typeof Error_2;
1682
+ Validity: typeof Validity;
1683
+ };
1684
+
1451
1685
  /**
1452
1686
  * A field configuration - either a divider or a field definition
1453
1687
  */
@@ -1502,6 +1736,50 @@ declare interface FieldMeta {
1502
1736
  truncateLines?: number;
1503
1737
  }
1504
1738
 
1739
+ declare type FieldRootProps = Pick<React_2.ComponentProps<typeof Field_2.Root>, "name" | "disabled" | "validate" | "validationMode" | "validationDebounceTime" | "className" | "style"> & {
1740
+ children: React_2.ReactNode;
1741
+ /** Whether the field has been blurred. Maps to Base UI's `touched`. */
1742
+ isTouched?: boolean;
1743
+ /** Whether the field value differs from the default. Maps to Base UI's `dirty`. */
1744
+ isDirty?: boolean;
1745
+ /** When true, marks the field as invalid. Also set automatically when `error` is provided. */
1746
+ invalid?: boolean;
1747
+ /**
1748
+ * An error object (e.g. from React Hook Form's `fieldState.error`).
1749
+ * When provided, the field is marked invalid (`invalid={!!error}`).
1750
+ */
1751
+ error?: {
1752
+ message?: string;
1753
+ };
1754
+ };
1755
+
1756
+ export declare const Fieldset: {
1757
+ Root: typeof Root_7;
1758
+ Legend: typeof Legend;
1759
+ };
1760
+
1761
+ /**
1762
+ * Groups related fields with a shared legend for accessible form sectioning.
1763
+ *
1764
+ * @example
1765
+ * ```tsx
1766
+ * <Fieldset.Root>
1767
+ * <Fieldset.Legend>Billing details</Fieldset.Legend>
1768
+ * <Field.Root name="company">
1769
+ * <Field.Label>Company</Field.Label>
1770
+ * <Field.Control />
1771
+ * </Field.Root>
1772
+ * <Field.Root name="taxId">
1773
+ * <Field.Label>Tax ID</Field.Label>
1774
+ * <Field.Control />
1775
+ * </Field.Root>
1776
+ * </Fieldset.Root>
1777
+ * ```
1778
+ */
1779
+ declare type FieldsetRootProps = Pick<React_2.ComponentProps<typeof Fieldset_2.Root>, "disabled" | "className" | "style"> & {
1780
+ children: React_2.ReactNode;
1781
+ };
1782
+
1505
1783
  /**
1506
1784
  * Supported field types for DescriptionCard
1507
1785
  */
@@ -1528,6 +1806,96 @@ declare namespace Footer_3 {
1528
1806
  var displayName: string;
1529
1807
  }
1530
1808
 
1809
+ /**
1810
+ * A form element with consolidated error handling and validation.
1811
+ *
1812
+ * Wraps every child `Field.Root` in a shared validation / error context.
1813
+ * External errors passed via `errors` are automatically routed to matching
1814
+ * `Field.Error` components by field `name`, and cleared when the user edits
1815
+ * the corresponding field.
1816
+ *
1817
+ * ## Validation flow
1818
+ *
1819
+ * Each `Field.Root` can declare its own `validate` function and/or rely on
1820
+ * native HTML constraint attributes (`required`, `type="email"`, `pattern`,
1821
+ * etc.). The moment validation fires is controlled by `validationMode`
1822
+ * (default `"onSubmit"`).
1823
+ *
1824
+ * External errors (e.g. from an API response) can be fed back via `errors`.
1825
+ * Errors are keyed by the field's `name` attribute and rendered by any
1826
+ * `Field.Error` with a matching `match` or a catch-all `Field.Error`
1827
+ * (no `match`).
1828
+ *
1829
+ * ## Programmatic validation
1830
+ *
1831
+ * Use `actionsRef` to imperatively trigger validation from outside the
1832
+ * normal submit flow (e.g. a "Validate" button or a multi-step wizard).
1833
+ *
1834
+ * ```tsx
1835
+ * const actions = React.useRef<{ validate: () => void }>(null);
1836
+ * <Form actionsRef={actions}>…</Form>
1837
+ * <button onClick={() => actions.current?.validate()}>Check</button>
1838
+ * ```
1839
+ *
1840
+ * @example
1841
+ * ### Basic usage
1842
+ * ```tsx
1843
+ * <Form onFormSubmit={(values) => save(values)}>
1844
+ * <Field.Root name="email">
1845
+ * <Field.Label>Email</Field.Label>
1846
+ * <Field.Control type="email" required />
1847
+ * <Field.Error match="typeMismatch">Enter a valid email.</Field.Error>
1848
+ * </Field.Root>
1849
+ * <button type="submit">Save</button>
1850
+ * </Form>
1851
+ * ```
1852
+ *
1853
+ * @example
1854
+ * ### External errors (e.g. API validation)
1855
+ * ```tsx
1856
+ * const [errors, setErrors] = React.useState({});
1857
+ *
1858
+ * async function handleSubmit(values) {
1859
+ * const res = await api.save(values);
1860
+ * if (res.errors) setErrors(res.errors);
1861
+ * }
1862
+ *
1863
+ * <Form errors={errors} onFormSubmit={handleSubmit}>
1864
+ * <Field.Root name="url">
1865
+ * <Field.Label>Homepage</Field.Label>
1866
+ * <Field.Control type="url" required />
1867
+ * <Field.Error />
1868
+ * </Field.Root>
1869
+ * <button type="submit">Submit</button>
1870
+ * </Form>
1871
+ * ```
1872
+ */
1873
+ export declare function Form<FormValues extends Record<string, any> = Record<string, any>>({ className, children, ...props }: FormProps<FormValues>): JSX.Element;
1874
+
1875
+ export declare namespace Form {
1876
+ var displayName: string;
1877
+ }
1878
+
1879
+ export declare type FormProps<FormValues extends Record<string, any> = Record<string, any>> = Pick<React_2.ComponentProps<typeof Form_2>, "errors" | "actionsRef" | "validationMode" | "noValidate" | "ref" | "className" | "style"> & {
1880
+ children: React_2.ReactNode;
1881
+ /**
1882
+ * Low-level submit handler that receives the native `FormEvent`.
1883
+ * Use this when you need direct access to the event (e.g. integrating
1884
+ * with React Hook Form's `handleSubmit`). For type-safe parsed form
1885
+ * values, prefer `onFormSubmit` instead.
1886
+ */
1887
+ onSubmit?: React_2.ComponentProps<typeof Form_2>["onSubmit"];
1888
+ /**
1889
+ * Called after successful validation with the parsed form values as a
1890
+ * typed object. Prefer this for simple forms that don't use an external
1891
+ * form library. When integrating with React Hook Form, use `onSubmit`
1892
+ * instead.
1893
+ */
1894
+ onFormSubmit?: ((formValues: FormValues, eventDetails: FormSubmitEventDetails) => void) | undefined;
1895
+ };
1896
+
1897
+ declare type FormSubmitEventDetails = NonNullable<React_2.ComponentProps<typeof Form_2>["onFormSubmit"]> extends (values: any, details: infer D) => any ? D : never;
1898
+
1531
1899
  /** Groups related menu items with the corresponding label. */
1532
1900
  declare function Group({ ...props }: React_2.ComponentProps<typeof Menu_2.Group>): JSX.Element;
1533
1901
 
@@ -1633,20 +2001,31 @@ declare namespace Header_2 {
1633
2001
  var displayName: string;
1634
2002
  }
1635
2003
 
1636
- /** A layout wrapper for the dialog title and description. */
1637
- declare function Header_3({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
2004
+ declare function Header_3({ className, title, description, children, ...props }: HeaderProps): JSX.Element;
1638
2005
 
1639
2006
  declare namespace Header_3 {
1640
2007
  var displayName: string;
1641
2008
  }
1642
2009
 
1643
- /** A layout wrapper for the sheet title and description. */
2010
+ /** A layout wrapper for the dialog title and description. */
1644
2011
  declare function Header_4({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
1645
2012
 
1646
2013
  declare namespace Header_4 {
1647
2014
  var displayName: string;
1648
2015
  }
1649
2016
 
2017
+ /** A layout wrapper for the sheet title and description. */
2018
+ declare function Header_5({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
2019
+
2020
+ declare namespace Header_5 {
2021
+ var displayName: string;
2022
+ }
2023
+
2024
+ declare type HeaderProps = Omit<React_2.ComponentProps<"div">, "title"> & {
2025
+ title?: React_2.ReactNode;
2026
+ description?: React_2.ReactNode;
2027
+ };
2028
+
1650
2029
  /**
1651
2030
  * Deny access and show 404 Not Found.
1652
2031
  *
@@ -1668,6 +2047,13 @@ export declare type I18nLabels<Def extends Record<string, LabelValue> = Record<s
1668
2047
  [K in L]: LabelDefinition<Def>;
1669
2048
  } & DynamicLocales<Def>;
1670
2049
 
2050
+ /** Profile image; hidden when missing or failed to load. */
2051
+ declare function Image_2({ className, ...props }: React_2.ComponentProps<typeof Avatar_2.Image>): JSX.Element;
2052
+
2053
+ declare namespace Image_2 {
2054
+ var displayName: string;
2055
+ }
2056
+
1671
2057
  /**
1672
2058
  * A styled input component.
1673
2059
  *
@@ -1688,13 +2074,19 @@ export declare type InputProps = React_2.ComponentProps<"input">;
1688
2074
  */
1689
2075
  declare type IsEmptyObject<T> = keyof T extends never ? true : false;
1690
2076
 
1691
- /** An individual interactive item in the menu. */
1692
- declare function Item({ className, ...props }: React_2.ComponentProps<typeof Menu_2.Item>): JSX.Element;
2077
+ declare function Item({ indicator, children, className }: ActivityCardItemProps): JSX.Element;
1693
2078
 
1694
2079
  declare namespace Item {
1695
2080
  var displayName: string;
1696
2081
  }
1697
2082
 
2083
+ /** An individual interactive item in the menu. */
2084
+ declare function Item_2({ className, ...props }: React_2.ComponentProps<typeof Menu_2.Item>): JSX.Element;
2085
+
2086
+ declare namespace Item_2 {
2087
+ var displayName: string;
2088
+ }
2089
+
1698
2090
  /**
1699
2091
  * A group of items with a label, used by Select, Combobox, and Autocomplete standalone components.
1700
2092
  *
@@ -1707,6 +2099,26 @@ export declare interface ItemGroup<T> {
1707
2099
  items: T[];
1708
2100
  }
1709
2101
 
2102
+ declare function Items<T extends ActivityCardBaseItem>({ children }: ActivityCardItemsProps<T>): JSX.Element;
2103
+
2104
+ declare namespace Items {
2105
+ var displayName: string;
2106
+ }
2107
+
2108
+ /**
2109
+ * An accessible label that is automatically associated with the field control.
2110
+ *
2111
+ * Uses the `LabelableContext` provided by `Field.Root` to resolve `htmlFor`.
2112
+ * Any Base UI control inside the same `Field.Root` (Field.Control, Select,
2113
+ * Combobox, Autocomplete) registers its ID with the context, so clicking
2114
+ * this label will focus the correct control.
2115
+ */
2116
+ declare function Label({ className, ...props }: React_2.ComponentProps<typeof Field_2.Label>): JSX.Element;
2117
+
2118
+ declare namespace Label {
2119
+ var displayName: string;
2120
+ }
2121
+
1710
2122
  /**
1711
2123
  * Ensures that other locales have the same label structure as the base definition.
1712
2124
  * For dynamic labels (functions), the props type must match.
@@ -1814,6 +2226,13 @@ export declare interface LayoutProps {
1814
2226
  children: ReactNode;
1815
2227
  }
1816
2228
 
2229
+ /** An accessible legend that is automatically associated with the fieldset. */
2230
+ declare function Legend({ className, ...props }: React_2.ComponentProps<typeof Fieldset_2.Legend>): JSX.Element;
2231
+
2232
+ declare namespace Legend {
2233
+ var displayName: string;
2234
+ }
2235
+
1817
2236
  export { Link }
1818
2237
 
1819
2238
  /** A link item in the menu that can be used to navigate to a different page. */
@@ -1838,10 +2257,10 @@ export declare interface MappedItem {
1838
2257
  }
1839
2258
 
1840
2259
  export declare const Menu: {
1841
- Root: typeof Root_3;
2260
+ Root: typeof Root_8;
1842
2261
  Trigger: typeof Trigger_2;
1843
- Content: typeof Content_2;
1844
- Item: typeof Item;
2262
+ Content: typeof Content_3;
2263
+ Item: typeof Item_2;
1845
2264
  LinkItem: typeof LinkItem;
1846
2265
  CheckboxItem: typeof CheckboxItem;
1847
2266
  CheckboxItemIndicator: typeof CheckboxItemIndicator;
@@ -1866,6 +2285,57 @@ declare namespace MenuSeparator {
1866
2285
  var displayName: string;
1867
2286
  }
1868
2287
 
2288
+ /**
2289
+ * MetricCard — Compact card for dashboard KPI display (title, value, optional trend and description).
2290
+ *
2291
+ * Static display only in v1. Use for summary metrics (e.g. net total, discount total).
2292
+ * Styling follows existing card conventions (bg-card, border, rounded-xl).
2293
+ *
2294
+ * @example
2295
+ * ```tsx
2296
+ * <MetricCard
2297
+ * title="Net total payment"
2298
+ * value="$1,500.00"
2299
+ * trend={{ direction: "up", value: "+5%" }}
2300
+ * description="vs last month"
2301
+ * />
2302
+ * ```
2303
+ */
2304
+ export declare function MetricCard({ title, value, trend, description, icon, className }: MetricCardProps): JSX.Element;
2305
+
2306
+ /**
2307
+ * Props for the MetricCard component.
2308
+ */
2309
+ export declare interface MetricCardProps {
2310
+ /** Metric title / header (e.g. "Net total payment") */
2311
+ title: string;
2312
+ /** Primary value (e.g. formatted currency or number) */
2313
+ value: ReactNode;
2314
+ /** Optional trend indicator */
2315
+ trend?: MetricCardTrend;
2316
+ /**
2317
+ * Optional supplementary description (e.g. "vs last period", "this week").
2318
+ * Empty strings are treated as absent and the description is not rendered in the meta row.
2319
+ */
2320
+ description?: string;
2321
+ /** Optional leading icon */
2322
+ icon?: ReactNode;
2323
+ /** Additional CSS classes for the card container */
2324
+ className?: string;
2325
+ }
2326
+
2327
+ declare interface MetricCardTrend {
2328
+ /** Visual and semantic direction */
2329
+ direction: MetricCardTrendDirection;
2330
+ /** Display value (e.g. "+12%", "-5%") */
2331
+ value: string;
2332
+ }
2333
+
2334
+ /**
2335
+ * Trend direction for metric display (e.g. up = positive, down = negative).
2336
+ */
2337
+ declare type MetricCardTrendDirection = "up" | "down" | "neutral";
2338
+
1869
2339
  /**
1870
2340
  * A resource that can be included in the root-level content in the navigation.
1871
2341
  */
@@ -2013,6 +2483,50 @@ declare type ResourceMeta = {
2013
2483
  breadcrumbTitle?: string | ((segment: string) => string);
2014
2484
  };
2015
2485
 
2486
+ declare function Root<T extends ActivityCardBaseItem>({ items, title, maxVisible, overflowLabel, groupBy, className, children, }: ActivityCardRootProps<T>): JSX.Element;
2487
+
2488
+ declare namespace Root {
2489
+ var displayName: string;
2490
+ }
2491
+
2492
+ /**
2493
+ * The root component that manages tooltip open/close state.
2494
+ *
2495
+ * @example
2496
+ * ```tsx
2497
+ * <Tooltip.Root>
2498
+ * <Tooltip.Trigger render={<Button variant="outline" />}>
2499
+ * Hover me
2500
+ * </Tooltip.Trigger>
2501
+ * <Tooltip.Content>Helpful information</Tooltip.Content>
2502
+ * </Tooltip.Root>
2503
+ * ```
2504
+ */
2505
+ declare function Root_10({ children, ...props }: TooltipRootProps): JSX.Element;
2506
+
2507
+ declare namespace Root_10 {
2508
+ var displayName: string;
2509
+ }
2510
+
2511
+ /**
2512
+ * Root container for an avatar (image with optional fallback).
2513
+ *
2514
+ * @example
2515
+ * ```tsx
2516
+ * import { Avatar } from "@tailor-platform/app-shell";
2517
+ *
2518
+ * <Avatar.Root>
2519
+ * <Avatar.Image src="/user.png" alt="User" />
2520
+ * <Avatar.Fallback>AB</Avatar.Fallback>
2521
+ * </Avatar.Root>
2522
+ * ```
2523
+ */
2524
+ declare function Root_2({ className, size, ...props }: AvatarProps): JSX.Element;
2525
+
2526
+ declare namespace Root_2 {
2527
+ var displayName: string;
2528
+ }
2529
+
2016
2530
  /**
2017
2531
  * The root table element with a horizontally scrollable container.
2018
2532
  *
@@ -2036,9 +2550,15 @@ declare type ResourceMeta = {
2036
2550
  * </Table.Root>
2037
2551
  * ```
2038
2552
  */
2039
- declare function Root({ className, containerClassName, ...props }: RootProps): JSX.Element;
2553
+ declare function Root_3({ className, containerClassName, ...props }: RootProps): JSX.Element;
2040
2554
 
2041
- declare namespace Root {
2555
+ declare namespace Root_3 {
2556
+ var displayName: string;
2557
+ }
2558
+
2559
+ declare function Root_4({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
2560
+
2561
+ declare namespace Root_4 {
2042
2562
  var displayName: string;
2043
2563
  }
2044
2564
 
@@ -2062,9 +2582,70 @@ declare namespace Root {
2062
2582
  * </Dialog.Root>
2063
2583
  * ```
2064
2584
  */
2065
- declare function Root_2({ ...props }: DialogRootProps): JSX.Element;
2585
+ declare function Root_5({ ...props }: DialogRootProps): JSX.Element;
2066
2586
 
2067
- declare namespace Root_2 {
2587
+ declare namespace Root_5 {
2588
+ var displayName: string;
2589
+ }
2590
+
2591
+ /**
2592
+ * Groups all parts of a form field and manages its validation state.
2593
+ *
2594
+ * Provides a `LabelableContext` and `FieldRootContext` that Base UI controls
2595
+ * automatically connect to. Any Base UI-backed control placed as a child
2596
+ * (e.g. Select, Combobox, Autocomplete, Field.Control) will:
2597
+ *
2598
+ * - Register its ID so that `Field.Label` receives the correct `htmlFor`
2599
+ * - Receive `aria-describedby` linking to `Field.Description` and `Field.Error`
2600
+ * - Inherit the `disabled` state from this root
2601
+ * - Participate in the validation system (`invalid`, `dirty`, `touched`)
2602
+ *
2603
+ * This means `Field.Control` can be omitted when using another AppShell input
2604
+ * component — the wiring happens automatically through Base UI's context.
2605
+ *
2606
+ * @example
2607
+ * ### With Field.Control (plain input)
2608
+ * ```tsx
2609
+ * <Field.Root name="email">
2610
+ * <Field.Label>Email</Field.Label>
2611
+ * <Field.Control type="email" required />
2612
+ * <Field.Description>We'll never share your email.</Field.Description>
2613
+ * <Field.Error match="typeMismatch">Please enter a valid email.</Field.Error>
2614
+ * </Field.Root>
2615
+ * ```
2616
+ *
2617
+ * @example
2618
+ * ### With React Hook Form (Controller spread)
2619
+ * ```tsx
2620
+ * <Controller
2621
+ * name="email"
2622
+ * control={control}
2623
+ * rules={{ required: "Required" }}
2624
+ * render={({ field, fieldState }) => (
2625
+ * <Field.Root {...fieldState}>
2626
+ * <Field.Label>Email</Field.Label>
2627
+ * <Field.Control {...field} type="email" />
2628
+ * <Field.Error match={fieldState.invalid}>{fieldState.error?.message}</Field.Error>
2629
+ * </Field.Root>
2630
+ * )}
2631
+ * />
2632
+ * ```
2633
+ *
2634
+ * > **Note:** When combining RHF with `Form`'s `errors` prop for server-side
2635
+ * > error routing, add `name={field.name}` to `Field.Root` so errors can be
2636
+ * > matched by field name.
2637
+ */
2638
+ declare function Root_6({ className, children, isTouched, isDirty, invalid, error, isValidating: _isValidating, ...props }: FieldRootProps & {
2639
+ isValidating?: unknown;
2640
+ }): JSX.Element;
2641
+
2642
+ declare namespace Root_6 {
2643
+ var displayName: string;
2644
+ }
2645
+
2646
+ declare function Root_7({ className, ...props }: FieldsetRootProps): JSX.Element;
2647
+
2648
+ declare namespace Root_7 {
2068
2649
  var displayName: string;
2069
2650
  }
2070
2651
 
@@ -2084,9 +2665,9 @@ declare namespace Root_2 {
2084
2665
  * </Menu.Root>
2085
2666
  * ```
2086
2667
  */
2087
- declare function Root_3({ children, ...props }: MenuRootProps): JSX.Element;
2668
+ declare function Root_8({ children, ...props }: MenuRootProps): JSX.Element;
2088
2669
 
2089
- declare namespace Root_3 {
2670
+ declare namespace Root_8 {
2090
2671
  var displayName: string;
2091
2672
  }
2092
2673
 
@@ -2110,28 +2691,9 @@ declare namespace Root_3 {
2110
2691
  * </Sheet.Root>
2111
2692
  * ```
2112
2693
  */
2113
- declare function Root_4({ side, ...props }: SheetRootProps): JSX.Element;
2694
+ declare function Root_9({ side, ...props }: SheetRootProps): JSX.Element;
2114
2695
 
2115
- declare namespace Root_4 {
2116
- var displayName: string;
2117
- }
2118
-
2119
- /**
2120
- * The root component that manages tooltip open/close state.
2121
- *
2122
- * @example
2123
- * ```tsx
2124
- * <Tooltip.Root>
2125
- * <Tooltip.Trigger render={<Button variant="outline" />}>
2126
- * Hover me
2127
- * </Tooltip.Trigger>
2128
- * <Tooltip.Content>Helpful information</Tooltip.Content>
2129
- * </Tooltip.Root>
2130
- * ```
2131
- */
2132
- declare function Root_5({ children, ...props }: TooltipRootProps): JSX.Element;
2133
-
2134
- declare namespace Root_5 {
2696
+ declare namespace Root_9 {
2135
2697
  var displayName: string;
2136
2698
  }
2137
2699
 
@@ -2314,6 +2876,12 @@ declare namespace SelectValue {
2314
2876
  var displayName: string;
2315
2877
  }
2316
2878
 
2879
+ /**
2880
+ * Shared props between `AppShellProps` and the internal `WithPages` wrapper.
2881
+ *
2882
+ * These props are available regardless of whether routes are configured
2883
+ * automatically (via vite-plugin) or manually (via `modules` prop).
2884
+ */
2317
2885
  declare type SharedAppShellProps = React.PropsWithChildren<{
2318
2886
  /**
2319
2887
  * App shell title
@@ -2337,6 +2905,23 @@ declare type SharedAppShellProps = React.PropsWithChildren<{
2337
2905
  * ```
2338
2906
  */
2339
2907
  rootComponent?: () => React.ReactNode;
2908
+ /**
2909
+ * Guards for the root route.
2910
+ *
2911
+ * When using file-based routing, this is automatically set from
2912
+ * the root page's guards via `AppShell.WithPages()`.
2913
+ *
2914
+ * @example
2915
+ * ```tsx
2916
+ * import { redirectTo } from "@tailor-platform/app-shell";
2917
+ *
2918
+ * <AppShell
2919
+ * modules={[...]}
2920
+ * rootGuards={[() => redirectTo("/dashboard")]}
2921
+ * />
2922
+ * ```
2923
+ */
2924
+ rootGuards?: Guard[];
2340
2925
  /**
2341
2926
  * Settings resources to be included in the settings menu
2342
2927
  */
@@ -2404,14 +2989,14 @@ declare type SharedAppShellProps = React.PropsWithChildren<{
2404
2989
  }>;
2405
2990
 
2406
2991
  export declare const Sheet: {
2407
- Root: typeof Root_4;
2992
+ Root: typeof Root_9;
2408
2993
  Trigger: typeof Trigger_3;
2409
2994
  Close: typeof Close_2;
2410
- Content: typeof Content_3;
2411
- Header: typeof Header_4;
2995
+ Content: typeof Content_4;
2996
+ Header: typeof Header_5;
2412
2997
  Footer: typeof Footer_3;
2413
2998
  Title: typeof Title_2;
2414
- Description: typeof Description_2;
2999
+ Description: typeof Description_3;
2415
3000
  };
2416
3001
 
2417
3002
  declare type SheetRootProps = Pick<React_2.ComponentProps<typeof Drawer.Root>, "open" | "defaultOpen" | "onOpenChange" | "modal"> & {
@@ -2620,7 +3205,7 @@ declare namespace SubmenuTrigger {
2620
3205
  }
2621
3206
 
2622
3207
  export declare const Table: {
2623
- Root: typeof Root;
3208
+ Root: typeof Root_3;
2624
3209
  Header: typeof Header_2;
2625
3210
  Body: typeof Body_2;
2626
3211
  Footer: typeof Footer;
@@ -2653,9 +3238,9 @@ declare namespace Title_2 {
2653
3238
  }
2654
3239
 
2655
3240
  export declare const Tooltip: {
2656
- Root: typeof Root_5;
3241
+ Root: typeof Root_10;
2657
3242
  Trigger: typeof Trigger_4;
2658
- Content: typeof Content_4;
3243
+ Content: typeof Content_5;
2659
3244
  Provider: typeof Provider;
2660
3245
  };
2661
3246
 
@@ -2800,7 +3385,7 @@ declare function useAsync<T>(options: UseAsyncItemsOptions<T>): UseAsyncItemsRet
2800
3385
  * ```tsx
2801
3386
  * const movies = Autocomplete.useAsync({
2802
3387
  * fetcher: async (query, { signal }) => {
2803
- * const res = await fetch(`/api/movies?q=${query}`, { signal });
3388
+ * const res = await fetch(`/api/movies?q=${query ?? ""}`, { signal });
2804
3389
  * if (!res.ok) return [];
2805
3390
  * return res.json();
2806
3391
  * },
@@ -2840,7 +3425,7 @@ declare interface UseAsyncItemsOptions<T> {
2840
3425
  * ```tsx
2841
3426
  * // Plain function
2842
3427
  * fetcher: async (query, { signal }) => {
2843
- * const res = await fetch(`/api/search?q=${query}`, { signal });
3428
+ * const res = await fetch(`/api/search?q=${query ?? ""}`, { signal });
2844
3429
  * return res.json();
2845
3430
  * }
2846
3431
  *
@@ -2865,6 +3450,8 @@ declare interface UseAsyncItemsReturn<T> {
2865
3450
  error: unknown;
2866
3451
  /** Input change handler — pass to the Root `onInputValueChange` prop */
2867
3452
  onInputValueChange: (value: string) => void;
3453
+ /** Open change handler — pass to the Root `onOpenChange` prop to fetch initial items on open */
3454
+ onOpenChange: (open: boolean) => void;
2868
3455
  }
2869
3456
 
2870
3457
  /**
@@ -3105,6 +3692,32 @@ export { useLocation }
3105
3692
 
3106
3693
  export { useNavigate }
3107
3694
 
3695
+ /**
3696
+ * Override the breadcrumb title for the current page.
3697
+ *
3698
+ * When `title` is a string, the breadcrumb segment matching the current path
3699
+ * is replaced with that value. When `title` is `undefined`, any previous
3700
+ * override is removed and the default title (from `defineResource`) is used.
3701
+ *
3702
+ * This hook is designed to work seamlessly with async data fetching — pass
3703
+ * the result of a query directly and the breadcrumb will update reactively.
3704
+ *
3705
+ * @example
3706
+ * ```tsx
3707
+ * defineResource({
3708
+ * path: ":id",
3709
+ * meta: { breadcrumbTitle: (segment) => `#${segment}` },
3710
+ * component: () => {
3711
+ * const { id } = useParams();
3712
+ * const { data } = useQuery(GET_ORDER, { variables: { id } });
3713
+ * useOverrideBreadcrumb(data?.order?.name);
3714
+ * return <OrderDetail />;
3715
+ * },
3716
+ * });
3717
+ * ```
3718
+ */
3719
+ export declare function useOverrideBreadcrumb(title: string | undefined): void;
3720
+
3108
3721
  /**
3109
3722
  * Find page meta (title, icon) for a given URL path.
3110
3723
  * Searches through modules and their resources recursively.
@@ -3124,6 +3737,57 @@ export declare const useTheme: () => ThemeProviderState;
3124
3737
 
3125
3738
  export declare const useToast: () => typeof toast;
3126
3739
 
3740
+ /**
3741
+ * Used to display a custom message based on the field's validity state.
3742
+ *
3743
+ * Requires `children` to be a render function that receives a
3744
+ * `FieldValidityState` object. The `validity` property within it mirrors the
3745
+ * browser's `ValidityState` (e.g. `valueMissing`, `tooShort`, `valid`),
3746
+ * enabling fully custom validation UI.
3747
+ *
3748
+ * @example
3749
+ * ### Checklist-style password requirements
3750
+ * ```tsx
3751
+ * <Field.Root name="password">
3752
+ * <Field.Label>Password</Field.Label>
3753
+ * <Field.Control type="password" required minLength={8} />
3754
+ * <Field.Validity>
3755
+ * {(state) => (
3756
+ * <ul>
3757
+ * <li>{state.validity.valueMissing ? "NG" : "OK"} Required</li>
3758
+ * <li>{state.validity.tooShort ? "NG" : "OK"} At least 8 characters</li>
3759
+ * </ul>
3760
+ * )}
3761
+ * </Field.Validity>
3762
+ * </Field.Root>
3763
+ * ```
3764
+ *
3765
+ * @example
3766
+ * ### Conditional styling based on validity
3767
+ * ```tsx
3768
+ * <Field.Root name="url">
3769
+ * <Field.Label>Website</Field.Label>
3770
+ * <Field.Control type="url" required />
3771
+ * <Field.Validity>
3772
+ * {(state) =>
3773
+ * state.validity.valid === false && (
3774
+ * <p className="text-destructive text-sm">
3775
+ * {state.validity.typeMismatch
3776
+ * ? "Please enter a valid URL (e.g. https://example.com)"
3777
+ * : "This field is required."}
3778
+ * </p>
3779
+ * )
3780
+ * }
3781
+ * </Field.Validity>
3782
+ * </Field.Root>
3783
+ * ```
3784
+ */
3785
+ declare function Validity({ ...props }: React_2.ComponentProps<typeof Field_2.Validity>): JSX.Element;
3786
+
3787
+ declare namespace Validity {
3788
+ var displayName: string;
3789
+ }
3790
+
3127
3791
  /**
3128
3792
  * Conditionally render children based on guard evaluation.
3129
3793
  *
@@ -3190,6 +3854,4 @@ export declare type WithGuardProps = {
3190
3854
  loading?: ReactNode;
3191
3855
  };
3192
3856
 
3193
- declare function withPages(pages: PageEntry[]): FC<AppShellProps>;
3194
-
3195
3857
  export { }