@ai-matrx/design-system 0.61.6 → 0.61.7
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 +19 -0
- package/dist/controls.cjs +2 -1
- package/dist/controls.cjs.map +1 -1
- package/dist/controls.css +22 -7
- package/dist/controls.d.cts +3 -0
- package/dist/controls.d.ts +3 -0
- package/dist/controls.js +2 -1
- package/dist/controls.js.map +1 -1
- package/dist/index.cjs +30 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +30 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/controls.css
CHANGED
|
@@ -228,8 +228,12 @@
|
|
|
228
228
|
min-width: 0;
|
|
229
229
|
width: 100%;
|
|
230
230
|
height: 100%;
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
/* Locked like every control declaration: an unlocked `inherit` loses to any
|
|
232
|
+
host's base-layer `input { font-size }` (matrx-frontend sets 17px), and
|
|
233
|
+
the field then types and shows its placeholder at 17px in a 13px capsule. */
|
|
234
|
+
font: inherit !important;
|
|
235
|
+
letter-spacing: inherit !important;
|
|
236
|
+
color: inherit !important;
|
|
233
237
|
cursor: text;
|
|
234
238
|
}
|
|
235
239
|
.matrx-control-field > button {
|
|
@@ -416,29 +420,34 @@
|
|
|
416
420
|
overflow: hidden;
|
|
417
421
|
text-overflow: ellipsis;
|
|
418
422
|
}
|
|
419
|
-
.matrx-control-badge[data-tone="primary"]
|
|
423
|
+
.matrx-control-badge[data-tone="primary"],
|
|
424
|
+
.matrx-control-button[data-tone="primary"] {
|
|
420
425
|
border-color: hsl(var(--primary) / 0.4) !important;
|
|
421
426
|
background-color: hsl(var(--primary) / 0.1) !important;
|
|
422
427
|
color: hsl(var(--primary)) !important;
|
|
423
428
|
}
|
|
424
|
-
.matrx-control-badge[data-tone="success"]
|
|
429
|
+
.matrx-control-badge[data-tone="success"],
|
|
430
|
+
.matrx-control-button[data-tone="success"] {
|
|
425
431
|
border-color: hsl(var(--success) / 0.4) !important;
|
|
426
432
|
background-color: hsl(var(--success) / 0.1) !important;
|
|
427
433
|
color: hsl(var(--success)) !important;
|
|
428
434
|
}
|
|
429
435
|
/* `--warning-foreground` is near-white (text ON a solid fill), so amber text
|
|
430
436
|
on a light tint is unreadable: the warning badge keeps foreground ink. */
|
|
431
|
-
.matrx-control-badge[data-tone="warning"]
|
|
437
|
+
.matrx-control-badge[data-tone="warning"],
|
|
438
|
+
.matrx-control-button[data-tone="warning"] {
|
|
432
439
|
border-color: hsl(var(--warning) / 0.6) !important;
|
|
433
440
|
background-color: hsl(var(--warning) / 0.15) !important;
|
|
434
441
|
color: hsl(var(--foreground)) !important;
|
|
435
442
|
}
|
|
436
|
-
.matrx-control-badge[data-tone="destructive"]
|
|
443
|
+
.matrx-control-badge[data-tone="destructive"],
|
|
444
|
+
.matrx-control-button[data-tone="destructive"] {
|
|
437
445
|
border-color: hsl(var(--destructive) / 0.4) !important;
|
|
438
446
|
background-color: hsl(var(--destructive) / 0.1) !important;
|
|
439
447
|
color: hsl(var(--destructive)) !important;
|
|
440
448
|
}
|
|
441
|
-
.matrx-control-badge[data-tone="info"]
|
|
449
|
+
.matrx-control-badge[data-tone="info"],
|
|
450
|
+
.matrx-control-button[data-tone="info"] {
|
|
442
451
|
border-color: hsl(var(--info) / 0.4) !important;
|
|
443
452
|
background-color: hsl(var(--info) / 0.1) !important;
|
|
444
453
|
color: hsl(var(--info)) !important;
|
|
@@ -553,6 +562,12 @@
|
|
|
553
562
|
min-width: 0;
|
|
554
563
|
flex: 1 1 auto;
|
|
555
564
|
}
|
|
565
|
+
/* The row's controls never yield width: the label and line truncate first.
|
|
566
|
+
(A ControlRow is `min-width: 0`, so on a phone a long line squeezed the
|
|
567
|
+
switches off their right edge — each row's at a different x, 2026-10-04.) */
|
|
568
|
+
.matrx-control-setting-row > .matrx-control-row {
|
|
569
|
+
flex-shrink: 0 !important;
|
|
570
|
+
}
|
|
556
571
|
.matrx-control-setting-label {
|
|
557
572
|
display: block;
|
|
558
573
|
overflow: hidden;
|
package/dist/controls.d.cts
CHANGED
|
@@ -34,6 +34,9 @@ type ControlVariant = "primary" | "quiet" | "outline" | "danger";
|
|
|
34
34
|
interface ButtonBase extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
35
35
|
/** Tone, never size. Default `outline`. */
|
|
36
36
|
variant?: ControlVariant;
|
|
37
|
+
/** A status tint from the role tokens (the Badge's), for a button that
|
|
38
|
+
* reports a state — a drift door, an alert count. Default: none. */
|
|
39
|
+
tone?: BadgeTone;
|
|
37
40
|
/** Leading 16px glyph. */
|
|
38
41
|
icon?: React.ReactNode;
|
|
39
42
|
/** Trailing 16px glyph (a menu chevron, an external-link mark). */
|
package/dist/controls.d.ts
CHANGED
|
@@ -34,6 +34,9 @@ type ControlVariant = "primary" | "quiet" | "outline" | "danger";
|
|
|
34
34
|
interface ButtonBase extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
35
35
|
/** Tone, never size. Default `outline`. */
|
|
36
36
|
variant?: ControlVariant;
|
|
37
|
+
/** A status tint from the role tokens (the Badge's), for a button that
|
|
38
|
+
* reports a state — a drift door, an alert count. Default: none. */
|
|
39
|
+
tone?: BadgeTone;
|
|
37
40
|
/** Leading 16px glyph. */
|
|
38
41
|
icon?: React.ReactNode;
|
|
39
42
|
/** Trailing 16px glyph (a menu chevron, an external-link mark). */
|
package/dist/controls.js
CHANGED
|
@@ -727,7 +727,7 @@ function glyphSlot(icon, iconEnd, label) {
|
|
|
727
727
|
return void 0;
|
|
728
728
|
}
|
|
729
729
|
var Button2 = React7.forwardRef(
|
|
730
|
-
({ className, variant = "outline", icon, iconEnd, asChild = false, children, onClick, type, ...props }, ref) => {
|
|
730
|
+
({ className, variant = "outline", tone, icon, iconEnd, asChild = false, children, onClick, type, ...props }, ref) => {
|
|
731
731
|
const Component = asChild ? Slot2 : "button";
|
|
732
732
|
const ariaDisabled = props["aria-disabled"];
|
|
733
733
|
const disabledChild = asChild && Boolean(props.disabled);
|
|
@@ -740,6 +740,7 @@ var Button2 = React7.forwardRef(
|
|
|
740
740
|
type: asChild ? void 0 : type ?? "button",
|
|
741
741
|
"data-matrx-control": "button",
|
|
742
742
|
"data-variant": variant,
|
|
743
|
+
"data-tone": tone && tone !== "neutral" ? tone : void 0,
|
|
743
744
|
"data-glyph": glyphSlot(icon, iconEnd, label),
|
|
744
745
|
className: cn("matrx-control matrx-control-button matrx-glyph-trim", className),
|
|
745
746
|
...props,
|