@evinvest/uikit 0.30.0 → 0.31.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/README.md +266 -72
- package/dist/{chunk-3IPB4QQJ.js → chunk-35SPIU4U.js} +10 -6
- package/dist/chunk-35SPIU4U.js.map +1 -0
- package/dist/components/account-list.js +128 -0
- package/dist/components/account-list.js.map +1 -0
- package/dist/components/account-menu-profile.js +114 -0
- package/dist/components/account-menu-profile.js.map +1 -0
- package/dist/components/account-menu.js +50 -23
- package/dist/components/account-menu.js.map +1 -1
- package/dist/components/account-settings-dialog.js +84 -0
- package/dist/components/account-settings-dialog.js.map +1 -0
- package/dist/components/alert-dialog.js +3 -2
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/animated-number-columns.js +105 -0
- package/dist/components/animated-number-columns.js.map +1 -0
- package/dist/components/animated-number.js +157 -0
- package/dist/components/animated-number.js.map +1 -0
- package/dist/components/app-shell.js +9 -0
- package/dist/components/app-shell.js.map +1 -1
- package/dist/components/aside.js +140 -0
- package/dist/components/aside.js.map +1 -0
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/button.js +3 -11
- package/dist/components/button.js.map +1 -1
- package/dist/components/chat-composer.js +141 -0
- package/dist/components/chat-composer.js.map +1 -0
- package/dist/components/chat-message.js +195 -0
- package/dist/components/chat-message.js.map +1 -0
- package/dist/components/chat-panel.js +137 -0
- package/dist/components/chat-panel.js.map +1 -0
- package/dist/components/chat-stream-text.js +69 -0
- package/dist/components/chat-stream-text.js.map +1 -0
- package/dist/components/chat-typing.js +26 -0
- package/dist/components/chat-typing.js.map +1 -0
- package/dist/components/command-palette.js +119 -0
- package/dist/components/command-palette.js.map +1 -0
- package/dist/components/command.js +3 -1
- package/dist/components/command.js.map +1 -1
- package/dist/components/confirm-dialog.js +123 -0
- package/dist/components/confirm-dialog.js.map +1 -0
- package/dist/components/context-menu.js +53 -5
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/dialog.js +3 -2
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/drawer.js +3 -1
- package/dist/components/drawer.js.map +1 -1
- package/dist/components/dropdown-menu.js +64 -5
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/form-row.js +51 -0
- package/dist/components/form-row.js.map +1 -0
- package/dist/components/header-controls.js +149 -0
- package/dist/components/header-controls.js.map +1 -0
- package/dist/components/icon-button.js +35 -0
- package/dist/components/icon-button.js.map +1 -0
- package/dist/components/key-value.js +68 -0
- package/dist/components/key-value.js.map +1 -0
- package/dist/components/menubar.js +39 -5
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/native-select.js +3 -4
- package/dist/components/native-select.js.map +1 -1
- package/dist/components/nav-collapse.js +142 -0
- package/dist/components/nav-collapse.js.map +1 -0
- package/dist/components/nav-model.js.map +1 -1
- package/dist/components/navigation-menu.js +4 -5
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/page-frame.js +2 -5
- package/dist/components/page-frame.js.map +1 -1
- package/dist/components/popover-form.js +60 -0
- package/dist/components/popover-form.js.map +1 -0
- package/dist/components/resource-error.js +1 -1
- package/dist/components/resource-error.js.map +1 -1
- package/dist/components/section-nav.js +73 -20
- package/dist/components/section-nav.js.map +1 -1
- package/dist/components/select.js +16 -6
- package/dist/components/select.js.map +1 -1
- package/dist/components/settings.js +94 -0
- package/dist/components/settings.js.map +1 -0
- package/dist/components/sheet.js +3 -2
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/shell-nav.js +80 -38
- package/dist/components/shell-nav.js.map +1 -1
- package/dist/components/smart-header.js +53 -0
- package/dist/components/smart-header.js.map +1 -0
- package/dist/components/status-item.js +42 -0
- package/dist/components/status-item.js.map +1 -0
- package/dist/components/system-banner.js +22 -12
- package/dist/components/system-banner.js.map +1 -1
- package/dist/components/top-bar.js +4 -3
- package/dist/components/top-bar.js.map +1 -1
- package/dist/components/ui-icons.js +77 -0
- package/dist/components/ui-icons.js.map +1 -0
- package/dist/components/use-count-tween.js +42 -0
- package/dist/components/use-count-tween.js.map +1 -0
- package/dist/components/workspace-tab.js +140 -0
- package/dist/components/workspace-tab.js.map +1 -0
- package/dist/generated/accent.js +2 -2
- package/dist/generated/accent.js.map +1 -1
- package/dist/generated/account-list.js +35 -0
- package/dist/generated/account-list.js.map +1 -0
- package/dist/generated/account-settings-dialog.js +27 -0
- package/dist/generated/account-settings-dialog.js.map +1 -0
- package/dist/generated/alert-dialog.js +1 -1
- package/dist/generated/alert-dialog.js.map +1 -1
- package/dist/generated/alert.js +2 -2
- package/dist/generated/alert.js.map +1 -1
- package/dist/generated/aside.js +36 -0
- package/dist/generated/aside.js.map +1 -0
- package/dist/generated/badge.js +7 -6
- package/dist/generated/badge.js.map +1 -1
- package/dist/generated/band.js +1 -1
- package/dist/generated/band.js.map +1 -1
- package/dist/generated/breadcrumb.js +2 -2
- package/dist/generated/breadcrumb.js.map +1 -1
- package/dist/generated/button-group.js +2 -2
- package/dist/generated/button-group.js.map +1 -1
- package/dist/generated/button.js +4 -4
- package/dist/generated/button.js.map +1 -1
- package/dist/generated/card.js +6 -6
- package/dist/generated/card.js.map +1 -1
- package/dist/generated/chat-composer.js +21 -0
- package/dist/generated/chat-composer.js.map +1 -0
- package/dist/generated/chat-message.js +86 -0
- package/dist/generated/chat-message.js.map +1 -0
- package/dist/generated/chat-typing.js +9 -0
- package/dist/generated/chat-typing.js.map +1 -0
- package/dist/generated/command-palette.js +17 -0
- package/dist/generated/command-palette.js.map +1 -0
- package/dist/generated/command.js +2 -2
- package/dist/generated/command.js.map +1 -1
- package/dist/generated/confirm-dialog.js +28 -0
- package/dist/generated/confirm-dialog.js.map +1 -0
- package/dist/generated/context-menu.js +1 -1
- package/dist/generated/context-menu.js.map +1 -1
- package/dist/generated/date-time-picker.js +1 -1
- package/dist/generated/date-time-picker.js.map +1 -1
- package/dist/generated/dialog.js +1 -1
- package/dist/generated/dialog.js.map +1 -1
- package/dist/generated/drawer.js +1 -1
- package/dist/generated/drawer.js.map +1 -1
- package/dist/generated/dropdown-menu.js +1 -1
- package/dist/generated/dropdown-menu.js.map +1 -1
- package/dist/generated/form-row.js +17 -0
- package/dist/generated/form-row.js.map +1 -0
- package/dist/generated/header-controls.js +56 -0
- package/dist/generated/header-controls.js.map +1 -0
- package/dist/generated/icon-button.js +13 -0
- package/dist/generated/icon-button.js.map +1 -0
- package/dist/generated/key-value.js +15 -0
- package/dist/generated/key-value.js.map +1 -0
- package/dist/generated/menubar.js +1 -1
- package/dist/generated/menubar.js.map +1 -1
- package/dist/generated/navigation-menu.js +1 -1
- package/dist/generated/navigation-menu.js.map +1 -1
- package/dist/generated/popover-form.js +13 -0
- package/dist/generated/popover-form.js.map +1 -0
- package/dist/generated/section-label.js +10 -0
- package/dist/generated/section-label.js.map +1 -0
- package/dist/generated/select.js +15 -3
- package/dist/generated/select.js.map +1 -1
- package/dist/generated/settings.js +36 -0
- package/dist/generated/settings.js.map +1 -0
- package/dist/generated/sheet.js +1 -1
- package/dist/generated/sheet.js.map +1 -1
- package/dist/generated/slider.js +1 -1
- package/dist/generated/slider.js.map +1 -1
- package/dist/generated/smart-header.js +11 -0
- package/dist/generated/smart-header.js.map +1 -0
- package/dist/generated/sonner.js +4 -4
- package/dist/generated/sonner.js.map +1 -1
- package/dist/generated/status-item.js +17 -0
- package/dist/generated/status-item.js.map +1 -0
- package/dist/generated/system-banner.js +33 -0
- package/dist/generated/system-banner.js.map +1 -0
- package/dist/generated/top-bar.js +9 -0
- package/dist/generated/top-bar.js.map +1 -0
- package/dist/generated/workspace-tab.js +17 -0
- package/dist/generated/workspace-tab.js.map +1 -0
- package/dist/index.d.ts +852 -156
- package/dist/index.js +21 -1
- package/dist/lib/cn.js +8 -1
- package/dist/lib/cn.js.map +1 -1
- package/dist/lib/number-parts.js +90 -0
- package/dist/lib/number-parts.js.map +1 -0
- package/dist/palette-cli.js +1 -1
- package/dist/palette.d.ts +6 -4
- package/dist/palette.js +3 -1
- package/dist/primitives/dismissable-layer.js +76 -4
- package/dist/primitives/dismissable-layer.js.map +1 -1
- package/dist/primitives/focus-scope.js +20 -5
- package/dist/primitives/focus-scope.js.map +1 -1
- package/dist/primitives/use-floating.js +16 -1
- package/dist/primitives/use-floating.js.map +1 -1
- package/dist/primitives/use-reduced-motion.js +20 -0
- package/dist/primitives/use-reduced-motion.js.map +1 -0
- package/package.json +1 -1
- package/styles/ev.css +281 -49
- package/styles/theme.css +335 -39
- package/styles/tokens.css +643 -103
- package/dist/chunk-3IPB4QQJ.js.map +0 -1
- package/dist/components/terminal.js +0 -206
- package/dist/components/terminal.js.map +0 -1
- package/dist/generated/terminal.js +0 -70
- package/dist/generated/terminal.js.map +0 -1
package/styles/theme.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/*
|
|
3
3
|
* Toast (sonner) and Drawer enter/exit motion, the reduced-motion fade for Sheet and
|
|
4
4
|
* the dialogs, the entrances (rise / stagger / settled / skeleton) and the app-shell
|
|
5
|
-
* markers, shared by both ports. Imported by the token
|
|
5
|
+
* markers, the chat caret and the docked aside, shared by both ports. Imported by the token
|
|
6
6
|
* sheets so the lifecycle ships with the theme contract.
|
|
7
7
|
*/
|
|
8
8
|
|
|
@@ -449,7 +449,198 @@
|
|
|
449
449
|
opacity: 0;
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
|
+
/* ── Chat: streaming text, caret, thinking dots, entrances ───────────────────
|
|
453
|
+
Streamed words (`chat-word`, from ChatStreamText) fade in from a 2px blur with
|
|
454
|
+
a small rise; each is an inline-block so `translate` applies, and the space
|
|
455
|
+
between words stays outside it so lines still wrap normally. The caret trails a
|
|
456
|
+
bubble that is still receiving text (`data-streaming`) and pulses instead of
|
|
457
|
+
blinking; once streaming ends the bubble keeps `data-caret`, so the caret fades
|
|
458
|
+
out by transition. The assistant's text sits a little dimmer while it arrives
|
|
459
|
+
and settles to full ink when it is done. Turns, markers and attachments fade in
|
|
460
|
+
as they mount; the log fades its top edge once scrolled, and the jump button
|
|
461
|
+
fades with its state. A docked aside is mounted and unmounted by its owner, so
|
|
462
|
+
it only has an enter: it slides in from the edge it docks to. Everything falls
|
|
463
|
+
back under reduced motion. */
|
|
464
|
+
@keyframes ev-word-in {
|
|
465
|
+
from {
|
|
466
|
+
opacity: 0;
|
|
467
|
+
filter: blur(2px);
|
|
468
|
+
translate: 0 3px;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
[data-slot="chat-word"] {
|
|
472
|
+
display: inline-block;
|
|
473
|
+
animation: ev-word-in var(--ev-dur-base, 280ms) var(--ev-ease-out, ease-out) backwards;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
[data-slot="chat-bubble"][data-variant="assistant"] {
|
|
477
|
+
transition: opacity var(--ev-dur-slow, 400ms) var(--ev-ease-out, ease-out);
|
|
478
|
+
}
|
|
479
|
+
[data-slot="chat-bubble"][data-variant="assistant"][data-streaming] {
|
|
480
|
+
opacity: 0.86;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
[data-slot="chat-bubble"][data-caret]::after {
|
|
484
|
+
content: "";
|
|
485
|
+
display: inline-block;
|
|
486
|
+
width: 0.5em;
|
|
487
|
+
height: 1em;
|
|
488
|
+
margin-left: 2px;
|
|
489
|
+
vertical-align: text-bottom;
|
|
490
|
+
background: var(--ink-mid);
|
|
491
|
+
opacity: 0;
|
|
492
|
+
transition: opacity var(--ev-dur-base, 280ms) var(--ev-ease-out, ease-out);
|
|
493
|
+
}
|
|
494
|
+
[data-slot="chat-bubble"][data-streaming]::after {
|
|
495
|
+
animation: ev-caret-pulse 1.4s var(--ev-ease-in-out, ease-in-out) infinite;
|
|
496
|
+
}
|
|
497
|
+
@keyframes ev-caret-pulse {
|
|
498
|
+
0%,
|
|
499
|
+
100% {
|
|
500
|
+
opacity: 0.15;
|
|
501
|
+
}
|
|
502
|
+
50% {
|
|
503
|
+
opacity: 0.9;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
[data-slot="chat-typing"] {
|
|
508
|
+
animation: ev-enter-fade var(--ev-dur-base, 280ms) var(--ev-ease-out, ease-out) backwards;
|
|
509
|
+
}
|
|
510
|
+
[data-slot="chat-typing"] [data-still] {
|
|
511
|
+
display: none;
|
|
512
|
+
}
|
|
513
|
+
[data-slot="chat-typing"] [data-dot] {
|
|
514
|
+
animation: ev-typing-wave 1.2s var(--ev-ease-in-out, ease-in-out) infinite;
|
|
515
|
+
}
|
|
516
|
+
[data-slot="chat-typing"] [data-dot]:nth-child(2) {
|
|
517
|
+
animation-delay: 160ms;
|
|
518
|
+
}
|
|
519
|
+
[data-slot="chat-typing"] [data-dot]:nth-child(3) {
|
|
520
|
+
animation-delay: 320ms;
|
|
521
|
+
}
|
|
522
|
+
@keyframes ev-typing-wave {
|
|
523
|
+
0%,
|
|
524
|
+
60%,
|
|
525
|
+
100% {
|
|
526
|
+
opacity: 0.25;
|
|
527
|
+
}
|
|
528
|
+
30% {
|
|
529
|
+
opacity: 1;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
@keyframes ev-chat-in {
|
|
534
|
+
from {
|
|
535
|
+
opacity: 0;
|
|
536
|
+
filter: blur(3px);
|
|
537
|
+
translate: 0 10px;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
@keyframes ev-chat-in-user {
|
|
541
|
+
from {
|
|
542
|
+
opacity: 0;
|
|
543
|
+
filter: blur(3px);
|
|
544
|
+
translate: 0 10px;
|
|
545
|
+
scale: 0.98;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
@keyframes ev-chat-part-in {
|
|
549
|
+
from {
|
|
550
|
+
opacity: 0;
|
|
551
|
+
translate: 0 4px;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
[data-slot="chat-message"][data-enter="rise"] {
|
|
555
|
+
animation: ev-chat-in var(--ev-dur-slow, 400ms) var(--ev-ease-out, ease-out) var(--enter-delay, 0ms) backwards;
|
|
556
|
+
}
|
|
557
|
+
[data-slot="chat-message"][data-role="user"][data-enter="rise"] {
|
|
558
|
+
transform-origin: right bottom;
|
|
559
|
+
animation-name: ev-chat-in-user;
|
|
560
|
+
}
|
|
561
|
+
[data-slot="chat-marker"],
|
|
562
|
+
[data-slot="chat-attachment"] {
|
|
563
|
+
animation: ev-chat-part-in var(--ev-dur-base, 280ms) var(--ev-ease-out, ease-out) backwards;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
@property --ev-chat-fade {
|
|
567
|
+
syntax: "<length>";
|
|
568
|
+
inherits: false;
|
|
569
|
+
initial-value: 0px;
|
|
570
|
+
}
|
|
571
|
+
[data-slot="chat-log"] {
|
|
572
|
+
mask-image: linear-gradient(to bottom, transparent, black var(--ev-chat-fade));
|
|
573
|
+
transition: --ev-chat-fade var(--ev-dur-base, 280ms) var(--ev-ease-out, ease-out);
|
|
574
|
+
}
|
|
575
|
+
[data-slot="chat-log"][data-scrolled] {
|
|
576
|
+
--ev-chat-fade: 28px;
|
|
577
|
+
}
|
|
578
|
+
[data-chat-jump] {
|
|
579
|
+
transition:
|
|
580
|
+
opacity var(--ev-dur-base, 280ms) var(--ev-ease-out, ease-out),
|
|
581
|
+
translate var(--ev-dur-base, 280ms) var(--ev-ease-out, ease-out);
|
|
582
|
+
}
|
|
583
|
+
[data-chat-jump="hidden"] {
|
|
584
|
+
opacity: 0;
|
|
585
|
+
translate: 0 6px;
|
|
586
|
+
pointer-events: none;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
[data-slot="aside-panel"][data-mode="docked"] {
|
|
590
|
+
--ev-aside-from: 24px;
|
|
591
|
+
animation: ev-aside-enter var(--ev-dur-base, 280ms) var(--ev-ease-out, ease-out) backwards;
|
|
592
|
+
}
|
|
593
|
+
[data-slot="aside-panel"][data-mode="docked"][data-side="left"] {
|
|
594
|
+
--ev-aside-from: -24px;
|
|
595
|
+
}
|
|
596
|
+
@keyframes ev-aside-enter {
|
|
597
|
+
from {
|
|
598
|
+
opacity: 0;
|
|
599
|
+
transform: translateX(var(--ev-aside-from));
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
|
|
452
603
|
@media (prefers-reduced-motion: reduce) {
|
|
604
|
+
[data-slot="chat-word"] {
|
|
605
|
+
animation: ev-enter-fade 1ms backwards;
|
|
606
|
+
/* beats the per-word stagger delay set inline */
|
|
607
|
+
animation-delay: 0ms !important;
|
|
608
|
+
}
|
|
609
|
+
[data-slot="chat-bubble"][data-variant="assistant"],
|
|
610
|
+
[data-slot="chat-bubble"][data-caret]::after,
|
|
611
|
+
[data-slot="chat-log"] {
|
|
612
|
+
transition: none;
|
|
613
|
+
}
|
|
614
|
+
[data-slot="chat-bubble"][data-variant="assistant"][data-streaming] {
|
|
615
|
+
opacity: 1;
|
|
616
|
+
}
|
|
617
|
+
[data-slot="chat-bubble"][data-streaming]::after {
|
|
618
|
+
animation: none;
|
|
619
|
+
opacity: 0.6;
|
|
620
|
+
}
|
|
621
|
+
[data-slot="chat-typing"],
|
|
622
|
+
[data-slot="chat-typing"] [data-dot] {
|
|
623
|
+
animation: none;
|
|
624
|
+
}
|
|
625
|
+
[data-slot="chat-typing"] [data-dot] {
|
|
626
|
+
display: none;
|
|
627
|
+
}
|
|
628
|
+
[data-slot="chat-typing"] [data-still] {
|
|
629
|
+
display: inline;
|
|
630
|
+
}
|
|
631
|
+
[data-slot="chat-message"][data-enter="rise"],
|
|
632
|
+
[data-slot="chat-message"][data-role="user"][data-enter="rise"],
|
|
633
|
+
[data-slot="chat-marker"],
|
|
634
|
+
[data-slot="chat-attachment"] {
|
|
635
|
+
animation: ev-enter-fade var(--ev-dur-fast, 180ms) linear backwards;
|
|
636
|
+
}
|
|
637
|
+
[data-chat-jump] {
|
|
638
|
+
transition: opacity var(--ev-dur-fast, 180ms) linear;
|
|
639
|
+
translate: none;
|
|
640
|
+
}
|
|
641
|
+
[data-slot="aside-panel"][data-mode="docked"] {
|
|
642
|
+
animation-name: ev-enter-fade;
|
|
643
|
+
}
|
|
453
644
|
[data-enter="rise"],
|
|
454
645
|
[data-enter="stagger"] > *,
|
|
455
646
|
[data-slot="settled"][data-state="revealed"] {
|
|
@@ -474,29 +665,47 @@
|
|
|
474
665
|
--radius-xl: calc(var(--radius) + 4px);
|
|
475
666
|
--radius-2xl: calc(var(--radius) + 8px);
|
|
476
667
|
|
|
477
|
-
/*
|
|
478
|
-
*
|
|
479
|
-
|
|
480
|
-
--shadow-
|
|
481
|
-
--shadow-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
--
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
668
|
+
/* The names stay, the values are per theme: u2 is flat (`--depth-*` is a
|
|
669
|
+
* zero shadow), Oldschool brings the ladder back in ev.css. */
|
|
670
|
+
--shadow-card: var(--depth-card);
|
|
671
|
+
--shadow-elevated: var(--depth-elevated);
|
|
672
|
+
--shadow-overlay: var(--depth-overlay);
|
|
673
|
+
|
|
674
|
+
/* Type scale: size / line-height in pairs, the Figma text styles. */
|
|
675
|
+
--text-caption: 0.6875rem;
|
|
676
|
+
--text-caption--line-height: 0.875rem;
|
|
677
|
+
--text-body-s: 0.75rem;
|
|
678
|
+
--text-body-s--line-height: 1rem;
|
|
679
|
+
--text-body: 0.8125rem;
|
|
680
|
+
--text-body--line-height: 1.125rem;
|
|
681
|
+
--text-body-l: 0.875rem;
|
|
682
|
+
--text-body-l--line-height: 1.25rem;
|
|
683
|
+
--text-h3: 0.875rem;
|
|
684
|
+
--text-h3--line-height: 1.25rem;
|
|
685
|
+
--text-h2: 1.5rem;
|
|
686
|
+
--text-h2--line-height: 1.875rem;
|
|
687
|
+
--text-h1: 2rem;
|
|
688
|
+
--text-h1--line-height: 2.375rem;
|
|
689
|
+
--text-figure-m: 1.25rem;
|
|
690
|
+
--text-figure-m--line-height: 1.5rem;
|
|
691
|
+
--text-figure-l: 1.75rem;
|
|
692
|
+
--text-figure-l--line-height: 2rem;
|
|
693
|
+
|
|
694
|
+
/* The families are parameters, apart from the colour contract: a brand scope
|
|
695
|
+
* sets `--brand-font-sans`, `--brand-font-serif` and `--brand-font-mono`
|
|
696
|
+
* (evinvest-palette writes them from a brand file's [fonts]). `serif` is the
|
|
697
|
+
* second face (headings, figures, wordmarks, italic accents), not necessarily
|
|
698
|
+
* one with serifs. Unset, each falls through to EV's: Inter, Inter Tight and
|
|
699
|
+
* JetBrains Mono (Oldschool sets its own, see ev.css). next/font (landing)
|
|
700
|
+
* sets `--font-inter` / `--font-inter-tight` / `--font-jetbrains-mono` /
|
|
701
|
+
* `--font-playfair`, a Rust consumer `@font-face`s the same families itself. Every leading var() carries its own fallback — an
|
|
492
702
|
* undefined one would invalidate the whole `font-family` and drop the
|
|
493
703
|
* browser to its default, so it must never resolve to guaranteed-invalid.
|
|
494
704
|
* `inline` puts the var() chain in the utility itself, so it resolves on
|
|
495
705
|
* the element and a brand scope re-fonts its subtree. */
|
|
496
706
|
--font-sans: var(--brand-font-sans, var(--font-inter, "Inter")), ui-sans-serif, system-ui, sans-serif;
|
|
497
|
-
--font-serif: var(--brand-font-
|
|
498
|
-
--font-mono: var(--brand-font-mono, var(--font-
|
|
499
|
-
--font-display: var(--brand-font-display, var(--font-playfair, "Playfair Display")), ui-serif, Georgia, serif;
|
|
707
|
+
--font-serif: var(--brand-font-serif, var(--font-inter-tight, "Inter Tight")), ui-sans-serif, system-ui, sans-serif;
|
|
708
|
+
--font-mono: var(--brand-font-mono, var(--font-jetbrains-mono, "JetBrains Mono")), ui-monospace, monospace;
|
|
500
709
|
|
|
501
710
|
/* The colour contract: every `--color-X: var(--X)` below is a name a palette
|
|
502
711
|
* owes, except the derived ones in the next rule. `evinvest-palette` reads
|
|
@@ -508,14 +717,20 @@
|
|
|
508
717
|
--color-popover: var(--popover);
|
|
509
718
|
--color-muted: var(--muted);
|
|
510
719
|
--color-hover: var(--hover);
|
|
720
|
+
--color-active: var(--active);
|
|
721
|
+
--color-selected: var(--selected);
|
|
722
|
+
--color-scrim: var(--scrim);
|
|
511
723
|
|
|
512
724
|
/* ink — hierarchy, loudest first */
|
|
513
725
|
--color-ink: var(--ink);
|
|
514
726
|
--color-ink-mid: var(--ink-mid);
|
|
515
727
|
--color-ink-soft: var(--ink-soft);
|
|
728
|
+
--color-ink-faint: var(--ink-faint);
|
|
516
729
|
|
|
517
730
|
/* lines */
|
|
731
|
+
--color-border-subtle: var(--border-subtle);
|
|
518
732
|
--color-border: var(--border);
|
|
733
|
+
--color-border-strong: var(--border-strong);
|
|
519
734
|
--color-input: var(--input);
|
|
520
735
|
--color-ring: var(--ring);
|
|
521
736
|
|
|
@@ -524,21 +739,47 @@
|
|
|
524
739
|
--color-primary: var(--primary);
|
|
525
740
|
--color-on-primary: var(--on-primary);
|
|
526
741
|
--color-primary-ink: var(--primary-ink);
|
|
742
|
+
--color-primary-hover: var(--primary-hover);
|
|
743
|
+
--color-primary-border: var(--primary-border);
|
|
527
744
|
--color-secondary: var(--secondary);
|
|
528
745
|
--color-on-secondary: var(--on-secondary);
|
|
529
746
|
--color-positive: var(--positive);
|
|
530
747
|
--color-on-positive: var(--on-positive);
|
|
748
|
+
--color-positive-ink: var(--positive-ink);
|
|
531
749
|
--color-accent-trace: var(--accent-trace);
|
|
532
750
|
--color-on-accent-trace: var(--on-accent-trace);
|
|
533
751
|
--color-accent-debug: var(--accent-debug);
|
|
534
752
|
--color-on-accent-debug: var(--on-accent-debug);
|
|
535
753
|
--color-accent-info: var(--accent-info);
|
|
536
754
|
--color-on-accent-info: var(--on-accent-info);
|
|
755
|
+
--color-accent-info-ink: var(--accent-info-ink);
|
|
537
756
|
--color-accent-warn: var(--accent-warn);
|
|
538
757
|
--color-on-accent-warn: var(--on-accent-warn);
|
|
539
758
|
--color-accent-error: var(--accent-error);
|
|
540
759
|
--color-on-accent-error: var(--on-accent-error);
|
|
541
|
-
|
|
760
|
+
|
|
761
|
+
/* component faces: derived below, pinned per theme by EV, so `bg-button-primary-bg`
|
|
762
|
+
* and `border-chip-error-border` are real utilities the class merge understands */
|
|
763
|
+
--color-button-primary-bg: var(--button-primary-bg);
|
|
764
|
+
--color-button-primary-hover: var(--button-primary-hover);
|
|
765
|
+
--color-button-primary-border: var(--button-primary-border);
|
|
766
|
+
--color-button-primary-ink: var(--button-primary-ink);
|
|
767
|
+
--color-button-danger-bg: var(--button-danger-bg);
|
|
768
|
+
--color-button-danger-hover: var(--button-danger-hover);
|
|
769
|
+
--color-button-danger-border: var(--button-danger-border);
|
|
770
|
+
--color-button-danger-ink: var(--button-danger-ink);
|
|
771
|
+
--color-chip-neutral-bg: var(--chip-neutral-bg);
|
|
772
|
+
--color-chip-neutral-border: var(--chip-neutral-border);
|
|
773
|
+
--color-chip-primary-bg: var(--chip-primary-bg);
|
|
774
|
+
--color-chip-primary-border: var(--chip-primary-border);
|
|
775
|
+
--color-chip-positive-bg: var(--chip-positive-bg);
|
|
776
|
+
--color-chip-positive-border: var(--chip-positive-border);
|
|
777
|
+
--color-chip-info-bg: var(--chip-info-bg);
|
|
778
|
+
--color-chip-info-border: var(--chip-info-border);
|
|
779
|
+
--color-chip-warn-bg: var(--chip-warn-bg);
|
|
780
|
+
--color-chip-warn-border: var(--chip-warn-border);
|
|
781
|
+
--color-chip-error-bg: var(--chip-error-bg);
|
|
782
|
+
--color-chip-error-border: var(--chip-error-border);
|
|
542
783
|
|
|
543
784
|
/* charts — distinguishable hues carrying no significance */
|
|
544
785
|
--color-chart-1: var(--chart-1);
|
|
@@ -546,42 +787,98 @@
|
|
|
546
787
|
--color-chart-3: var(--chart-3);
|
|
547
788
|
--color-chart-4: var(--chart-4);
|
|
548
789
|
--color-chart-5: var(--chart-5);
|
|
790
|
+
--color-chart-6: var(--chart-6);
|
|
549
791
|
}
|
|
550
792
|
|
|
551
793
|
/* Derived from the palette, and redeclared on every scope a palette can be
|
|
552
794
|
* declared on. A var() inside a custom property is resolved where it is
|
|
553
795
|
* declared and the result is what inherits — declared on `:root` alone, a brand
|
|
554
796
|
* scope would change the text and keep EV's borders, hover and focus ring.
|
|
555
|
-
* Zero specificity, so a palette that sets one of these outright wins.
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
797
|
+
* Zero specificity, so a palette that sets one of these outright wins. These
|
|
798
|
+
* are the formulas a brand file gets; EV pins its own per theme in ev.css. */
|
|
799
|
+
:where(:root, .dark, .light, [data-brand], [data-theme]) {
|
|
800
|
+
/* surface states: the menu-item tint, the pressed tint, the chosen row */
|
|
801
|
+
--hover: color-mix(in srgb, var(--ink) 6%, transparent);
|
|
802
|
+
--active: color-mix(in srgb, var(--ink) 10%, transparent);
|
|
803
|
+
--selected: color-mix(in srgb, var(--ink) 10%, transparent);
|
|
804
|
+
/* behind a modal layer; black on either polarity keeps the page readable
|
|
805
|
+
* through it without tinting the brand */
|
|
806
|
+
--scrim: color-mix(in srgb, black 50%, transparent);
|
|
559
807
|
--ink-mid: color-mix(in srgb, var(--ink) 82%, transparent);
|
|
560
808
|
/* the most-used secondary text token, so it has to clear AA on its own */
|
|
561
|
-
--ink-soft: color-mix(in srgb, var(--ink)
|
|
562
|
-
/*
|
|
809
|
+
--ink-soft: color-mix(in srgb, var(--ink) 60%, transparent);
|
|
810
|
+
/* disabled only: exempt from the text floor because nothing can be done with it */
|
|
811
|
+
--ink-faint: color-mix(in srgb, var(--ink) 38%, transparent);
|
|
812
|
+
/* three steps of line: a row rule, a divider, and a panel edge. Decoration,
|
|
813
|
+
* so they stay quiet; none of them is a control edge (see --input) */
|
|
814
|
+
--border-subtle: color-mix(in srgb, var(--ink) 8%, transparent);
|
|
563
815
|
--border: color-mix(in srgb, var(--ink) 14%, transparent);
|
|
816
|
+
--border-strong: color-mix(in srgb, var(--ink) 26%, transparent);
|
|
564
817
|
/* the only edge an unfilled control has, so it owes the non-text 3:1 on every
|
|
565
818
|
* surface (lib#154). One mix serves both polarities; light is the binding
|
|
566
819
|
* side — ink over white needs ~47% to clear it, dark lands near 4:1. */
|
|
567
820
|
--input: color-mix(in srgb, var(--ink) 48%, transparent);
|
|
568
821
|
--ring: var(--primary-ink);
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
*
|
|
573
|
-
*
|
|
574
|
-
|
|
822
|
+
--primary-hover: color-mix(in srgb, var(--primary) 95%, black);
|
|
823
|
+
--primary-border: color-mix(in srgb, var(--primary-ink) 55%, transparent);
|
|
824
|
+
/* the quiet status roles as text on a surface: a fill is a shape, and as text
|
|
825
|
+
* it reads far below AA on a light plane. warn and error have none: they are
|
|
826
|
+
* text in their own colour (docs/spec/accents.md). 60 % of the role toward
|
|
827
|
+
* the ink is the fallback for a brand that pins nothing. */
|
|
828
|
+
--positive-ink: color-mix(in srgb, var(--positive) 60%, var(--ink));
|
|
829
|
+
--accent-info-ink: color-mix(in srgb, var(--accent-info) 60%, var(--ink));
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
/* Component faces built from the palette. Derived like the rule above (a brand
|
|
833
|
+
* file owes none of them and may pin any), but kept in a rule of their own: the
|
|
834
|
+
* same scopes, listed in another order so the contract reader finds one rule
|
|
835
|
+
* per selector. */
|
|
836
|
+
:where([data-theme], [data-brand], .light, .dark, :root) {
|
|
837
|
+
/* primary is an outline button, danger the same in the error role */
|
|
838
|
+
--button-primary-bg: transparent;
|
|
839
|
+
--button-primary-hover: var(--hover);
|
|
840
|
+
--button-primary-border: color-mix(in srgb, var(--ink) 60%, transparent);
|
|
841
|
+
--button-primary-ink: var(--ink);
|
|
842
|
+
--button-danger-bg: transparent;
|
|
843
|
+
--button-danger-hover: color-mix(in srgb, var(--accent-error) 10%, transparent);
|
|
844
|
+
--button-danger-border: var(--accent-error);
|
|
845
|
+
--button-danger-ink: var(--accent-error);
|
|
846
|
+
|
|
847
|
+
/* chips (Badge, status pills). The source is the colour the label wears, so
|
|
848
|
+
* the edge and the label are one hue; --chip-fill and --chip-edge are in the
|
|
849
|
+
* geometry. */
|
|
850
|
+
--chip-neutral-bg: var(--hover);
|
|
851
|
+
--chip-neutral-border: var(--border);
|
|
852
|
+
--chip-primary-bg: color-mix(in srgb, var(--primary-ink) var(--chip-fill), transparent);
|
|
853
|
+
--chip-primary-border: color-mix(in srgb, var(--primary-ink) var(--chip-edge), transparent);
|
|
854
|
+
--chip-positive-bg: color-mix(in srgb, var(--positive-ink) var(--chip-fill), transparent);
|
|
855
|
+
--chip-positive-border: color-mix(in srgb, var(--positive-ink) var(--chip-edge), transparent);
|
|
856
|
+
--chip-info-bg: color-mix(in srgb, var(--accent-info-ink) var(--chip-fill), transparent);
|
|
857
|
+
--chip-info-border: color-mix(in srgb, var(--accent-info-ink) var(--chip-edge), transparent);
|
|
858
|
+
--chip-warn-bg: color-mix(in srgb, var(--accent-warn) var(--chip-fill), transparent);
|
|
859
|
+
--chip-warn-border: color-mix(in srgb, var(--accent-warn) var(--chip-edge), transparent);
|
|
860
|
+
--chip-error-bg: color-mix(in srgb, var(--accent-error) var(--chip-fill), transparent);
|
|
861
|
+
--chip-error-border: color-mix(in srgb, var(--accent-error) var(--chip-edge), transparent);
|
|
575
862
|
}
|
|
576
863
|
|
|
577
864
|
/* Geometry. A `[data-brand]` scope is a theme root of its own, so it restarts
|
|
578
865
|
* from these defaults (and from the scale-ups below) rather than inheriting
|
|
579
|
-
* whatever an ancestor computed
|
|
580
|
-
* from `--radius` and has to be recomputed wherever `--radius` may change. */
|
|
866
|
+
* whatever an ancestor computed. */
|
|
581
867
|
:where(:root, [data-brand]) {
|
|
582
|
-
--radius: 0.375rem; /*
|
|
868
|
+
--radius: 0.375rem; /* panels and menus */
|
|
583
869
|
/* control geometry, so a consumer reshapes every button/input at once */
|
|
584
|
-
--control-radius:
|
|
870
|
+
--control-radius: 0.25rem;
|
|
871
|
+
--chip-radius: 0.25rem;
|
|
872
|
+
/* how much of its ink a chip's fill and edge take, for a brand that pins
|
|
873
|
+
* nothing: an outline by default, a tint where a theme raises the fill */
|
|
874
|
+
--chip-fill: 0%;
|
|
875
|
+
--chip-edge: 50%;
|
|
876
|
+
/* u2 is flat: depth is surface steps and hairlines. Never `none` — inside
|
|
877
|
+
* Tailwind's comma-separated box-shadow list it invalidates the whole
|
|
878
|
+
* declaration, and the focus ring goes with it. */
|
|
879
|
+
--depth-card: 0 0 #0000;
|
|
880
|
+
--depth-elevated: 0 0 #0000;
|
|
881
|
+
--depth-overlay: 0 0 #0000;
|
|
585
882
|
--control-py: 0.5rem;
|
|
586
883
|
/* the Xl (call-to-action) button reads all three */
|
|
587
884
|
--control-px: 2rem;
|
|
@@ -637,11 +934,10 @@
|
|
|
637
934
|
--ev-shell-offset: 0px;
|
|
638
935
|
}
|
|
639
936
|
|
|
640
|
-
/* Mobile-first scale-ups: roomier gutters
|
|
641
|
-
|
|
937
|
+
/* Mobile-first scale-ups: roomier gutters on bigger viewports. Lives here (not
|
|
938
|
+
per-component) so every consumer scales alike. */
|
|
642
939
|
@media (min-width: 640px) {
|
|
643
940
|
:where(:root, [data-brand]) {
|
|
644
|
-
--radius: 0.5rem;
|
|
645
941
|
--page-px: 1.5rem;
|
|
646
942
|
}
|
|
647
943
|
}
|