@flytedan/flytebot-design-system 0.48.0 → 0.48.1
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.cjs +33 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -11
- package/dist/index.d.ts +34 -11
- package/dist/index.js +63 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +41 -0
package/package.json
CHANGED
package/styles/components.css
CHANGED
|
@@ -859,6 +859,32 @@
|
|
|
859
859
|
border-color: var(--border-strong);
|
|
860
860
|
box-shadow: none;
|
|
861
861
|
}
|
|
862
|
+
/* MP-271 review (comment 2920, finding 3): an interactive Card (href/onClick) can no longer
|
|
863
|
+
render `action`/`footer` INSIDE the `<a>`/`<button>` — that was the only way this component
|
|
864
|
+
could ever produce a real `<button>` (or a link) nested inside a real `<a>`, which is invalid
|
|
865
|
+
HTML5 and double-fires clicks. `.fd-card-shell` is the plain, non-interactive wrapper Card
|
|
866
|
+
renders around the `<a>`/`<button>` only when it's interactive; `action` and `footer` become
|
|
867
|
+
its ordinary siblings, never its descendants, so nesting is impossible regardless of what a
|
|
868
|
+
caller puts in either slot. `footer` needs nothing extra (it was already the last thing
|
|
869
|
+
painted, so a sibling after the `<a>` lands in the exact same visual spot); `action` sits
|
|
870
|
+
inside the header row visually, so it's positioned back into that corner over the `<a>`,
|
|
871
|
+
given a higher stacking order so it stays independently clickable/focusable (the "stretched
|
|
872
|
+
link" technique's own z-index rule, applied to a real sibling instead of a pseudo-element). */
|
|
873
|
+
.fd-card-shell {
|
|
874
|
+
position: relative;
|
|
875
|
+
display: flex;
|
|
876
|
+
flex-direction: column;
|
|
877
|
+
height: 100%;
|
|
878
|
+
}
|
|
879
|
+
.fd-card-shell > .fd-card-interactive {
|
|
880
|
+
flex: 1 1 auto;
|
|
881
|
+
}
|
|
882
|
+
.fd-card-shell-action {
|
|
883
|
+
position: absolute;
|
|
884
|
+
top: 16px;
|
|
885
|
+
right: 18px;
|
|
886
|
+
z-index: 1;
|
|
887
|
+
}
|
|
862
888
|
/* The header degrades in two steps as the action slot needs more room than is left:
|
|
863
889
|
first the title gives up ITS OWN spare width (ordinary flex-shrink) down to
|
|
864
890
|
fd-card-head-title's min-width; once even that doesn't leave enough room for the
|
|
@@ -3430,6 +3456,21 @@
|
|
|
3430
3456
|
grid-template-columns: repeat(auto-fill, minmax(var(--card-grid-min, 280px), 1fr));
|
|
3431
3457
|
align-items: stretch;
|
|
3432
3458
|
}
|
|
3459
|
+
/* MP-271 review (comment 2920, finding 2): CardGrid wraps every item in its own
|
|
3460
|
+
`<div role="listitem">` rather than cloning `role` onto the child (a clone silently drops
|
|
3461
|
+
an added prop on a Fragment child, and can't fix that). The wrapper is now the real grid
|
|
3462
|
+
item that `align-items: stretch` above stretches to the row's height, so it has to pass
|
|
3463
|
+
that height on to its own one real child the same way `.fd-card-body`'s `flex: 1 1 auto`
|
|
3464
|
+
passes extra height down to `.fd-card-foot` — otherwise a stretched wrapper with an
|
|
3465
|
+
un-stretched child inside it would look identical to no equal-height rows at all. */
|
|
3466
|
+
.fd-card-grid > [role="listitem"] {
|
|
3467
|
+
display: flex;
|
|
3468
|
+
min-width: 0;
|
|
3469
|
+
}
|
|
3470
|
+
.fd-card-grid > [role="listitem"] > * {
|
|
3471
|
+
flex: 1 1 auto;
|
|
3472
|
+
min-width: 0;
|
|
3473
|
+
}
|
|
3433
3474
|
@media (max-width: 640px) {
|
|
3434
3475
|
.fd-grid-stats {
|
|
3435
3476
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
|