@tailor-platform/app-shell 0.28.0 → 0.30.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.
@@ -1,5 +1,8 @@
1
1
  import { AuthClient } from '@tailor-platform/auth-public-client';
2
2
  import { ClassProp } from 'class-variance-authority/types';
3
+ import { CSSProperties } from 'react';
4
+ import { Dialog as Dialog_2 } from '@base-ui/react/dialog';
5
+ import { Drawer } from '@base-ui/react/drawer';
3
6
  import { FC } from 'react';
4
7
  import { JSX } from 'react/jsx-runtime';
5
8
  import { Link } from 'react-router';
@@ -7,6 +10,7 @@ import { LoaderFunctionArgs } from 'react-router';
7
10
  import * as React_2 from 'react';
8
11
  import { ReactNode } from 'react';
9
12
  import { toast } from 'sonner';
13
+ import { Tooltip as Tooltip_2 } from '@base-ui/react/tooltip';
10
14
  import { useLocation } from 'react-router';
11
15
  import { useNavigate } from 'react-router';
12
16
  import { useParams } from 'react-router';
@@ -14,6 +18,62 @@ import { useRouteError } from 'react-router';
14
18
  import { useSearchParams } from 'react-router';
15
19
  import { VariantProps } from 'class-variance-authority';
16
20
 
21
+ /**
22
+ * A single action row in the ActionPanel (icon + label, triggered by onClick).
23
+ * For navigation, call useNavigate() inside onClick (e.g. navigate("/path")).
24
+ */
25
+ declare interface ActionItem {
26
+ /** Unique key for React */
27
+ key: string;
28
+ /** Visible label */
29
+ label: string;
30
+ /** Icon: any component or SVG; rendered in a fixed-size slot (e.g. 16px) */
31
+ icon: ReactNode;
32
+ /** Called when the row is clicked. For navigation, use useNavigate() inside the callback. */
33
+ onClick?: () => void | Promise<void>;
34
+ /** Optional; disable the row */
35
+ disabled?: boolean;
36
+ /** When true, show loading indicator in the row and make it non-interactive */
37
+ loading?: boolean;
38
+ }
39
+
40
+ /**
41
+ * ActionPanel — Card with title and list of actions (icon + label).
42
+ *
43
+ * Each row has an icon and label and is triggered by onClick. For navigation, use
44
+ * useNavigate() inside the callback (e.g. onClick: () => navigate("/path")).
45
+ * Use `astw:w-full` so the panel fills the width of its parent container.
46
+ *
47
+ * When an action has `loading: true`, the row shows a spinner in the icon slot and is
48
+ * non-interactive (useful for backend-driven actions: parent sets loading from mutation/request state).
49
+ *
50
+ * @example
51
+ * ```tsx
52
+ * const navigate = useNavigate();
53
+ * <ActionPanel
54
+ * title="Actions"
55
+ * actions={[
56
+ * { key: "1", label: "Create invoice", icon: <ReceiptIcon />, onClick: () => openModal() },
57
+ * { key: "2", label: "View docs", icon: <DocIcon />, onClick: () => navigate("/docs") },
58
+ * { key: "3", label: "Saving…", icon: <SaveIcon />, onClick: () => {}, loading: true },
59
+ * ]}
60
+ * />
61
+ * ```
62
+ */
63
+ export declare function ActionPanel({ title, actions, className }: ActionPanelProps): JSX.Element;
64
+
65
+ /**
66
+ * Props for the ActionPanel component.
67
+ */
68
+ export declare interface ActionPanelProps {
69
+ /** Card title */
70
+ title: string;
71
+ /** List of actions to render */
72
+ actions: ActionItem[];
73
+ /** Additional CSS classes for the card container */
74
+ className?: string;
75
+ }
76
+
17
77
  export declare const AppShell: {
18
78
  (props: AppShellProps): JSX.Element | null;
19
79
  /* Excluded from this release type: WithPages */
@@ -237,6 +297,69 @@ export declare const badgeVariants: (props?: ({
237
297
  */
238
298
  declare type BadgeVariantType = "default" | "success" | "warning" | "error" | "neutral" | "outline-success" | "outline-warning" | "outline-error" | "outline-info" | "outline-neutral";
239
299
 
300
+ /** The table body section (`<tbody>`). */
301
+ declare function Body_2({ className, ...props }: React_2.ComponentProps<"tbody">): JSX.Element;
302
+
303
+ declare namespace Body_2 {
304
+ var displayName: string;
305
+ }
306
+
307
+ /**
308
+ * A styled button component with multiple variants and sizes.
309
+ *
310
+ * @example
311
+ * ```tsx
312
+ * import { Button } from "@tailor-platform/app-shell";
313
+ *
314
+ * <Button variant="default">Click me</Button>
315
+ * <Button variant="outline" size="sm">Small</Button>
316
+ * <Button variant="destructive">Delete</Button>
317
+ * ```
318
+ */
319
+ export declare function Button({ className, variant, size, render, children, ...props }: ButtonProps): React_2.ReactElement<unknown, string | React_2.JSXElementConstructor<any>>;
320
+
321
+ export declare type ButtonProps = React_2.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
322
+ render?: React_2.ReactElement;
323
+ };
324
+
325
+ export declare const buttonVariants: (props?: ({
326
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
327
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
328
+ } & ClassProp) | undefined) => string;
329
+
330
+ /** A table caption element. */
331
+ declare function Caption({ className, ...props }: React_2.ComponentProps<"caption">): JSX.Element;
332
+
333
+ declare namespace Caption {
334
+ var displayName: string;
335
+ }
336
+
337
+ /** A table data cell (`<td>`). */
338
+ declare function Cell({ className, ...props }: React_2.ComponentProps<"td">): JSX.Element;
339
+
340
+ declare namespace Cell {
341
+ var displayName: string;
342
+ }
343
+
344
+ /** A button that closes the dialog. */
345
+ declare function Close({ ...props }: React_2.ComponentProps<typeof Dialog_2.Close>): JSX.Element;
346
+
347
+ declare namespace Close {
348
+ var displayName: string;
349
+ }
350
+
351
+ /** A button that closes the sheet. */
352
+ declare function Close_2({ ...props }: React_2.ComponentProps<typeof Drawer.Close>): JSX.Element;
353
+
354
+ declare namespace Close_2 {
355
+ var displayName: string;
356
+ }
357
+
358
+ /**
359
+ * Supported area values for Layout.Column
360
+ */
361
+ declare type ColumnArea = "left" | "main" | "right";
362
+
240
363
  /**
241
364
  * Supported column count options
242
365
  */
@@ -248,6 +371,16 @@ declare type ColumnCount = 1 | 2 | 3;
248
371
  declare interface ColumnProps {
249
372
  /** Additional CSS classes */
250
373
  className?: string;
374
+ /** Inline styles */
375
+ style?: CSSProperties;
376
+ /**
377
+ * Column area role. When specified on all columns, determines width template
378
+ * based on role rather than position.
379
+ * - "left": fixed 320px
380
+ * - "main": flex-1
381
+ * - "right": fixed 280px
382
+ */
383
+ area?: ColumnArea;
251
384
  /** Child content */
252
385
  children?: ReactNode;
253
386
  }
@@ -310,6 +443,31 @@ declare type CommonProps = {
310
443
  guards?: Guard[];
311
444
  };
312
445
 
446
+ /** The main dialog panel that contains the dialog content. Automatically includes a close button and overlay. */
447
+ declare function Content({ className, children, ...props }: React_2.ComponentProps<typeof Dialog_2.Popup>): JSX.Element;
448
+
449
+ declare namespace Content {
450
+ var displayName: string;
451
+ }
452
+
453
+ /** The main sheet panel. The `side` is inherited from `Sheet.Root` via context. */
454
+ declare function Content_2({ className, children, ...props }: React_2.ComponentProps<typeof Drawer.Popup>): JSX.Element;
455
+
456
+ declare namespace Content_2 {
457
+ var displayName: string;
458
+ }
459
+
460
+ /** The tooltip popup that displays additional information. */
461
+ declare function Content_3({ className, sideOffset, side, align, children, ...restProps }: React_2.ComponentProps<typeof Tooltip_2.Popup> & {
462
+ sideOffset?: number;
463
+ side?: "top" | "right" | "bottom" | "left";
464
+ align?: "start" | "center" | "end";
465
+ }): JSX.Element;
466
+
467
+ declare namespace Content_3 {
468
+ var displayName: string;
469
+ }
470
+
313
471
  /**
314
472
  * Context data type inferred from AppShellRegister.
315
473
  * Falls back to Record<string, unknown> if not augmented.
@@ -522,31 +680,43 @@ export declare const defineI18nLabels: <const L extends Exclude<string, "en">, c
522
680
  };
523
681
 
524
682
  /**
525
- * Define a root-level resource that renders a React component.
683
+ * Define a module that appears as a top-level item in the sidebar navigation.
684
+ *
685
+ * A module can be configured in several ways:
686
+ * - **With component**: renders the component at the module path.
687
+ * - **Without component, with resources**: child resources are accessible, but
688
+ * navigating to the module path itself returns a 404.
689
+ * - **With guards only**: useful for redirect-only paths (e.g. legacy URL migration).
690
+ * The guard loader runs and can redirect; if all guards pass, the path returns 404.
691
+ * - **Path only (no component, no resources, no guards)**: the module path falls
692
+ * through to the catch-all 404 route.
526
693
  *
527
694
  * @example
528
695
  * ```
529
- * // Define a minimal resource
530
- * defineReactResource({
531
- * path: "custom-page",
532
- * component: () => {
533
- * return (
534
- * <div>
535
- * <p>This is a custom page.</p>
536
- * </div>
537
- * );
538
- * },
696
+ * defineModule({
697
+ * path: "dashboard",
698
+ * component: (props) => <div>{props.title}</div>,
699
+ * resources: [defineResource({ ... })],
539
700
  * });
540
701
  * ```
541
702
  */
542
703
  export declare function defineModule(props: DefineModuleProps): Module;
543
704
 
544
- declare type DefineModuleProps = CommonProps & CommonModuleProps & {
705
+ declare type DefineModuleProps = CommonProps & CommonModuleProps & ErrorBoundaryProps & {
545
706
  /**
546
707
  * React component to render.
547
708
  *
548
- * If not provided, a guard with `redirectTo()` must be used to redirect
549
- * users to the appropriate resource.
709
+ * If not provided and no guards are given, the module path will return a 404
710
+ * response while child resources remain accessible.
711
+ *
712
+ * If `resources` is non-empty and guards are provided, guards take precedence
713
+ * over the default 404: for example, `redirectTo()` will redirect instead of
714
+ * returning 404. If all guards return `pass()`, the module path still returns
715
+ * a 404 since there is no component to render.
716
+ *
717
+ * Guard-only modules (no component, no resources) are also supported — for
718
+ * example, to maintain legacy URL paths that redirect elsewhere. In this case,
719
+ * at least one guard must be provided.
550
720
  *
551
721
  * @example
552
722
  * ```tsx
@@ -554,22 +724,23 @@ declare type DefineModuleProps = CommonProps & CommonModuleProps & {
554
724
  * ```
555
725
  */
556
726
  component?: (props: ResourceComponentProps) => ReactNode;
557
- /**
558
- * Error boundary component for this module and its child resources.
559
- * When an error occurs in this module or its resources, this component will render.
560
- * Use the `useRouteError` hook to access error details within the component.
561
- */
562
- errorBoundary?: ErrorBoundaryComponent;
563
727
  };
564
728
 
565
729
  /**
566
730
  * Define a resource that renders a React component.
567
731
  *
732
+ * A resource can be configured in several ways:
733
+ * - **With component**: renders the component at the resource path.
734
+ * - **Without component, with subResources**: sub-resources are accessible,
735
+ * but navigating to the resource path itself returns a 404.
736
+ * - **With guards only**: useful for redirect-only paths.
737
+ * The guard loader runs and can redirect; if all guards pass, the path returns 404.
738
+ *
568
739
  * This resource can be used as a sub-resource of a module or as a root-level resource.
569
740
  *
570
741
  * @example
571
742
  * ```
572
- * // Define a minimal resource
743
+ * // Resource with component and sub-resources
573
744
  * defineResource({
574
745
  * path: "custom-page",
575
746
  * component: () => {
@@ -592,25 +763,55 @@ declare type DefineModuleProps = CommonProps & CommonModuleProps & {
592
763
  * }),
593
764
  * ]
594
765
  * });
766
+ *
767
+ * // Resource without component (sub-resources only, path returns 404)
768
+ * defineResource({
769
+ * path: "namespace",
770
+ * subResources: [
771
+ * defineResource({
772
+ * path: "page-a",
773
+ * component: () => <div>Page A</div>,
774
+ * }),
775
+ * ]
776
+ * });
595
777
  * ```
596
778
  *
597
779
  */
598
780
  export declare function defineResource(props: DefineResourceProps): Resource;
599
781
 
600
- declare type DefineResourceProps = CommonProps & ReactResourceProps & {
782
+ declare type DefineResourceProps = CommonProps & ErrorBoundaryProps & {
601
783
  /**
602
- * Sub-resources of the resource.
784
+ * React component to render.
785
+ *
786
+ * If not provided and no guards are given, the resource path will return a 404
787
+ * response while sub-resources remain accessible.
788
+ *
789
+ * If `subResources` is non-empty and guards are provided, guards take precedence
790
+ * over the default 404: for example, `redirectTo()` will redirect instead of
791
+ * returning 404. If all guards return `pass()`, the resource path still returns
792
+ * a 404 since there is no component to render.
603
793
  */
604
- subResources?: Array<Resource>;
794
+ component?: (props: ResourceComponentProps) => ReactNode;
605
795
  /**
606
- * Error boundary component for this resource and its sub-resources.
607
- * When an error occurs in this resource, this component will render.
608
- * Overrides module-level or global error boundaries.
609
- * Use the `useRouteError` hook to access error details within the component.
796
+ * Sub-resources of the resource.
610
797
  */
611
- errorBoundary?: ErrorBoundaryComponent;
798
+ subResources?: Array<Resource>;
612
799
  };
613
800
 
801
+ /** A description that provides additional context for the dialog. */
802
+ declare function Description({ className, ...props }: React_2.ComponentProps<typeof Dialog_2.Description>): JSX.Element;
803
+
804
+ declare namespace Description {
805
+ var displayName: string;
806
+ }
807
+
808
+ /** A description that provides additional context for the sheet. */
809
+ declare function Description_2({ className, ...props }: React_2.ComponentProps<typeof Drawer.Description>): JSX.Element;
810
+
811
+ declare namespace Description_2 {
812
+ var displayName: string;
813
+ }
814
+
614
815
  /**
615
816
  * DescriptionCard - ERP document display component
616
817
  *
@@ -631,7 +832,7 @@ declare type DefineResourceProps = CommonProps & ReactResourceProps & {
631
832
  * />
632
833
  * ```
633
834
  */
634
- export declare function DescriptionCard({ data, title, fields, columns, className, headerAction, }: DescriptionCardProps): JSX.Element;
835
+ export declare function DescriptionCard({ data, title, fields, columns, className, style, headerAction, }: DescriptionCardProps): JSX.Element;
635
836
 
636
837
  /**
637
838
  * Props for the DescriptionCard component
@@ -647,10 +848,27 @@ export declare interface DescriptionCardProps {
647
848
  columns?: Columns;
648
849
  /** Additional CSS classes */
649
850
  className?: string;
851
+ /** Inline styles */
852
+ style?: CSSProperties;
650
853
  /** Header action slot (e.g., edit button) */
651
- headerAction?: React.ReactNode;
854
+ headerAction?: ReactNode;
652
855
  }
653
856
 
857
+ export declare const Dialog: {
858
+ Root: typeof Root_2;
859
+ Close: typeof Close;
860
+ Content: typeof Content;
861
+ Description: typeof Description;
862
+ Footer: typeof Footer_2;
863
+ Header: typeof Header_3;
864
+ Title: typeof Title;
865
+ Trigger: typeof Trigger;
866
+ };
867
+
868
+ declare type DialogRootProps = Pick<React_2.ComponentProps<typeof Dialog_2.Root>, "open" | "defaultOpen" | "onOpenChange" | "modal"> & {
869
+ children: React_2.ReactNode;
870
+ };
871
+
654
872
  declare type DynamicLocales<Def extends Record<string, LabelValue>> = {
655
873
  [locale: string]: Partial<LabelDefinition<Def>> | undefined;
656
874
  };
@@ -698,6 +916,16 @@ export declare interface EnhancedAuthClient extends AuthClient {
698
916
  */
699
917
  export declare type ErrorBoundaryComponent = ReactNode;
700
918
 
919
+ declare type ErrorBoundaryProps = {
920
+ /**
921
+ * Error boundary component for this module/resource and its children.
922
+ * When an error occurs, this component will render.
923
+ * Overrides any parent-level (module or global) error boundary.
924
+ * Use the `useRouteError` hook to access error details within the component.
925
+ */
926
+ errorBoundary?: ErrorBoundaryComponent;
927
+ };
928
+
701
929
  /**
702
930
  * Type-safe path builder for file-based routing.
703
931
  *
@@ -786,6 +1014,27 @@ declare interface FieldMeta {
786
1014
  */
787
1015
  declare type FieldType = "text" | "badge" | "money" | "date" | "link" | "address" | "reference";
788
1016
 
1017
+ /** The table footer section (`<tfoot>`). */
1018
+ declare function Footer({ className, ...props }: React_2.ComponentProps<"tfoot">): JSX.Element;
1019
+
1020
+ declare namespace Footer {
1021
+ var displayName: string;
1022
+ }
1023
+
1024
+ /** A layout wrapper for dialog action buttons, typically placed at the bottom. */
1025
+ declare function Footer_2({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
1026
+
1027
+ declare namespace Footer_2 {
1028
+ var displayName: string;
1029
+ }
1030
+
1031
+ /** A layout wrapper for sheet action buttons, typically placed at the bottom. */
1032
+ declare function Footer_3({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
1033
+
1034
+ declare namespace Footer_3 {
1035
+ var displayName: string;
1036
+ }
1037
+
789
1038
  /**
790
1039
  * Guard function type.
791
1040
  * Guards are executed in order and stop on the first non-pass result.
@@ -818,6 +1067,79 @@ export declare type GuardResult =
818
1067
  to: string;
819
1068
  };
820
1069
 
1070
+ /** A table header cell (`<th>`). */
1071
+ declare function Head({ className, ...props }: React_2.ComponentProps<"th">): JSX.Element;
1072
+
1073
+ declare namespace Head {
1074
+ var displayName: string;
1075
+ }
1076
+
1077
+ /**
1078
+ * Layout.Header — Page-level header with title, actions, and an optional
1079
+ * full-width slot.
1080
+ *
1081
+ * Place this as a direct child of `<Layout>`, above any `<Layout.Column>`
1082
+ * children. The header spans the full width of the grid via `col-span-full`,
1083
+ * regardless of column count.
1084
+ *
1085
+ * If multiple `Layout.Header` children are provided to `<Layout>`, only the
1086
+ * first one is rendered.
1087
+ *
1088
+ * - **title** — Rendered as an `<h1>` on the left side.
1089
+ * - **actions** — Rendered on the right side (e.g. save / cancel buttons).
1090
+ * - **children** — Rendered full-width below the title/actions row.
1091
+ * Useful for tabs, breadcrumbs, or other secondary navigation.
1092
+ *
1093
+ * ### Data attributes
1094
+ *
1095
+ * The rendered `<header>` has `data-layout-header`, which `<Layout>` uses
1096
+ * internally to apply `col-span-full`.
1097
+ *
1098
+ * @example
1099
+ * ```tsx
1100
+ * <Layout>
1101
+ * <Layout.Header
1102
+ * title="Purchase Orders"
1103
+ * actions={[<Button key="create">Create</Button>]}
1104
+ * >
1105
+ * <Tabs value={tab} onValueChange={setTab}>
1106
+ * <TabsList>
1107
+ * <TabsTrigger value="all">All</TabsTrigger>
1108
+ * <TabsTrigger value="open">Open</TabsTrigger>
1109
+ * </TabsList>
1110
+ * </Tabs>
1111
+ * </Layout.Header>
1112
+ * <Layout.Column>…</Layout.Column>
1113
+ * </Layout>
1114
+ * ```
1115
+ */
1116
+ declare function Header({ title, actions, children }: LayoutHeaderProps): JSX.Element;
1117
+
1118
+ declare namespace Header {
1119
+ var displayName: string;
1120
+ }
1121
+
1122
+ /** The table header section (`<thead>`). */
1123
+ declare function Header_2({ className, ...props }: React_2.ComponentProps<"thead">): JSX.Element;
1124
+
1125
+ declare namespace Header_2 {
1126
+ var displayName: string;
1127
+ }
1128
+
1129
+ /** A layout wrapper for the dialog title and description. */
1130
+ declare function Header_3({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
1131
+
1132
+ declare namespace Header_3 {
1133
+ var displayName: string;
1134
+ }
1135
+
1136
+ /** A layout wrapper for the sheet title and description. */
1137
+ declare function Header_4({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
1138
+
1139
+ declare namespace Header_4 {
1140
+ var displayName: string;
1141
+ }
1142
+
821
1143
  /**
822
1144
  * Deny access and show 404 Not Found.
823
1145
  *
@@ -839,6 +1161,21 @@ export declare type I18nLabels<Def extends Record<string, LabelValue> = Record<s
839
1161
  [K in L]: LabelDefinition<Def>;
840
1162
  } & DynamicLocales<Def>;
841
1163
 
1164
+ /**
1165
+ * A styled input component.
1166
+ *
1167
+ * @example
1168
+ * ```tsx
1169
+ * import { Input } from "@tailor-platform/app-shell";
1170
+ *
1171
+ * <Input type="text" placeholder="Enter your name" />
1172
+ * <Input type="email" disabled />
1173
+ * ```
1174
+ */
1175
+ export declare function Input({ className, type, ...props }: InputProps): JSX.Element;
1176
+
1177
+ export declare type InputProps = React_2.ComponentProps<"input">;
1178
+
842
1179
  /**
843
1180
  * Check if an object type has no keys.
844
1181
  */
@@ -858,30 +1195,61 @@ declare type LabelDefinition<Def extends Record<string, LabelValue>> = {
858
1195
  declare type LabelValue = string | ((props: any) => string);
859
1196
 
860
1197
  /**
861
- * Layout - Responsive column layout component
1198
+ * Layout – Responsive grid layout component
1199
+ *
1200
+ * Uses CSS Grid for responsive column layouts. On mobile, all columns
1201
+ * stack vertically (`grid-cols-1`). At `lg` (2-column) or `xl` (3+ column)
1202
+ * breakpoints, columns display side by side with widths determined by
1203
+ * position or the `area` prop on each `Layout.Column`.
1204
+ *
1205
+ * ### Child filtering
1206
+ *
1207
+ * Only `Layout.Header` and `Layout.Column` are recognized as children;
1208
+ * any other elements are silently ignored and will not be rendered.
1209
+ * If multiple `Layout.Header` children are provided, only the first one
1210
+ * is rendered.
862
1211
  *
863
- * Automatically handles responsive behavior for 1, 2, or 3 column layouts.
864
- * Uses flexbox with viewport breakpoints for simple, CSS-only responsive behavior.
1212
+ * ### Grid template
1213
+ *
1214
+ * Column widths are controlled via a `--layout-cols` CSS custom property
1215
+ * set on the root `<div>`, consumed by `grid-cols-[var(--layout-cols)]`.
1216
+ * The value is computed from position (see `Layout.Column`) or `area` props.
1217
+ * For a single column, no custom property is set and the grid remains
1218
+ * `grid-cols-1`.
865
1219
  *
866
1220
  * @example
867
1221
  * ```tsx
868
- * // Basic layout
869
- * <Layout columns={2}>
1222
+ * // With Layout.Header
1223
+ * <Layout>
1224
+ * <Layout.Header title="Page Title" actions={[<Button key="save">Save</Button>]} />
870
1225
  * <Layout.Column>Main content</Layout.Column>
871
1226
  * <Layout.Column>Side panel</Layout.Column>
872
1227
  * </Layout>
873
1228
  *
874
- * // With header and actions
875
- * <Layout columns={2} title="Page Title" actions={[<Button key="save">Save</Button>]}>
876
- * <Layout.Column>...</Layout.Column>
877
- * <Layout.Column>...</Layout.Column>
1229
+ * // With area prop
1230
+ * <Layout>
1231
+ * <Layout.Column area="left">Sidebar</Layout.Column>
1232
+ * <Layout.Column area="main">Content</Layout.Column>
878
1233
  * </Layout>
879
1234
  * ```
880
1235
  */
881
- export declare function Layout({ columns, className, gap, title, actions, children }: LayoutProps): JSX.Element;
1236
+ export declare function Layout({ columns, className, style, gap, title, actions, children }: LayoutProps): JSX.Element;
882
1237
 
883
1238
  export declare namespace Layout {
884
1239
  var Column: React_2.ForwardRefExoticComponent<ColumnProps & React_2.RefAttributes<HTMLDivElement>>;
1240
+ var Header: Header;
1241
+ }
1242
+
1243
+ /**
1244
+ * Props for Layout.Header component
1245
+ */
1246
+ declare interface LayoutHeaderProps {
1247
+ /** Page title (left side) */
1248
+ title?: string;
1249
+ /** Action buttons or nodes (right side) */
1250
+ actions?: ReactNode[];
1251
+ /** Renders full-width below the title/actions row (e.g. tabs) */
1252
+ children?: ReactNode;
885
1253
  }
886
1254
 
887
1255
  /**
@@ -891,20 +1259,32 @@ export declare interface LayoutProps {
891
1259
  /**
892
1260
  * Number of columns (1, 2, or 3).
893
1261
  *
894
- * **Required.** Must match the exact number of `Layout.Column` children.
895
- * The component will throw an error in development if there's a mismatch.
1262
+ * @deprecated Auto-detected from Layout.Column children count when omitted.
896
1263
  */
897
- columns: ColumnCount;
1264
+ columns?: ColumnCount;
898
1265
  /** Additional CSS classes */
899
1266
  className?: string;
900
- /** Gap between columns (default: 4 = 16px) */
1267
+ /** Inline styles */
1268
+ style?: CSSProperties;
1269
+ /**
1270
+ * Gap between columns (default: 4 = 16px)
1271
+ *
1272
+ * @deprecated Remove the `gap` prop and use `className` with the `astw:` prefix
1273
+ * (e.g. `className="astw:gap-6"`) to override the default gap.
1274
+ */
901
1275
  gap?: number;
902
- /** Header title - displayed at the top of the layout */
1276
+ /** Header title - displayed at the top of the layout
1277
+ *
1278
+ * @deprecated Use `<Layout.Header title="...">` instead.
1279
+ */
903
1280
  title?: string;
904
- /** Header actions - array of action components (e.g., buttons) displayed on the right side of the header.
905
- * Layout and spacing are handled automatically. */
1281
+ /** Header actions displayed on the right side of the header.
1282
+ * Layout and spacing are handled automatically.
1283
+ *
1284
+ * @deprecated Use `<Layout.Header actions={...}>` instead.
1285
+ */
906
1286
  actions?: ReactNode[];
907
- /** Child elements - must be exactly `columns` number of Layout.Column components */
1287
+ /** Child elements - Layout.Header and/or Layout.Column components */
908
1288
  children: ReactNode;
909
1289
  }
910
1290
 
@@ -976,11 +1356,15 @@ export declare type PageMeta = {
976
1356
  */
977
1357
  export declare const pass: () => GuardResult;
978
1358
 
979
- declare type ReactResourceProps = {
980
- /**
981
- * React component to render.
982
- */
983
- component: (props: ResourceComponentProps) => ReactNode;
1359
+ /** Provides shared delay configuration for nested tooltips. */
1360
+ declare function Provider({ delay, children, ...props }: ProviderProps): JSX.Element;
1361
+
1362
+ declare namespace Provider {
1363
+ var displayName: string;
1364
+ }
1365
+
1366
+ declare type ProviderProps = Pick<React_2.ComponentProps<typeof Tooltip_2.Provider>, "delay" | "closeDelay" | "timeout"> & {
1367
+ children: React_2.ReactNode;
984
1368
  };
985
1369
 
986
1370
  /**
@@ -1007,7 +1391,7 @@ export declare const redirectTo: (to: string) => GuardResult;
1007
1391
  */
1008
1392
  declare type Resource = CommonPageResource & {
1009
1393
  _type: "resource";
1010
- component: () => ReactNode;
1394
+ component?: () => ReactNode;
1011
1395
  subResources?: Array<Resource>;
1012
1396
  errorBoundary: ErrorBoundaryComponent;
1013
1397
  guards?: Guard[];
@@ -1034,6 +1418,106 @@ declare type ResourceMeta = {
1034
1418
  breadcrumbTitle?: string | ((segment: string) => string);
1035
1419
  };
1036
1420
 
1421
+ /**
1422
+ * The root table element with a horizontally scrollable container.
1423
+ *
1424
+ * Note: `className` targets the inner `<table>` element, while `containerClassName` targets the outer scrollable `<div>` wrapper.
1425
+ *
1426
+ * @example
1427
+ * ```tsx
1428
+ * <Table.Root>
1429
+ * <Table.Header>
1430
+ * <Table.Row>
1431
+ * <Table.Head>Name</Table.Head>
1432
+ * <Table.Head>Status</Table.Head>
1433
+ * </Table.Row>
1434
+ * </Table.Header>
1435
+ * <Table.Body>
1436
+ * <Table.Row>
1437
+ * <Table.Cell>Item 1</Table.Cell>
1438
+ * <Table.Cell>Active</Table.Cell>
1439
+ * </Table.Row>
1440
+ * </Table.Body>
1441
+ * </Table.Root>
1442
+ * ```
1443
+ */
1444
+ declare function Root({ className, containerClassName, ...props }: RootProps): JSX.Element;
1445
+
1446
+ declare namespace Root {
1447
+ var displayName: string;
1448
+ }
1449
+
1450
+ /**
1451
+ * The root component that manages dialog open/close state.
1452
+ *
1453
+ * @example
1454
+ * ```tsx
1455
+ * <Dialog.Root>
1456
+ * <Dialog.Trigger render={<Button />}>Open</Dialog.Trigger>
1457
+ * <Dialog.Content>
1458
+ * <Dialog.Header>
1459
+ * <Dialog.Title>Are you sure?</Dialog.Title>
1460
+ * <Dialog.Description>This action cannot be undone.</Dialog.Description>
1461
+ * </Dialog.Header>
1462
+ * <Dialog.Footer>
1463
+ * <Button variant="outline">Cancel</Button>
1464
+ * <Button>Confirm</Button>
1465
+ * </Dialog.Footer>
1466
+ * </Dialog.Content>
1467
+ * </Dialog.Root>
1468
+ * ```
1469
+ */
1470
+ declare function Root_2({ ...props }: DialogRootProps): JSX.Element;
1471
+
1472
+ declare namespace Root_2 {
1473
+ var displayName: string;
1474
+ }
1475
+
1476
+ /**
1477
+ * The root component that manages sheet open/close state.
1478
+ * The `side` prop controls which edge of the screen the sheet slides in from.
1479
+ *
1480
+ * @example
1481
+ * ```tsx
1482
+ * <Sheet.Root side="right">
1483
+ * <Sheet.Trigger render={<Button />}>Open</Sheet.Trigger>
1484
+ * <Sheet.Content>
1485
+ * <Sheet.Header>
1486
+ * <Sheet.Title>Settings</Sheet.Title>
1487
+ * <Sheet.Description>Manage your preferences.</Sheet.Description>
1488
+ * </Sheet.Header>
1489
+ * <Sheet.Footer>
1490
+ * <Button>Save</Button>
1491
+ * </Sheet.Footer>
1492
+ * </Sheet.Content>
1493
+ * </Sheet.Root>
1494
+ * ```
1495
+ */
1496
+ declare function Root_3({ side, ...props }: SheetRootProps): JSX.Element;
1497
+
1498
+ declare namespace Root_3 {
1499
+ var displayName: string;
1500
+ }
1501
+
1502
+ /**
1503
+ * The root component that manages tooltip open/close state.
1504
+ *
1505
+ * @example
1506
+ * ```tsx
1507
+ * <Tooltip.Root>
1508
+ * <Tooltip.Trigger render={<Button variant="outline" />}>
1509
+ * Hover me
1510
+ * </Tooltip.Trigger>
1511
+ * <Tooltip.Content>Helpful information</Tooltip.Content>
1512
+ * </Tooltip.Root>
1513
+ * ```
1514
+ */
1515
+ declare function Root_4({ children, ...props }: TooltipRootProps): JSX.Element;
1516
+
1517
+ declare namespace Root_4 {
1518
+ var displayName: string;
1519
+ }
1520
+
1037
1521
  declare type RootConfiguration = {
1038
1522
  modules: Modules;
1039
1523
  settingsResources: Resource[];
@@ -1042,6 +1526,11 @@ declare type RootConfiguration = {
1042
1526
  locale: string;
1043
1527
  };
1044
1528
 
1529
+ declare type RootProps = React_2.ComponentProps<"table"> & {
1530
+ /** Additional CSS classes for the outer scrollable `<div>` container. Use this to control height, overflow, or container-level layout. */
1531
+ containerClassName?: string;
1532
+ };
1533
+
1045
1534
  /**
1046
1535
  * Route parameters type inferred from AppShellRegister.
1047
1536
  * Falls back to Record<string, Record<string, string>> if not augmented.
@@ -1051,6 +1540,13 @@ export declare type RouteParams = AppShellRegister extends {
1051
1540
  routeParams: infer T;
1052
1541
  } ? T : Record<string, Record<string, string>>;
1053
1542
 
1543
+ /** A table row (`<tr>`). */
1544
+ declare function Row({ className, ...props }: React_2.ComponentProps<"tr">): JSX.Element;
1545
+
1546
+ declare namespace Row {
1547
+ var displayName: string;
1548
+ }
1549
+
1054
1550
  declare type SharedAppShellProps = React.PropsWithChildren<{
1055
1551
  /**
1056
1552
  * App shell title
@@ -1140,6 +1636,24 @@ declare type SharedAppShellProps = React.PropsWithChildren<{
1140
1636
  contextData?: ContextData;
1141
1637
  }>;
1142
1638
 
1639
+ export declare const Sheet: {
1640
+ Root: typeof Root_3;
1641
+ Trigger: typeof Trigger_2;
1642
+ Close: typeof Close_2;
1643
+ Content: typeof Content_2;
1644
+ Header: typeof Header_4;
1645
+ Footer: typeof Footer_3;
1646
+ Title: typeof Title_2;
1647
+ Description: typeof Description_2;
1648
+ };
1649
+
1650
+ declare type SheetRootProps = Pick<React_2.ComponentProps<typeof Drawer.Root>, "open" | "defaultOpen" | "onOpenChange" | "modal"> & {
1651
+ children: React_2.ReactNode;
1652
+ side?: Side;
1653
+ };
1654
+
1655
+ declare type Side = "top" | "right" | "bottom" | "left";
1656
+
1143
1657
  /**
1144
1658
  * A collapsible group for sidebar navigation.
1145
1659
  *
@@ -1320,6 +1834,17 @@ export declare type SidebarLayoutProps = {
1320
1834
  */
1321
1835
  export declare const SidebarSeparator: () => JSX.Element;
1322
1836
 
1837
+ export declare const Table: {
1838
+ Root: typeof Root;
1839
+ Header: typeof Header_2;
1840
+ Body: typeof Body_2;
1841
+ Footer: typeof Footer;
1842
+ Row: typeof Row;
1843
+ Head: typeof Head;
1844
+ Cell: typeof Cell;
1845
+ Caption: typeof Caption;
1846
+ };
1847
+
1323
1848
  declare type Theme = "dark" | "light" | "system";
1324
1849
 
1325
1850
  declare type ThemeProviderState = {
@@ -1328,6 +1853,52 @@ declare type ThemeProviderState = {
1328
1853
  setTheme: (theme: Theme) => void;
1329
1854
  };
1330
1855
 
1856
+ /** The title of the dialog, announced by screen readers. */
1857
+ declare function Title({ className, ...props }: React_2.ComponentProps<typeof Dialog_2.Title>): JSX.Element;
1858
+
1859
+ declare namespace Title {
1860
+ var displayName: string;
1861
+ }
1862
+
1863
+ /** The title of the sheet, announced by screen readers. */
1864
+ declare function Title_2({ className, ...props }: React_2.ComponentProps<typeof Drawer.Title>): JSX.Element;
1865
+
1866
+ declare namespace Title_2 {
1867
+ var displayName: string;
1868
+ }
1869
+
1870
+ export declare const Tooltip: {
1871
+ Root: typeof Root_4;
1872
+ Trigger: typeof Trigger_3;
1873
+ Content: typeof Content_3;
1874
+ Provider: typeof Provider;
1875
+ };
1876
+
1877
+ declare type TooltipRootProps = Pick<React_2.ComponentProps<typeof Tooltip_2.Root>, "open" | "defaultOpen" | "onOpenChange"> & {
1878
+ children: React_2.ReactNode;
1879
+ };
1880
+
1881
+ /** The element that opens the dialog when clicked. */
1882
+ declare function Trigger({ ...props }: React_2.ComponentProps<typeof Dialog_2.Trigger>): JSX.Element;
1883
+
1884
+ declare namespace Trigger {
1885
+ var displayName: string;
1886
+ }
1887
+
1888
+ /** The element that opens the sheet when clicked. */
1889
+ declare function Trigger_2({ ...props }: React_2.ComponentProps<typeof Drawer.Trigger>): JSX.Element;
1890
+
1891
+ declare namespace Trigger_2 {
1892
+ var displayName: string;
1893
+ }
1894
+
1895
+ /** The element that triggers the tooltip on hover or focus. */
1896
+ declare function Trigger_3({ ...props }: React_2.ComponentProps<typeof Tooltip_2.Trigger>): JSX.Element;
1897
+
1898
+ declare namespace Trigger_3 {
1899
+ var displayName: string;
1900
+ }
1901
+
1331
1902
  /**
1332
1903
  * Type-safe path builder interface.
1333
1904
  *