@ai-matrx/design-system 0.5.2 → 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 +39 -1
- 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,5 +1,43 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
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.
|
|
34
|
+
|
|
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
|
+
|
|
3
41
|
## 0.5.2 — 2026-09-07
|
|
4
42
|
|
|
5
43
|
Two real source corrections, found by adopting 0.5.0 in the first two consumers
|
|
@@ -121,7 +159,7 @@ copy of something this version now ships:
|
|
|
121
159
|
- **matrx-frontend** — `components/ui/{avatar,card,checkbox,collapsible,dialog,dropdown-menu,progress,scroll-area,switch,table,tabs,textarea}.tsx`
|
|
122
160
|
and `components/ui/context-menu/context-menu.tsx`. High-fanout files become
|
|
123
161
|
re-export shims that bind this repo's historical variant (`Card size="sm"`,
|
|
124
|
-
`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
|
|
125
163
|
established for `button` / `badge` / `label` / `separator`. The
|
|
126
164
|
clipboard/motion variants (`CopyInput`, `FancyInput`, `DeleteInput`,
|
|
127
165
|
`CopyTextarea`, `FancyTextarea`) stay host-owned under the C8 split-out law.
|
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: {
|