@ai-matrx/design-system 0.11.4 → 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/dist/styles.css CHANGED
@@ -783,44 +783,21 @@
783
783
  }
784
784
 
785
785
  /* -----------------------------------------------------------------------
786
- .matrx-dialog-footer — THE STICKY FOOTER'S GEOMETRY, in one place.
787
-
788
- This used to be a string of Tailwind utilities on `DialogFooter` and
789
- `AlertDialogFooter`, and one of them — a NEGATIVE BOTTOM MARGIN used to
790
- bleed the footer over the card's bottom padding — silently clipped the
791
- thing the destructive-actions law exists to make readable (0.11.3, feedback
792
- bf8fb00b). The mechanism, measured in Chrome at 1280x800:
793
-
794
- a `position: sticky` element is CLAMPED to its containing block (here
795
- the grid area / flex line the card gives it). A negative bottom margin
796
- makes the footer's BORDER box taller than that area by exactly
797
- `--dialog-pad`, so the browser yanks the whole footer UP by that amount.
798
- With `--dialog-pad: 1.5rem` and `gap-4` that is 24px up against a 16px
799
- gap: an 8px overlap in which the opaque footer painted over the last
800
- line of the consequence — at EVERY description length, and unreachable
801
- by scrolling, because the card's `scrollHeight === clientHeight`.
802
-
803
- The bleed is now bought without a negative block margin: the footer owns
804
- the card's BOTTOM padding (`padding-bottom`), the card gives it up (see
805
- the reservation rule below), and only the INLINE bleed stays a negative
806
- margin — sticky clamps the block axis, never the inline one.
807
-
808
- `--dialog-pad-bottom` lets a card ask for more than `--dialog-pad` at the
809
- bottom edge; the mobile sheet uses it for the home-indicator safe area.
786
+ --dialog-pad-bottom on the mobile sheet — the home-indicator clearance.
787
+
788
+ The dialog card's bottom padding belongs to its sticky footer (see THE
789
+ FOOTER RESERVATION below), so the safe area the sheet used to buy with
790
+ `pb-safe` has to arrive as the FOOTER's bottom pad instead. Same max()
791
+ floor. Unlayered like the rest of this section, though a custom property is
792
+ not something preflight touches — it is here so the whole contract reads in
793
+ one place.
794
+
795
+ The footer's own geometry is deliberately NOT a rule: it stays Tailwind
796
+ utilities on the element, so a caller's `className` still overrides it
797
+ through tailwind-merge exactly as it always has (matrx-frontend has ~10
798
+ footers that pass their own padding). Only the card half — which no caller
799
+ addresses — is CSS.
810
800
  ----------------------------------------------------------------------- */
811
- .matrx-dialog-footer {
812
- position: sticky;
813
- bottom: 0;
814
- z-index: 10;
815
- padding-top: 0.75rem;
816
- margin-inline: calc(var(--dialog-pad, 0px) * -1);
817
- padding-inline: var(--dialog-pad, 0px);
818
- padding-bottom: var(--dialog-pad-bottom, var(--dialog-pad, 0px));
819
- }
820
-
821
- /* The sheet's bottom edge is the phone's bottom edge — the footer has to
822
- clear the home indicator, which is what the card's `pb-safe` used to do
823
- before the footer took the bottom padding over. Same `max()` floor. */
824
801
  .matrx-mobile-sheet {
825
802
  --dialog-pad-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
826
803
  }
@@ -831,8 +808,18 @@
831
808
  A card that contains a sticky footer gives its bottom padding TO that
832
809
  footer, so the footer's box is exactly as tall as the space the card
833
810
  allocated it. That is what keeps `position: sticky` from clamping the
834
- footer upward over the preceding row (the 0.11.3 defect; see
835
- `.matrx-dialog-footer` above for the measured mechanism).
811
+ footer upward over the preceding row.
812
+
813
+ THE MECHANISM (measured in Chrome at 1280x800, 0.11.2). The footer used to
814
+ bleed over this padding with `mb-[calc(var(--dialog-pad,0px)*-1)]`. A
815
+ negative bottom margin makes an element's BORDER box taller than the grid
816
+ area (or flex line) its parent allocated it, and `position: sticky` CLAMPS a
817
+ box to its containing block — so the browser yanked the whole footer UP by
818
+ `--dialog-pad` (24px) against a `gap-4` (16px). The 8px difference was
819
+ opaque footer painted over the last line of the consequence copy, at EVERY
820
+ description length, and unreachable: the card's
821
+ `scrollHeight === clientHeight`, so nothing could scroll it into view.
822
+ Feedback `bf8fb00b`.
836
823
 
837
824
  Two consequences worth stating out loud:
838
825
  • a card with NO footer keeps its full padding — the reservation is
@@ -844,11 +831,17 @@
844
831
  the actions.
845
832
 
846
833
  Deliberately UNLAYERED: it has to beat the card's own `p-6` / `p-4 pb-safe`
847
- utilities, which live in `@layer utilities` (and in this package's own
848
- layer, for `pb-safe`). Unlayered beats every layered rule regardless of
849
- specificity — the same reason the sheet density restatement below is.
834
+ utilities, which live in `@layer utilities`. Unlayered beats every layered
835
+ rule regardless of specificity — the same reason the sheet density
836
+ restatement below is.
837
+
838
+ And deliberately ONE-SIDED: the FOOTER's geometry stays Tailwind utilities
839
+ on the element, never a rule, so a caller's `className` still overrides its
840
+ padding through tailwind-merge exactly as it always has. Only the card half,
841
+ which no caller addresses, is CSS.
850
842
  ──────────────────────────────────────────────────────────────────────── */
851
- .matrx-dialog-card:has(> .matrx-dialog-footer) {
843
+ .matrx-dialog-card:has(> [data-slot="dialog-footer"]),
844
+ .matrx-dialog-card:has(> [data-slot="alert-dialog-footer"]) {
852
845
  padding-bottom: 0;
853
846
  }
854
847
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-matrx/design-system",
3
- "version": "0.11.4",
3
+ "version": "0.11.5",
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",