@behavioral-agentic-design-system/core 0.32.0 → 0.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@behavioral-agentic-design-system/core",
3
- "version": "0.32.0",
3
+ "version": "0.32.1",
4
4
  "description": "BADS core — tokens, shadcn/ui components, and the BADS template shell (app routes, customize tab, theme hooks). Forks consume this and re-export, keeping client repos to ~30 lines of glue.",
5
5
  "license": "MIT",
6
6
  "author": "Matthew Stephens <work@matthewstephens.com> (https://github.com/matthewlarn)",
@@ -10,7 +10,7 @@ const codeVariants = cva("font-mono text-muted-foreground bg-muted", {
10
10
  variant: {
11
11
  inline: "inline rounded px-[0.3em] py-[0.1em] text-xs",
12
12
  block:
13
- "block w-full rounded-md border border-border px-3 py-2.5 text-sm leading-relaxed overflow-x-auto whitespace-pre outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
13
+ "block w-full rounded-md border border-border px-3 py-2.5 text-sm leading-relaxed overflow-x-auto scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent whitespace-pre outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
14
14
  },
15
15
  size: {
16
16
  sm: "",
@@ -8,7 +8,20 @@ function Table({ className, ...props }: React.ComponentProps<"table">) {
8
8
  return (
9
9
  <div
10
10
  data-slot="table-container"
11
- className="relative w-full overflow-x-auto"
11
+ // The container scrolls horizontally, so it must be keyboard-reachable:
12
+ // axe fails an unfocusable scroll region as `scrollable-region-focusable`
13
+ // (serious), and a pointer-free user otherwise cannot reach the columns
14
+ // past the fold at all. Same treatment `code.tsx` already applies to its
15
+ // block variant. Unconditional rather than measured: a table's width
16
+ // depends on its content and its container, neither of which is known
17
+ // here, and a tab stop that is occasionally redundant is a far smaller
18
+ // cost than columns that are sometimes unreachable.
19
+ tabIndex={0}
20
+ // scrollbar-thin + a token-coloured thumb, so the scroller reads as part
21
+ // of the system instead of the OS default. First-party Tailwind v4.3
22
+ // utilities — no plugin. --border is the quiet mid-grey already audited
23
+ // at 3.79:1 against the page, clearing SC 1.4.11's 3:1 non-text floor.
24
+ className="relative w-full overflow-x-auto scrollbar-thin scrollbar-thumb-border scrollbar-track-transparent"
12
25
  >
13
26
  <table
14
27
  data-slot="table"
@@ -36,3 +36,49 @@ export const RealisticUse: Story = {
36
36
  </TableBody>
37
37
  </Table>),
38
38
  };
39
+
40
+ /**
41
+ * The horizontal-overflow path, which nothing exercised before: both stories
42
+ * above set w-[480px] on the table inside a w-full container, so it never
43
+ * actually scrolls and axe never sees a scroll region. A shipped Table narrower
44
+ * than its content is the normal case for a consumer, and an unfocusable scroll
45
+ * region fails `scrollable-region-focusable` (serious) — columns past the fold
46
+ * are unreachable without a pointer. Keep this story wide-in-a-narrow-box so
47
+ * the a11y suite covers the case that actually regresses.
48
+ */
49
+ export const WideOverflowing: Story = {
50
+ render: () => (
51
+ <div className="w-[380px]">
52
+ <Table className="min-w-[760px]">
53
+ <TableCaption>Component review status across the registry.</TableCaption>
54
+ <TableHeader>
55
+ <TableRow>
56
+ <TableHead>Component</TableHead>
57
+ <TableHead>Reviewer</TableHead>
58
+ <TableHead>Bucket</TableHead>
59
+ <TableHead>Stories</TableHead>
60
+ <TableHead>Last reviewed</TableHead>
61
+ <TableHead className="text-right">Status</TableHead>
62
+ </TableRow>
63
+ </TableHeader>
64
+ <TableBody>
65
+ {[
66
+ ["MultiSelect", "Seo-yun Park", "Primitive", "9", "2026-08-19", "Approved"],
67
+ ["TreeSelect", "Marcus Lindqvist", "Primitive", "7", "2026-08-20", "Changes requested"],
68
+ ["DataTable", "Anika Patel", "Composition", "12", "2026-08-22", "Approved"],
69
+ ["TagsInput", "Chloé Dubois-Martin", "Primitive", "6", "2026-08-25", "In review"],
70
+ ].map(([component, reviewer, bucket, stories, reviewed, status]) => (
71
+ <TableRow key={component}>
72
+ <TableCell className="font-medium">{component}</TableCell>
73
+ <TableCell>{reviewer}</TableCell>
74
+ <TableCell>{bucket}</TableCell>
75
+ <TableCell className="tabular-nums">{stories}</TableCell>
76
+ <TableCell className="tabular-nums">{reviewed}</TableCell>
77
+ <TableCell className="text-right text-muted-foreground">{status}</TableCell>
78
+ </TableRow>
79
+ ))}
80
+ </TableBody>
81
+ </Table>
82
+ </div>
83
+ ),
84
+ };