@ai-matrx/design-system 0.5.1 → 0.6.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 +65 -6
- package/dist/index.cjs +26 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- package/dist/styles.css +11 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,69 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.6.0 — 2026-09-07
|
|
4
|
+
|
|
5
|
+
**THE BUTTON SCALE.** matrx-frontend carried a 127-line CVA button fork
|
|
6
|
+
(`components/ui/ButtonMine.tsx`, 17 call sites) alongside the package `Button`.
|
|
7
|
+
It existed for one reason: the package scale stopped at `sm`/`lg`, so a dense
|
|
8
|
+
toolbar had nowhere to go. Per C22 the gap moves into the package rather than
|
|
9
|
+
being papered over in a host shim, and the fork is deleted in the same session.
|
|
10
|
+
|
|
11
|
+
- **`Button` gains six size rungs** — `xs`, `md`, `xl`, `2xl`, `3xl`, and
|
|
12
|
+
`roundIcon` (a circular icon box) — completing one scale from `xs` to `3xl`
|
|
13
|
+
beside the existing `icon` / `icon-sm`. `md` is a deliberate alias of
|
|
14
|
+
`default`; the fork's middle rung was spelled that way at its call sites.
|
|
15
|
+
- **`Button` gains two variants** — `primary` (an explicit spelling of
|
|
16
|
+
`default`, identical by construction, because ~17 sites say it) and
|
|
17
|
+
`success`, the affirmative twin of `destructive`, painted from the
|
|
18
|
+
`--success` / `--success-foreground` token pair the theme already shipped.
|
|
19
|
+
- **`src/button.test.tsx` makes the scale a contract**: every rung resolves,
|
|
20
|
+
every rung is distinct (except the declared `md` alias), heights ascend, and
|
|
21
|
+
NO variant reaches a raw palette colour. Proven failing-then-passing by
|
|
22
|
+
deleting the `xs` rung. A missing rung is how the fork came back the first
|
|
23
|
+
time.
|
|
24
|
+
|
|
25
|
+
Two names the fork spelled differently now resolve to the package's geometry,
|
|
26
|
+
and the ~17 adopted sites move with them: `sm` is `h-8` (the fork's was `h-7`)
|
|
27
|
+
and `icon` is `h-9 w-9` (the fork's was `h-10 w-10`). This is the convergence,
|
|
28
|
+
not a regression — the fork also painted hardcoded `blue-600`/`gray-700`
|
|
29
|
+
palettes, so those sites now follow the host's own tokens in light and dark.
|
|
30
|
+
|
|
31
|
+
Not carried: the fork's `m` / `l` legacy size aliases (no call site used
|
|
32
|
+
either) and its runtime `isValidOption` variant/size validation, which guarded
|
|
33
|
+
against values TypeScript already refuses.
|
|
4
34
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
35
|
+
### Consumer action (C28)
|
|
36
|
+
|
|
37
|
+
None required — every existing `variant`/`size` value keeps its meaning. If
|
|
38
|
+
your repo has its own button fork with extra sizes, it can now be deleted:
|
|
39
|
+
adopt `@ai-matrx/design-system`'s `Button` and re-point the call sites.
|
|
40
|
+
|
|
41
|
+
## 0.5.2 — 2026-09-07
|
|
42
|
+
|
|
43
|
+
Two real source corrections, found by adopting 0.5.0 in the first two consumers
|
|
44
|
+
before any of them shipped it.
|
|
45
|
+
|
|
46
|
+
(0.5.1 is an automatic changed-only republish tag the release automation cut
|
|
47
|
+
between these two commits; it carries 0.5.0's source with no source change. Go
|
|
48
|
+
straight to 0.5.2.)
|
|
49
|
+
|
|
50
|
+
- **`useIsMobile` no longer crashes where `matchMedia` is absent.** Older jsdom
|
|
51
|
+
setups and some embedded webviews do not provide it, and `Dialog` reads the
|
|
52
|
+
hook — so adopting 0.5.0 took down 38 of workflow-studio's tests over a
|
|
53
|
+
breakpoint. The width read still gives a correct first answer; only live
|
|
54
|
+
resize tracking is lost, which is exactly what is unavailable. A primitive
|
|
55
|
+
must never cost a host its whole suite (or its screen) for an optional
|
|
56
|
+
capability.
|
|
57
|
+
- **`Checkbox` and `Table` now default to `md`** — the stock 16px control and
|
|
58
|
+
`p-3` cells, which every host except matrx-frontend already used. The 0.5.0
|
|
59
|
+
defaults would have made three consumers bind a size just to stand still.
|
|
60
|
+
matrx-frontend is dense on purpose and binds `sm` in its own shim.
|
|
61
|
+
|
|
62
|
+
### Consumer action (C28)
|
|
63
|
+
|
|
64
|
+
None beyond installing 0.5.2 (0.5.1 was an automatic republish tag cut between these two commits; it carries the 0.5.0 source). If you pinned `Checkbox size="sm"` or
|
|
65
|
+
`Table size="sm"` to match 0.5.0's defaults, drop it unless you actually want
|
|
66
|
+
the dense variant.
|
|
8
67
|
|
|
9
68
|
## 0.5.0 — 2026-09-07
|
|
10
69
|
|
|
@@ -100,7 +159,7 @@ copy of something this version now ships:
|
|
|
100
159
|
- **matrx-frontend** — `components/ui/{avatar,card,checkbox,collapsible,dialog,dropdown-menu,progress,scroll-area,switch,table,tabs,textarea}.tsx`
|
|
101
160
|
and `components/ui/context-menu/context-menu.tsx`. High-fanout files become
|
|
102
161
|
re-export shims that bind this repo's historical variant (`Card size="sm"`,
|
|
103
|
-
`Switch size="sm"`, `Table size="sm"`), matching what the 08-30 swap
|
|
162
|
+
`Switch size="sm"`, `Checkbox size="sm"`, `Table size="sm"`), matching what the 08-30 swap
|
|
104
163
|
established for `button` / `badge` / `label` / `separator`. The
|
|
105
164
|
clipboard/motion variants (`CopyInput`, `FancyInput`, `DeleteInput`,
|
|
106
165
|
`CopyTextarea`, `FancyTextarea`) stay host-owned under the C8 split-out law.
|
|
@@ -114,7 +173,7 @@ copy of something this version now ships:
|
|
|
114
173
|
carrying that app's own visual language; they are DEFERRED, not forgotten —
|
|
115
174
|
see FEATURE.md § Deferred.
|
|
116
175
|
- **aidream/apps/dashboard** — `src/components/ui/{avatar,card,checkbox,context-menu,dialog,dropdown-menu,scroll-area,switch,table,tabs,textarea}.tsx`.
|
|
117
|
-
|
|
176
|
+
Bind `Card size="lg"` to keep this app's density (Table defaults to md as of 0.5.1).
|
|
118
177
|
- **aidream/apps/workflow-studio** — `src/components/ui/{dialog,dropdown-menu,scroll-area,switch,tabs,textarea}.tsx`.
|
|
119
178
|
Its ScrollArea viewport hack becomes `viewportClassName="[&>div]:!block [&>div]:min-w-0"`.
|
|
120
179
|
|
package/dist/index.cjs
CHANGED
|
@@ -536,19 +536,43 @@ var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
|
536
536
|
variants: {
|
|
537
537
|
variant: {
|
|
538
538
|
default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
|
|
539
|
+
/**
|
|
540
|
+
* An explicit spelling of `default`, identical by construction. It is
|
|
541
|
+
* not decoration: matrx-frontend's `ButtonMine` fork carried it, ~17
|
|
542
|
+
* call sites say `variant="primary"`, and the alternative to keeping
|
|
543
|
+
* the word was a host shim translating a prop — the massage C22 bans.
|
|
544
|
+
*/
|
|
545
|
+
primary: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
|
|
539
546
|
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
547
|
+
/** The affirmative twin of `destructive` — confirm, approve, publish. */
|
|
548
|
+
success: "bg-success text-success-foreground shadow-sm hover:bg-success/90",
|
|
540
549
|
outline: "border border-border bg-card shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
541
550
|
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
542
551
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
543
552
|
link: "text-primary underline-offset-4 hover:underline",
|
|
544
553
|
subtle: "border border-transparent bg-muted/50 text-foreground hover:border-border hover:bg-muted"
|
|
545
554
|
},
|
|
555
|
+
/**
|
|
556
|
+
* ONE size scale, xs → 3xl, plus the two icon boxes. The top and bottom
|
|
557
|
+
* of the scale came in from matrx-frontend's `ButtonMine` fork (2026-09-07):
|
|
558
|
+
* a dense toolbar needs `xs`, and a marketing/hero call to action needs
|
|
559
|
+
* `xl`+. A host that has to reach outside this scale forks the button,
|
|
560
|
+
* which is exactly how `ButtonMine` was born.
|
|
561
|
+
*/
|
|
546
562
|
size: {
|
|
547
|
-
|
|
563
|
+
xs: "h-6 rounded-md px-1 text-xs",
|
|
548
564
|
sm: "h-8 rounded-md px-3 text-xs",
|
|
565
|
+
default: "h-9 px-4 py-2",
|
|
566
|
+
/** An explicit spelling of `default` (the fork's middle rung). */
|
|
567
|
+
md: "h-9 px-4 py-2",
|
|
549
568
|
lg: "h-10 rounded-md px-6",
|
|
569
|
+
xl: "h-12 px-8 py-3 text-base",
|
|
570
|
+
"2xl": "h-14 px-10 py-3 text-base",
|
|
571
|
+
"3xl": "h-16 px-12 py-3 text-base",
|
|
550
572
|
icon: "h-9 w-9",
|
|
551
|
-
"icon-sm": "h-7 w-7"
|
|
573
|
+
"icon-sm": "h-7 w-7",
|
|
574
|
+
/** A circular icon box — an avatar-shaped control, not a square one. */
|
|
575
|
+
roundIcon: "h-8 w-8 rounded-full p-0"
|
|
552
576
|
}
|
|
553
577
|
},
|
|
554
578
|
defaultVariants: {
|