@ai-matrx/design-system 0.11.3 → 0.11.5

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,103 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.11.5 — 2026-09-08
4
+
5
+ **0.11.4's footer rule was correct and in the wrong place a second time — it
6
+ would have overridden every caller's own footer padding.** Take this patch.
7
+ 0.11.3 and 0.11.4 are both superseded.
8
+
9
+ 0.11.4 fixed the layering by moving `.matrx-dialog-footer` OUT of the cascade
10
+ layer. That made it apply — and, being unlayered, it then beat any host utility
11
+ on the same element. matrx-frontend has ~10 footers that pass their own padding
12
+ (`<DialogFooter className="p-0">`, `"px-4 py-3 border-t"`, `"px-5 py-3"`,
13
+ `"mt-2 pt-2"`, …), and every one of them would have silently lost.
14
+
15
+ **The resolution is to make the CARD carry the fix and leave the FOOTER
16
+ alone.** The footer's geometry goes back to being Tailwind utilities on the
17
+ element, exactly as it always was, so `cn` + tailwind-merge keeps a caller's
18
+ `className` winning — minus the one utility that caused the defect:
19
+
20
+ ```
21
+ - mx-[…] mb-[calc(var(--dialog-pad,0px)*-1)] px-[…] pb-[var(--dialog-pad,0px)]
22
+ + mx-[…] px-[…] pb-[var(--dialog-pad-bottom,0px)]
23
+ ```
24
+
25
+ Only the card half — which no caller addresses — is CSS, and it stays unlayered
26
+ because it must beat the card's own `p-6` / `p-4 pb-safe`:
27
+
28
+ ```css
29
+ .matrx-dialog-card:has(> [data-slot="dialog-footer"]),
30
+ .matrx-dialog-card:has(> [data-slot="alert-dialog-footer"]) { padding-bottom: 0 }
31
+ ```
32
+
33
+ `--dialog-pad-bottom` is now declared by each card: `1.5rem` on the two desktop
34
+ cards, and on the mobile sheet the unlayered
35
+ `.matrx-mobile-sheet { --dialog-pad-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px)) }`
36
+ so the actions still clear the home indicator.
37
+
38
+ 0.11.4's OTHER half stands and is the durable finding: **THE PREFLIGHT RULE**
39
+ and the three contracts it rescued (`.pb-safe`, `.pt-safe`, the glass stroke)
40
+ are unchanged here — see § 0.11.4.
41
+
42
+ ### Consumer action (C28)
43
+
44
+ **Take 0.11.5.** 0.11.3 renders the footer with no padding at all; 0.11.4
45
+ renders it with the package's padding regardless of what the caller asked for.
46
+ Both are superseded within the hour. Every `DialogFooter` / `AlertDialogFooter`
47
+ `className` override behaves exactly as it did in 0.11.2.
48
+
49
+ ## 0.11.4 — 2026-09-08
50
+
51
+ **0.11.3 SHIPPED THE FIX INTO A LAYER WHERE IT DID NOT APPLY — and the census
52
+ that forced found three older contracts in the same state.** Take this patch,
53
+ not 0.11.3.
54
+
55
+ 0.11.3 moved the sticky-footer geometry into a shipped `.matrx-dialog-footer`
56
+ rule inside `@layer matrx-design-system`. On the live matrx-frontend build that
57
+ rule was present in the CSSOM and its padding computed to **`0px`**:
58
+
59
+ ```
60
+ layer order → properties, [matrx-design-system-tokens, matrx-design-system],
61
+ theme, base, components, utilities
62
+ @layer base → *, ::after, ::before, ::backdrop { … margin: 0; padding: 0 }
63
+ ```
64
+
65
+ 🚨 **THE PREFLIGHT RULE.** Tailwind's preflight zeroes `margin`, `padding`,
66
+ `border` and `box-sizing` on every element from `@layer base` — and a host that
67
+ follows THIS PACKAGE'S OWN documented layer statement puts
68
+ `matrx-design-system` BELOW `base`. So a layered declaration of any of those
69
+ four is not lower-priority: it is **gone**, with no error and nothing on screen
70
+ to trace it by, in the consumer that followed the docs most carefully.
71
+
72
+ **The census that finding forced — three contracts that were already inert,
73
+ silently, in matrx-frontend:**
74
+
75
+ | Rule | Shipped | Property preflight ate |
76
+ |---|---|---|
77
+ | `.pb-safe` | 0.5.0 | `padding-bottom` — the safe-area floor under every BottomSheet body/footer and the CommandDialog mobile sheet |
78
+ | `.pt-safe` | 0.7.0 | `padding-top` — the notch clearance on a `direction="top"` Drawer |
79
+ | `.matrx-glass-thin-border` | 0.5.0 | `border` — the glass chrome's whole stroke |
80
+
81
+ All four now live **unlayered**, under a banner that says why, and the glass
82
+ rule is split so only its stroke leaves the layer (fill, blur and elevation
83
+ stay layered, so a host utility can still re-tint them).
84
+
85
+ **Guard:** `styles.test.ts` § THE PREFLIGHT RULE — no layered rule may declare
86
+ a preflight-reset property, and the four known contracts must be unlayered and
87
+ intact. Proven RED on the 0.11.3 sheet, where it named all three older
88
+ offenders as well as the new one.
89
+
90
+ ### Consumer action (C28)
91
+
92
+ **Take 0.11.4.** 0.11.3 has the correct structure and an inert footer rule: the
93
+ occlusion is gone but the footer renders with no padding and no bleed. Three
94
+ contracts get quietly *better* here — safe-area padding and the glass stroke
95
+ start working in every Tailwind host for the first time. One behaviour change
96
+ worth knowing: because `.matrx-dialog-footer`, `.pb-safe`, `.pt-safe` and the
97
+ glass stroke are now unlayered, a host utility on the same element no longer
98
+ overrides those specific properties. Pass geometry through the component's own
99
+ seams (`--dialog-pad`, `--dialog-pad-bottom`) rather than a padding utility.
100
+
3
101
  ## 0.11.3 — 2026-09-07
4
102
 
5
103
  **THE STICKY FOOTER STOPPED PAINTING OVER THE CONSEQUENCE.** `ConfirmDialog`'s
package/dist/index.cjs CHANGED
@@ -1067,7 +1067,7 @@ var AlertDialogContent = React7.forwardRef(({ className, children, container, an
1067
1067
  // a sticky footer when there is one, so the footer's box matches the
1068
1068
  // space the grid gave it and sticky never clamps it up over the
1069
1069
  // consequence copy.
1070
- "max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full",
1070
+ "max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] [--dialog-pad-bottom:1.5rem] overflow-x-clip [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full",
1071
1071
  "sm:rounded-lg",
1072
1072
  animated && MOTION_DIALOG,
1073
1073
  className
@@ -1104,12 +1104,25 @@ var AlertDialogFooter = ({
1104
1104
  className: cn(
1105
1105
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
1106
1106
  // Ruling 3/4 — sticky to the card edges so a scrolled body never shows
1107
- // through under the actions, and safe-area padded on a phone. ALL of
1108
- // that geometry is `matrx-dialog-footer`, a rule this package SHIPS
1109
- // (styles.css), because the utility spelling of it carried a negative
1110
- // block margin that sticky clamped painting the footer over the last
1111
- // 8px of the consequence at every description length (0.11.3).
1112
- "matrx-dialog-footer bg-background",
1107
+ // through under the actions, and safe-area padded on a phone.
1108
+ //
1109
+ // 🚨 THERE IS NO `mb-[…]` HERE, AND THERE MUST NEVER BE ONE AGAIN
1110
+ // (0.11.3, feedback bf8fb00b). The bleed over the card's bottom padding
1111
+ // used to be a NEGATIVE BLOCK MARGIN, which makes this box taller than
1112
+ // the grid area the card allocates it — and `position: sticky` CLAMPS a
1113
+ // box to its containing block, so the browser yanked the footer UP by
1114
+ // `--dialog-pad` against the card's `gap-4` and painted 8px of opaque
1115
+ // footer over the last line of the consequence, at every length. The
1116
+ // card now RESERVES this footer's block size instead (`matrx-dialog-card`
1117
+ // in styles.css hands over its `padding-bottom`), so the bleed costs no
1118
+ // margin at all. Guard: `sticky-footer-geometry.test.tsx`.
1119
+ //
1120
+ // These stay UTILITIES rather than a shipped rule so a caller's
1121
+ // `className` still wins through tailwind-merge — a shipped rule would
1122
+ // have to be unlayered to survive Tailwind preflight (§ THE PREFLIGHT
1123
+ // RULE in styles.css) and would then override every caller's padding.
1124
+ "sticky bottom-0 z-10 bg-background pt-3",
1125
+ "mx-[calc(var(--dialog-pad,0px)*-1)] px-[var(--dialog-pad,0px)] pb-[var(--dialog-pad-bottom,0px)]",
1113
1126
  className
1114
1127
  ),
1115
1128
  ...props
@@ -2130,7 +2143,7 @@ var DialogContentPrimitive = React17.forwardRef((props, ref) => {
2130
2143
  );
2131
2144
  });
2132
2145
  DialogContentPrimitive.displayName = "DialogContentPrimitive";
2133
- var DIALOG_DESKTOP_CLASSES2 = `matrx-dialog-card fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg ${CENTERED_DIALOG} gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg`;
2146
+ var DIALOG_DESKTOP_CLASSES2 = `matrx-dialog-card fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg ${CENTERED_DIALOG} gap-4 max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] [--dialog-pad-bottom:1.5rem] overflow-x-clip border bg-background p-6 shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full sm:rounded-lg`;
2134
2147
  var DIALOG_MOBILE_SHEET_CLASSES2 = "matrx-mobile-sheet matrx-dialog-card fixed inset-x-0 bottom-0 left-0 right-0 top-auto z-[10000] flex min-w-0 flex-col w-full max-w-full max-h-[90dvh] translate-x-0 translate-y-0 gap-4 [--dialog-pad:1rem] overflow-x-clip border-t bg-background p-4 pb-safe shadow-lg [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full rounded-t-2xl rounded-b-none overflow-y-auto overscroll-contain";
2135
2148
  var DIALOG_MOBILE_SHEET_OVERRIDE2 = "inset-x-0 bottom-0 left-0 right-0 top-auto translate-x-0 translate-y-0 w-full max-w-full max-h-[90dvh] rounded-b-none rounded-t-2xl overflow-y-auto";
2136
2149
  var DialogContent = React17.forwardRef(
@@ -2235,12 +2248,26 @@ var DialogFooter = ({
2235
2248
  "data-slot": "dialog-footer",
2236
2249
  className: cn(
2237
2250
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
2238
- // Ruling 3 — the geometry is `matrx-dialog-footer`, a rule this package
2239
- // SHIPS (styles.css). It used to be utilities, one of which was a
2240
- // negative block margin that `position: sticky` clamps — the footer was
2241
- // yanked up over the row above it by `--dialog-pad` minus the card gap
2242
- // (0.11.3). The card gives the footer its bottom padding instead.
2243
- "matrx-dialog-footer bg-background",
2251
+ // Ruling 3/4sticky to the card edges so a scrolled body never shows
2252
+ // through under the actions, and safe-area padded on a phone.
2253
+ //
2254
+ // 🚨 THERE IS NO `mb-[…]` HERE, AND THERE MUST NEVER BE ONE AGAIN
2255
+ // (0.11.3, feedback bf8fb00b). The bleed over the card's bottom padding
2256
+ // used to be a NEGATIVE BLOCK MARGIN, which makes this box taller than
2257
+ // the grid area the card allocates it — and `position: sticky` CLAMPS a
2258
+ // box to its containing block, so the browser yanked the footer UP by
2259
+ // `--dialog-pad` against the card's `gap-4` and painted 8px of opaque
2260
+ // footer over the last line of the consequence, at every length. The
2261
+ // card now RESERVES this footer's block size instead (`matrx-dialog-card`
2262
+ // in styles.css hands over its `padding-bottom`), so the bleed costs no
2263
+ // margin at all. Guard: `sticky-footer-geometry.test.tsx`.
2264
+ //
2265
+ // These stay UTILITIES rather than a shipped rule so a caller's
2266
+ // `className` still wins through tailwind-merge — a shipped rule would
2267
+ // have to be unlayered to survive Tailwind preflight (§ THE PREFLIGHT
2268
+ // RULE in styles.css) and would then override every caller's padding.
2269
+ "sticky bottom-0 z-10 bg-background pt-3",
2270
+ "mx-[calc(var(--dialog-pad,0px)*-1)] px-[var(--dialog-pad,0px)] pb-[var(--dialog-pad-bottom,0px)]",
2244
2271
  className
2245
2272
  ),
2246
2273
  ...props