@flytedan/flytebot-design-system 0.20.0 → 0.22.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 +3007 -2556
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +162 -2
- package/dist/index.d.ts +162 -2
- package/dist/index.js +2900 -2453
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/components.css +302 -0
package/package.json
CHANGED
package/styles/components.css
CHANGED
|
@@ -3462,6 +3462,308 @@
|
|
|
3462
3462
|
transition: width var(--dur-base) var(--ease);
|
|
3463
3463
|
}
|
|
3464
3464
|
|
|
3465
|
+
/* --- charts (MP-210): TrendChart, DonutChart, BarList, FunnelChart -------- */
|
|
3466
|
+
/* Colour comes only from --chart-1..8 (tokens.css), which are declared once in :root
|
|
3467
|
+
and never redefined under [data-theme="dark"] or [data-contrast="high"] — so every
|
|
3468
|
+
fill/stroke below is already correct in all three without a single override rule
|
|
3469
|
+
here. Only the theme-aware tokens (--text, --text-2, --text-muted, --border,
|
|
3470
|
+
--surface-3) carry axes, gridlines and labels, which DO need to shift per theme. */
|
|
3471
|
+
.fd-chart-legend {
|
|
3472
|
+
list-style: none;
|
|
3473
|
+
margin: 12px 0 0;
|
|
3474
|
+
padding: 0;
|
|
3475
|
+
display: flex;
|
|
3476
|
+
flex-wrap: wrap;
|
|
3477
|
+
gap: 6px 16px;
|
|
3478
|
+
}
|
|
3479
|
+
.fd-chart-legend-item {
|
|
3480
|
+
display: inline-flex;
|
|
3481
|
+
align-items: center;
|
|
3482
|
+
gap: 7px;
|
|
3483
|
+
border: none;
|
|
3484
|
+
background: none;
|
|
3485
|
+
padding: 3px 4px;
|
|
3486
|
+
margin: -3px -4px;
|
|
3487
|
+
border-radius: var(--r-sm);
|
|
3488
|
+
font-size: var(--body-sm-size);
|
|
3489
|
+
color: var(--text-2);
|
|
3490
|
+
cursor: pointer;
|
|
3491
|
+
transition: opacity var(--dur-base) var(--ease), background var(--dur-fast) var(--ease);
|
|
3492
|
+
}
|
|
3493
|
+
.fd-chart-legend-item:hover {
|
|
3494
|
+
background: var(--surface-2);
|
|
3495
|
+
}
|
|
3496
|
+
.fd-chart-legend-item:focus-visible {
|
|
3497
|
+
outline: none;
|
|
3498
|
+
box-shadow: var(--focus-ring);
|
|
3499
|
+
}
|
|
3500
|
+
.fd-chart-legend-item.is-dim {
|
|
3501
|
+
opacity: 0.45;
|
|
3502
|
+
}
|
|
3503
|
+
.fd-chart-legend-swatch {
|
|
3504
|
+
width: 9px;
|
|
3505
|
+
height: 9px;
|
|
3506
|
+
border-radius: 2px;
|
|
3507
|
+
flex: none;
|
|
3508
|
+
}
|
|
3509
|
+
.fd-chart-legend-label {
|
|
3510
|
+
white-space: nowrap;
|
|
3511
|
+
}
|
|
3512
|
+
|
|
3513
|
+
/* TrendChart */
|
|
3514
|
+
.fd-trend {
|
|
3515
|
+
display: flex;
|
|
3516
|
+
flex-direction: column;
|
|
3517
|
+
gap: 4px;
|
|
3518
|
+
width: 100%;
|
|
3519
|
+
min-width: 0;
|
|
3520
|
+
}
|
|
3521
|
+
.fd-trend-plot {
|
|
3522
|
+
width: 100%;
|
|
3523
|
+
}
|
|
3524
|
+
.fd-trend-svg {
|
|
3525
|
+
display: block;
|
|
3526
|
+
width: 100%;
|
|
3527
|
+
height: 100%;
|
|
3528
|
+
overflow: visible;
|
|
3529
|
+
}
|
|
3530
|
+
.fd-trend-grid {
|
|
3531
|
+
stroke: var(--border);
|
|
3532
|
+
stroke-width: 1;
|
|
3533
|
+
}
|
|
3534
|
+
.fd-trend-axis {
|
|
3535
|
+
stroke: var(--border-strong);
|
|
3536
|
+
stroke-width: 1;
|
|
3537
|
+
}
|
|
3538
|
+
.fd-trend-axis-label {
|
|
3539
|
+
fill: var(--text-muted);
|
|
3540
|
+
font-size: 10.5px;
|
|
3541
|
+
font-family: var(--font-sans);
|
|
3542
|
+
}
|
|
3543
|
+
.fd-trend-line {
|
|
3544
|
+
transition: opacity var(--dur-base) var(--ease);
|
|
3545
|
+
vector-effect: non-scaling-stroke;
|
|
3546
|
+
}
|
|
3547
|
+
.fd-trend-dot {
|
|
3548
|
+
cursor: pointer;
|
|
3549
|
+
transition: r var(--dur-fast) var(--ease);
|
|
3550
|
+
}
|
|
3551
|
+
.fd-trend-dot:focus-visible {
|
|
3552
|
+
outline: 2px solid var(--brand);
|
|
3553
|
+
outline-offset: 1px;
|
|
3554
|
+
}
|
|
3555
|
+
.fd-trend-tip text {
|
|
3556
|
+
fill: var(--text);
|
|
3557
|
+
font-size: 11px;
|
|
3558
|
+
font-weight: var(--w-medium);
|
|
3559
|
+
paint-order: stroke;
|
|
3560
|
+
stroke: var(--surface);
|
|
3561
|
+
stroke-width: 3px;
|
|
3562
|
+
}
|
|
3563
|
+
.fd-trend-skel {
|
|
3564
|
+
width: 100%;
|
|
3565
|
+
}
|
|
3566
|
+
|
|
3567
|
+
/* DonutChart */
|
|
3568
|
+
.fd-donut {
|
|
3569
|
+
display: flex;
|
|
3570
|
+
flex-direction: column;
|
|
3571
|
+
gap: 4px;
|
|
3572
|
+
}
|
|
3573
|
+
.fd-donut-body {
|
|
3574
|
+
display: flex;
|
|
3575
|
+
align-items: center;
|
|
3576
|
+
gap: 20px;
|
|
3577
|
+
flex-wrap: wrap;
|
|
3578
|
+
}
|
|
3579
|
+
.fd-donut-ring {
|
|
3580
|
+
position: relative;
|
|
3581
|
+
flex: none;
|
|
3582
|
+
}
|
|
3583
|
+
.fd-donut-ring svg {
|
|
3584
|
+
display: block;
|
|
3585
|
+
width: 100%;
|
|
3586
|
+
height: 100%;
|
|
3587
|
+
}
|
|
3588
|
+
.fd-donut-center {
|
|
3589
|
+
position: absolute;
|
|
3590
|
+
inset: 0;
|
|
3591
|
+
display: flex;
|
|
3592
|
+
flex-direction: column;
|
|
3593
|
+
align-items: center;
|
|
3594
|
+
justify-content: center;
|
|
3595
|
+
text-align: center;
|
|
3596
|
+
pointer-events: none;
|
|
3597
|
+
}
|
|
3598
|
+
.fd-donut-center-big {
|
|
3599
|
+
font-size: var(--h3-size);
|
|
3600
|
+
font-weight: var(--w-semibold);
|
|
3601
|
+
color: var(--text);
|
|
3602
|
+
line-height: 1.1;
|
|
3603
|
+
}
|
|
3604
|
+
.fd-donut-center-small {
|
|
3605
|
+
font-size: 11px;
|
|
3606
|
+
color: var(--text-muted);
|
|
3607
|
+
margin-top: 2px;
|
|
3608
|
+
}
|
|
3609
|
+
.fd-donut-legend {
|
|
3610
|
+
flex: 1;
|
|
3611
|
+
min-width: 160px;
|
|
3612
|
+
margin-top: 0;
|
|
3613
|
+
flex-direction: column;
|
|
3614
|
+
align-items: flex-start;
|
|
3615
|
+
}
|
|
3616
|
+
|
|
3617
|
+
/* BarList */
|
|
3618
|
+
.fd-barlist-list {
|
|
3619
|
+
list-style: none;
|
|
3620
|
+
margin: 0;
|
|
3621
|
+
padding: 0;
|
|
3622
|
+
display: flex;
|
|
3623
|
+
flex-direction: column;
|
|
3624
|
+
gap: 2px;
|
|
3625
|
+
}
|
|
3626
|
+
/* Tooltip's own trigger wrapper is an inline-flex span sized to its content (so an icon
|
|
3627
|
+
trigger elsewhere in the kit hugs the icon) — here the trigger IS the whole row, so it
|
|
3628
|
+
has to fill the row's width instead of shrink-wrapping it, or every column past the
|
|
3629
|
+
label collapses to min-content. */
|
|
3630
|
+
.fd-barlist-row .fd-tooltip-anchor {
|
|
3631
|
+
display: block;
|
|
3632
|
+
width: 100%;
|
|
3633
|
+
}
|
|
3634
|
+
.fd-barlist-btn {
|
|
3635
|
+
display: grid;
|
|
3636
|
+
grid-template-columns: minmax(64px, 0.9fr) 3fr auto auto;
|
|
3637
|
+
align-items: center;
|
|
3638
|
+
gap: 10px;
|
|
3639
|
+
width: 100%;
|
|
3640
|
+
border: none;
|
|
3641
|
+
background: none;
|
|
3642
|
+
padding: 6px 4px;
|
|
3643
|
+
border-radius: var(--r-sm);
|
|
3644
|
+
cursor: pointer;
|
|
3645
|
+
text-align: left;
|
|
3646
|
+
font: inherit;
|
|
3647
|
+
color: inherit;
|
|
3648
|
+
}
|
|
3649
|
+
.fd-barlist-btn:hover {
|
|
3650
|
+
background: var(--surface-2);
|
|
3651
|
+
}
|
|
3652
|
+
.fd-barlist-btn:focus-visible {
|
|
3653
|
+
outline: none;
|
|
3654
|
+
box-shadow: var(--focus-ring);
|
|
3655
|
+
}
|
|
3656
|
+
.fd-barlist-label {
|
|
3657
|
+
font-size: var(--body-sm-size);
|
|
3658
|
+
color: var(--text-2);
|
|
3659
|
+
overflow: hidden;
|
|
3660
|
+
text-overflow: ellipsis;
|
|
3661
|
+
white-space: nowrap;
|
|
3662
|
+
min-width: 0;
|
|
3663
|
+
}
|
|
3664
|
+
.fd-barlist-track {
|
|
3665
|
+
min-width: 0;
|
|
3666
|
+
display: flex;
|
|
3667
|
+
align-items: center;
|
|
3668
|
+
}
|
|
3669
|
+
.fd-barlist-track svg {
|
|
3670
|
+
display: block;
|
|
3671
|
+
width: 100%;
|
|
3672
|
+
height: 100%;
|
|
3673
|
+
overflow: visible;
|
|
3674
|
+
}
|
|
3675
|
+
.fd-barlist-rail {
|
|
3676
|
+
fill: var(--surface-3);
|
|
3677
|
+
}
|
|
3678
|
+
.fd-barlist-value {
|
|
3679
|
+
font-size: var(--body-sm-size);
|
|
3680
|
+
color: var(--text);
|
|
3681
|
+
white-space: nowrap;
|
|
3682
|
+
}
|
|
3683
|
+
.fd-barlist-pct {
|
|
3684
|
+
font-size: 12px;
|
|
3685
|
+
color: var(--text-muted);
|
|
3686
|
+
white-space: nowrap;
|
|
3687
|
+
min-width: 34px;
|
|
3688
|
+
text-align: right;
|
|
3689
|
+
}
|
|
3690
|
+
@media (max-width: 480px) {
|
|
3691
|
+
.fd-barlist-btn {
|
|
3692
|
+
grid-template-columns: minmax(52px, 0.8fr) 2fr auto auto;
|
|
3693
|
+
gap: 6px;
|
|
3694
|
+
}
|
|
3695
|
+
.fd-barlist-pct {
|
|
3696
|
+
display: none;
|
|
3697
|
+
}
|
|
3698
|
+
}
|
|
3699
|
+
|
|
3700
|
+
/* FunnelChart */
|
|
3701
|
+
.fd-funnel-list {
|
|
3702
|
+
list-style: none;
|
|
3703
|
+
margin: 0;
|
|
3704
|
+
padding: 0;
|
|
3705
|
+
display: flex;
|
|
3706
|
+
flex-direction: column;
|
|
3707
|
+
}
|
|
3708
|
+
/* See the identical rule on .fd-barlist-row: Tooltip's trigger wrapper shrink-wraps its
|
|
3709
|
+
content by default, but here the trigger is the whole step row. */
|
|
3710
|
+
.fd-funnel-row .fd-tooltip-anchor {
|
|
3711
|
+
display: block;
|
|
3712
|
+
width: 100%;
|
|
3713
|
+
}
|
|
3714
|
+
.fd-funnel-btn {
|
|
3715
|
+
display: flex;
|
|
3716
|
+
flex-direction: column;
|
|
3717
|
+
align-items: center;
|
|
3718
|
+
gap: 4px;
|
|
3719
|
+
width: 100%;
|
|
3720
|
+
border: none;
|
|
3721
|
+
background: none;
|
|
3722
|
+
padding: 4px;
|
|
3723
|
+
border-radius: var(--r-sm);
|
|
3724
|
+
cursor: pointer;
|
|
3725
|
+
font: inherit;
|
|
3726
|
+
color: inherit;
|
|
3727
|
+
}
|
|
3728
|
+
.fd-funnel-btn:hover {
|
|
3729
|
+
background: var(--surface-2);
|
|
3730
|
+
}
|
|
3731
|
+
.fd-funnel-btn:focus-visible {
|
|
3732
|
+
outline: none;
|
|
3733
|
+
box-shadow: var(--focus-ring);
|
|
3734
|
+
}
|
|
3735
|
+
.fd-funnel-shape-wrap {
|
|
3736
|
+
width: 100%;
|
|
3737
|
+
display: flex;
|
|
3738
|
+
justify-content: center;
|
|
3739
|
+
}
|
|
3740
|
+
.fd-funnel-shape {
|
|
3741
|
+
display: block;
|
|
3742
|
+
height: 100%;
|
|
3743
|
+
transition: width var(--dur-base) var(--ease);
|
|
3744
|
+
}
|
|
3745
|
+
.fd-funnel-meta {
|
|
3746
|
+
display: flex;
|
|
3747
|
+
align-items: baseline;
|
|
3748
|
+
justify-content: center;
|
|
3749
|
+
gap: 10px;
|
|
3750
|
+
flex-wrap: wrap;
|
|
3751
|
+
font-size: var(--body-sm-size);
|
|
3752
|
+
}
|
|
3753
|
+
.fd-funnel-label {
|
|
3754
|
+
font-weight: var(--w-medium);
|
|
3755
|
+
color: var(--text);
|
|
3756
|
+
}
|
|
3757
|
+
.fd-funnel-value {
|
|
3758
|
+
color: var(--text-2);
|
|
3759
|
+
}
|
|
3760
|
+
.fd-funnel-rates {
|
|
3761
|
+
display: flex;
|
|
3762
|
+
gap: 10px;
|
|
3763
|
+
color: var(--text-muted);
|
|
3764
|
+
font-size: 12px;
|
|
3765
|
+
}
|
|
3766
|
+
|
|
3465
3767
|
/* --- code + diff --------------------------------------------------------- */
|
|
3466
3768
|
.fd-code {
|
|
3467
3769
|
border: 1px solid var(--chat-code-border);
|