@ai-matrx/design-system 0.7.1 → 0.9.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 +119 -0
- package/README.md +4 -2
- package/dist/index.cjs +685 -593
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +119 -8
- package/dist/index.d.ts +119 -8
- package/dist/index.js +685 -593
- package/dist/index.js.map +1 -1
- package/dist/styles.css +76 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,124 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.0 — 2026-09-07
|
|
4
|
+
|
|
5
|
+
**`Collapsible` gets the open/close transition the package never shipped
|
|
6
|
+
(census row 19f, the tail 0.8.0 left open).** Until now `collapsible.tsx` was a
|
|
7
|
+
bare re-export of Radix, and Radix ships no motion — it only publishes the
|
|
8
|
+
measured height as `--radix-collapsible-content-height` and leaves the
|
|
9
|
+
keyframes to you. So every consumer invented the transition itself, and the
|
|
10
|
+
inventions are the reason this is a package change and not a host one:
|
|
11
|
+
|
|
12
|
+
- **Two matrx-frontend collapsibles had never animated, silently.**
|
|
13
|
+
`components/matrx/matrx-collapsible/matrx-collapsible.tsx` and
|
|
14
|
+
`enhanced-collapsible.tsx` carried `animate-accordion-down`/`-up` on a
|
|
15
|
+
COLLAPSIBLE panel. Those keyframes interpolate to
|
|
16
|
+
`--radix-ACCORDION-content-height`, which Radix never sets on a collapsible,
|
|
17
|
+
so the target height was always an undefined variable. No animation, no
|
|
18
|
+
error, for as long as the components existed. (Found while deleting the host
|
|
19
|
+
keyframes in 0.8.0; the dead classes were removed then, with the finding
|
|
20
|
+
recorded in place.)
|
|
21
|
+
- **Six more animated correctly — in exactly one app.** `ChatCollapsible`,
|
|
22
|
+
`ChatCollapsibleWrapper`, `TranscriptBlock`, `StructuredPlanBlock`,
|
|
23
|
+
`AdvancedCollapsible` and `armani-collapsible` used
|
|
24
|
+
`animate-slide-down`/`-up`, whose keyframes lived only in matrx-frontend's
|
|
25
|
+
`globals.css`. Same C26 silent host contract as the accordion's, wearing a
|
|
26
|
+
working coat: any other consumer of this package got nothing.
|
|
27
|
+
|
|
28
|
+
`CollapsibleContent` now applies `.matrx-collapsible-content overflow-hidden`
|
|
29
|
+
by default. The rule and its keyframes ship in `styles.css`, keyed off the
|
|
30
|
+
COLLAPSIBLE height variable, at the same 200ms ease-out as
|
|
31
|
+
`.matrx-accordion-content` so the two primitives agree on the same screen, and
|
|
32
|
+
`prefers-reduced-motion: reduce` drops the animation while keeping the
|
|
33
|
+
clipping. The panel also carries `data-slot="collapsible-content"`.
|
|
34
|
+
|
|
35
|
+
Unlike `AccordionContent`, this does NOT wrap children in a padding div —
|
|
36
|
+
collapsibles in the fleet pad their own bodies, and inserting a box would move
|
|
37
|
+
every one of them.
|
|
38
|
+
|
|
39
|
+
**Opt-out:** `<CollapsibleContent animated={false}>` returns bare Radix — no
|
|
40
|
+
class, no clipping, instant open — for the rare panel with a child that must
|
|
41
|
+
overflow its bounds (a non-portalled popover, a sticky header). It is not the
|
|
42
|
+
reduced-motion switch; the stylesheet already handles that.
|
|
43
|
+
|
|
44
|
+
Guards: `collapsible.test.tsx` (transition class present and not either host
|
|
45
|
+
utility; the keyframes read the collapsible variable and not the accordion's;
|
|
46
|
+
both reduced-motion states silenced; the opt-out removing class AND clipping),
|
|
47
|
+
`matrx-accordion-content` + `matrx-collapsible-content` added to
|
|
48
|
+
`styles.test.ts`'s required-rule list, and the packed-tarball canary now
|
|
49
|
+
asserts both rules, the collapsible height variable, and a reduced-motion
|
|
50
|
+
block actually ship in `dist/styles.css`. Proven failing-then-passing by
|
|
51
|
+
re-pointing the keyframes at the accordion variable.
|
|
52
|
+
|
|
53
|
+
### Consumer action (C28)
|
|
54
|
+
|
|
55
|
+
- 🔶 **This is a VISIBLE change, on purpose.** Every `CollapsibleContent` in
|
|
56
|
+
every consumer now animates open and closed at 200ms where most of them
|
|
57
|
+
previously snapped. If a panel must not move or must not clip, pass
|
|
58
|
+
`animated={false}` — do not re-add host keyframes.
|
|
59
|
+
- **Delete host collapsible keyframes and the per-site classes that used
|
|
60
|
+
them.** In matrx-frontend that is `slide-down` / `slide-up` in
|
|
61
|
+
`app/globals.css`, the `--animate-slide-down` / `--animate-slide-up` theme
|
|
62
|
+
entries, and the `data-[state=open]:animate-slide-down
|
|
63
|
+
data-[state=closed]:animate-slide-up` pairs on the six components listed
|
|
64
|
+
above (all done in this same session, per THE SAME-SESSION LAW).
|
|
65
|
+
- **The two components named at the top of this entry —
|
|
66
|
+
`matrx-collapsible.tsx` and `enhanced-collapsible.tsx` — animate for the
|
|
67
|
+
first time ever** with this release. They need no code change; they get the
|
|
68
|
+
transition from the package.
|
|
69
|
+
- New type export: `CollapsibleContentProps`.
|
|
70
|
+
|
|
71
|
+
## 0.8.0 — 2026-09-07
|
|
72
|
+
|
|
73
|
+
**Accordion — the last stand-in in the fleet (census row 19c).** Growth waves 1
|
|
74
|
+
and 2 collapsed Card, Table, Alert, Avatar, Progress, Collapsible, Checkbox,
|
|
75
|
+
Slider and RadioGroup into this package, but nothing here was called
|
|
76
|
+
`Accordion`. So `aidream/apps/workflow-studio`'s DB-authored component scope
|
|
77
|
+
was still handing agent-authored components four dependency-free `<div>`s
|
|
78
|
+
named `Accordion` / `AccordionItem` / `AccordionTrigger` / `AccordionContent`.
|
|
79
|
+
A DB-authored component that asked for an accordion got four stacked divs:
|
|
80
|
+
every section permanently open, no trigger, no keyboard, no ARIA — a screen
|
|
81
|
+
that looks finished and is not.
|
|
82
|
+
|
|
83
|
+
The port is built from matrx-frontend's `components/ui/accordion.tsx` (the only
|
|
84
|
+
real implementation in the fleet), with three corrections recorded rather than
|
|
85
|
+
preserved:
|
|
86
|
+
|
|
87
|
+
- **The animation is package-owned CSS.** The original used
|
|
88
|
+
`animate-accordion-down` / `-up` — Tailwind utility names that exist only in
|
|
89
|
+
a host `tailwind.config.js`. Any consumer without that config got a component
|
|
90
|
+
that jumped open, silently, with no error. `.matrx-accordion-content` and its
|
|
91
|
+
keyframes now ship in `styles.css` (the C26 styling contract), keyed off
|
|
92
|
+
Radix's runtime `--radix-accordion-content-height`, and honour
|
|
93
|
+
`prefers-reduced-motion`.
|
|
94
|
+
- **Density is a prop, not a fork** — `size="sm|md"` declared once on the root
|
|
95
|
+
and read from context by every trigger and panel, exactly as on `Card` and
|
|
96
|
+
`Table`, so an accordion cannot mix a `p-4` header with a `pb-2` body.
|
|
97
|
+
- **The chevron is an inlined icon** (C19), not a `@radix-ui/react-icons`
|
|
98
|
+
import, so the package still carries no icon-library dependency.
|
|
99
|
+
|
|
100
|
+
`rightElements` (controls on the trigger row, before the chevron) is kept from
|
|
101
|
+
the original so matrx-frontend can adopt without losing a capability.
|
|
102
|
+
|
|
103
|
+
The SSR note the original carried is kept and restated: **the root renders
|
|
104
|
+
unconditionally.** There is no mount gate — Radix ids come from React's
|
|
105
|
+
SSR-stable `useId`, and the gate deleted every header and every
|
|
106
|
+
`defaultValue`-open item from SSR and the first client paint.
|
|
107
|
+
|
|
108
|
+
New dependency: `@radix-ui/react-accordion`.
|
|
109
|
+
|
|
110
|
+
### Consumer action (C28)
|
|
111
|
+
|
|
112
|
+
- Nothing breaks; this is additive.
|
|
113
|
+
- **Delete any local `Accordion` fork or `div` stand-in and import from here.**
|
|
114
|
+
Known holders at publish time: `aidream/apps/workflow-studio`'s
|
|
115
|
+
`component-scope.tsx` (adopted in this same session, per THE SAME-SESSION
|
|
116
|
+
LAW) and `matrx-frontend/components/ui/accordion.tsx` +
|
|
117
|
+
`components/matrx/matrx-collapsible/AccordionWrapper.tsx` (NOT adopted here —
|
|
118
|
+
a realtime lane held that tree; it is a live census row).
|
|
119
|
+
- A host that previously relied on its own `animate-accordion-*` keyframes can
|
|
120
|
+
drop them.
|
|
121
|
+
|
|
3
122
|
## 0.7.1 — 2026-09-07
|
|
4
123
|
|
|
5
124
|
- **`ResizableHandle` defaults to `xs` (2px), not `sm` (4px).** Caught in the
|
package/README.md
CHANGED
|
@@ -3,14 +3,16 @@
|
|
|
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
|
+
|
|
15
|
+
**Motion ships with the component.** `Accordion` and `Collapsible` animate open and closed out of the box (200ms, `prefers-reduced-motion` honoured) from rules in `styles.css` — you never define keyframes or add an `animate-*` utility for them. `CollapsibleContent` also clips its body while it moves; pass `animated={false}` for the rare panel with a child that must overflow its bounds.
|
|
14
16
|
|
|
15
17
|
**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
18
|
|