@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/CHANGELOG.md +130 -0
- package/dist/index.cjs +19 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -3
- package/dist/index.d.ts +17 -3
- package/dist/index.js +19 -8
- package/dist/index.js.map +1 -1
- package/dist/styles.css +125 -21
- package/package.json +1 -1
package/dist/styles.css
CHANGED
|
@@ -40,6 +40,26 @@
|
|
|
40
40
|
rule regardless of specificity โ that is the only way to re-scale
|
|
41
41
|
utility-set font sizes, and the only way a mask survives a `mask-*` reset.
|
|
42
42
|
|
|
43
|
+
๐จ THE PREFLIGHT RULE (0.11.3, measured โ not reasoned)
|
|
44
|
+
-------------------------------------------------------
|
|
45
|
+
A LAYERED rule here may not declare `margin*`, `padding*`, `border*` or
|
|
46
|
+
`box-sizing`. Tailwind's preflight zeroes all four on `*, ::before, ::after`
|
|
47
|
+
inside `@layer base`, and in a host that follows the order statement above
|
|
48
|
+
this package's layer sits BELOW `base` โ so a layered padding is silently
|
|
49
|
+
discarded with nothing to see, in the consumer that follows the docs most
|
|
50
|
+
carefully. Read off matrx-frontend's LIVE stylesheet on 2026-09-08:
|
|
51
|
+
|
|
52
|
+
layer order โ properties, [matrx-design-system-tokens,
|
|
53
|
+
matrx-design-system], theme, base, components, utilities
|
|
54
|
+
@layer base โ *, ::after, ::before, ::backdrop { โฆ margin: 0; padding: 0 }
|
|
55
|
+
|
|
56
|
+
Found because `.matrx-dialog-footer`'s padding computed to `0px` on a live
|
|
57
|
+
dialog while its rule was demonstrably present in the CSSOM. The census it
|
|
58
|
+
forced found `.pb-safe`, `.pt-safe` and `.matrx-glass-thin-border`'s stroke
|
|
59
|
+
in the same state โ three geometry contracts that had been INERT in
|
|
60
|
+
matrx-frontend since 0.5.0/0.7.0, silently. All four now live unlayered
|
|
61
|
+
below. Guard: `styles.test.ts` ยง THE PREFLIGHT RULE.
|
|
62
|
+
|
|
43
63
|
Extracted from matrx-frontend `app/globals.css` (the tap-target precedent);
|
|
44
64
|
the host originals were deleted in the same session that shipped this file.
|
|
45
65
|
========================================================================= */
|
|
@@ -88,25 +108,6 @@
|
|
|
88
108
|
}
|
|
89
109
|
}
|
|
90
110
|
|
|
91
|
-
/* -----------------------------------------------------------------------
|
|
92
|
-
pb-safe โ safe-area bottom padding (BottomSheet body/footer, CommandDialog
|
|
93
|
-
mobile sheet). max() guarantees a minimum padding even when the inset is
|
|
94
|
-
0 (env() resolves to 0 on non-notched devices and when viewport-fit=cover
|
|
95
|
-
is absent).
|
|
96
|
-
----------------------------------------------------------------------- */
|
|
97
|
-
.pb-safe {
|
|
98
|
-
padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/* -----------------------------------------------------------------------
|
|
102
|
-
pt-safe โ the top twin, for a `direction="top"` Drawer, which lands under
|
|
103
|
-
the notch/status bar on exactly the devices where pb-safe matters. Same
|
|
104
|
-
max() floor and the same reason for it.
|
|
105
|
-
----------------------------------------------------------------------- */
|
|
106
|
-
.pt-safe {
|
|
107
|
-
padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
|
|
108
|
-
}
|
|
109
|
-
|
|
110
111
|
/* -----------------------------------------------------------------------
|
|
111
112
|
matrx-glass-thin-border โ the glass chrome the BottomSheet close control
|
|
112
113
|
and drag affordances wear. The STRUCTURE (tinted fill, backdrop blur +
|
|
@@ -126,8 +127,8 @@
|
|
|
126
127
|
saturate(var(--matrx-glass-saturate));
|
|
127
128
|
backdrop-filter: blur(var(--matrx-glass-blur))
|
|
128
129
|
saturate(var(--matrx-glass-saturate));
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
/* The stroke is NOT here โ Tailwind preflight resets `border` in
|
|
131
|
+
`@layer base`, which outranks this layer. See THE PREFLIGHT RULE. */
|
|
131
132
|
}
|
|
132
133
|
.matrx-glass-thin-border:hover {
|
|
133
134
|
background-color: var(--matrx-glass-bg-hover);
|
|
@@ -140,6 +141,7 @@
|
|
|
140
141
|
.matrx-glass-thin-border:has(> a:active) {
|
|
141
142
|
background-color: var(--matrx-glass-bg);
|
|
142
143
|
}
|
|
144
|
+
|
|
143
145
|
}
|
|
144
146
|
|
|
145
147
|
/* Keyframes cannot live inside a cascade layer's rule set and be referenced
|
|
@@ -748,6 +750,108 @@
|
|
|
748
750
|
);
|
|
749
751
|
}
|
|
750
752
|
|
|
753
|
+
/* โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
754
|
+
THE PREFLIGHT-RESET GEOMETRY. Everything below this banner is UNLAYERED
|
|
755
|
+
because Tailwind preflight zeroes `margin`, `padding`, `border` and
|
|
756
|
+
`box-sizing` on every element from `@layer base` โ which outranks this
|
|
757
|
+
package's layer in any host that declares the documented layer order. A
|
|
758
|
+
layered version of any of these rules is not "lower priority"; it is GONE,
|
|
759
|
+
with no error and nothing on screen to trace it by. See THE PREFLIGHT RULE
|
|
760
|
+
in this file's header for the measurement.
|
|
761
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ */
|
|
762
|
+
|
|
763
|
+
/* pb-safe โ safe-area bottom padding (BottomSheet body/footer, CommandDialog
|
|
764
|
+
mobile sheet, the dialog sheet's footer). max() guarantees a minimum padding
|
|
765
|
+
even when the inset is 0 (env() resolves to 0 on non-notched devices and
|
|
766
|
+
when viewport-fit=cover is absent). */
|
|
767
|
+
.pb-safe {
|
|
768
|
+
padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
/* pt-safe โ the top twin, for a `direction="top"` Drawer, which lands under
|
|
772
|
+
the notch/status bar on exactly the devices where pb-safe matters. */
|
|
773
|
+
.pt-safe {
|
|
774
|
+
padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
/* The glass chrome's STROKE. The fill, blur and elevation stay layered (a host
|
|
778
|
+
utility should still be able to re-tint them); the stroke cannot, because
|
|
779
|
+
preflight's `border: 0px solid` would erase it. */
|
|
780
|
+
.matrx-glass-thin-border {
|
|
781
|
+
border: var(--matrx-glass-border-width-thin) solid
|
|
782
|
+
var(--matrx-glass-border-color);
|
|
783
|
+
}
|
|
784
|
+
|
|
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.
|
|
810
|
+
----------------------------------------------------------------------- */
|
|
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
|
+
.matrx-mobile-sheet {
|
|
825
|
+
--dialog-pad-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
/* โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
829
|
+
.matrx-dialog-card โ THE FOOTER RESERVATION.
|
|
830
|
+
|
|
831
|
+
A card that contains a sticky footer gives its bottom padding TO that
|
|
832
|
+
footer, so the footer's box is exactly as tall as the space the card
|
|
833
|
+
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).
|
|
836
|
+
|
|
837
|
+
Two consequences worth stating out loud:
|
|
838
|
+
โข a card with NO footer keeps its full padding โ the reservation is
|
|
839
|
+
conditional on purpose, so `DialogContent` without a `DialogFooter`
|
|
840
|
+
is unchanged;
|
|
841
|
+
โข the footer's own `padding-bottom` reproduces the card's, so the visual
|
|
842
|
+
result is identical to the intended bleed: opaque background all the
|
|
843
|
+
way to the card's bottom edge, with nothing scrolling through beneath
|
|
844
|
+
the actions.
|
|
845
|
+
|
|
846
|
+
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.
|
|
850
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ */
|
|
851
|
+
.matrx-dialog-card:has(> .matrx-dialog-footer) {
|
|
852
|
+
padding-bottom: 0;
|
|
853
|
+
}
|
|
854
|
+
|
|
751
855
|
/* โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
752
856
|
.matrx-mobile-sheet โ ONE mobile density for any desktop panel hosted in a
|
|
753
857
|
bottom sheet (TabbedBottomSheet sets it; see that file's header).
|
package/package.json
CHANGED