@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/CHANGELOG.md +46 -0
- package/dist/index.cjs +41 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +41 -14
- package/dist/index.js.map +1 -1
- package/dist/styles.css +36 -43
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -783,44 +783,21 @@
|
|
|
783
783
|
}
|
|
784
784
|
|
|
785
785
|
/* -----------------------------------------------------------------------
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
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
|
|
835
|
-
|
|
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
|
|
848
|
-
|
|
849
|
-
|
|
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(>
|
|
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