@ai-matrx/design-system 0.11.3 โ 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 +98 -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 +96 -69
- 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);
|
|
@@ -141,48 +142,6 @@
|
|
|
141
142
|
background-color: var(--matrx-glass-bg);
|
|
142
143
|
}
|
|
143
144
|
|
|
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
|
-
}
|
|
186
145
|
}
|
|
187
146
|
|
|
188
147
|
/* Keyframes cannot live inside a cascade layer's rule set and be referenced
|
|
@@ -791,14 +750,76 @@
|
|
|
791
750
|
);
|
|
792
751
|
}
|
|
793
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
|
+
--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.
|
|
800
|
+
----------------------------------------------------------------------- */
|
|
801
|
+
.matrx-mobile-sheet {
|
|
802
|
+
--dialog-pad-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
|
|
803
|
+
}
|
|
804
|
+
|
|
794
805
|
/* โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
795
806
|
.matrx-dialog-card โ THE FOOTER RESERVATION.
|
|
796
807
|
|
|
797
808
|
A card that contains a sticky footer gives its bottom padding TO that
|
|
798
809
|
footer, so the footer's box is exactly as tall as the space the card
|
|
799
810
|
allocated it. That is what keeps `position: sticky` from clamping the
|
|
800
|
-
footer upward over the preceding row
|
|
801
|
-
|
|
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`.
|
|
802
823
|
|
|
803
824
|
Two consequences worth stating out loud:
|
|
804
825
|
โข a card with NO footer keeps its full padding โ the reservation is
|
|
@@ -810,11 +831,17 @@
|
|
|
810
831
|
the actions.
|
|
811
832
|
|
|
812
833
|
Deliberately UNLAYERED: it has to beat the card's own `p-6` / `p-4 pb-safe`
|
|
813
|
-
utilities, which live in `@layer utilities
|
|
814
|
-
|
|
815
|
-
|
|
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.
|
|
816
842
|
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ */
|
|
817
|
-
.matrx-dialog-card:has(>
|
|
843
|
+
.matrx-dialog-card:has(> [data-slot="dialog-footer"]),
|
|
844
|
+
.matrx-dialog-card:has(> [data-slot="alert-dialog-footer"]) {
|
|
818
845
|
padding-bottom: 0;
|
|
819
846
|
}
|
|
820
847
|
|
package/package.json
CHANGED