Skip to content

Commit 61aeb2a

Browse files
authored
feat: Polish dialog, popover shadows & borders, add missing provider logos (anomalyco#7326)
1 parent 4b0f7b8 commit 61aeb2a

File tree

9 files changed

+95
-9
lines changed

9 files changed

+95
-9
lines changed
Lines changed: 14 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

packages/ui/src/components/dialog.css

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,15 @@
4343

4444
/* padding: 8px; */
4545
/* padding: 8px 8px 0 8px; */
46-
border: 1px solid hsl(from var(--border-base) h s l / 0.2);
46+
border: 1px solid
47+
light-dark(
48+
color-mix(in oklch, var(--border-base) 30%, transparent),
49+
color-mix(in oklch, var(--border-base) 50%, transparent)
50+
);
4751
border-radius: var(--radius-xl);
4852
background: var(--surface-raised-stronger-non-alpha);
4953
background-clip: padding-box;
50-
box-shadow:
51-
0 15px 45px 0 rgba(19, 16, 16, 0.35),
52-
0 3.35px 10.051px 0 rgba(19, 16, 16, 0.25),
53-
0 0.998px 2.993px 0 rgba(19, 16, 16, 0.2);
54+
box-shadow: var(--shadow-lg);
5455

5556
/* animation: contentHide 300ms ease-in forwards; */
5657
/**/

packages/ui/src/components/dropdown-menu.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
min-width: 8rem;
44
overflow: hidden;
55
border-radius: var(--radius-md);
6-
border: 1px solid var(--border-weak-base);
6+
border: 1px solid color-mix(in oklch, var(--border-base) 50%, transparent);
7+
background-clip: padding-box;
78
background-color: var(--surface-raised-stronger-non-alpha);
89
padding: 4px;
910
box-shadow: var(--shadow-md);

packages/ui/src/components/popover.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@
77
min-width: 200px;
88
max-width: 320px;
99
border-radius: var(--radius-md);
10-
border: 1px solid var(--border-weak-base);
1110
background-color: var(--surface-raised-stronger-non-alpha);
11+
12+
border: 1px solid color-mix(in oklch, var(--border-base) 50%, transparent);
13+
background-clip: padding-box;
1214
box-shadow: var(--shadow-md);
15+
1316
transform-origin: var(--kb-popover-content-transform-origin);
1417

1518
&:focus-within {

packages/ui/src/components/provider-icons/sprite.svg

Lines changed: 50 additions & 0 deletions
Loading

packages/ui/src/components/provider-icons/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const iconNames = [
3131
"ollama-cloud",
3232
"nvidia",
3333
"nebius",
34+
"nano-gpt",
3435
"morph",
3536
"moonshotai",
3637
"moonshotai-cn",
@@ -54,6 +55,7 @@ export const iconNames = [
5455
"google-vertex-anthropic",
5556
"github-models",
5657
"github-copilot",
58+
"friendli",
5759
"fireworks-ai",
5860
"fastrouter",
5961
"deepseek",
@@ -73,6 +75,7 @@ export const iconNames = [
7375
"alibaba",
7476
"alibaba-cn",
7577
"aihubmix",
78+
"abacus",
7679
] as const
7780

7881
export type IconName = (typeof iconNames)[number]

packages/ui/src/styles/theme.css

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,17 @@
4747
--radius-xl: 0.625rem;
4848

4949
--shadow-xs:
50-
0 1px 2px -1px rgba(19, 16, 16, 0.04), 0 1px 2px 0 rgba(19, 16, 16, 0.06), 0 1px 3px 0 rgba(19, 16, 16, 0.08);
50+
0 1px 2px -0.5px light-dark(hsl(0 0% 0% / 0.04), hsl(0 0% 0% / 0.06)),
51+
0 0.5px 1.5px 0 light-dark(hsl(0 0% 0% / 0.025), hsl(0 0% 0% / 0.08)),
52+
0 1px 3px 0 light-dark(hsl(0 0% 0% / 0.05), hsl(0 0% 0% / 0.1));
5153
--shadow-md:
52-
0 6px 8px -4px rgba(19, 16, 16, 0.12), 0 4px 3px -2px rgba(19, 16, 16, 0.12), 0 1px 2px -1px rgba(19, 16, 16, 0.12);
54+
0 6px 12px -2px light-dark(hsl(0 0% 0% / 0.075), hsl(0 0% 0% / 0.1)),
55+
0 4px 8px -2px light-dark(hsl(0 0% 0% / 0.075), hsl(0 0% 0% / 0.15)),
56+
0 1px 2px light-dark(hsl(0 0% 0% / 0.1), hsl(0 0% 0% / 0.15));
57+
--shadow-lg:
58+
0 16px 48px -6px light-dark(hsl(0 0% 0% / 0.05), hsl(0 0% 0% / 0.15)),
59+
0 6px 12px -2px light-dark(hsl(0 0% 0% / 0.025), hsl(0 0% 0% / 0.1)),
60+
0 1px 2.5px light-dark(hsl(0 0% 0% / 0.025), hsl(0 0% 0% / 0.1));
5361
--shadow-xs-border:
5462
0 0 0 1px var(--border-base, rgba(11, 6, 0, 0.2)), 0 1px 2px -1px rgba(19, 16, 16, 0.04),
5563
0 1px 2px 0 rgba(19, 16, 16, 0.06), 0 1px 3px 0 rgba(19, 16, 16, 0.08);

0 commit comments

Comments
 (0)