@flytedan/flytebot-design-system 0.46.0 → 0.48.0
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 +2073 -1900
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -2
- package/dist/index.d.ts +66 -2
- package/dist/index.js +1643 -1471
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +94 -3
package/package.json
CHANGED
package/styles/components.css
CHANGED
|
@@ -791,6 +791,13 @@
|
|
|
791
791
|
border-radius: var(--r-lg);
|
|
792
792
|
box-shadow: var(--e-1);
|
|
793
793
|
overflow: hidden;
|
|
794
|
+
/* MP-271: column flex so a card stretched taller than its own content (CardGrid's
|
|
795
|
+
equal-height rows — a row's shorter cards stretch to match the tallest) still keeps its
|
|
796
|
+
footer pinned to the bottom rather than leaving a gap above it. flex-direction: column on
|
|
797
|
+
a `<div>`/`<a>`/`<button>` all behave identically, so this holds regardless of which
|
|
798
|
+
element Card renders as (see `interactive` in Card.tsx). */
|
|
799
|
+
display: flex;
|
|
800
|
+
flex-direction: column;
|
|
794
801
|
}
|
|
795
802
|
.fd-card-flat {
|
|
796
803
|
box-shadow: none;
|
|
@@ -809,6 +816,49 @@
|
|
|
809
816
|
border-color: var(--border-strong);
|
|
810
817
|
transform: translateY(-1px);
|
|
811
818
|
}
|
|
819
|
+
/* MP-271: a real interactive card (Card rendered as <a> or <button> — `href`/`onClick`).
|
|
820
|
+
Reset the native element's own look (button chrome, link underline/colour) so it reads as
|
|
821
|
+
the same card either way, then add hover/press states that only ever touch box-shadow and
|
|
822
|
+
border-color — never `transform` or a size-affecting property — so nothing jumps or
|
|
823
|
+
reflows on press (MP-271 AC). A `:focus-visible` rule of its own IS needed, restated after
|
|
824
|
+
`:hover`/`:active` below: without it, the global `button:focus-visible`/`a:focus-visible`
|
|
825
|
+
rule (styles/foundations.css, specificity 0,1,1) loses to `.fd-card-interactive:hover`
|
|
826
|
+
(0,2,0) whenever a card is both keyboard-focused and still under the pointer — a real,
|
|
827
|
+
reachable state (tab to a card, and the mouse that was already resting on it never moved)
|
|
828
|
+
— which would hide the focus ring entirely. Same fix Button.tsx's own `:focus-visible`
|
|
829
|
+
rule already uses for the identical reason (see components.css's own comment on
|
|
830
|
+
`.fd-btn-icon-solid:focus-visible`). */
|
|
831
|
+
.fd-card-interactive {
|
|
832
|
+
display: block;
|
|
833
|
+
width: 100%;
|
|
834
|
+
text-align: left;
|
|
835
|
+
color: inherit;
|
|
836
|
+
text-decoration: none;
|
|
837
|
+
font: inherit;
|
|
838
|
+
cursor: pointer;
|
|
839
|
+
transition: box-shadow var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
|
|
840
|
+
}
|
|
841
|
+
.fd-card-interactive:hover {
|
|
842
|
+
box-shadow: var(--e-2);
|
|
843
|
+
border-color: var(--border-strong);
|
|
844
|
+
}
|
|
845
|
+
.fd-card-interactive:active {
|
|
846
|
+
box-shadow: var(--e-1);
|
|
847
|
+
border-color: var(--border-strong);
|
|
848
|
+
}
|
|
849
|
+
.fd-card-interactive:focus-visible {
|
|
850
|
+
box-shadow: var(--focus-ring);
|
|
851
|
+
}
|
|
852
|
+
/* MP-271: the draft/placeholder variant — dashed instead of solid, using the same
|
|
853
|
+
`--border-strong` token an emphatic-but-still-neutral border already uses elsewhere
|
|
854
|
+
(Card's own `:hover` above), so light, dark and `[data-contrast="high"]` (tokens/
|
|
855
|
+
appearance.css: high contrast promotes `--border` to `--border-strong` itself) all
|
|
856
|
+
resolve a correct, themed dash with no new colour token. */
|
|
857
|
+
.fd-card-draft {
|
|
858
|
+
border-style: dashed;
|
|
859
|
+
border-color: var(--border-strong);
|
|
860
|
+
box-shadow: none;
|
|
861
|
+
}
|
|
812
862
|
/* The header degrades in two steps as the action slot needs more room than is left:
|
|
813
863
|
first the title gives up ITS OWN spare width (ordinary flex-shrink) down to
|
|
814
864
|
fd-card-head-title's min-width; once even that doesn't leave enough room for the
|
|
@@ -839,6 +889,9 @@
|
|
|
839
889
|
}
|
|
840
890
|
.fd-card-body {
|
|
841
891
|
padding: 18px;
|
|
892
|
+
/* MP-271: lets the body absorb any extra height CardGrid's equal-height stretch adds,
|
|
893
|
+
keeping `fd-card-foot` pinned to the bottom instead of leaving a gap above it. */
|
|
894
|
+
flex: 1 1 auto;
|
|
842
895
|
}
|
|
843
896
|
.fd-card-foot {
|
|
844
897
|
display: flex;
|
|
@@ -3050,11 +3103,30 @@
|
|
|
3050
3103
|
.fd-cal-title:hover {
|
|
3051
3104
|
background: var(--surface-2);
|
|
3052
3105
|
}
|
|
3106
|
+
/* MP-272: visually hidden but still read by assistive tech — used for the calendar's live
|
|
3107
|
+
* month/year announcement, which has no visible element of its own (the mode-switch button
|
|
3108
|
+
* already shows the same text, but re-reads "button" on every change if it owns the label). */
|
|
3109
|
+
.fd-sr-only {
|
|
3110
|
+
position: absolute;
|
|
3111
|
+
width: 1px;
|
|
3112
|
+
height: 1px;
|
|
3113
|
+
padding: 0;
|
|
3114
|
+
margin: -1px;
|
|
3115
|
+
overflow: hidden;
|
|
3116
|
+
clip: rect(0, 0, 0, 0);
|
|
3117
|
+
white-space: nowrap;
|
|
3118
|
+
border: 0;
|
|
3119
|
+
}
|
|
3053
3120
|
.fd-cal-grid {
|
|
3054
3121
|
display: grid;
|
|
3055
3122
|
grid-template-columns: repeat(7, 1fr);
|
|
3056
3123
|
gap: 2px;
|
|
3057
3124
|
}
|
|
3125
|
+
/* MP-272: each week (and the header) is a role="row" for grid semantics, but must not
|
|
3126
|
+
* introduce its own layout box — its 7 cells are still tracks of the parent's 7-column grid. */
|
|
3127
|
+
.fd-cal-row {
|
|
3128
|
+
display: contents;
|
|
3129
|
+
}
|
|
3058
3130
|
.fd-cal-dow {
|
|
3059
3131
|
text-align: center;
|
|
3060
3132
|
font-size: 10.5px;
|
|
@@ -3066,6 +3138,9 @@
|
|
|
3066
3138
|
}
|
|
3067
3139
|
.fd-cal-day {
|
|
3068
3140
|
position: relative;
|
|
3141
|
+
display: flex;
|
|
3142
|
+
align-items: center;
|
|
3143
|
+
justify-content: center;
|
|
3069
3144
|
height: 34px;
|
|
3070
3145
|
border: none;
|
|
3071
3146
|
background: none;
|
|
@@ -3080,9 +3155,8 @@
|
|
|
3080
3155
|
.fd-cal-day:hover {
|
|
3081
3156
|
background: var(--surface-2);
|
|
3082
3157
|
}
|
|
3083
|
-
.fd-cal-day.is-
|
|
3084
|
-
|
|
3085
|
-
opacity: 0.45;
|
|
3158
|
+
.fd-cal-day.is-empty {
|
|
3159
|
+
cursor: default;
|
|
3086
3160
|
}
|
|
3087
3161
|
.fd-cal-day.is-today::after {
|
|
3088
3162
|
content: "";
|
|
@@ -3339,6 +3413,23 @@
|
|
|
3339
3413
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr));
|
|
3340
3414
|
gap: 16px;
|
|
3341
3415
|
}
|
|
3416
|
+
/* MP-271 — CardGrid (src/components/layout/CardGrid.tsx). `auto-fill` rather than
|
|
3417
|
+
`fd-grid-stats`'s own `auto-fit` above on purpose: a dashboard of Cards should keep a
|
|
3418
|
+
consistent card width as the count changes, not stretch a lone card to fill the whole row
|
|
3419
|
+
the way a handful of stat tiles usefully do. `--card-grid-min` is set inline per instance
|
|
3420
|
+
(CardGrid's `minCardWidth` prop, default 280px); `1fr` is what lets the last, partial row's
|
|
3421
|
+
cards still share the leftover width evenly rather than sitting at a fixed size with a gap
|
|
3422
|
+
down one side. Gap is deliberately NOT set here — CardGrid applies one of the existing
|
|
3423
|
+
`fd-gap-*` utility classes above alongside this one, so a "medium gap" stays one token
|
|
3424
|
+
shared with every other flex/grid consumer of the spacing scale, not a second grid-only
|
|
3425
|
+
value. Equal-height rows need no explicit rule: `align-items: stretch` is Grid's own
|
|
3426
|
+
default, restated below only so it can't silently regress if that default is ever
|
|
3427
|
+
overridden elsewhere for `.fd-card-grid`'s selector specifically. */
|
|
3428
|
+
.fd-card-grid {
|
|
3429
|
+
display: grid;
|
|
3430
|
+
grid-template-columns: repeat(auto-fill, minmax(var(--card-grid-min, 280px), 1fr));
|
|
3431
|
+
align-items: stretch;
|
|
3432
|
+
}
|
|
3342
3433
|
@media (max-width: 640px) {
|
|
3343
3434
|
.fd-grid-stats {
|
|
3344
3435
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
|