@ai-matrx/design-system 0.11.2 → 0.11.3

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/dist/styles.css CHANGED
@@ -140,6 +140,49 @@
140
140
  .matrx-glass-thin-border:has(> a:active) {
141
141
  background-color: var(--matrx-glass-bg);
142
142
  }
143
+
144
+ /* -----------------------------------------------------------------------
145
+ .matrx-dialog-footer — THE STICKY FOOTER'S GEOMETRY, in one place.
146
+
147
+ This used to be a string of Tailwind utilities on `DialogFooter` and
148
+ `AlertDialogFooter`, and one of them — a NEGATIVE BOTTOM MARGIN used to
149
+ bleed the footer over the card's bottom padding — silently clipped the
150
+ thing the destructive-actions law exists to make readable (0.11.3, feedback
151
+ bf8fb00b). The mechanism, measured in Chrome at 1280x800:
152
+
153
+ a `position: sticky` element is CLAMPED to its containing block (here
154
+ the grid area / flex line the card gives it). A negative bottom margin
155
+ makes the footer's BORDER box taller than that area by exactly
156
+ `--dialog-pad`, so the browser yanks the whole footer UP by that amount.
157
+ With `--dialog-pad: 1.5rem` and `gap-4` that is 24px up against a 16px
158
+ gap: an 8px overlap in which the opaque footer painted over the last
159
+ line of the consequence — at EVERY description length, and unreachable
160
+ by scrolling, because the card's `scrollHeight === clientHeight`.
161
+
162
+ The bleed is now bought without a negative block margin: the footer owns
163
+ the card's BOTTOM padding (`padding-bottom`), the card gives it up (see
164
+ the reservation rule below), and only the INLINE bleed stays a negative
165
+ margin — sticky clamps the block axis, never the inline one.
166
+
167
+ `--dialog-pad-bottom` lets a card ask for more than `--dialog-pad` at the
168
+ bottom edge; the mobile sheet uses it for the home-indicator safe area.
169
+ ----------------------------------------------------------------------- */
170
+ .matrx-dialog-footer {
171
+ position: sticky;
172
+ bottom: 0;
173
+ z-index: 10;
174
+ padding-top: 0.75rem;
175
+ margin-inline: calc(var(--dialog-pad, 0px) * -1);
176
+ padding-inline: var(--dialog-pad, 0px);
177
+ padding-bottom: var(--dialog-pad-bottom, var(--dialog-pad, 0px));
178
+ }
179
+
180
+ /* The sheet's bottom edge is the phone's bottom edge — the footer has to
181
+ clear the home indicator, which is what the card's `pb-safe` used to do
182
+ before the footer took the bottom padding over. Same `max()` floor. */
183
+ .matrx-mobile-sheet {
184
+ --dialog-pad-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
185
+ }
143
186
  }
144
187
 
145
188
  /* Keyframes cannot live inside a cascade layer's rule set and be referenced
@@ -748,6 +791,33 @@
748
791
  );
749
792
  }
750
793
 
794
+ /* ────────────────────────────────────────────────────────────────────────
795
+ .matrx-dialog-card — THE FOOTER RESERVATION.
796
+
797
+ A card that contains a sticky footer gives its bottom padding TO that
798
+ footer, so the footer's box is exactly as tall as the space the card
799
+ allocated it. That is what keeps `position: sticky` from clamping the
800
+ footer upward over the preceding row (the 0.11.3 defect; see
801
+ `.matrx-dialog-footer` above for the measured mechanism).
802
+
803
+ Two consequences worth stating out loud:
804
+ • a card with NO footer keeps its full padding — the reservation is
805
+ conditional on purpose, so `DialogContent` without a `DialogFooter`
806
+ is unchanged;
807
+ • the footer's own `padding-bottom` reproduces the card's, so the visual
808
+ result is identical to the intended bleed: opaque background all the
809
+ way to the card's bottom edge, with nothing scrolling through beneath
810
+ the actions.
811
+
812
+ Deliberately UNLAYERED: it has to beat the card's own `p-6` / `p-4 pb-safe`
813
+ utilities, which live in `@layer utilities` (and in this package's own
814
+ layer, for `pb-safe`). Unlayered beats every layered rule regardless of
815
+ specificity — the same reason the sheet density restatement below is.
816
+ ──────────────────────────────────────────────────────────────────────── */
817
+ .matrx-dialog-card:has(> .matrx-dialog-footer) {
818
+ padding-bottom: 0;
819
+ }
820
+
751
821
  /* ────────────────────────────────────────────────────────────────────────
752
822
  .matrx-mobile-sheet — ONE mobile density for any desktop panel hosted in a
753
823
  bottom sheet (TabbedBottomSheet sets it; see that file's header).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/design-system",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "AI Matrx semantic React primitives shared across Vite, Next.js, desktop, and customer-built applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",