@slipstream-ui/core 0.4.0 → 0.5.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.
Files changed (92) hide show
  1. package/dist/index.d.mts +296 -15
  2. package/dist/index.d.ts +296 -15
  3. package/dist/index.js +1047 -473
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +1096 -530
  6. package/dist/index.mjs.map +1 -1
  7. package/dist/manifests/app-shell.manifest.json +50 -0
  8. package/dist/manifests/badge.manifest.json +9 -4
  9. package/dist/manifests/breadcrumb.manifest.json +6 -0
  10. package/dist/manifests/button.manifest.json +14 -0
  11. package/dist/manifests/confirm-dialog.manifest.json +132 -0
  12. package/dist/manifests/data-table.manifest.json +50 -0
  13. package/dist/manifests/dialog.manifest.json +7 -0
  14. package/dist/manifests/drawer.manifest.json +7 -0
  15. package/dist/manifests/link.manifest.json +106 -0
  16. package/dist/manifests/page-header.manifest.json +30 -0
  17. package/dist/manifests/pagination.manifest.json +6 -0
  18. package/dist/manifests/prose.manifest.json +75 -0
  19. package/dist/manifests/search.manifest.json +41 -9
  20. package/dist/manifests/section-heading.manifest.json +108 -0
  21. package/dist/manifests/select.manifest.json +6 -0
  22. package/dist/manifests/site-footer.manifest.json +94 -0
  23. package/dist/manifests/site-header.manifest.json +130 -0
  24. package/dist/manifests/table-of-contents.manifest.json +87 -0
  25. package/package.json +2 -2
  26. package/src/components/alert/Alert.tsx +2 -2
  27. package/src/components/app-shell/AppShell.test.tsx +49 -1
  28. package/src/components/app-shell/AppShell.tsx +147 -43
  29. package/src/components/badge/Badge.test.tsx +21 -0
  30. package/src/components/badge/Badge.tsx +6 -0
  31. package/src/components/breadcrumb/Breadcrumb.test.tsx +16 -0
  32. package/src/components/breadcrumb/Breadcrumb.tsx +10 -5
  33. package/src/components/button/Button.test.tsx +40 -2
  34. package/src/components/button/Button.tsx +31 -7
  35. package/src/components/confirm-dialog/ConfirmDialog.test.tsx +46 -0
  36. package/src/components/confirm-dialog/ConfirmDialog.tsx +86 -0
  37. package/src/components/confirm-dialog/index.ts +1 -0
  38. package/src/components/data-table/DataTable.test.tsx +92 -0
  39. package/src/components/data-table/DataTable.tsx +98 -7
  40. package/src/components/dialog/Dialog.test.tsx +7 -0
  41. package/src/components/dialog/Dialog.tsx +4 -1
  42. package/src/components/drawer/Drawer.test.tsx +11 -2
  43. package/src/components/drawer/Drawer.tsx +5 -2
  44. package/src/components/input/Input.tsx +1 -0
  45. package/src/components/link/Link.test.tsx +60 -0
  46. package/src/components/link/Link.tsx +85 -0
  47. package/src/components/link/index.ts +1 -0
  48. package/src/components/page-header/PageHeader.test.tsx +17 -0
  49. package/src/components/page-header/PageHeader.tsx +22 -6
  50. package/src/components/pagination/Pagination.test.tsx +8 -0
  51. package/src/components/pagination/Pagination.tsx +16 -6
  52. package/src/components/prose/Prose.test.tsx +35 -0
  53. package/src/components/prose/Prose.tsx +61 -0
  54. package/src/components/prose/index.ts +1 -0
  55. package/src/components/search/Search.test.tsx +16 -0
  56. package/src/components/search/Search.tsx +11 -2
  57. package/src/components/section-heading/SectionHeading.test.tsx +32 -0
  58. package/src/components/section-heading/SectionHeading.tsx +54 -0
  59. package/src/components/section-heading/index.ts +1 -0
  60. package/src/components/select/Select.tsx +9 -7
  61. package/src/components/site-footer/SiteFooter.test.tsx +30 -0
  62. package/src/components/site-footer/SiteFooter.tsx +79 -0
  63. package/src/components/site-footer/index.ts +1 -0
  64. package/src/components/site-header/SiteHeader.test.tsx +53 -0
  65. package/src/components/site-header/SiteHeader.tsx +124 -0
  66. package/src/components/site-header/index.ts +1 -0
  67. package/src/components/switch/Switch.test.tsx +10 -0
  68. package/src/components/switch/Switch.tsx +8 -3
  69. package/src/components/table-of-contents/TableOfContents.test.tsx +31 -0
  70. package/src/components/table-of-contents/TableOfContents.tsx +100 -0
  71. package/src/components/table-of-contents/index.ts +1 -0
  72. package/src/components/textarea/Textarea.tsx +1 -0
  73. package/src/index.ts +7 -0
  74. package/src/manifests/app-shell.manifest.json +50 -0
  75. package/src/manifests/badge.manifest.json +9 -4
  76. package/src/manifests/breadcrumb.manifest.json +6 -0
  77. package/src/manifests/button.manifest.json +14 -0
  78. package/src/manifests/confirm-dialog.manifest.json +132 -0
  79. package/src/manifests/data-table.manifest.json +50 -0
  80. package/src/manifests/dialog.manifest.json +7 -0
  81. package/src/manifests/drawer.manifest.json +7 -0
  82. package/src/manifests/link.manifest.json +106 -0
  83. package/src/manifests/page-header.manifest.json +30 -0
  84. package/src/manifests/pagination.manifest.json +6 -0
  85. package/src/manifests/prose.manifest.json +75 -0
  86. package/src/manifests/search.manifest.json +41 -9
  87. package/src/manifests/section-heading.manifest.json +108 -0
  88. package/src/manifests/select.manifest.json +6 -0
  89. package/src/manifests/site-footer.manifest.json +94 -0
  90. package/src/manifests/site-header.manifest.json +130 -0
  91. package/src/manifests/table-of-contents.manifest.json +87 -0
  92. package/src/test/tailwind-v4.test.ts +103 -0
package/dist/index.d.ts CHANGED
@@ -163,6 +163,8 @@ type SidebarItem = {
163
163
  badge?: React.ReactNode;
164
164
  /** Force the active state (otherwise activeHref is compared). */
165
165
  active?: boolean;
166
+ /** Nested items — renders a collapsible group with aria-expanded. */
167
+ children?: SidebarItem[];
166
168
  };
167
169
  type SidebarSection = {
168
170
  title?: string;
@@ -180,13 +182,22 @@ type SidebarProps = Omit<React.HTMLAttributes<HTMLElement>, 'children'> & {
180
182
  linkComponent?: React.ElementType;
181
183
  /** Accessible name of the nav landmark. Default 'Primary'. */
182
184
  label?: string;
185
+ /** Show the collapse/expand control (icon-only rail when collapsed). */
186
+ collapsible?: boolean;
187
+ /** Initial collapsed state when uncontrolled. */
188
+ defaultCollapsed?: boolean;
189
+ /** Controlled collapsed state. */
190
+ collapsed?: boolean;
191
+ onCollapsedChange?: (collapsed: boolean) => void;
192
+ /** Groups open initially (in addition to groups containing the active route). */
193
+ defaultExpanded?: string[];
183
194
  };
184
195
  /**
185
- * Sectioned navigation rail. Purely presentational: you pass the active
186
- * route and a router link component, so it stays stateless and works with
187
- * any routing library.
196
+ * Sectioned navigation rail — now with nested groups and a collapsible
197
+ * icon-only mode. Purely presentational: you pass the active route and a
198
+ * router link component, so it stays stateless about routing.
188
199
  */
189
- declare function Sidebar({ sections, heading, footer, activeHref, linkComponent, label, className, ...props }: SidebarProps): React.JSX.Element;
200
+ declare function Sidebar({ sections, heading, footer, activeHref, linkComponent, label, collapsible, defaultCollapsed, collapsed: collapsedProp, onCollapsedChange, defaultExpanded, className, ...props }: SidebarProps): React.JSX.Element;
190
201
  type AppShellProps = React.HTMLAttributes<HTMLDivElement> & {
191
202
  /** Desktop rail; also rendered inside a mobile drawer. */
192
203
  sidebar?: React.ReactNode;
@@ -196,26 +207,37 @@ type AppShellProps = React.HTMLAttributes<HTMLDivElement> & {
196
207
  hideMobileMenu?: boolean;
197
208
  /** Tailwind width class for the desktop rail. Default 'w-64'. */
198
209
  sidebarWidth?: string;
210
+ /** Breakpoint at which the rail switches to the mobile drawer. Default 'md'. */
211
+ mobileBreakpoint?: 'sm' | 'md' | 'lg';
199
212
  };
200
213
  /**
201
214
  * Application frame: fixed-height sidebar, sticky header, scrolling main.
202
215
  * On small screens the sidebar becomes a left Drawer opened by a burger
203
- * button, so pages never need their own responsive nav wiring.
216
+ * button, so pages never need their own responsive nav wiring. A collapsed
217
+ * Sidebar (data-collapsed) shrinks the desktop rail automatically.
204
218
  */
205
- declare function AppShell({ sidebar, header, hideMobileMenu, sidebarWidth, className, children, ...props }: AppShellProps): React.JSX.Element;
219
+ declare function AppShell({ sidebar, header, hideMobileMenu, sidebarWidth, mobileBreakpoint, className, children, ...props }: AppShellProps): React.JSX.Element;
206
220
 
207
221
  declare const buttonVariants: (props?: ({
208
- variant?: "link" | "default" | "destructive" | "success" | "warning" | "info" | "outline" | "outline-destructive" | "outline-success" | "outline-warning" | "outline-info" | "secondary" | "ghost" | null | undefined;
222
+ variant?: "link" | "default" | "primary" | "destructive" | "danger" | "success" | "warning" | "info" | "outline" | "outline-destructive" | "outline-success" | "outline-warning" | "outline-info" | "secondary" | "ghost" | null | undefined;
209
223
  size?: "sm" | "lg" | "default" | "icon" | null | undefined;
210
224
  } & class_variance_authority_types.ClassProp) | undefined) => string;
211
225
  type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonVariants> & {
212
226
  asChild?: boolean;
227
+ /** Shows a spinner, disables the button and sets aria-busy while an action runs. */
228
+ loading?: boolean;
229
+ /** Screen-reader text while loading (default "Loading"). */
230
+ loadingLabel?: string;
213
231
  };
214
232
  declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<(props?: ({
215
- variant?: "link" | "default" | "destructive" | "success" | "warning" | "info" | "outline" | "outline-destructive" | "outline-success" | "outline-warning" | "outline-info" | "secondary" | "ghost" | null | undefined;
233
+ variant?: "link" | "default" | "primary" | "destructive" | "danger" | "success" | "warning" | "info" | "outline" | "outline-destructive" | "outline-success" | "outline-warning" | "outline-info" | "secondary" | "ghost" | null | undefined;
216
234
  size?: "sm" | "lg" | "default" | "icon" | null | undefined;
217
235
  } & class_variance_authority_types.ClassProp) | undefined) => string> & {
218
236
  asChild?: boolean;
237
+ /** Shows a spinner, disables the button and sets aria-busy while an action runs. */
238
+ loading?: boolean;
239
+ /** Screen-reader text while loading (default "Loading"). */
240
+ loadingLabel?: string;
219
241
  } & React.RefAttributes<HTMLButtonElement>>;
220
242
 
221
243
  type ButtonGroupProps = React.HTMLAttributes<HTMLDivElement> & {
@@ -273,14 +295,14 @@ declare const InputGroupAddon: React.ForwardRefExoticComponent<React.HTMLAttribu
273
295
  } & React.RefAttributes<HTMLDivElement>>;
274
296
 
275
297
  declare const badgeVariants: (props?: ({
276
- variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
298
+ variant?: "default" | "primary" | "destructive" | "danger" | "success" | "warning" | "info" | "outline" | "secondary" | null | undefined;
277
299
  } & class_variance_authority_types.ClassProp) | undefined) => string;
278
300
  type BadgeProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof badgeVariants> & {
279
301
  /** Render the child element (e.g. a router Link) with badge styling. */
280
302
  asChild?: boolean;
281
303
  };
282
304
  declare const Badge: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
283
- variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
305
+ variant?: "default" | "primary" | "destructive" | "danger" | "success" | "warning" | "info" | "outline" | "secondary" | null | undefined;
284
306
  } & class_variance_authority_types.ClassProp) | undefined) => string> & {
285
307
  /** Render the child element (e.g. a router Link) with badge styling. */
286
308
  asChild?: boolean;
@@ -400,6 +422,8 @@ type DialogProps = {
400
422
  closeOnBackdrop?: boolean;
401
423
  /** Hide the close (✕) button in the header; Escape and backdrop still close. */
402
424
  showClose?: boolean;
425
+ /** Accessible label for the close button (default "Close dialog"). */
426
+ closeLabel?: string;
403
427
  /** Focused when the dialog opens; defaults to the first focusable element. */
404
428
  initialFocusRef?: React.RefObject<HTMLElement | null>;
405
429
  /** Accessible name when `title` is omitted (required with a custom header). */
@@ -435,7 +459,7 @@ declare function DialogFooter({ className, ...props }: DialogFooterProps): React
435
459
  * `<DialogHeader>`/`<DialogTitle>`/`<DialogDescription>` (and an
436
460
  * `ariaLabel` fallback) for full control.
437
461
  */
438
- declare function Dialog({ open, onOpenChange, title, description, children, size, header, footer, scrollable, bodyClassName, closeOnBackdrop, showClose, initialFocusRef, ariaLabel, animate, }: DialogProps): React.ReactPortal | null;
462
+ declare function Dialog({ open, onOpenChange, title, description, children, size, header, footer, scrollable, bodyClassName, closeOnBackdrop, showClose, closeLabel, initialFocusRef, ariaLabel, animate, }: DialogProps): React.ReactPortal | null;
439
463
 
440
464
  type DrawerSide = 'left' | 'right' | 'top' | 'bottom';
441
465
  type DrawerSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
@@ -463,6 +487,8 @@ type DrawerProps = {
463
487
  closeOnBackdrop?: boolean;
464
488
  /** Hide the close (✕) button in the header (default true). */
465
489
  showClose?: boolean;
490
+ /** Accessible label for the close button (default "Close drawer"). */
491
+ closeLabel?: string;
466
492
  /** Focused when the drawer opens; defaults to the first focusable element. */
467
493
  initialFocusRef?: React.RefObject<HTMLElement | null>;
468
494
  /** Overrides the accessible name (defaults to the title). */
@@ -481,7 +507,7 @@ type DrawerProps = {
481
507
  * restoration on close. Renders fixed to the chosen edge with a border
482
508
  * against the backdrop.
483
509
  */
484
- declare function Drawer({ open, onOpenChange, title, description, children, side, size, width, height, closeOnBackdrop, showClose, initialFocusRef, ariaLabel, animate, }: DrawerProps): React.ReactPortal | null;
510
+ declare function Drawer({ open, onOpenChange, title, description, children, side, size, width, height, closeOnBackdrop, showClose, closeLabel, initialFocusRef, ariaLabel, animate, }: DrawerProps): React.ReactPortal | null;
485
511
 
486
512
  type SelectOption = {
487
513
  value: string;
@@ -505,6 +531,8 @@ type SelectProps = Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'onChange
505
531
  value?: string | string[];
506
532
  defaultValue?: string | string[];
507
533
  onChange?: (value: string | string[]) => void;
534
+ /** Alias for onChange — the value-based callback used by most codebases. */
535
+ onValueChange?: (value: string | string[]) => void;
508
536
  };
509
537
  /**
510
538
  * Accessible select primitive built on the native <select>: full keyboard,
@@ -525,6 +553,8 @@ declare const Select: React.ForwardRefExoticComponent<Omit<React.SelectHTMLAttri
525
553
  value?: string | string[];
526
554
  defaultValue?: string | string[];
527
555
  onChange?: (value: string | string[]) => void;
556
+ /** Alias for onChange — the value-based callback used by most codebases. */
557
+ onValueChange?: (value: string | string[]) => void;
528
558
  } & React.RefAttributes<HTMLSelectElement>>;
529
559
 
530
560
  type TableCardProps = React.HTMLAttributes<HTMLDivElement> & {
@@ -631,6 +661,8 @@ type SearchOption = {
631
661
  type SearchProps = {
632
662
  /** The full option set; filtered client-side as the user types. */
633
663
  options: SearchOption[];
664
+ /** Controlled selected value (display follows it). null clears the selection. */
665
+ value?: string | null;
634
666
  /** Initially selected option value. Selection is reported via onValueChange. */
635
667
  defaultValue?: string;
636
668
  /** Called with the selected option's value. */
@@ -651,7 +683,7 @@ type SearchProps = {
651
683
  * defaultValue). The listbox portals to document.body with fixed
652
684
  * positioning, so scrollable containers never clip it.
653
685
  */
654
- declare function Search({ options, defaultValue, onValueChange, placeholder, emptyText, disabled, id, name, className, 'aria-label': ariaLabel, }: SearchProps): React.JSX.Element;
686
+ declare function Search({ options, value, defaultValue, onValueChange, placeholder, emptyText, disabled, id, name, className, 'aria-label': ariaLabel, }: SearchProps): React.JSX.Element;
655
687
 
656
688
  type ComboboxItem = {
657
689
  value: string;
@@ -1053,6 +1085,8 @@ type SwitchProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange
1053
1085
  defaultChecked?: boolean;
1054
1086
  /** Fired when the user toggles the switch. */
1055
1087
  onCheckedChange?: (checked: boolean) => void;
1088
+ /** Name for form submission — renders a hidden "on" input while checked. */
1089
+ name?: string;
1056
1090
  };
1057
1091
  /**
1058
1092
  * Toggle switch for binary settings. Rendered as a button with
@@ -1066,6 +1100,8 @@ declare const Switch: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttri
1066
1100
  defaultChecked?: boolean;
1067
1101
  /** Fired when the user toggles the switch. */
1068
1102
  onCheckedChange?: (checked: boolean) => void;
1103
+ /** Name for form submission — renders a hidden "on" input while checked. */
1104
+ name?: string;
1069
1105
  } & React.RefAttributes<HTMLButtonElement>>;
1070
1106
 
1071
1107
  declare const separatorVariants: (props?: ({
@@ -1241,6 +1277,138 @@ type CardFooterProps = React.HTMLAttributes<HTMLDivElement>;
1241
1277
  /** Footer section of a Card; typically contains actions. */
1242
1278
  declare const CardFooter: React.ForwardRefExoticComponent<CardFooterProps & React.RefAttributes<HTMLDivElement>>;
1243
1279
 
1280
+ type ConfirmDialogProps = {
1281
+ open: boolean;
1282
+ onOpenChange: (open: boolean) => void;
1283
+ title: string;
1284
+ description?: string;
1285
+ /** Confirm button label. Default 'Confirm'. */
1286
+ confirmLabel?: string;
1287
+ /** Cancel button label. Default 'Cancel'. */
1288
+ cancelLabel?: string;
1289
+ /** Destructive confirmation (red confirm button + destructive panel accent). */
1290
+ destructive?: boolean;
1291
+ /**
1292
+ * Confirm handler. Return a promise to show a pending state; the dialog
1293
+ * closes automatically when it resolves unless `closeOnConfirm` is false.
1294
+ */
1295
+ onConfirm: () => void | Promise<void>;
1296
+ closeOnConfirm?: boolean;
1297
+ /** Extra body content above the actions. */
1298
+ children?: React.ReactNode;
1299
+ };
1300
+ /**
1301
+ * Accessible confirmation dialog built on Dialog: focus trap, Escape,
1302
+ * backdrop dismissal and focus restoration come from the primitive, plus a
1303
+ * pending state for async confirmations (79 hand-rolled confirm modals in
1304
+ * the audited apps use this exact shape).
1305
+ */
1306
+ declare function ConfirmDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, destructive, onConfirm, closeOnConfirm, children, }: ConfirmDialogProps): React.JSX.Element;
1307
+
1308
+ type TocHeading = {
1309
+ id: string;
1310
+ text: string;
1311
+ level: 2 | 3 | 4;
1312
+ };
1313
+ type TableOfContentsProps = React.HTMLAttributes<HTMLElement> & {
1314
+ headings: TocHeading[];
1315
+ /** Controlled active heading id (otherwise use `useScrollSpy`). */
1316
+ activeId?: string;
1317
+ /** Accessible name. Default 'On this page'. */
1318
+ label?: string;
1319
+ /** Stick to the viewport while the article scrolls (default true). */
1320
+ sticky?: boolean;
1321
+ };
1322
+ /**
1323
+ * "On this page" navigation for long-form content. Renders a nested list
1324
+ * with indentation per heading level and aria-current on the active item.
1325
+ * Pair with `useScrollSpy` (or your own scroll tracking) for the active id.
1326
+ */
1327
+ declare function TableOfContents({ headings, activeId, label, sticky, className, ...props }: TableOfContentsProps): React.JSX.Element;
1328
+ /**
1329
+ * Tracks which of the given element ids is currently in view. Returns the
1330
+ * active id (the last heading scrolled past) and stays SSR-safe.
1331
+ */
1332
+ declare function useScrollSpy(ids: string[], options?: {
1333
+ rootMargin?: string;
1334
+ }): string | undefined;
1335
+
1336
+ type ProseProps = React.HTMLAttributes<HTMLDivElement> & {
1337
+ /** Type scale. Default 'md'. */
1338
+ size?: 'sm' | 'md' | 'lg';
1339
+ };
1340
+ /**
1341
+ * Long-form content typography for rendered markdown/MDX output.
1342
+ *
1343
+ * Self-contained (no @tailwindcss/typography dependency): element styles ride
1344
+ * on child selectors, so any MDX/remark renderer can drop its output inside.
1345
+ * Keeps the content pipeline (Shiki, KaTeX, Mermaid) untouched.
1346
+ */
1347
+ declare const Prose: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
1348
+ /** Type scale. Default 'md'. */
1349
+ size?: "sm" | "md" | "lg";
1350
+ } & React.RefAttributes<HTMLDivElement>>;
1351
+
1352
+ type SiteFooterLink = {
1353
+ label: string;
1354
+ href: string;
1355
+ external?: boolean;
1356
+ };
1357
+ type SiteFooterColumn = {
1358
+ title: string;
1359
+ links: SiteFooterLink[];
1360
+ };
1361
+ type SiteFooterProps = React.HTMLAttributes<HTMLElement> & {
1362
+ /** Brand slot (logo/lockup). */
1363
+ brand?: React.ReactNode;
1364
+ /** Short line under the brand. */
1365
+ tagline?: string;
1366
+ columns: SiteFooterColumn[];
1367
+ /** Bottom bar (copyright, legal links). */
1368
+ legal?: React.ReactNode;
1369
+ /** Router link element. */
1370
+ linkComponent?: React.ElementType;
1371
+ };
1372
+ /**
1373
+ * Marketing footer: brand + tagline column, link columns, and a legal bar.
1374
+ * Router-agnostic through `linkComponent`; external links get safe rel.
1375
+ */
1376
+ declare function SiteFooter({ brand, tagline, columns, legal, linkComponent, className, ...props }: SiteFooterProps): React.JSX.Element;
1377
+
1378
+ type SiteNavItem = {
1379
+ href: string;
1380
+ label: string;
1381
+ /** Render with target=_blank + rel=noopener. */
1382
+ external?: boolean;
1383
+ };
1384
+ type SiteHeaderProps = React.HTMLAttributes<HTMLElement> & {
1385
+ /** Brand slot — logo/lockup or wordmark. Wrapped in a link to "/". */
1386
+ brand: React.ReactNode;
1387
+ /** Primary navigation items. */
1388
+ items: SiteNavItem[];
1389
+ /** Current route for active styling (aria-current="page"). */
1390
+ activeHref?: string;
1391
+ /**
1392
+ * Active matching: 'prefix' highlights /docs when on /docs/installation
1393
+ * (default — marketing), 'exact' only the identical href (app chrome).
1394
+ */
1395
+ match?: 'prefix' | 'exact';
1396
+ /** Right-aligned actions (theme toggle, GitHub, CTA). */
1397
+ actions?: React.ReactNode;
1398
+ /** Custom link element for routers (Next Link, react-router Link). */
1399
+ linkComponent?: React.ElementType;
1400
+ /** Pin to the top (default true). */
1401
+ sticky?: boolean;
1402
+ /** Title of the mobile navigation drawer. Default 'Menu'. */
1403
+ mobileLabel?: string;
1404
+ };
1405
+ /**
1406
+ * Marketing/site header: sticky bar with brand, horizontal navigation with
1407
+ * prefix-aware active states, right-aligned actions and a mobile drawer.
1408
+ * Router-agnostic through `linkComponent`.
1409
+ */
1410
+ declare function SiteHeader({ brand, items, activeHref, match, actions, linkComponent, sticky, mobileLabel, className, ...props }: SiteHeaderProps): React.JSX.Element;
1411
+
1244
1412
  type AccordionProps = {
1245
1413
  /** Controlled open item ids. */
1246
1414
  value?: string[];
@@ -1356,12 +1524,28 @@ type DataTableProps<T> = {
1356
1524
  pageSize?: number;
1357
1525
  /** Controlled page (1-based) when pageSize is set. */
1358
1526
  page?: number;
1527
+ /** Total page count (manual/server pagination). */
1528
+ pageCount?: number;
1529
+ /** Total row count across all pages (summary + derived page count). */
1530
+ total?: number;
1531
+ /** Server pagination: render `data` as-is; don't slice or sort client-side. */
1532
+ manualPagination?: boolean;
1533
+ /** Selected row ids (controlled). Enables the leading selection column. */
1534
+ selectedRowIds?: string[];
1535
+ /** Fires with the full selection after a row or select-all toggle. */
1536
+ onSelectedRowIdsChange?: (ids: string[]) => void;
1537
+ /** Disable selection for individual rows. */
1538
+ isRowSelectable?: (row: T) => boolean;
1539
+ /** Rendered above the table while at least one row is selected. */
1540
+ bulkActions?: React.ReactNode;
1359
1541
  /** Fires on page change (controlled or not). */
1360
1542
  onPageChange?: (page: number) => void;
1361
1543
  /** Click/keyboard activation on a row. */
1362
1544
  onRowClick?: (row: T) => void;
1363
1545
  /** Message shown when data is empty. */
1364
1546
  emptyMessage?: string;
1547
+ /** Accessible label for the select-all checkbox (default "Select all rows"). */
1548
+ selectAllLabel?: string;
1365
1549
  /** Pin the header while the body scrolls (needs a max-height on the wrapper via className). */
1366
1550
  stickyHeader?: boolean;
1367
1551
  /** Compact row density. */
@@ -1384,7 +1568,7 @@ type DataTableProps<T> = {
1384
1568
  * aria-sort, cursor pagination when `pageSize` is set, and a friendly empty
1385
1569
  * state — so most tables never need hand-rolled table code.
1386
1570
  */
1387
- declare function DataTable<T>({ columns, data, rowId, caption, defaultSort, sortKey, sortDir, onSortChange, renderSortIcon, pageSize, page, onPageChange, onRowClick, emptyMessage, stickyHeader, density, zebra, loading, loadingRows, className, }: DataTableProps<T>): React.JSX.Element;
1571
+ declare function DataTable<T>({ columns, data, rowId, caption, defaultSort, sortKey, sortDir, onSortChange, renderSortIcon, pageSize, page, onPageChange, pageCount: pageCountProp, total, manualPagination, selectedRowIds, onSelectedRowIdsChange, isRowSelectable, bulkActions, onRowClick, emptyMessage, selectAllLabel, stickyHeader, density, zebra, loading, loadingRows, className, }: DataTableProps<T>): React.JSX.Element;
1388
1572
 
1389
1573
  type ListProps = React.HTMLAttributes<HTMLUListElement> & {
1390
1574
  /** Hairline dividers between rows. */
@@ -1443,6 +1627,39 @@ declare const ListItem: React.ForwardRefExoticComponent<React.LiHTMLAttributes<H
1443
1627
  disabled?: boolean;
1444
1628
  } & React.RefAttributes<HTMLLIElement>>;
1445
1629
 
1630
+ declare const linkVariants: (props?: ({
1631
+ variant?: "default" | "muted" | "underline" | "arrow" | "external" | null | undefined;
1632
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1633
+ type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & VariantProps<typeof linkVariants> & {
1634
+ /** Render the child element (router Link) with link styling. */
1635
+ asChild?: boolean;
1636
+ /**
1637
+ * Force external handling (target=_blank + rel). Absolute http(s) hrefs
1638
+ * are detected automatically; mailto:/tel: links never open a new tab.
1639
+ */
1640
+ external?: boolean;
1641
+ };
1642
+ /**
1643
+ * Inline link primitive with the project's link variants. Keeps a real
1644
+ * `<a href>` (SEO, modified clicks, middle-click) and adds safe external
1645
+ * handling: absolute URLs get target="_blank" + rel="noopener noreferrer"
1646
+ * and a screen-reader note, unless `external={false}`.
1647
+ *
1648
+ * For client-side routing, wrap your router's link: `<Link asChild><RouterLink …/></Link>`.
1649
+ */
1650
+ declare const Link: React.ForwardRefExoticComponent<React.AnchorHTMLAttributes<HTMLAnchorElement> & VariantProps<(props?: ({
1651
+ variant?: "default" | "muted" | "underline" | "arrow" | "external" | null | undefined;
1652
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & {
1653
+ /** Render the child element (router Link) with link styling. */
1654
+ asChild?: boolean;
1655
+ /**
1656
+ * Force external handling (target=_blank + rel). Absolute http(s) hrefs
1657
+ * are detected automatically; mailto:/tel: links never open a new tab.
1658
+ */
1659
+ external?: boolean;
1660
+ } & React.RefAttributes<HTMLAnchorElement>>;
1661
+ type LinkVariant = NonNullable<VariantProps<typeof linkVariants>['variant']>;
1662
+
1446
1663
  declare const sizeClasses$1: {
1447
1664
  readonly xs: "text-xs";
1448
1665
  readonly sm: "text-sm";
@@ -1552,6 +1769,12 @@ type PageHeaderProps = React.HTMLAttributes<HTMLDivElement> & {
1552
1769
  actions?: React.ReactNode;
1553
1770
  /** Small slot under the title row (tabs, filters). */
1554
1771
  children?: React.ReactNode;
1772
+ /** Eyebrow/kicker above the title (category, date, overline). */
1773
+ eyebrow?: React.ReactNode;
1774
+ /** Heading scale — 'hero' is for marketing landing pages. */
1775
+ size?: 'sm' | 'md' | 'lg' | 'hero';
1776
+ /** Text alignment; hero marketing pages often center. */
1777
+ align?: 'left' | 'center';
1555
1778
  };
1556
1779
  /**
1557
1780
  * Standard page heading block: optional breadcrumbs, title, description and
@@ -1567,6 +1790,42 @@ declare const PageHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<H
1567
1790
  actions?: React.ReactNode;
1568
1791
  /** Small slot under the title row (tabs, filters). */
1569
1792
  children?: React.ReactNode;
1793
+ /** Eyebrow/kicker above the title (category, date, overline). */
1794
+ eyebrow?: React.ReactNode;
1795
+ /** Heading scale — 'hero' is for marketing landing pages. */
1796
+ size?: "sm" | "md" | "lg" | "hero";
1797
+ /** Text alignment; hero marketing pages often center. */
1798
+ align?: "left" | "center";
1799
+ } & React.RefAttributes<HTMLDivElement>>;
1800
+
1801
+ type SectionHeadingProps = React.HTMLAttributes<HTMLDivElement> & {
1802
+ title: string;
1803
+ description?: string;
1804
+ /** Kicker above the title (category, step, overline). */
1805
+ eyebrow?: React.ReactNode;
1806
+ /** Right-aligned actions (link to all, buttons). */
1807
+ actions?: React.ReactNode;
1808
+ /** Heading level rendered for the title (default h2). */
1809
+ level?: 2 | 3 | 4;
1810
+ align?: 'left' | 'center';
1811
+ size?: 'sm' | 'md' | 'lg';
1812
+ };
1813
+ /**
1814
+ * Marketing/content section heading: eyebrow, title, description and an
1815
+ * actions slot, with heading level and alignment control. Complements
1816
+ * PageHeader (which owns the page's single h1).
1817
+ */
1818
+ declare const SectionHeading: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
1819
+ title: string;
1820
+ description?: string;
1821
+ /** Kicker above the title (category, step, overline). */
1822
+ eyebrow?: React.ReactNode;
1823
+ /** Right-aligned actions (link to all, buttons). */
1824
+ actions?: React.ReactNode;
1825
+ /** Heading level rendered for the title (default h2). */
1826
+ level?: 2 | 3 | 4;
1827
+ align?: "left" | "center";
1828
+ size?: "sm" | "md" | "lg";
1570
1829
  } & React.RefAttributes<HTMLDivElement>>;
1571
1830
 
1572
1831
  type MetricTrend = 'up' | 'down' | 'flat';
@@ -2058,6 +2317,8 @@ type BreadcrumbProps = React.HTMLAttributes<HTMLElement> & {
2058
2317
  * (e.g. via a router, state machine, or analytics wrapper).
2059
2318
  */
2060
2319
  onItemClick?: (item: BreadcrumbItem, index: number) => void;
2320
+ /** Custom link element for routers (Next Link, react-router Link). */
2321
+ linkComponent?: React.ElementType;
2061
2322
  };
2062
2323
  /**
2063
2324
  * Navigation breadcrumb trail. The last item is rendered as the current
@@ -2075,6 +2336,8 @@ declare const Breadcrumb: React.ForwardRefExoticComponent<React.HTMLAttributes<H
2075
2336
  * (e.g. via a router, state machine, or analytics wrapper).
2076
2337
  */
2077
2338
  onItemClick?: (item: BreadcrumbItem, index: number) => void;
2339
+ /** Custom link element for routers (Next Link, react-router Link). */
2340
+ linkComponent?: React.ElementType;
2078
2341
  } & React.RefAttributes<HTMLElement>>;
2079
2342
 
2080
2343
  type PaginationIcons = {
@@ -2116,6 +2379,15 @@ type PaginationProps = React.HTMLAttributes<HTMLElement> & {
2116
2379
  showLast?: boolean;
2117
2380
  /** Replace the default ‹ › « » glyphs. */
2118
2381
  icons?: PaginationIcons;
2382
+ /** Localized landmark and control labels. */
2383
+ labels?: {
2384
+ pagination?: string;
2385
+ first?: string;
2386
+ previous?: string;
2387
+ next?: string;
2388
+ last?: string;
2389
+ page?: (page: number) => string;
2390
+ };
2119
2391
  };
2120
2392
  /**
2121
2393
  * Numeric pagination with prev/next and optional boundary jumps. Renders
@@ -2153,6 +2425,15 @@ declare const Pagination: React.ForwardRefExoticComponent<React.HTMLAttributes<H
2153
2425
  showLast?: boolean;
2154
2426
  /** Replace the default ‹ › « » glyphs. */
2155
2427
  icons?: PaginationIcons;
2428
+ /** Localized landmark and control labels. */
2429
+ labels?: {
2430
+ pagination?: string;
2431
+ first?: string;
2432
+ previous?: string;
2433
+ next?: string;
2434
+ last?: string;
2435
+ page?: (page: number) => string;
2436
+ };
2156
2437
  } & React.RefAttributes<HTMLElement>>;
2157
2438
 
2158
- export { type AccessibilityRequirement, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, AlertTitle, type AlertTitleProps, type AntiPattern, AppShell, type AppShellProps, AuthLayout, type AuthLayoutProps, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Block, type BlockElement, type BlockProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Checkbox, CheckboxGroup, CheckboxGroupItem, type CheckboxGroupItemProps, type CheckboxGroupOrientation, type CheckboxGroupProps, type CheckboxProps, type ComboboxItem, type ComponentManifest, type ComponentTier, type CompositionRule, type ContentGuideline, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, Dialog, DialogBody, type DialogBodyProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, type DialogProps, type DialogSize, DialogTitle, type DialogTitleProps, Divider, Drawer, type DrawerProps, type DrawerSide, type DrawerSize, EmptyState, type EmptyStateProps, Fieldset, type FieldsetProps, FileUpload, type FileUploadProps, FilterBar, type FilterBarProps, Flex, FlexItem, type FlexItemProps, type FlexProps, Form, FormField, type FormFieldLabelPlacement, type FormFieldProps, FormLayout, type FormLayoutProps, type FormProps, type FormVariant, type GapValue, Grid, GridItem, type GridItemProps, type GridProps, Heading, type HeadingLevel, type HeadingProps, Input, InputGroup, InputGroupAddon, type InputGroupAddonProps, type InputGroupProps, type InputProps, Label, type LabelProps, List, ListItem, type ListItemProps, type ListProps, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLabel, type MenuLabelProps, type MenuProps, MenuSeparator, type MenuSeparatorProps, MenuTrigger, type MenuTriggerProps, MetricCard, type MetricCardProps, type MetricTrend, PageHeader, type PageHeaderProps, Pagination, type PaginationIcons, type PaginationProps, PasswordInput, type PasswordInputProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, type PropSchema, Radio, RadioCard, type RadioCardProps, RadioGroup, RadioGroupContext, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioProps, Search, type SearchOption, type SearchProps, Select, SelectMenu, type SelectMenuItem, type SelectMenuProps, type SelectOption, type SelectOptionGroup, type SelectProps, Separator, type SeparatorProps, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, Skeleton, type SkeletonProps, type SortIconState, Spinner, type SpinnerProps, Stepper, type StepperProps, type StepperStep, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCard, type TableCardProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Text, type TextProps, Textarea, type TextareaProps, TimePicker, type TimePickerProps, Timeline, type TimelineItem, type TimelineProps, type ToastAction, type ToastContextValue, type ToastOptions, ToastProvider, type ToastRecord, type ToastVariant, Toaster, type ToasterPosition, type ToasterProps, Tooltip, type TooltipProps, type UsageExample, alertVariants, badgeVariants, buttonVariants, cn, isComponentManifest, resolveGap, separatorVariants, spinnerVariants, toast, useCombobox, usePresence, useToast };
2439
+ export { type AccessibilityRequirement, Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, type AlertDescriptionProps, type AlertProps, AlertTitle, type AlertTitleProps, type AntiPattern, AppShell, type AppShellProps, AuthLayout, type AuthLayoutProps, Autocomplete, type AutocompleteOption, type AutocompleteProps, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Block, type BlockElement, type BlockProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Checkbox, CheckboxGroup, CheckboxGroupItem, type CheckboxGroupItemProps, type CheckboxGroupOrientation, type CheckboxGroupProps, type CheckboxProps, type ComboboxItem, type ComponentManifest, type ComponentTier, type CompositionRule, ConfirmDialog, type ConfirmDialogProps, type ContentGuideline, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, Dialog, DialogBody, type DialogBodyProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, type DialogProps, type DialogSize, DialogTitle, type DialogTitleProps, Divider, Drawer, type DrawerProps, type DrawerSide, type DrawerSize, EmptyState, type EmptyStateProps, Fieldset, type FieldsetProps, FileUpload, type FileUploadProps, FilterBar, type FilterBarProps, Flex, FlexItem, type FlexItemProps, type FlexProps, Form, FormField, type FormFieldLabelPlacement, type FormFieldProps, FormLayout, type FormLayoutProps, type FormProps, type FormVariant, type GapValue, Grid, GridItem, type GridItemProps, type GridProps, Heading, type HeadingLevel, type HeadingProps, Input, InputGroup, InputGroupAddon, type InputGroupAddonProps, type InputGroupProps, type InputProps, Label, type LabelProps, Link, type LinkProps, type LinkVariant, List, ListItem, type ListItemProps, type ListProps, Menu, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLabel, type MenuLabelProps, type MenuProps, MenuSeparator, type MenuSeparatorProps, MenuTrigger, type MenuTriggerProps, MetricCard, type MetricCardProps, type MetricTrend, PageHeader, type PageHeaderProps, Pagination, type PaginationIcons, type PaginationProps, PasswordInput, type PasswordInputProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Progress, type ProgressProps, type PropSchema, Prose, type ProseProps, Radio, RadioCard, type RadioCardProps, RadioGroup, RadioGroupContext, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioProps, Search, type SearchOption, type SearchProps, SectionHeading, type SectionHeadingProps, Select, SelectMenu, type SelectMenuItem, type SelectMenuProps, type SelectOption, type SelectOptionGroup, type SelectProps, Separator, type SeparatorProps, Sidebar, type SidebarItem, type SidebarProps, type SidebarSection, SiteFooter, type SiteFooterColumn, type SiteFooterLink, type SiteFooterProps, SiteHeader, type SiteHeaderProps, type SiteNavItem, Skeleton, type SkeletonProps, type SortIconState, Spinner, type SpinnerProps, Stepper, type StepperProps, type StepperStep, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCard, type TableCardProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, TableOfContents, type TableOfContentsProps, type TableProps, TableRow, type TableRowProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Text, type TextProps, Textarea, type TextareaProps, TimePicker, type TimePickerProps, Timeline, type TimelineItem, type TimelineProps, type ToastAction, type ToastContextValue, type ToastOptions, ToastProvider, type ToastRecord, type ToastVariant, Toaster, type ToasterPosition, type ToasterProps, type TocHeading, Tooltip, type TooltipProps, type UsageExample, alertVariants, badgeVariants, buttonVariants, cn, isComponentManifest, resolveGap, separatorVariants, spinnerVariants, toast, useCombobox, usePresence, useScrollSpy, useToast };