@ai-matrx/design-system 0.11.2 → 0.11.4

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/index.d.cts CHANGED
@@ -176,6 +176,15 @@ declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttrib
176
176
  * `AlertDialogCancel` inherit the package Button's own target rules through
177
177
  * `buttonVariants`; the footer keeps them safe-area padded on mobile.
178
178
  *
179
+ * 5. THE STICKY FOOTER NEVER PAINTS OVER THE BODY (0.11.3). Ruling 3's footer
180
+ * bled over the card's bottom padding with a negative block margin, and
181
+ * `position: sticky` clamps a box to its containing block — so the footer
182
+ * was dragged UP by `--dialog-pad` against the card's `gap-4`, covering the
183
+ * last 8px of the consequence copy at every length, unreachable because the
184
+ * card did not scroll. The bleed is now the card's RESERVATION
185
+ * (`matrx-dialog-card` gives its bottom padding to `matrx-dialog-footer`),
186
+ * which sticky has nothing to clamp. See `sticky-footer-geometry.test.tsx`.
187
+ *
179
188
  * SEAM INVERSION. The host resolved its portal target through
180
189
  * `usePopoutContainer` (its window-panel popout body); here that is the
181
190
  * package's `PortalContainerProvider`, with an explicit `container` prop still
@@ -760,9 +769,14 @@ declare function CreatablePicker({ value, options, onSelect, placeholder, search
760
769
  * dismisses WITHOUT writing, and is indistinguishable from a silent save
761
770
  * failure. `max-h-[85dvh] overflow-y-auto` is the cap.
762
771
  *
763
- * 3. THE PRIMARY ACTION IS ALWAYS PRESSABLE. `DialogFooter` is sticky and
764
- * bleeds to the card's edges using `--dialog-pad`, so scrolled content
765
- * never shows through beneath it. Outside a DialogContent the variable is
772
+ * 3. THE PRIMARY ACTION IS ALWAYS PRESSABLE AND NEVER ON TOP OF THE BODY.
773
+ * `DialogFooter` is sticky and bleeds to the card's edges using
774
+ * `--dialog-pad`. Until 0.11.3 that bleed was a NEGATIVE BLOCK MARGIN,
775
+ * which sticky clamps: the footer was dragged up over the row above it by
776
+ * `--dialog-pad` minus the card gap. The card now RESERVES the footer's
777
+ * block size instead (`matrx-dialog-card` / `matrx-dialog-footer` in
778
+ * `styles.css`), so scrolled content never shows through beneath it AND the
779
+ * footer never covers the row above it. Outside a DialogContent the variable is
766
780
  * unset, the padding falls back to `0px`, and the footer is the plain row
767
781
  * it always was.
768
782
  *
package/dist/index.d.ts CHANGED
@@ -176,6 +176,15 @@ declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttrib
176
176
  * `AlertDialogCancel` inherit the package Button's own target rules through
177
177
  * `buttonVariants`; the footer keeps them safe-area padded on mobile.
178
178
  *
179
+ * 5. THE STICKY FOOTER NEVER PAINTS OVER THE BODY (0.11.3). Ruling 3's footer
180
+ * bled over the card's bottom padding with a negative block margin, and
181
+ * `position: sticky` clamps a box to its containing block — so the footer
182
+ * was dragged UP by `--dialog-pad` against the card's `gap-4`, covering the
183
+ * last 8px of the consequence copy at every length, unreachable because the
184
+ * card did not scroll. The bleed is now the card's RESERVATION
185
+ * (`matrx-dialog-card` gives its bottom padding to `matrx-dialog-footer`),
186
+ * which sticky has nothing to clamp. See `sticky-footer-geometry.test.tsx`.
187
+ *
179
188
  * SEAM INVERSION. The host resolved its portal target through
180
189
  * `usePopoutContainer` (its window-panel popout body); here that is the
181
190
  * package's `PortalContainerProvider`, with an explicit `container` prop still
@@ -760,9 +769,14 @@ declare function CreatablePicker({ value, options, onSelect, placeholder, search
760
769
  * dismisses WITHOUT writing, and is indistinguishable from a silent save
761
770
  * failure. `max-h-[85dvh] overflow-y-auto` is the cap.
762
771
  *
763
- * 3. THE PRIMARY ACTION IS ALWAYS PRESSABLE. `DialogFooter` is sticky and
764
- * bleeds to the card's edges using `--dialog-pad`, so scrolled content
765
- * never shows through beneath it. Outside a DialogContent the variable is
772
+ * 3. THE PRIMARY ACTION IS ALWAYS PRESSABLE AND NEVER ON TOP OF THE BODY.
773
+ * `DialogFooter` is sticky and bleeds to the card's edges using
774
+ * `--dialog-pad`. Until 0.11.3 that bleed was a NEGATIVE BLOCK MARGIN,
775
+ * which sticky clamps: the footer was dragged up over the row above it by
776
+ * `--dialog-pad` minus the card gap. The card now RESERVES the footer's
777
+ * block size instead (`matrx-dialog-card` / `matrx-dialog-footer` in
778
+ * `styles.css`), so scrolled content never shows through beneath it AND the
779
+ * footer never covers the row above it. Outside a DialogContent the variable is
766
780
  * unset, the padding falls back to `0px`, and the footer is the plain row
767
781
  * it always was.
768
782
  *
package/dist/index.js CHANGED
@@ -817,9 +817,13 @@ var AlertDialogContent = React7.forwardRef(({ className, children, container, an
817
817
  ref,
818
818
  "data-slot": "alert-dialog-content",
819
819
  className: cn(
820
- `fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg ${CENTERED_DIALOG} gap-4 border bg-background p-6 shadow-lg`,
820
+ `matrx-dialog-card fixed left-[50%] top-[50%] z-[10000] grid min-w-0 w-full max-w-lg ${CENTERED_DIALOG} gap-4 border bg-background p-6 shadow-lg`,
821
821
  // Ruling 3 — never taller than the viewport, always scrollable, and
822
822
  // the footer stays reachable via --dialog-pad like Dialog's.
823
+ // Ruling 5 (0.11.3) — `matrx-dialog-card` hands the bottom padding to
824
+ // a sticky footer when there is one, so the footer's box matches the
825
+ // space the grid gave it and sticky never clamps it up over the
826
+ // consequence copy.
823
827
  "max-h-[85dvh] overflow-y-auto overscroll-contain [--dialog-pad:1.5rem] overflow-x-clip [overflow-wrap:anywhere] [&>*]:min-w-0 [&>*]:max-w-full",
824
828
  "sm:rounded-lg",
825
829
  animated && MOTION_DIALOG,
@@ -857,9 +861,12 @@ var AlertDialogFooter = ({
857
861
  className: cn(
858
862
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
859
863
  // Ruling 3/4 — sticky to the card edges so a scrolled body never shows
860
- // through under the actions, and safe-area padded on a phone.
861
- "sticky bottom-0 z-10 bg-background pt-3",
862
- "mx-[calc(var(--dialog-pad,0px)*-1)] mb-[calc(var(--dialog-pad,0px)*-1)] px-[var(--dialog-pad,0px)] pb-[var(--dialog-pad,0px)]",
864
+ // through under the actions, and safe-area padded on a phone. ALL of
865
+ // that geometry is `matrx-dialog-footer`, a rule this package SHIPS
866
+ // (styles.css), because the utility spelling of it carried a negative
867
+ // block margin that sticky clamped — painting the footer over the last
868
+ // 8px of the consequence at every description length (0.11.3).
869
+ "matrx-dialog-footer bg-background",
863
870
  className
864
871
  ),
865
872
  ...props
@@ -1886,8 +1893,8 @@ var DialogContentPrimitive = React17.forwardRef((props, ref) => {
1886
1893
  );
1887
1894
  });
1888
1895
  DialogContentPrimitive.displayName = "DialogContentPrimitive";
1889
- var DIALOG_DESKTOP_CLASSES2 = `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`;
1890
- var DIALOG_MOBILE_SHEET_CLASSES2 = "matrx-mobile-sheet 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";
1896
+ 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`;
1897
+ 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";
1891
1898
  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";
1892
1899
  var DialogContent = React17.forwardRef(
1893
1900
  ({
@@ -1991,8 +1998,12 @@ var DialogFooter = ({
1991
1998
  "data-slot": "dialog-footer",
1992
1999
  className: cn(
1993
2000
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
1994
- "sticky bottom-0 z-10 bg-background pt-3",
1995
- "mx-[calc(var(--dialog-pad,0px)*-1)] mb-[calc(var(--dialog-pad,0px)*-1)] px-[var(--dialog-pad,0px)] pb-[var(--dialog-pad,0px)]",
2001
+ // Ruling 3 — the geometry is `matrx-dialog-footer`, a rule this package
2002
+ // SHIPS (styles.css). It used to be utilities, one of which was a
2003
+ // negative block margin that `position: sticky` clamps — the footer was
2004
+ // yanked up over the row above it by `--dialog-pad` minus the card gap
2005
+ // (0.11.3). The card gives the footer its bottom padding instead.
2006
+ "matrx-dialog-footer bg-background",
1996
2007
  className
1997
2008
  ),
1998
2009
  ...props