@ai-matrx/design-system 0.7.0 → 0.8.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,70 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0 — 2026-09-07
4
+
5
+ **Accordion — the last stand-in in the fleet (census row 19c).** Growth waves 1
6
+ and 2 collapsed Card, Table, Alert, Avatar, Progress, Collapsible, Checkbox,
7
+ Slider and RadioGroup into this package, but nothing here was called
8
+ `Accordion`. So `aidream/apps/workflow-studio`'s DB-authored component scope
9
+ was still handing agent-authored components four dependency-free `<div>`s
10
+ named `Accordion` / `AccordionItem` / `AccordionTrigger` / `AccordionContent`.
11
+ A DB-authored component that asked for an accordion got four stacked divs:
12
+ every section permanently open, no trigger, no keyboard, no ARIA — a screen
13
+ that looks finished and is not.
14
+
15
+ The port is built from matrx-frontend's `components/ui/accordion.tsx` (the only
16
+ real implementation in the fleet), with three corrections recorded rather than
17
+ preserved:
18
+
19
+ - **The animation is package-owned CSS.** The original used
20
+ `animate-accordion-down` / `-up` — Tailwind utility names that exist only in
21
+ a host `tailwind.config.js`. Any consumer without that config got a component
22
+ that jumped open, silently, with no error. `.matrx-accordion-content` and its
23
+ keyframes now ship in `styles.css` (the C26 styling contract), keyed off
24
+ Radix's runtime `--radix-accordion-content-height`, and honour
25
+ `prefers-reduced-motion`.
26
+ - **Density is a prop, not a fork** — `size="sm|md"` declared once on the root
27
+ and read from context by every trigger and panel, exactly as on `Card` and
28
+ `Table`, so an accordion cannot mix a `p-4` header with a `pb-2` body.
29
+ - **The chevron is an inlined icon** (C19), not a `@radix-ui/react-icons`
30
+ import, so the package still carries no icon-library dependency.
31
+
32
+ `rightElements` (controls on the trigger row, before the chevron) is kept from
33
+ the original so matrx-frontend can adopt without losing a capability.
34
+
35
+ The SSR note the original carried is kept and restated: **the root renders
36
+ unconditionally.** There is no mount gate — Radix ids come from React's
37
+ SSR-stable `useId`, and the gate deleted every header and every
38
+ `defaultValue`-open item from SSR and the first client paint.
39
+
40
+ New dependency: `@radix-ui/react-accordion`.
41
+
42
+ ### Consumer action (C28)
43
+
44
+ - Nothing breaks; this is additive.
45
+ - **Delete any local `Accordion` fork or `div` stand-in and import from here.**
46
+ Known holders at publish time: `aidream/apps/workflow-studio`'s
47
+ `component-scope.tsx` (adopted in this same session, per THE SAME-SESSION
48
+ LAW) and `matrx-frontend/components/ui/accordion.tsx` +
49
+ `components/matrx/matrx-collapsible/AccordionWrapper.tsx` (NOT adopted here —
50
+ a realtime lane held that tree; it is a live census row).
51
+ - A host that previously relied on its own `animate-accordion-*` keyframes can
52
+ drop them.
53
+
54
+ ## 0.7.1 — 2026-09-07
55
+
56
+ - **`ResizableHandle` defaults to `xs` (2px), not `sm` (4px).** Caught in the
57
+ live spot-check of the 0.7.0 adoption: matrx-frontend's `/notes` split
58
+ rendered a 4px rule where its fork had drawn 2px. The port was supposed to be
59
+ behaviour-verbatim, and `size="sm"` was simply the wrong rung to call the
60
+ default. Every explicit `size=` is unaffected, and
61
+ `components/ui/matrx/resizable.tsx` still binds `md`.
62
+
63
+ ### Consumer action (C28)
64
+
65
+ None. If you adopted 0.7.0 and liked the slightly thicker default, pass
66
+ `size="sm"`.
67
+
3
68
  ## 0.7.0 — 2026-09-07
4
69
 
5
70
  **GROWTH WAVE 2 (C18).** Wave 1 (0.5.0) deleted 34 forked primitives but had
package/README.md CHANGED
@@ -3,14 +3,14 @@
3
3
  The small, semantic UI foundation shared by AI Matrx React applications — primitives whose behavior and variants are identical across Vite and Next.js hosts.
4
4
 
5
5
  **Controls:** Button, Badge, Label, Separator, the Input family, the Textarea family, Checkbox, Switch, RadioGroup, Slider, Toggle + ToggleGroup, Avatar, Progress.
6
- **Surfaces:** Card, Table, Tabs, Collapsible, ScrollArea, Popover, Tooltip, HoverCard, Sheet, Dialog, AlertDialog, Drawer, BottomSheet + TabbedBottomSheet, Alert, Resizable, Skeleton.
6
+ **Surfaces:** Card, Table, Tabs, Accordion, Collapsible, ScrollArea, Popover, Tooltip, HoverCard, Sheet, Dialog, AlertDialog, Drawer, BottomSheet + TabbedBottomSheet, Alert, Resizable, Skeleton.
7
7
  **Menus:** DropdownMenu, ContextMenu, Command / CommandDialog, Select, CreatablePicker.
8
8
  **Composed:** EditableLabel, SegmentedControl, ScoreRing, OverflowToolbar.
9
9
  **Hooks + utilities:** `useScrollFade`, `useIsMobile`, `usePortalContainer`, `useDialogContainer`, `useDrawerDirection`, `cn`.
10
10
 
11
11
  **The Tooltip lives here, and only here.** `@ai-matrx/tap-target` used to ship its own copy; since design-system 0.7.0 / tap-target 0.2.0 it consumes this one and re-exports nothing.
12
12
 
13
- Where hosts had forked a primitive over DENSITY, density is a prop, not a fork: `Card size="sm|md|lg"`, `Table size="sm|md"`, `Switch`/`Avatar`/`Checkbox`/`Slider`/`RadioGroup`/`Toggle` `size`, `ResizableHandle size="xs".."4xl"`. It is declared once on the root and every item reads it from context, so a card cannot mix paddings and a radio group cannot mix control sizes.
13
+ Where hosts had forked a primitive over DENSITY, density is a prop, not a fork: `Card size="sm|md|lg"`, `Table size="sm|md"`, `Accordion size="sm|md"`, `Switch`/`Avatar`/`Checkbox`/`Slider`/`RadioGroup`/`Toggle` `size`, `ResizableHandle size="xs".."4xl"`. It is declared once on the root and every item reads it from context, so a card cannot mix paddings and a radio group cannot mix control sizes.
14
14
 
15
15
  **Mobile is the Drawer's job.** `Drawer` owns the iOS rules every host was re-deriving — `dvh` never `vh`, `pb-safe`/`pt-safe` safe-area padding, a 44px grab-handle target, `DrawerBody` as the `flex-1 min-h-0` scroll shard — and `direction` makes a top/side drawer a prop rather than a fork. Every touch control (`Slider`, `RadioGroup`, `ResizableHandle`) carries an invisible 44px target on coarse pointers, with desktop density untouched.
16
16