@handamade/psi-react 0.20.0 → 0.21.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 (111) hide show
  1. package/README.md +1 -1
  2. package/dist/AppShell/AppShell.d.ts +51 -0
  3. package/dist/AppShell/AppShell.d.ts.map +1 -0
  4. package/dist/Banner/Banner.d.ts +35 -0
  5. package/dist/Banner/Banner.d.ts.map +1 -0
  6. package/dist/Button/Button.d.ts +4 -0
  7. package/dist/Button/Button.d.ts.map +1 -1
  8. package/dist/CopyButton/CopyButton.d.ts +23 -0
  9. package/dist/CopyButton/CopyButton.d.ts.map +1 -0
  10. package/dist/CursorPagination/CursorPagination.d.ts +29 -0
  11. package/dist/CursorPagination/CursorPagination.d.ts.map +1 -0
  12. package/dist/Field/Field.d.ts +11 -1
  13. package/dist/Field/Field.d.ts.map +1 -1
  14. package/dist/Field/useFieldControl.d.ts +40 -0
  15. package/dist/Field/useFieldControl.d.ts.map +1 -0
  16. package/dist/InlineAlert/InlineAlert.d.ts +32 -0
  17. package/dist/InlineAlert/InlineAlert.d.ts.map +1 -0
  18. package/dist/NavBar/NavBar.d.ts +10 -2
  19. package/dist/NavBar/NavBar.d.ts.map +1 -1
  20. package/dist/NavTree/NavGroup.d.ts +22 -0
  21. package/dist/NavTree/NavGroup.d.ts.map +1 -0
  22. package/dist/NavTree/NavItem.d.ts +25 -0
  23. package/dist/NavTree/NavItem.d.ts.map +1 -0
  24. package/dist/NavTree/NavTree.d.ts +23 -0
  25. package/dist/NavTree/NavTree.d.ts.map +1 -0
  26. package/dist/Skeleton/Skeleton.d.ts +22 -0
  27. package/dist/Skeleton/Skeleton.d.ts.map +1 -0
  28. package/dist/SkipLink/SkipLink.d.ts +25 -0
  29. package/dist/SkipLink/SkipLink.d.ts.map +1 -0
  30. package/dist/Table/Table.d.ts +6 -3
  31. package/dist/Table/Table.d.ts.map +1 -1
  32. package/dist/Table/TableBody.d.ts +7 -4
  33. package/dist/Table/TableBody.d.ts.map +1 -1
  34. package/dist/Table/TableCaption.d.ts +21 -0
  35. package/dist/Table/TableCaption.d.ts.map +1 -0
  36. package/dist/Table/TableCell.d.ts +15 -5
  37. package/dist/Table/TableCell.d.ts.map +1 -1
  38. package/dist/Table/TableHead.d.ts +5 -3
  39. package/dist/Table/TableHead.d.ts.map +1 -1
  40. package/dist/Table/TableHeaderCell.d.ts +5 -3
  41. package/dist/Table/TableHeaderCell.d.ts.map +1 -1
  42. package/dist/Table/TableRow.d.ts +5 -3
  43. package/dist/Table/TableRow.d.ts.map +1 -1
  44. package/dist/Toast/Announcement.d.ts +30 -0
  45. package/dist/Toast/Announcement.d.ts.map +1 -0
  46. package/dist/Toast/Toast.d.ts +16 -2
  47. package/dist/Toast/Toast.d.ts.map +1 -1
  48. package/dist/Toast/ToastProvider.d.ts.map +1 -1
  49. package/dist/Toast/ToastRegion.d.ts +16 -7
  50. package/dist/Toast/ToastRegion.d.ts.map +1 -1
  51. package/dist/Toast/status.d.ts +15 -0
  52. package/dist/Toast/status.d.ts.map +1 -0
  53. package/dist/Toast/useToast.d.ts +6 -1
  54. package/dist/Toast/useToast.d.ts.map +1 -1
  55. package/dist/Toolbar/Toolbar.d.ts +16 -4
  56. package/dist/Toolbar/Toolbar.d.ts.map +1 -1
  57. package/dist/a11y-meta.d.ts.map +1 -1
  58. package/dist/index.d.ts +29 -3
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +1377 -1065
  61. package/dist/manifest.json +1033 -240
  62. package/dist/patterns.json +671 -3
  63. package/dist/styles.css +1 -1
  64. package/docs/Announcement.md +37 -0
  65. package/docs/AppShell.md +46 -0
  66. package/docs/AspectRatio.md +1 -1
  67. package/docs/Banner.md +54 -0
  68. package/docs/Button.md +2 -1
  69. package/docs/Card.md +1 -1
  70. package/docs/Checkbox.md +1 -1
  71. package/docs/CopyButton.md +51 -0
  72. package/docs/CursorPagination.md +45 -0
  73. package/docs/DescriptionItem.md +1 -1
  74. package/docs/DescriptionList.md +1 -1
  75. package/docs/Dialog.md +1 -1
  76. package/docs/Field.md +3 -2
  77. package/docs/IconButton.md +1 -1
  78. package/docs/InlineAlert.md +53 -0
  79. package/docs/Input.md +1 -1
  80. package/docs/Menu.md +1 -1
  81. package/docs/MenuItem.md +1 -1
  82. package/docs/MenuSeparator.md +1 -1
  83. package/docs/NavBar.md +4 -2
  84. package/docs/NavGroup.md +40 -0
  85. package/docs/NavItem.md +40 -0
  86. package/docs/NavTree.md +39 -0
  87. package/docs/Pagination.md +1 -1
  88. package/docs/Panel.md +1 -1
  89. package/docs/Select.md +1 -1
  90. package/docs/Skeleton.md +50 -0
  91. package/docs/SkipLink.md +40 -0
  92. package/docs/Switch.md +1 -1
  93. package/docs/Tab.md +1 -1
  94. package/docs/TabList.md +1 -1
  95. package/docs/TabPanel.md +1 -1
  96. package/docs/Table.md +1 -1
  97. package/docs/TableBody.md +3 -2
  98. package/docs/TableCaption.md +39 -0
  99. package/docs/TableCell.md +5 -2
  100. package/docs/TableHead.md +2 -1
  101. package/docs/TableHeaderCell.md +2 -1
  102. package/docs/TableRow.md +2 -1
  103. package/docs/Tabs.md +1 -1
  104. package/docs/Tag.md +1 -1
  105. package/docs/Toast.md +5 -3
  106. package/docs/ToastProvider.md +1 -1
  107. package/docs/ToastRegion.md +4 -4
  108. package/docs/Toolbar.md +5 -3
  109. package/docs/Tooltip.md +1 -1
  110. package/llms.txt +39 -9
  111. package/package.json +2 -2
@@ -26,6 +26,13 @@
26
26
  "default": 32,
27
27
  "description": "Height in px (24 | 32 | 40 | 48)."
28
28
  },
29
+ {
30
+ "name": "type",
31
+ "type": "\"button\" | \"submit\" | \"reset\"",
32
+ "required": false,
33
+ "default": null,
34
+ "description": "Button type. Declared so the manifest lists it and a pattern can say\n`submit` (D87). No default is set: the platform's applies — `submit`\ninside a form, a plain button elsewhere."
35
+ },
29
36
  {
30
37
  "name": "href",
31
38
  "type": "string",
@@ -462,6 +469,13 @@
462
469
  "default": false,
463
470
  "description": "Renders the required marker and flows `required` to the control."
464
471
  },
472
+ {
473
+ "name": "requiredText",
474
+ "type": "string",
475
+ "required": false,
476
+ "default": null,
477
+ "description": "With `required`, the label shows this text — \"(Required)\", say — instead\nof the asterisk, so the requirement is stated in words and not by a glyph\nalone (D84). Visible and aria-hidden: the control carries the programmatic\nsignal (`required` / `aria-required`), and a screen reader that heard both\nwould say it twice. Without `required` it renders nothing."
478
+ },
465
479
  {
466
480
  "name": "group",
467
481
  "type": "boolean",
@@ -720,7 +734,7 @@
720
734
  },
721
735
  {
722
736
  "name": "Toolbar",
723
- "description": "Horizontal grouping row for filter/search controls (D52). Wraps on overflow; zero JS. Deliberately NOT ARIA role=\"toolbar\" — that role contracts roving-tabindex arrow-key navigation, wrong for form controls. With aria-label it announces as role=\"group\".",
737
+ "description": "Horizontal grouping row for filter/search controls (D52). Wraps on overflow; zero JS. Deliberately NOT ARIA role=\"toolbar\" — that role contracts roving-tabindex arrow-key navigation, wrong for form controls. With aria-label it announces as role=\"group\"; as a form, as a named form landmark instead (D87).",
724
738
  "slots": [
725
739
  {
726
740
  "name": "body",
@@ -744,9 +758,23 @@
744
758
  "default": 8,
745
759
  "description": "Gap between controls in px."
746
760
  },
761
+ {
762
+ "name": "align",
763
+ "type": "\"center\" | \"end\"",
764
+ "required": false,
765
+ "default": "center",
766
+ "description": "Cross-axis alignment. `end` lines items up on their bottom edge, so\ncontrols under visible Field labels and a button without one share a\ncontrol line (D87). It lines up each item's *last* line: a Field in an\nend-aligned row must end on its control — no description or error line\nunder it; put a hint in the label."
767
+ },
768
+ {
769
+ "name": "as",
770
+ "type": "\"div\" | \"form\"",
771
+ "required": false,
772
+ "default": "div",
773
+ "description": "Root element. `form` renders a real `<form>`, so a submit Button\nsubmits it and Enter in a field does too; with `aria-label` it is a\nnamed form landmark, so it takes no `role=\"group\"` (D87). Wire\n`onSubmit`."
774
+ },
747
775
  {
748
776
  "name": "ref",
749
- "type": "Ref<HTMLDivElement>",
777
+ "type": "Ref<HTMLDivElement | HTMLFormElement>",
750
778
  "required": false,
751
779
  "default": null,
752
780
  "description": "Forwarded ref to the root element."
@@ -791,7 +819,26 @@
791
819
  {
792
820
  "name": "NavBar",
793
821
  "description": "Top navigation bar with brand, nav-link, and trailing-action slots.",
794
- "slots": [],
822
+ "slots": [
823
+ {
824
+ "name": "brand",
825
+ "accepts": {},
826
+ "cardinality": "0..*",
827
+ "order": 1
828
+ },
829
+ {
830
+ "name": "actions",
831
+ "accepts": {},
832
+ "cardinality": "0..*",
833
+ "order": 2
834
+ },
835
+ {
836
+ "name": "body",
837
+ "accepts": {},
838
+ "cardinality": "0..*",
839
+ "order": 3
840
+ }
841
+ ],
795
842
  "props": [
796
843
  {
797
844
  "name": "brand",
@@ -812,7 +859,21 @@
812
859
  "type": "ReactNode",
813
860
  "required": false,
814
861
  "default": null,
815
- "description": "Nav links."
862
+ "description": "Nav links. The `<nav>` renders only when there are children, so a bar with\na brand and actions and no links has no empty landmark (D88)."
863
+ },
864
+ {
865
+ "name": "navLabel",
866
+ "type": "string",
867
+ "required": false,
868
+ "default": null,
869
+ "description": "Accessible name of the links' `<nav>` (its `aria-label`). Rest props land\non the `<header>`, so this is the only way to label the `<nav>` (D88)."
870
+ },
871
+ {
872
+ "name": "fluid",
873
+ "type": "boolean",
874
+ "required": false,
875
+ "default": false,
876
+ "description": "Lay the row out at full width: it drops `psi-container` (the centred\nmax-width column) and keeps the `--psi-gutter` side padding. For an\napplication header over a full-width frame (D88)."
816
877
  },
817
878
  {
818
879
  "name": "ref",
@@ -831,30 +892,30 @@
831
892
  ]
832
893
  },
833
894
  {
834
- "name": "AspectRatio",
835
- "description": "Fixed-aspect-ratio box that sizes its child media.",
895
+ "name": "SkipLink",
896
+ "description": "A link to the page's main content, invisible until it takes keyboard focus and then fixed at the inline-start top corner on a surface, drawing the shared focus ring (D88). Render it first in the document. No script: native fragment navigation moves focus to a target that is focusable, so the next *Tab* continues from inside it. `AppShell`'s `main` is one (`tabIndex={-1}`); a bare `<main>` is not, so give it one. A modal `Dialog` makes the rest of the document inert, so the link never needs to beat one. A `ToastRegion` is on the native top layer, which paints above everything whatever its `z-index`: do not place one at `top-start` (its default is `bottom-end`) in an app with a skip link, or it covers the focused link.",
836
897
  "slots": [],
837
898
  "props": [
838
899
  {
839
- "name": "children",
840
- "type": "ReactNode",
841
- "required": false,
900
+ "name": "href",
901
+ "type": "string",
902
+ "required": true,
842
903
  "default": null,
843
- "description": "Content constrained to the ratio."
904
+ "description": "Fragment of the element to skip to, such as `\"#main\"`. The target must be\nfocusable (`tabIndex={-1}` is enough), or focus does not move."
844
905
  },
845
906
  {
846
- "name": "ratio",
847
- "type": "number",
907
+ "name": "children",
908
+ "type": "ReactNode",
848
909
  "required": true,
849
910
  "default": null,
850
- "description": "Width/height ratio, e.g. 16/10 or 4/5."
911
+ "description": "Visible text, such as \"Skip to content\"."
851
912
  },
852
913
  {
853
914
  "name": "ref",
854
- "type": "Ref<HTMLDivElement>",
915
+ "type": "Ref<HTMLAnchorElement>",
855
916
  "required": false,
856
917
  "default": null,
857
- "description": "Forwarded ref to the frame element."
918
+ "description": "Forwarded ref to the anchor."
858
919
  },
859
920
  {
860
921
  "name": "className",
@@ -866,73 +927,84 @@
866
927
  ]
867
928
  },
868
929
  {
869
- "name": "Menu",
870
- "description": "Action menu on the native Popover API top layer: the top layer and light dismiss come from the platform; Esc, roving keyboard, placement and dismissal reasons are Psi's (D53). Controlled-only, like Dialog (D50). Controlled-only means Menu does not change its own visibility. Esc and item-select *report* a dismissal via onClose(reason) and leave the popover open; only the consumer flipping `open` to false actually closes it. Esc calls preventDefault() to suppress the platform's own popover dismissal, which is what makes that possible. Light dismiss (outside click) is the one asymmetry, and it is forced by the platform: the browser hides the popover itself and the hide-side `beforetoggle` is not cancelable, so the popover is already closed by the time the resulting `toggle` lets us report onClose(\"outside\"). The consumer must still flip `open` to false so React's state matches the DOM. `toggle` therefore reports only that one reason. A close driven by the consumer (`open` true -> false) runs through the sync effect's own hidePopover(), which raises a `toggle` too — that one is suppressed, because a programmatic close is not a dismissal and must not call onClose.",
930
+ "name": "NavTree",
931
+ "description": "A navigation tree (D88): a `<nav aria-label>` around a `<ul>` of `NavItem`s and `NavGroup`s. Native elements only — *Tab* moves through the group buttons and the links of open groups; there is no roving focus and no `role=\"menu\"` or `role=\"tree\"`, because site navigation is a list of links, not a widget. Router-agnostic: pass your router's link inside each `NavItem`, with `aria-current=\"page\"` on the current one.",
871
932
  "slots": [
872
- {
873
- "name": "trigger",
874
- "accepts": {
875
- "contracts": [
876
- "interactive"
877
- ]
878
- },
879
- "cardinality": "1..1",
880
- "order": 1
881
- },
882
933
  {
883
934
  "name": "body",
884
935
  "accepts": {
885
936
  "components": [
886
- "MenuItem",
887
- "MenuSeparator"
937
+ "NavGroup",
938
+ "NavItem"
888
939
  ]
889
940
  },
890
941
  "cardinality": "1..*",
891
- "order": 2
942
+ "order": 1
892
943
  }
893
944
  ],
894
945
  "props": [
895
946
  {
896
- "name": "open",
897
- "type": "boolean",
947
+ "name": "aria-label",
948
+ "type": "string",
898
949
  "required": true,
899
950
  "default": null,
900
- "description": "Controlled open state; syncs to showPopover()/hidePopover()."
951
+ "description": "Accessible name of the navigation landmark, such as \"Main\". Required: an\napp has more than one `<nav>` (a header's, a sidebar's), and an unnamed\none is indistinguishable from the rest. Declared here rather than\ninherited so docgen keeps it in the manifest (D60)."
901
952
  },
902
953
  {
903
- "name": "onClose",
904
- "type": "(reason: \"item-select\" | \"esc\" | \"outside\") => void",
954
+ "name": "children",
955
+ "type": "ReactNode",
905
956
  "required": true,
906
957
  "default": null,
907
- "description": "Called when a dismissal is *requested*; the consumer flips `open`.\n\nMenu never closes itself on `\"esc\"` or `\"item-select\"` — the popover stays\nopen until `open` becomes false (D50). `\"outside\"` is the one exception:\nlight dismiss is performed by the browser before it tells us, so by the\ntime that reason is reported the popover is already closed. Flipping\n`open` to false is still required, to keep React's state in step.\n\nInvariant (D58): a dismissal is only ever reported for a menu that is\ncurrently open according to its own `open` prop. The platform can close\nan auto popover before the consumer's state catches up — clicking another\nmenu's trigger light-dismisses this one before the consumer's click\nhandler runs — and a report for an already-closed menu would clear a\nselection that has since moved on."
958
+ "description": "`NavItem`s and `NavGroup`s — each renders an `<li>`."
908
959
  },
909
960
  {
910
- "name": "trigger",
911
- "type": "ReactElement<Record<string, unknown>, string | JSXElementConstructor<any>>",
912
- "required": true,
961
+ "name": "className",
962
+ "type": "string",
963
+ "required": false,
913
964
  "default": null,
914
- "description": "The trigger element. Must be a single React element that spreads unknown\nprops onto a focusable node (a Psi `Button`, say): Menu clones it to add\n`aria-haspopup=\"menu\"` and `aria-expanded`, so assistive tech associates\nthe menu with the control users actually focus."
965
+ "description": "Additional CSS class name(s) merged onto the component's root element."
915
966
  },
916
967
  {
917
- "name": "placement",
918
- "type": "\"bottom-start\" | \"bottom-end\" | \"top-start\" | \"top-end\"",
968
+ "name": "ref",
969
+ "type": "Ref<HTMLElement>",
919
970
  "required": false,
920
- "default": "bottom-start",
921
- "description": "Placement relative to the trigger."
971
+ "default": null,
972
+ "description": "Forwarded ref to the `<nav>`."
973
+ }
974
+ ]
975
+ },
976
+ {
977
+ "name": "NavGroup",
978
+ "description": "A collapsible group of `NavItem`s in a `NavTree` (D88). Controlled-only, like `Tabs` (D67): `open` and `onOpenChange` are required and nothing is remembered. Renders a native `<button aria-expanded aria-controls>` over a `<ul>` that is `hidden` when closed, so the items leave the layout and the accessibility tree while `aria-controls` keeps naming an element. The chevron turns with the state and is `aria-hidden`: the label and `aria-expanded` carry the meaning.",
979
+ "slots": [],
980
+ "props": [
981
+ {
982
+ "name": "label",
983
+ "type": "ReactNode",
984
+ "required": true,
985
+ "default": null,
986
+ "description": "The group's visible label, such as \"Reports\"."
922
987
  },
923
988
  {
924
- "name": "aria-label",
925
- "type": "string",
926
- "required": false,
989
+ "name": "open",
990
+ "type": "boolean",
991
+ "required": true,
927
992
  "default": null,
928
- "description": "Accessible name for the menu when there is no visible label."
993
+ "description": "Whether the group's items are shown. Controlled."
994
+ },
995
+ {
996
+ "name": "onOpenChange",
997
+ "type": "(open: boolean) => void",
998
+ "required": true,
999
+ "default": null,
1000
+ "description": "Called with the next state when the button is pressed. The group never\nchanges `open` itself."
929
1001
  },
930
1002
  {
931
1003
  "name": "children",
932
1004
  "type": "ReactNode",
933
1005
  "required": true,
934
1006
  "default": null,
935
- "description": "MenuItem and MenuSeparator children."
1007
+ "description": "`NavItem`s of the group."
936
1008
  },
937
1009
  {
938
1010
  "name": "className",
@@ -940,19 +1012,12 @@
940
1012
  "required": false,
941
1013
  "default": null,
942
1014
  "description": "Additional CSS class name(s) merged onto the component's root element."
943
- },
944
- {
945
- "name": "ref",
946
- "type": "Ref<HTMLDivElement>",
947
- "required": false,
948
- "default": null,
949
- "description": "Forwarded ref to the popover element."
950
1015
  }
951
1016
  ]
952
1017
  },
953
1018
  {
954
- "name": "MenuItem",
955
- "description": "One action in a Menu. Renders a real <button> so activation, Enter and Space come from the platform; the roving tabindex is applied by Menu's keyboard hook, which finds items via [data-psi-menu-item] (D53).",
1019
+ "name": "NavItem",
1020
+ "description": "One entry of a `NavTree` (D88): an `<li>` that styles the single anchor inside it. Router apps pass their own link as the child, so it keeps its `href`, `aria-current` and handlers; `href` is for plain links and for presets, where the compose tree can hold only manifest components and a raw `<a>` is not one. The current page is never marked by colour alone: medium weight, a raised surface and a bar at the inline start.",
956
1021
  "slots": [],
957
1022
  "props": [
958
1023
  {
@@ -960,116 +1025,135 @@
960
1025
  "type": "ReactNode",
961
1026
  "required": true,
962
1027
  "default": null,
963
- "description": "Item label."
1028
+ "description": "Without `href`: one anchor, your router's link — put `aria-current=\"page\"`\non the current one. With `href`: the link's text."
964
1029
  },
965
1030
  {
966
- "name": "onSelect",
967
- "type": "() => void",
968
- "required": true,
1031
+ "name": "href",
1032
+ "type": "string",
1033
+ "required": false,
969
1034
  "default": null,
970
- "description": "Fires on activation; Menu then reports the dismissal via onClose(\"item-select\") (D50)."
1035
+ "description": "Render the anchor yourself (D88), for a plain link or a preset: the\n`<li>` holds `<a href>` with `children` as its text. Router apps leave it\nout and pass their own link as the child, so the link keeps its own\nhandlers."
971
1036
  },
972
1037
  {
973
- "name": "variant",
974
- "type": "\"neutral\" | \"danger\"",
1038
+ "name": "current",
1039
+ "type": "boolean",
975
1040
  "required": false,
976
- "default": "neutral",
977
- "description": "danger is for destructive actions only (house rule)."
1041
+ "default": null,
1042
+ "description": "Mark the link as the current page (`aria-current=\"page\"`). Only with\n`href`; a link you pass as a child carries its own `aria-current`."
978
1043
  },
979
1044
  {
980
- "name": "disabled",
981
- "type": "boolean",
1045
+ "name": "className",
1046
+ "type": "string",
982
1047
  "required": false,
983
- "default": false,
984
- "description": ""
1048
+ "default": null,
1049
+ "description": "Additional CSS class name(s) merged onto the component's root element."
1050
+ },
1051
+ {
1052
+ "name": "ref",
1053
+ "type": "Ref<HTMLLIElement>",
1054
+ "required": false,
1055
+ "default": null,
1056
+ "description": "Forwarded ref to the `<li>`."
985
1057
  }
986
1058
  ]
987
1059
  },
988
1060
  {
989
- "name": "MenuSeparator",
990
- "description": "Hairline rule between Menu item groups. No props by design (D53).",
991
- "slots": [],
992
- "props": []
993
- },
994
- {
995
- "name": "Table",
996
- "description": "Data table on native table semantics. Holds no state: sorting, selection and pagination are the consumer's (D62, extending D50/D53).",
1061
+ "name": "AppShell",
1062
+ "description": "The frame of an application (D88): a header row over a sidebar and a `<main>` that each scroll on their own, filling the viewport (`100dvh`). Because the header has a row of its own and `main` is its own scroller, nothing scrolls under the header, so a focused element is never obscured by it (WCAG 2.2 *Focus Not Obscured*) without `scroll-padding`. `main` carries `id={mainId}` and `tabIndex={-1}`: the target of a `SkipLink`, not a tab stop; focused by the skip link it draws the shared focus ring inside its box. A closed sidebar is `hidden`, not narrowed to icons; there is no responsive drawer and no stored open state, so this is a desktop frame. A page whose document must scroll as a whole does not use `AppShell`. Mount it at the root of the page with no margin or padding around it: it is `100dvh` tall, so anything around it makes the document scroll and slides the frame. Do not place a `ToastRegion` at `top-start` in an app with a skip link: the native top layer paints over the focused link.",
997
1063
  "slots": [
998
1064
  {
999
- "name": "body",
1065
+ "name": "skipLink",
1000
1066
  "accepts": {
1001
1067
  "components": [
1002
- "TableHead",
1003
- "TableBody"
1068
+ "SkipLink"
1004
1069
  ]
1005
1070
  },
1006
- "cardinality": "1..*",
1071
+ "cardinality": "0..1",
1007
1072
  "order": 1
1073
+ },
1074
+ {
1075
+ "name": "header",
1076
+ "accepts": {
1077
+ "components": [
1078
+ "NavBar"
1079
+ ]
1080
+ },
1081
+ "cardinality": "0..1",
1082
+ "order": 2
1083
+ },
1084
+ {
1085
+ "name": "sidebar",
1086
+ "accepts": {
1087
+ "components": [
1088
+ "NavTree"
1089
+ ]
1090
+ },
1091
+ "cardinality": "0..1",
1092
+ "order": 3
1093
+ },
1094
+ {
1095
+ "name": "body",
1096
+ "accepts": {},
1097
+ "cardinality": "0..*",
1098
+ "order": 4
1008
1099
  }
1009
1100
  ],
1010
1101
  "props": [
1011
1102
  {
1012
- "name": "size",
1013
- "type": "32 | 40 | 48",
1014
- "required": false,
1015
- "default": 40,
1016
- "description": "Row height in px."
1017
- },
1018
- {
1019
- "name": "stickyHeader",
1020
- "type": "boolean",
1103
+ "name": "skipLink",
1104
+ "type": "ReactNode",
1021
1105
  "required": false,
1022
1106
  "default": null,
1023
- "description": "Pins the header while the body scrolls."
1107
+ "description": "A `SkipLink` (D88), rendered first so it is the first tab stop. Point its\n`href` at `#` plus `mainId`."
1024
1108
  },
1025
1109
  {
1026
- "name": "sortable",
1027
- "type": "boolean",
1110
+ "name": "header",
1111
+ "type": "ReactNode",
1028
1112
  "required": false,
1029
- "default": false,
1030
- "description": "Enables the sort affordance on header cells that declare a `sortKey`."
1113
+ "default": null,
1114
+ "description": "The header row, usually a `NavBar` (D88). It sits in a row of its own\nabove the sidebar and `main`, so nothing scrolls under it."
1031
1115
  },
1032
1116
  {
1033
- "name": "sort",
1034
- "type": "TableSortState | null",
1117
+ "name": "sidebar",
1118
+ "type": "ReactNode",
1035
1119
  "required": false,
1036
1120
  "default": null,
1037
- "description": "Controlled sort state; `null` when nothing is sorted."
1121
+ "description": "The sidebar's content, usually a `NavTree` (D88). The shell wraps it in a\n`<div>`, not an `<aside>`: a `NavTree` is already the landmark."
1038
1122
  },
1039
1123
  {
1040
- "name": "onSortChange",
1041
- "type": "((sort: TableSortState) => void)",
1124
+ "name": "children",
1125
+ "type": "ReactNode",
1042
1126
  "required": false,
1043
1127
  "default": null,
1044
- "description": "Called with the **next** sort state, already toggled — store it as given\nand do not toggle again. A fresh column arrives `\"asc\"`; an active `\"asc\"`\ncolumn emits `\"desc\"`; an active `\"desc\"` column emits `\"asc\"`.\n\nOptional in the type because `sortable` may be false; a discriminated union\nexpressing the real contract does not survive docgen's flat prop\nextraction, which would strip these props from the manifest entirely (D62)."
1128
+ "description": "The page, rendered inside `<main>` (D88)."
1045
1129
  },
1046
1130
  {
1047
- "name": "selectable",
1131
+ "name": "sidebarOpen",
1048
1132
  "type": "boolean",
1049
1133
  "required": false,
1050
- "default": false,
1051
- "description": "Renders the row-selection checkbox column."
1134
+ "default": true,
1135
+ "description": "Whether the sidebar is shown. Controlled: wire your Menu toggle's\n`aria-expanded` and this to one piece of state. Closed, the sidebar is\n`hidden`, so it leaves the layout and the accessibility tree, and stays in\nthe DOM so the toggle's `aria-controls` keeps naming an element (D88)."
1052
1136
  },
1053
1137
  {
1054
- "name": "selected",
1055
- "type": "ReadonlySet<string>",
1138
+ "name": "sidebarTheme",
1139
+ "type": "string",
1056
1140
  "required": false,
1057
- "default": "new Set<string>()",
1058
- "description": "Controlled selection, keyed by each `TableRow`'s `rowId`."
1141
+ "default": null,
1142
+ "description": "A theme name for the sidebar alone, such as `\"dark\"`: sets\n`data-psi-theme` on the sidebar element, so every token inside re-resolves\nunder that theme while the rest of the page keeps its own (D88). The\nsidebar paints `--psi-bg-primary` itself; a theme paints no background."
1059
1143
  },
1060
1144
  {
1061
- "name": "onSelectionChange",
1062
- "type": "((selected: ReadonlySet<string>) => void)",
1145
+ "name": "sidebarId",
1146
+ "type": "string",
1063
1147
  "required": false,
1064
- "default": null,
1065
- "description": "Called with the next selection. See `onSortChange` on why it is optional."
1148
+ "default": "sidebar",
1149
+ "description": "`id` of the sidebar element, which a toggle names with `aria-controls`\n(D88)."
1066
1150
  },
1067
1151
  {
1068
- "name": "children",
1069
- "type": "ReactNode",
1070
- "required": true,
1071
- "default": null,
1072
- "description": "TableHead and TableBody."
1152
+ "name": "mainId",
1153
+ "type": "string",
1154
+ "required": false,
1155
+ "default": "main",
1156
+ "description": "`id` of `<main>`, which a `SkipLink`'s `href` names (D88)."
1073
1157
  },
1074
1158
  {
1075
1159
  "name": "className",
@@ -1080,22 +1164,280 @@
1080
1164
  },
1081
1165
  {
1082
1166
  "name": "ref",
1083
- "type": "Ref<HTMLTableElement>",
1167
+ "type": "Ref<HTMLDivElement>",
1084
1168
  "required": false,
1085
1169
  "default": null,
1086
- "description": "Forwarded ref to the underlying `<table>` element."
1170
+ "description": "Forwarded ref to the root `<div>`."
1087
1171
  }
1088
1172
  ]
1089
1173
  },
1090
1174
  {
1091
- "name": "TableHead",
1092
- "description": "`<thead>`. When the table is selectable, prepends the select-all cell to the FIRST header row so the header's column count matches the body's — the checkbox column is Table's, not the consumer's schema. Clones the row rather than rebuilding it, so the consumer's own props on that `TableRow` survive.",
1175
+ "name": "AspectRatio",
1176
+ "description": "Fixed-aspect-ratio box that sizes its child media.",
1093
1177
  "slots": [],
1094
1178
  "props": [
1095
1179
  {
1096
1180
  "name": "children",
1097
1181
  "type": "ReactNode",
1098
- "required": true,
1182
+ "required": false,
1183
+ "default": null,
1184
+ "description": "Content constrained to the ratio."
1185
+ },
1186
+ {
1187
+ "name": "ratio",
1188
+ "type": "number",
1189
+ "required": true,
1190
+ "default": null,
1191
+ "description": "Width/height ratio, e.g. 16/10 or 4/5."
1192
+ },
1193
+ {
1194
+ "name": "ref",
1195
+ "type": "Ref<HTMLDivElement>",
1196
+ "required": false,
1197
+ "default": null,
1198
+ "description": "Forwarded ref to the frame element."
1199
+ },
1200
+ {
1201
+ "name": "className",
1202
+ "type": "string",
1203
+ "required": false,
1204
+ "default": null,
1205
+ "description": "Additional CSS class name(s) merged onto the component's root element."
1206
+ }
1207
+ ]
1208
+ },
1209
+ {
1210
+ "name": "Menu",
1211
+ "description": "Action menu on the native Popover API top layer: the top layer and light dismiss come from the platform; Esc, roving keyboard, placement and dismissal reasons are Psi's (D53). Controlled-only, like Dialog (D50). Controlled-only means Menu does not change its own visibility. Esc and item-select *report* a dismissal via onClose(reason) and leave the popover open; only the consumer flipping `open` to false actually closes it. Esc calls preventDefault() to suppress the platform's own popover dismissal, which is what makes that possible. Light dismiss (outside click) is the one asymmetry, and it is forced by the platform: the browser hides the popover itself and the hide-side `beforetoggle` is not cancelable, so the popover is already closed by the time the resulting `toggle` lets us report onClose(\"outside\"). The consumer must still flip `open` to false so React's state matches the DOM. `toggle` therefore reports only that one reason. A close driven by the consumer (`open` true -> false) runs through the sync effect's own hidePopover(), which raises a `toggle` too — that one is suppressed, because a programmatic close is not a dismissal and must not call onClose.",
1212
+ "slots": [
1213
+ {
1214
+ "name": "trigger",
1215
+ "accepts": {
1216
+ "contracts": [
1217
+ "interactive"
1218
+ ]
1219
+ },
1220
+ "cardinality": "1..1",
1221
+ "order": 1
1222
+ },
1223
+ {
1224
+ "name": "body",
1225
+ "accepts": {
1226
+ "components": [
1227
+ "MenuItem",
1228
+ "MenuSeparator"
1229
+ ]
1230
+ },
1231
+ "cardinality": "1..*",
1232
+ "order": 2
1233
+ }
1234
+ ],
1235
+ "props": [
1236
+ {
1237
+ "name": "open",
1238
+ "type": "boolean",
1239
+ "required": true,
1240
+ "default": null,
1241
+ "description": "Controlled open state; syncs to showPopover()/hidePopover()."
1242
+ },
1243
+ {
1244
+ "name": "onClose",
1245
+ "type": "(reason: \"item-select\" | \"esc\" | \"outside\") => void",
1246
+ "required": true,
1247
+ "default": null,
1248
+ "description": "Called when a dismissal is *requested*; the consumer flips `open`.\n\nMenu never closes itself on `\"esc\"` or `\"item-select\"` — the popover stays\nopen until `open` becomes false (D50). `\"outside\"` is the one exception:\nlight dismiss is performed by the browser before it tells us, so by the\ntime that reason is reported the popover is already closed. Flipping\n`open` to false is still required, to keep React's state in step.\n\nInvariant (D58): a dismissal is only ever reported for a menu that is\ncurrently open according to its own `open` prop. The platform can close\nan auto popover before the consumer's state catches up — clicking another\nmenu's trigger light-dismisses this one before the consumer's click\nhandler runs — and a report for an already-closed menu would clear a\nselection that has since moved on."
1249
+ },
1250
+ {
1251
+ "name": "trigger",
1252
+ "type": "ReactElement<Record<string, unknown>, string | JSXElementConstructor<any>>",
1253
+ "required": true,
1254
+ "default": null,
1255
+ "description": "The trigger element. Must be a single React element that spreads unknown\nprops onto a focusable node (a Psi `Button`, say): Menu clones it to add\n`aria-haspopup=\"menu\"` and `aria-expanded`, so assistive tech associates\nthe menu with the control users actually focus."
1256
+ },
1257
+ {
1258
+ "name": "placement",
1259
+ "type": "\"bottom-start\" | \"bottom-end\" | \"top-start\" | \"top-end\"",
1260
+ "required": false,
1261
+ "default": "bottom-start",
1262
+ "description": "Placement relative to the trigger."
1263
+ },
1264
+ {
1265
+ "name": "aria-label",
1266
+ "type": "string",
1267
+ "required": false,
1268
+ "default": null,
1269
+ "description": "Accessible name for the menu when there is no visible label."
1270
+ },
1271
+ {
1272
+ "name": "children",
1273
+ "type": "ReactNode",
1274
+ "required": true,
1275
+ "default": null,
1276
+ "description": "MenuItem and MenuSeparator children."
1277
+ },
1278
+ {
1279
+ "name": "className",
1280
+ "type": "string",
1281
+ "required": false,
1282
+ "default": null,
1283
+ "description": "Additional CSS class name(s) merged onto the component's root element."
1284
+ },
1285
+ {
1286
+ "name": "ref",
1287
+ "type": "Ref<HTMLDivElement>",
1288
+ "required": false,
1289
+ "default": null,
1290
+ "description": "Forwarded ref to the popover element."
1291
+ }
1292
+ ]
1293
+ },
1294
+ {
1295
+ "name": "MenuItem",
1296
+ "description": "One action in a Menu. Renders a real <button> so activation, Enter and Space come from the platform; the roving tabindex is applied by Menu's keyboard hook, which finds items via [data-psi-menu-item] (D53).",
1297
+ "slots": [],
1298
+ "props": [
1299
+ {
1300
+ "name": "children",
1301
+ "type": "ReactNode",
1302
+ "required": true,
1303
+ "default": null,
1304
+ "description": "Item label."
1305
+ },
1306
+ {
1307
+ "name": "onSelect",
1308
+ "type": "() => void",
1309
+ "required": true,
1310
+ "default": null,
1311
+ "description": "Fires on activation; Menu then reports the dismissal via onClose(\"item-select\") (D50)."
1312
+ },
1313
+ {
1314
+ "name": "variant",
1315
+ "type": "\"neutral\" | \"danger\"",
1316
+ "required": false,
1317
+ "default": "neutral",
1318
+ "description": "danger is for destructive actions only (house rule)."
1319
+ },
1320
+ {
1321
+ "name": "disabled",
1322
+ "type": "boolean",
1323
+ "required": false,
1324
+ "default": false,
1325
+ "description": ""
1326
+ }
1327
+ ]
1328
+ },
1329
+ {
1330
+ "name": "MenuSeparator",
1331
+ "description": "Hairline rule between Menu item groups. No props by design (D53).",
1332
+ "slots": [],
1333
+ "props": []
1334
+ },
1335
+ {
1336
+ "name": "Table",
1337
+ "description": "Data table on native table semantics. Holds no state: sorting, selection and pagination are the consumer's (D62, extending D50/D53).",
1338
+ "slots": [
1339
+ {
1340
+ "name": "body",
1341
+ "accepts": {
1342
+ "components": [
1343
+ "TableCaption",
1344
+ "TableHead",
1345
+ "TableBody"
1346
+ ]
1347
+ },
1348
+ "cardinality": "1..*",
1349
+ "order": 1
1350
+ }
1351
+ ],
1352
+ "props": [
1353
+ {
1354
+ "name": "size",
1355
+ "type": "32 | 40 | 48",
1356
+ "required": false,
1357
+ "default": 40,
1358
+ "description": "Row height in px."
1359
+ },
1360
+ {
1361
+ "name": "stickyHeader",
1362
+ "type": "boolean",
1363
+ "required": false,
1364
+ "default": null,
1365
+ "description": "Pins the header while the body scrolls."
1366
+ },
1367
+ {
1368
+ "name": "sortable",
1369
+ "type": "boolean",
1370
+ "required": false,
1371
+ "default": false,
1372
+ "description": "Enables the sort affordance on header cells that declare a `sortKey`."
1373
+ },
1374
+ {
1375
+ "name": "sort",
1376
+ "type": "TableSortState | null",
1377
+ "required": false,
1378
+ "default": null,
1379
+ "description": "Controlled sort state; `null` when nothing is sorted."
1380
+ },
1381
+ {
1382
+ "name": "onSortChange",
1383
+ "type": "((sort: TableSortState) => void)",
1384
+ "required": false,
1385
+ "default": null,
1386
+ "description": "Called with the **next** sort state, already toggled — store it as given\nand do not toggle again. A fresh column arrives `\"asc\"`; an active `\"asc\"`\ncolumn emits `\"desc\"`; an active `\"desc\"` column emits `\"asc\"`.\n\nOptional in the type because `sortable` may be false; a discriminated union\nexpressing the real contract does not survive docgen's flat prop\nextraction, which would strip these props from the manifest entirely (D62)."
1387
+ },
1388
+ {
1389
+ "name": "selectable",
1390
+ "type": "boolean",
1391
+ "required": false,
1392
+ "default": false,
1393
+ "description": "Renders the row-selection checkbox column."
1394
+ },
1395
+ {
1396
+ "name": "selected",
1397
+ "type": "ReadonlySet<string>",
1398
+ "required": false,
1399
+ "default": "new Set<string>()",
1400
+ "description": "Controlled selection, keyed by each `TableRow`'s `rowId`."
1401
+ },
1402
+ {
1403
+ "name": "onSelectionChange",
1404
+ "type": "((selected: ReadonlySet<string>) => void)",
1405
+ "required": false,
1406
+ "default": null,
1407
+ "description": "Called with the next selection. See `onSortChange` on why it is optional."
1408
+ },
1409
+ {
1410
+ "name": "children",
1411
+ "type": "ReactNode",
1412
+ "required": true,
1413
+ "default": null,
1414
+ "description": "TableHead and TableBody."
1415
+ },
1416
+ {
1417
+ "name": "className",
1418
+ "type": "string",
1419
+ "required": false,
1420
+ "default": null,
1421
+ "description": "Additional CSS class name(s) merged onto the component's root element."
1422
+ },
1423
+ {
1424
+ "name": "ref",
1425
+ "type": "Ref<HTMLTableElement>",
1426
+ "required": false,
1427
+ "default": null,
1428
+ "description": "Forwarded ref to the underlying `<table>` element."
1429
+ }
1430
+ ]
1431
+ },
1432
+ {
1433
+ "name": "TableHead",
1434
+ "description": "`<thead>`. When the table is selectable, prepends the select-all cell to the FIRST header row so the header's column count matches the body's — the checkbox column is Table's, not the consumer's schema. Clones the row rather than rebuilding it, so the consumer's own props on that `TableRow` survive.",
1435
+ "slots": [],
1436
+ "props": [
1437
+ {
1438
+ "name": "children",
1439
+ "type": "ReactNode",
1440
+ "required": true,
1099
1441
  "default": null,
1100
1442
  "description": "The header TableRow."
1101
1443
  },
@@ -1105,20 +1447,397 @@
1105
1447
  "required": false,
1106
1448
  "default": null,
1107
1449
  "description": "Additional CSS class name(s) merged onto the component's root element."
1450
+ },
1451
+ {
1452
+ "name": "ref",
1453
+ "type": "Ref<HTMLTableSectionElement>",
1454
+ "required": false,
1455
+ "default": null,
1456
+ "description": "Forwarded ref to the `<thead>`."
1457
+ }
1458
+ ]
1459
+ },
1460
+ {
1461
+ "name": "TableBody",
1462
+ "description": "`<tbody>` wrapper. Remaining attributes land on it (D85) — `aria-busy` while a page of rows loads, say.",
1463
+ "slots": [],
1464
+ "props": [
1465
+ {
1466
+ "name": "children",
1467
+ "type": "ReactNode",
1468
+ "required": true,
1469
+ "default": null,
1470
+ "description": "The body TableRows."
1471
+ },
1472
+ {
1473
+ "name": "className",
1474
+ "type": "string",
1475
+ "required": false,
1476
+ "default": null,
1477
+ "description": "Additional CSS class name(s) merged onto the component's root element."
1478
+ },
1479
+ {
1480
+ "name": "ref",
1481
+ "type": "Ref<HTMLTableSectionElement>",
1482
+ "required": false,
1483
+ "default": null,
1484
+ "description": "Forwarded ref to the `<tbody>`."
1485
+ }
1486
+ ]
1487
+ },
1488
+ {
1489
+ "name": "TableRow",
1490
+ "description": "`<tr>`. `rowId` is the key the `selected` set holds.",
1491
+ "slots": [],
1492
+ "props": [
1493
+ {
1494
+ "name": "rowId",
1495
+ "type": "string",
1496
+ "required": false,
1497
+ "default": null,
1498
+ "description": "Stable identity for selection. Required for selectable tables (D62)."
1499
+ },
1500
+ {
1501
+ "name": "selectLabel",
1502
+ "type": "string",
1503
+ "required": false,
1504
+ "default": null,
1505
+ "description": "Accessible name for this row's selection checkbox."
1506
+ },
1507
+ {
1508
+ "name": "children",
1509
+ "type": "ReactNode",
1510
+ "required": true,
1511
+ "default": null,
1512
+ "description": "The row's cells."
1513
+ },
1514
+ {
1515
+ "name": "className",
1516
+ "type": "string",
1517
+ "required": false,
1518
+ "default": null,
1519
+ "description": "Additional CSS class name(s) merged onto the component's root element."
1520
+ },
1521
+ {
1522
+ "name": "ref",
1523
+ "type": "Ref<HTMLTableRowElement>",
1524
+ "required": false,
1525
+ "default": null,
1526
+ "description": "Forwarded ref to the `<tr>`."
1527
+ }
1528
+ ]
1529
+ },
1530
+ {
1531
+ "name": "TableHeaderCell",
1532
+ "description": "`<th scope=\"col\">`. `aria-sort` belongs on the th, never on the inner button — assistive tech reads the sort state from the column header.",
1533
+ "slots": [],
1534
+ "props": [
1535
+ {
1536
+ "name": "sortKey",
1537
+ "type": "string",
1538
+ "required": false,
1539
+ "default": null,
1540
+ "description": "Sort key this column emits. Enables the sort control when the table is `sortable`."
1541
+ },
1542
+ {
1543
+ "name": "numeric",
1544
+ "type": "boolean",
1545
+ "required": false,
1546
+ "default": null,
1547
+ "description": "Right-aligns and renders tabular figures (D62)."
1548
+ },
1549
+ {
1550
+ "name": "children",
1551
+ "type": "ReactNode",
1552
+ "required": false,
1553
+ "default": null,
1554
+ "description": "Header label."
1555
+ },
1556
+ {
1557
+ "name": "className",
1558
+ "type": "string",
1559
+ "required": false,
1560
+ "default": null,
1561
+ "description": "Additional CSS class name(s) merged onto the component's root element."
1562
+ },
1563
+ {
1564
+ "name": "ref",
1565
+ "type": "Ref<HTMLTableCellElement>",
1566
+ "required": false,
1567
+ "default": null,
1568
+ "description": "Forwarded ref to the `<th>`."
1108
1569
  }
1109
1570
  ]
1110
1571
  },
1111
1572
  {
1112
- "name": "TableBody",
1113
- "description": "`<tbody>` wrapper.",
1573
+ "name": "TableCell",
1574
+ "description": "`<td>`, or `<th scope=\"row\">` with `rowHeader`. `numeric` means right-aligned *and* tabular — a column that aligns but whose digits jitter between rows defeats the purpose. Remaining attributes land on the cell (D85).",
1575
+ "slots": [],
1576
+ "props": [
1577
+ {
1578
+ "name": "numeric",
1579
+ "type": "boolean",
1580
+ "required": false,
1581
+ "default": null,
1582
+ "description": "Right-aligns and renders tabular figures (D62)."
1583
+ },
1584
+ {
1585
+ "name": "colSpan",
1586
+ "type": "number",
1587
+ "required": false,
1588
+ "default": null,
1589
+ "description": "Columns the cell spans — an empty-state row spanning the table (D85)."
1590
+ },
1591
+ {
1592
+ "name": "rowHeader",
1593
+ "type": "boolean",
1594
+ "required": false,
1595
+ "default": null,
1596
+ "description": "Renders `<th scope=\"row\">` instead of `<td>`: the cell that names its\nrow, an identifier say, so a screen reader reads it with every cell in\nthe row (D85). Styled as a cell, at medium weight."
1597
+ },
1598
+ {
1599
+ "name": "children",
1600
+ "type": "ReactNode",
1601
+ "required": false,
1602
+ "default": null,
1603
+ "description": "Cell content."
1604
+ },
1605
+ {
1606
+ "name": "className",
1607
+ "type": "string",
1608
+ "required": false,
1609
+ "default": null,
1610
+ "description": "Additional CSS class name(s) merged onto the component's root element."
1611
+ },
1612
+ {
1613
+ "name": "ref",
1614
+ "type": "Ref<HTMLTableCellElement>",
1615
+ "required": false,
1616
+ "default": null,
1617
+ "description": "Forwarded ref to the cell element."
1618
+ }
1619
+ ]
1620
+ },
1621
+ {
1622
+ "name": "TableCaption",
1623
+ "description": "`<caption>` — the table's name, above it, and an optional detail line (D85). It names the table for assistive tech, which an `aria-label` on the `Table` would also do, but a caption is visible. A token-paged list has no page numbers to land on, so after a page change the consumer moves focus here: give it `tabIndex={-1}`, put the range in `detail`, and call `focus()` on the ref. The ring is the shared one (D82), drawn inside the caption's box. Remaining attributes land on the element.",
1624
+ "slots": [],
1625
+ "props": [
1626
+ {
1627
+ "name": "children",
1628
+ "type": "ReactNode",
1629
+ "required": true,
1630
+ "default": null,
1631
+ "description": "The name line — what the table lists. Also the table's accessible name."
1632
+ },
1633
+ {
1634
+ "name": "detail",
1635
+ "type": "ReactNode",
1636
+ "required": false,
1637
+ "default": null,
1638
+ "description": "An optional second line: the range shown, say — \"Rows 51–100 of more\nthan 100,000\"."
1639
+ },
1640
+ {
1641
+ "name": "className",
1642
+ "type": "string",
1643
+ "required": false,
1644
+ "default": null,
1645
+ "description": "Additional CSS class name(s) merged onto the component's root element."
1646
+ },
1647
+ {
1648
+ "name": "ref",
1649
+ "type": "Ref<HTMLTableCaptionElement>",
1650
+ "required": false,
1651
+ "default": null,
1652
+ "description": "Forwarded ref to the `<caption>`, so focus can be moved to it."
1653
+ }
1654
+ ]
1655
+ },
1656
+ {
1657
+ "name": "Pagination",
1658
+ "description": "Numbered pager with ellipsis truncation (D63). Standalone rather than a Table family member: `table-pagination` composes it as a Toolbar sibling of the page-size Select.",
1659
+ "slots": [],
1660
+ "props": [
1661
+ {
1662
+ "name": "page",
1663
+ "type": "number",
1664
+ "required": true,
1665
+ "default": null,
1666
+ "description": "Current page, 1-based. A value outside `[1, pageCount]` (including\nnon-finite values like `NaN`) is clamped for rendering and logs a\n`console.warn` in development. `pageCount < 1` renders no page buttons."
1667
+ },
1668
+ {
1669
+ "name": "pageCount",
1670
+ "type": "number",
1671
+ "required": true,
1672
+ "default": null,
1673
+ "description": "Total number of pages."
1674
+ },
1675
+ {
1676
+ "name": "onPageChange",
1677
+ "type": "(page: number) => void",
1678
+ "required": true,
1679
+ "default": null,
1680
+ "description": "Called with the requested page. Required — unlike Table's `onSortChange`/\n`onSelectionChange`, which are optional because `sortable`/`selectable`\ngate whether they're meaningful, `Pagination` has no such gating boolean:\nthe prop is unconditionally meaningful, so a `Pagination` without it is a\ndead control (final review finding, D62)."
1681
+ },
1682
+ {
1683
+ "name": "siblingCount",
1684
+ "type": "number",
1685
+ "required": false,
1686
+ "default": 1,
1687
+ "description": "Pages shown either side of the current one before truncating."
1688
+ },
1689
+ {
1690
+ "name": "aria-label",
1691
+ "type": "string",
1692
+ "required": false,
1693
+ "default": "Pagination",
1694
+ "description": "Accessible name for the nav landmark."
1695
+ },
1696
+ {
1697
+ "name": "className",
1698
+ "type": "string",
1699
+ "required": false,
1700
+ "default": null,
1701
+ "description": "Additional CSS class name(s) merged onto the component's root element."
1702
+ }
1703
+ ]
1704
+ },
1705
+ {
1706
+ "name": "CursorPagination",
1707
+ "description": "A pager for a list that pages by cursor (D85): a backend that returns a `nextPageToken` and no page count. Two `ghost` Buttons with visible words in a `<nav>`; the chevrons only reinforce them. A direction that is not available is disabled. It holds no state and knows nothing about pages — the consumer holds the tokens and answers `hasPrevious` / `hasNext`. A sibling of `Pagination`, not a mode of it: `Pagination`'s contract is a page count and numbers, and this one has neither.",
1114
1708
  "slots": [],
1115
1709
  "props": [
1116
1710
  {
1117
- "name": "children",
1118
- "type": "ReactNode",
1119
- "required": true,
1711
+ "name": "hasPrevious",
1712
+ "type": "boolean",
1713
+ "required": true,
1714
+ "default": null,
1715
+ "description": "Whether a previous page exists — the consumer knows, from its tokens."
1716
+ },
1717
+ {
1718
+ "name": "hasNext",
1719
+ "type": "boolean",
1720
+ "required": true,
1721
+ "default": null,
1722
+ "description": "Whether a next page exists."
1723
+ },
1724
+ {
1725
+ "name": "onPrevious",
1726
+ "type": "() => void",
1727
+ "required": true,
1728
+ "default": null,
1729
+ "description": "Called when the user asks for the previous page."
1730
+ },
1731
+ {
1732
+ "name": "onNext",
1733
+ "type": "() => void",
1734
+ "required": true,
1735
+ "default": null,
1736
+ "description": "Called when the user asks for the next page."
1737
+ },
1738
+ {
1739
+ "name": "previousLabel",
1740
+ "type": "string",
1741
+ "required": false,
1742
+ "default": "Previous",
1743
+ "description": "Visible text of the previous button."
1744
+ },
1745
+ {
1746
+ "name": "nextLabel",
1747
+ "type": "string",
1748
+ "required": false,
1749
+ "default": "Next",
1750
+ "description": "Visible text of the next button."
1751
+ },
1752
+ {
1753
+ "name": "size",
1754
+ "type": "32 | 40",
1755
+ "required": false,
1756
+ "default": 32,
1757
+ "description": "Button height in px."
1758
+ },
1759
+ {
1760
+ "name": "aria-label",
1761
+ "type": "string",
1762
+ "required": false,
1763
+ "default": "Pagination",
1764
+ "description": "Accessible name for the nav landmark."
1765
+ },
1766
+ {
1767
+ "name": "className",
1768
+ "type": "string",
1769
+ "required": false,
1770
+ "default": null,
1771
+ "description": "Additional CSS class name(s) merged onto the component's root element."
1772
+ }
1773
+ ]
1774
+ },
1775
+ {
1776
+ "name": "Toast",
1777
+ "description": "A single transient notification card (D64). Controlled and presentational: it holds no state, runs no timer, and never removes itself — `onDismiss` reports and the owner disposes, exactly as Dialog (D50) and Menu (D53) do. Toast does not carry its own `role`/`aria-live`. Politeness belongs to the two persistent wrappers inside ToastRegion, because a live region must pre-exist the content it announces; a role on the toast itself would reintroduce the mount-with-content problem one level down. `politeness` (D83) only tells the region which wrapper to use. Composed by hand with ToastRegion for full control, or driven by ToastProvider's queue.",
1778
+ "slots": [
1779
+ {
1780
+ "name": "body",
1781
+ "accepts": {},
1782
+ "cardinality": "1..*",
1783
+ "order": 1
1784
+ },
1785
+ {
1786
+ "name": "action",
1787
+ "accepts": {
1788
+ "components": [
1789
+ "Button"
1790
+ ],
1791
+ "contracts": [
1792
+ "inline-content"
1793
+ ]
1794
+ },
1795
+ "cardinality": "0..1",
1796
+ "order": 2
1797
+ }
1798
+ ],
1799
+ "props": [
1800
+ {
1801
+ "name": "variant",
1802
+ "type": "\"neutral\" | \"success\" | \"warning\" | \"danger\"",
1803
+ "required": false,
1804
+ "default": "neutral",
1805
+ "description": "Status variant."
1806
+ },
1807
+ {
1808
+ "name": "children",
1809
+ "type": "ReactNode",
1810
+ "required": true,
1811
+ "default": null,
1812
+ "description": "The message."
1813
+ },
1814
+ {
1815
+ "name": "action",
1816
+ "type": "ReactNode",
1817
+ "required": false,
1818
+ "default": null,
1819
+ "description": "Trailing affordance — a ghost Button (Undo, Retry, View)."
1820
+ },
1821
+ {
1822
+ "name": "onDismiss",
1823
+ "type": "(() => void)",
1824
+ "required": false,
1825
+ "default": null,
1826
+ "description": "When provided, renders the dismiss button and calls this. Toast does not\nremove itself; the owner disposes."
1827
+ },
1828
+ {
1829
+ "name": "politeness",
1830
+ "type": "\"polite\" | \"assertive\"",
1831
+ "required": false,
1832
+ "default": null,
1833
+ "description": "Which live wrapper ToastRegion routes this toast into (D83). Unset, the\nvariant decides: neutral and success are polite, warning and danger\nassertive. Set it when the kind of event, not its tone, decides — the\noutcome of the user's own action may interrupt even when it succeeded."
1834
+ },
1835
+ {
1836
+ "name": "statusLabel",
1837
+ "type": "string | null",
1838
+ "required": false,
1120
1839
  "default": null,
1121
- "description": "The body TableRows."
1840
+ "description": "The visually hidden status word (D83). A string replaces the default\n(\"Success:\", \"Warning:\", \"Error:\") — pass the translated word; `null`\ndrops it. Unset keeps the default, and `neutral` has none."
1122
1841
  },
1123
1842
  {
1124
1843
  "name": "className",
@@ -1126,34 +1845,41 @@
1126
1845
  "required": false,
1127
1846
  "default": null,
1128
1847
  "description": "Additional CSS class name(s) merged onto the component's root element."
1848
+ },
1849
+ {
1850
+ "name": "ref",
1851
+ "type": "Ref<HTMLDivElement>",
1852
+ "required": false,
1853
+ "default": null,
1854
+ "description": "Forwarded ref to the underlying `<div>`."
1129
1855
  }
1130
1856
  ]
1131
1857
  },
1132
1858
  {
1133
- "name": "TableRow",
1134
- "description": "`<tr>`. `rowId` is the key the `selected` set holds.",
1859
+ "name": "ToastRegion",
1860
+ "description": "The positioned live region that holds the toast stack (D64). Two things here are load-bearing and both look like details: 1. **The two live wrappers are always rendered**, empty queue included. A live region announces mutations to a subtree that already existed; a wrapper that mounts together with its first toast reads as a new subtree, and that first toast is never announced. 2. **`popover=\"manual\"`, not `\"auto\"`.** Manual puts the region in the native top layer without light dismiss. The top layer is required because Dialog uses showModal() — also top layer — so a fixed region at --psi-z-overlay would paint *under* the modal backdrop, hiding the confirmation for the action a user just took inside a dialog. And `auto` would be dismissed by the very click that raised the toast. Routing reads `politeness`, then `variant`, off each child — the same Children.map technique Table uses for select-all injection. `politeness` wins (D83): the owner of an announcement knows what kind of event it is, and tone is only the default. Consequence of the split, visible in the `InRegion` VR baseline: the stack is grouped by politeness, not strictly chronological — every assertive toast sorts below every polite one regardless of arrival order. Chronological order is preserved *within* each group. Keeping it exact across both would mean one live region with a politeness that changes per message, which is the thing the two wrappers exist to avoid. Accepted: at `limit` 3 the grouping reads as severity ordering, and the newest toast still lands nearest the screen edge within its group. Remaining HTML attributes, `data-*` included, are spread onto the root element (D83). That is how an application marks the region `data-react-aria-top-layer`, so that a React Aria overlay — which hides everything outside itself with `aria-hidden` — leaves the two live regions exposed. The region's own attributes always win.",
1135
1861
  "slots": [],
1136
1862
  "props": [
1137
1863
  {
1138
- "name": "rowId",
1139
- "type": "string",
1864
+ "name": "placement",
1865
+ "type": "\"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\"",
1140
1866
  "required": false,
1141
- "default": null,
1142
- "description": "Stable identity for selection. Required for selectable tables (D62)."
1867
+ "default": "bottom-end",
1868
+ "description": "Corner the stack occupies."
1143
1869
  },
1144
1870
  {
1145
- "name": "selectLabel",
1871
+ "name": "aria-label",
1146
1872
  "type": "string",
1147
1873
  "required": false,
1148
- "default": null,
1149
- "description": "Accessible name for this row's selection checkbox."
1874
+ "default": "Notifications",
1875
+ "description": "Accessible name for the region."
1150
1876
  },
1151
1877
  {
1152
1878
  "name": "children",
1153
1879
  "type": "ReactNode",
1154
1880
  "required": true,
1155
1881
  "default": null,
1156
- "description": "The row's cells."
1882
+ "description": "The stack — `Toast` and `Announcement` elements, each routed to a live\nwrapper by its `politeness`, or by a Toast's variant when it names none."
1157
1883
  },
1158
1884
  {
1159
1885
  "name": "className",
@@ -1161,111 +1887,151 @@
1161
1887
  "required": false,
1162
1888
  "default": null,
1163
1889
  "description": "Additional CSS class name(s) merged onto the component's root element."
1890
+ },
1891
+ {
1892
+ "name": "ref",
1893
+ "type": "Ref<HTMLDivElement>",
1894
+ "required": false,
1895
+ "default": null,
1896
+ "description": "Forwarded ref to the region element."
1164
1897
  }
1165
1898
  ]
1166
1899
  },
1167
1900
  {
1168
- "name": "TableHeaderCell",
1169
- "description": "`<th scope=\"col\">`. `aria-sort` belongs on the th, never on the inner button — assistive tech reads the sort state from the column header.",
1901
+ "name": "ToastProvider",
1902
+ "description": "Owns the toast queue, its auto-dismiss timers, and the single ToastRegion (D65). This is the library's one stateful container, and the exception is deliberately narrow. D50 and D53 rejected internal state for Dialog and Menu because the consumer already owned the state that decided visibility — a menu is open because a user clicked a trigger the consumer rendered. A toast has no such owner: it is created by an outcome, not by a UI state, and it disappears on a timer nobody is watching. The rule that survives is the useful half — presentational components stay controlled (`Toast` still holds nothing), a stateful container may exist when the state has no natural owner, and it must be opt-in. Timers pause while the pointer or focus is inside the region (WCAG 2.2.1), and resume with the time *remaining* rather than a fresh full duration — restarting would let a user hold a toast open indefinitely by jiggling the mouse.",
1170
1903
  "slots": [],
1171
1904
  "props": [
1172
1905
  {
1173
- "name": "sortKey",
1174
- "type": "string",
1906
+ "name": "limit",
1907
+ "type": "number",
1175
1908
  "required": false,
1176
- "default": null,
1177
- "description": "Sort key this column emits. Enables the sort control when the table is `sortable`."
1909
+ "default": 3,
1910
+ "description": "Max simultaneous toasts; the oldest is evicted first."
1178
1911
  },
1179
1912
  {
1180
- "name": "numeric",
1181
- "type": "boolean",
1913
+ "name": "duration",
1914
+ "type": "number",
1182
1915
  "required": false,
1183
- "default": null,
1184
- "description": "Right-aligns and renders tabular figures (D62)."
1916
+ "default": 5000,
1917
+ "description": "Auto-dismiss for toasts with no action, in ms."
1185
1918
  },
1186
1919
  {
1187
- "name": "children",
1188
- "type": "ReactNode",
1920
+ "name": "actionDuration",
1921
+ "type": "number",
1189
1922
  "required": false,
1190
- "default": null,
1191
- "description": "Header label."
1923
+ "default": 10000,
1924
+ "description": "Auto-dismiss for toasts carrying an action, in ms. An affordance that\nvanishes before it can be reached is not an affordance."
1192
1925
  },
1193
1926
  {
1194
- "name": "className",
1195
- "type": "string",
1927
+ "name": "placement",
1928
+ "type": "\"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\"",
1196
1929
  "required": false,
1930
+ "default": "bottom-end",
1931
+ "description": "Corner the stack occupies."
1932
+ },
1933
+ {
1934
+ "name": "children",
1935
+ "type": "ReactNode",
1936
+ "required": true,
1197
1937
  "default": null,
1198
- "description": "Additional CSS class name(s) merged onto the component's root element."
1938
+ "description": "The subtree that may call `useToast()`. The region is rendered alongside it."
1199
1939
  }
1200
1940
  ]
1201
1941
  },
1202
1942
  {
1203
- "name": "TableCell",
1204
- "description": "`<td>`. `numeric` means right-aligned *and* tabular — a column that aligns but whose digits jitter between rows defeats the purpose.",
1943
+ "name": "Announcement",
1944
+ "description": "Text for a screen reader only, spoken through ToastRegion (D83). **It is not a live region.** It renders no `role` and no `aria-live`, and outside a ToastRegion it announces nothing — the region's two persistent wrappers are the only live regions, and an Announcement is content for one of them. Do not use it as a second announcer. Use it where an event must be spoken and there is nothing to show: a state change of the object on screen, or field errors the form already displays. `politeness` is not read here. ToastRegion reads it off the element to pick a wrapper, the same way it reads a Toast's. Controlled, like Toast: it holds no state and never removes itself. Remove it once it has been spoken. To announce the same text again, remove it and render it again with a new `key` — a live region speaks changes, and an unchanged node is not one. It takes no `className`: the one thing a class could do to it is make it visible, and then it is a Toast.",
1205
1945
  "slots": [],
1206
1946
  "props": [
1207
1947
  {
1208
- "name": "numeric",
1209
- "type": "boolean",
1948
+ "name": "politeness",
1949
+ "type": "\"polite\" | \"assertive\"",
1210
1950
  "required": false,
1211
- "default": null,
1212
- "description": "Right-aligns and renders tabular figures (D62)."
1951
+ "default": "\"polite\"",
1952
+ "description": "Which of ToastRegion's two live wrappers speaks it."
1213
1953
  },
1214
1954
  {
1215
1955
  "name": "children",
1216
1956
  "type": "ReactNode",
1217
- "required": false,
1218
- "default": null,
1219
- "description": "Cell content."
1220
- },
1221
- {
1222
- "name": "className",
1223
- "type": "string",
1224
- "required": false,
1957
+ "required": true,
1225
1958
  "default": null,
1226
- "description": "Additional CSS class name(s) merged onto the component's root element."
1959
+ "description": "The text to announce."
1227
1960
  }
1228
1961
  ]
1229
1962
  },
1230
1963
  {
1231
- "name": "Pagination",
1232
- "description": "Numbered pager with ellipsis truncation (D63). Standalone rather than a Table family member: `table-pagination` composes it as a Toolbar sibling of the page-size Select.",
1233
- "slots": [],
1964
+ "name": "Banner",
1965
+ "description": "A full-width, page-level status message (D86). It is not a live region: it renders no `role` and no `aria-live`, so mounting one announces nothing, and announcing stays the application's — route the same event through a `ToastRegion` or an `Announcement` if it must be spoken. Controlled and presentational: it holds no state and never removes itself; `onDismiss` reports and the owner disposes. A tinted strip with no radius and no border, it is meant to span the page edge to edge, above the content. For the same message inside content, use `InlineAlert`.",
1966
+ "slots": [
1967
+ {
1968
+ "name": "title",
1969
+ "accepts": {},
1970
+ "cardinality": "0..1",
1971
+ "order": 1
1972
+ },
1973
+ {
1974
+ "name": "body",
1975
+ "accepts": {},
1976
+ "cardinality": "1..*",
1977
+ "order": 2
1978
+ },
1979
+ {
1980
+ "name": "action",
1981
+ "accepts": {
1982
+ "components": [
1983
+ "Button"
1984
+ ],
1985
+ "contracts": [
1986
+ "inline-content"
1987
+ ]
1988
+ },
1989
+ "cardinality": "0..1",
1990
+ "order": 3
1991
+ }
1992
+ ],
1234
1993
  "props": [
1235
1994
  {
1236
- "name": "page",
1237
- "type": "number",
1238
- "required": true,
1995
+ "name": "variant",
1996
+ "type": "\"neutral\" | \"success\" | \"warning\" | \"danger\"",
1997
+ "required": false,
1998
+ "default": "neutral",
1999
+ "description": "Status variant."
2000
+ },
2001
+ {
2002
+ "name": "title",
2003
+ "type": "ReactNode",
2004
+ "required": false,
1239
2005
  "default": null,
1240
- "description": "Current page, 1-based. A value outside `[1, pageCount]` (including\nnon-finite values like `NaN`) is clamped for rendering and logs a\n`console.warn` in development. `pageCount < 1` renders no page buttons."
2006
+ "description": "A short heading, rendered before the body in the medium weight."
1241
2007
  },
1242
2008
  {
1243
- "name": "pageCount",
1244
- "type": "number",
2009
+ "name": "children",
2010
+ "type": "ReactNode",
1245
2011
  "required": true,
1246
2012
  "default": null,
1247
- "description": "Total number of pages."
2013
+ "description": "The message."
1248
2014
  },
1249
2015
  {
1250
- "name": "onPageChange",
1251
- "type": "(page: number) => void",
1252
- "required": true,
2016
+ "name": "action",
2017
+ "type": "ReactNode",
2018
+ "required": false,
1253
2019
  "default": null,
1254
- "description": "Called with the requested page. Required — unlike Table's `onSortChange`/\n`onSelectionChange`, which are optional because `sortable`/`selectable`\ngate whether they're meaningful, `Pagination` has no such gating boolean:\nthe prop is unconditionally meaningful, so a `Pagination` without it is a\ndead control (final review finding, D62)."
2020
+ "description": "Trailing affordance — a ghost Button (Review, Retry, Learn more)."
1255
2021
  },
1256
2022
  {
1257
- "name": "siblingCount",
1258
- "type": "number",
2023
+ "name": "onDismiss",
2024
+ "type": "(() => void)",
1259
2025
  "required": false,
1260
- "default": 1,
1261
- "description": "Pages shown either side of the current one before truncating."
2026
+ "default": null,
2027
+ "description": "When provided, renders the dismiss button and calls this. Banner does not\nremove itself; the owner disposes."
1262
2028
  },
1263
2029
  {
1264
- "name": "aria-label",
1265
- "type": "string",
2030
+ "name": "statusLabel",
2031
+ "type": "string | null",
1266
2032
  "required": false,
1267
- "default": "Pagination",
1268
- "description": "Accessible name for the nav landmark."
2033
+ "default": null,
2034
+ "description": "The visually hidden status word (D83). A string replaces the default\n(\"Success:\", \"Warning:\", \"Error:\") — pass the translated word; `null`\ndrops it. Unset keeps the default, and `neutral` has none."
1269
2035
  },
1270
2036
  {
1271
2037
  "name": "className",
@@ -1273,18 +2039,31 @@
1273
2039
  "required": false,
1274
2040
  "default": null,
1275
2041
  "description": "Additional CSS class name(s) merged onto the component's root element."
2042
+ },
2043
+ {
2044
+ "name": "ref",
2045
+ "type": "Ref<HTMLDivElement>",
2046
+ "required": false,
2047
+ "default": null,
2048
+ "description": "Forwarded ref to the underlying `<div>`."
1276
2049
  }
1277
2050
  ]
1278
2051
  },
1279
2052
  {
1280
- "name": "Toast",
1281
- "description": "A single transient notification card (D64). Controlled and presentational: it holds no state, runs no timer, and never removes itself — `onDismiss` reports and the owner disposes, exactly as Dialog (D50) and Menu (D53) do. Toast does not carry its own `role`/`aria-live`. Politeness belongs to the two persistent wrappers inside ToastRegion, because a live region must pre-exist the content it announces; a role on the toast itself would reintroduce the mount-with-content problem one level down. Composed by hand with ToastRegion for full control, or driven by ToastProvider's queue.",
2053
+ "name": "InlineAlert",
2054
+ "description": "Not `role=\"alert\"`, despite its name. It is not a live region: it renders no `role` and no `aria-live`, so mounting one announces nothing, and announcing stays the application's — route the same event through a `ToastRegion` or an `Announcement` if it must be spoken. A status message that sits inside content (D86): above a form, in a panel. A tinted surface with a 1px border in the variant's colour and a radius; it fills the width of its container rather than setting its own. Presentational and stateless, with no dismiss button. For a page-wide strip, use `Banner`.",
1282
2055
  "slots": [
2056
+ {
2057
+ "name": "title",
2058
+ "accepts": {},
2059
+ "cardinality": "0..1",
2060
+ "order": 1
2061
+ },
1283
2062
  {
1284
2063
  "name": "body",
1285
2064
  "accepts": {},
1286
2065
  "cardinality": "1..*",
1287
- "order": 1
2066
+ "order": 2
1288
2067
  },
1289
2068
  {
1290
2069
  "name": "action",
@@ -1297,7 +2076,7 @@
1297
2076
  ]
1298
2077
  },
1299
2078
  "cardinality": "0..1",
1300
- "order": 2
2079
+ "order": 3
1301
2080
  }
1302
2081
  ],
1303
2082
  "props": [
@@ -1308,6 +2087,13 @@
1308
2087
  "default": "neutral",
1309
2088
  "description": "Status variant."
1310
2089
  },
2090
+ {
2091
+ "name": "title",
2092
+ "type": "ReactNode",
2093
+ "required": false,
2094
+ "default": null,
2095
+ "description": "A short heading, rendered before the body in the medium weight."
2096
+ },
1311
2097
  {
1312
2098
  "name": "children",
1313
2099
  "type": "ReactNode",
@@ -1320,14 +2106,14 @@
1320
2106
  "type": "ReactNode",
1321
2107
  "required": false,
1322
2108
  "default": null,
1323
- "description": "Trailing affordance — a ghost Button (Undo, Retry, View)."
2109
+ "description": "Trailing affordance — a ghost Button (Review, Retry, Learn more)."
1324
2110
  },
1325
2111
  {
1326
- "name": "onDismiss",
1327
- "type": "(() => void)",
2112
+ "name": "statusLabel",
2113
+ "type": "string | null",
1328
2114
  "required": false,
1329
2115
  "default": null,
1330
- "description": "When provided, renders the dismiss button and calls this. Toast does not\nremove itself; the owner disposes."
2116
+ "description": "The visually hidden status word (D83). A string replaces the default\n(\"Success:\", \"Warning:\", \"Error:\") — pass the translated word; `null`\ndrops it. Unset keeps the default, and `neutral` has none."
1331
2117
  },
1332
2118
  {
1333
2119
  "name": "className",
@@ -1346,30 +2132,30 @@
1346
2132
  ]
1347
2133
  },
1348
2134
  {
1349
- "name": "ToastRegion",
1350
- "description": "The positioned live region that holds the toast stack (D64). Two things here are load-bearing and both look like details: 1. **The two live wrappers are always rendered**, empty queue included. A live region announces mutations to a subtree that already existed; a wrapper that mounts together with its first toast reads as a new subtree, and that first toast is never announced. 2. **`popover=\"manual\"`, not `\"auto\"`.** Manual puts the region in the native top layer without light dismiss. The top layer is required because Dialog uses showModal() — also top layer — so a fixed region at --psi-z-overlay would paint *under* the modal backdrop, hiding the confirmation for the action a user just took inside a dialog. And `auto` would be dismissed by the very click that raised the toast. Routing reads `variant` off each child, the same Children.map technique Table uses for select-all injection. Consequence of the split, visible in the `InRegion` VR baseline: the stack is grouped by politeness, not strictly chronological — every assertive toast sorts below every polite one regardless of arrival order. Chronological order is preserved *within* each group. Keeping it exact across both would mean one live region with a politeness that changes per message, which is the thing the two wrappers exist to avoid. Accepted: at `limit` 3 the grouping reads as severity ordering, and the newest toast still lands nearest the screen edge within its group.",
2135
+ "name": "Skeleton",
2136
+ "description": "A loading placeholder. It is not a live region: it renders no `role` and no `aria-live`, and it is always `aria-hidden=\"true\"`, so assistive tech skips it entirely. Put `aria-busy` on the region the skeleton stands for — that is what tells a screen reader the content is coming. Its width fills the container; size the container, not the skeleton. The pulse is an opacity animation that stops under `prefers-reduced-motion: reduce` (D86).",
1351
2137
  "slots": [],
1352
2138
  "props": [
1353
2139
  {
1354
- "name": "placement",
1355
- "type": "\"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\"",
2140
+ "name": "variant",
2141
+ "type": "\"text\" | \"block\"",
1356
2142
  "required": false,
1357
- "default": "bottom-end",
1358
- "description": "Corner the stack occupies."
2143
+ "default": "text",
2144
+ "description": "`text` renders `lines` stacked bars; `block` one box."
1359
2145
  },
1360
2146
  {
1361
- "name": "aria-label",
1362
- "type": "string",
2147
+ "name": "lines",
2148
+ "type": "number",
1363
2149
  "required": false,
1364
- "default": "Notifications",
1365
- "description": "Accessible name for the region."
2150
+ "default": 1,
2151
+ "description": "Number of text lines; the last of several is shorter. Text only."
1366
2152
  },
1367
2153
  {
1368
- "name": "children",
1369
- "type": "ReactNode",
1370
- "required": true,
1371
- "default": null,
1372
- "description": "The toast stack — `Toast` elements, routed to a live wrapper by variant."
2154
+ "name": "size",
2155
+ "type": "24 | 32 | 40 | 48",
2156
+ "required": false,
2157
+ "default": 40,
2158
+ "description": "Height of a block, from the size scale. Block only."
1373
2159
  },
1374
2160
  {
1375
2161
  "name": "className",
@@ -1383,49 +2169,56 @@
1383
2169
  "type": "Ref<HTMLDivElement>",
1384
2170
  "required": false,
1385
2171
  "default": null,
1386
- "description": "Forwarded ref to the region element."
2172
+ "description": "Forwarded ref to the underlying `<div>`."
1387
2173
  }
1388
2174
  ]
1389
2175
  },
1390
2176
  {
1391
- "name": "ToastProvider",
1392
- "description": "Owns the toast queue, its auto-dismiss timers, and the single ToastRegion (D65). This is the library's one stateful container, and the exception is deliberately narrow. D50 and D53 rejected internal state for Dialog and Menu because the consumer already owned the state that decided visibility — a menu is open because a user clicked a trigger the consumer rendered. A toast has no such owner: it is created by an outcome, not by a UI state, and it disappears on a timer nobody is watching. The rule that survives is the useful half — presentational components stay controlled (`Toast` still holds nothing), a stateful container may exist when the state has no natural owner, and it must be opt-in. Timers pause while the pointer or focus is inside the region (WCAG 2.2.1), and resume with the time *remaining* rather than a fresh full duration — restarting would let a user hold a toast open indefinitely by jiggling the mouse.",
2177
+ "name": "CopyButton",
2178
+ "description": "Not a live region: it renders no role and no `aria-live`, never changes its label or icon after a copy, and announces nothing. The application speaks the result — route `onCopy` through its announcer or a Toast (D86). Copies `value` to the clipboard when pressed. A `Button` with a leading `IconCopy` and a visible label; the icon only reinforces the word.",
1393
2179
  "slots": [],
1394
2180
  "props": [
1395
2181
  {
1396
- "name": "limit",
1397
- "type": "number",
2182
+ "name": "value",
2183
+ "type": "string",
2184
+ "required": true,
2185
+ "default": null,
2186
+ "description": "The text written to the clipboard."
2187
+ },
2188
+ {
2189
+ "name": "label",
2190
+ "type": "string",
1398
2191
  "required": false,
1399
- "default": 3,
1400
- "description": "Max simultaneous toasts; the oldest is evicted first."
2192
+ "default": "Copy",
2193
+ "description": "Visible text of the button."
1401
2194
  },
1402
2195
  {
1403
- "name": "duration",
1404
- "type": "number",
2196
+ "name": "size",
2197
+ "type": "24 | 32 | 40 | 48",
1405
2198
  "required": false,
1406
- "default": 5000,
1407
- "description": "Auto-dismiss for toasts with no action, in ms."
2199
+ "default": 32,
2200
+ "description": "Button height in px."
1408
2201
  },
1409
2202
  {
1410
- "name": "actionDuration",
1411
- "type": "number",
2203
+ "name": "variant",
2204
+ "type": "\"accent\" | \"accent-subtle\" | \"neutral\" | \"neutral-subtle\" | \"ghost\" | \"danger\" | \"danger-subtle\" | \"outline\"",
1412
2205
  "required": false,
1413
- "default": 10000,
1414
- "description": "Auto-dismiss for toasts carrying an action, in ms. An affordance that\nvanishes before it can be reached is not an affordance."
2206
+ "default": "ghost",
2207
+ "description": "Button variant."
1415
2208
  },
1416
2209
  {
1417
- "name": "placement",
1418
- "type": "\"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\"",
2210
+ "name": "onCopy",
2211
+ "type": "((result: \"copied\" | \"failed\") => void)",
1419
2212
  "required": false,
1420
- "default": "bottom-end",
1421
- "description": "Corner the stack occupies."
2213
+ "default": null,
2214
+ "description": "Called with the outcome once the clipboard write settles. `\"failed\"` covers\na rejected write and an environment with no clipboard API."
1422
2215
  },
1423
2216
  {
1424
- "name": "children",
1425
- "type": "ReactNode",
1426
- "required": true,
2217
+ "name": "className",
2218
+ "type": "string",
2219
+ "required": false,
1427
2220
  "default": null,
1428
- "description": "The subtree that may call `useToast()`. The region is rendered alongside it."
2221
+ "description": "Additional CSS class name(s) merged onto the component's root element."
1429
2222
  }
1430
2223
  ]
1431
2224
  },