Skip to content

Commit 3cdaeb7

Browse files
feat: switch to base ui
Signed-off-by: Henry <mail@henrygressmann.de>
1 parent cc84ddb commit 3cdaeb7

16 files changed

Lines changed: 461 additions & 486 deletions

File tree

Cargo.lock

Lines changed: 251 additions & 250 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ path="src/main.rs"
1717
[dependencies]
1818
# async/concurrency
1919
arc-swap="1.8"
20-
tokio={version="1.49", default-features=false, features=["macros", "rt-multi-thread", "signal"]}
20+
tokio={version="1.50", default-features=false, features=["macros", "rt-multi-thread", "signal"]}
2121
tokio-util={version="0.7", features=["io"]}
2222
futures-lite={version="2.6", default-features=false, features=["alloc"]}
2323
quick_cache={version="0.6", features=["ahash"]}
@@ -41,7 +41,7 @@ zstd={version="0.13", default-features=false}
4141
# general
4242
argh={version="0.1", default-features=false, features=["help"]}
4343
anyhow={version="1.0"}
44-
rand={version="0.10.0-rc.9", default-features=false, features=["std", "thread_rng"]}
44+
rand={version="0.10.0", default-features=false, features=["std", "thread_rng"]}
4545
chrono={version="0.4", default-features=false, features=["std", "now", "serde"]}
4646
figment={version="0.10", features=["toml", "env"]}
4747
tracing={version="0.1", default-features=false, features=["std"]}
@@ -92,8 +92,7 @@ maxminddb={version="0.27", optional=true, features=["simdutf8"]}
9292
figment={version="*", features=["test"]}
9393
cookie={version="*", default-features=false}
9494
tower={version="*", features=["util"]}
95-
hyper={version="*", features=["full"]}
96-
axum-test={version="18"}
95+
axum-test={version="19"}
9796

9897
[features]
9998
default=["geoip"]

about.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ accepted=[
55
"ISC",
66
"MPL-2.0",
77
"BSD-3-Clause",
8+
"BSD-2-Clause",
89
"Unicode-DFS-2016",
910
"Unicode-3.0",
1011
"OpenSSL",

data/licenses-cargo.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

data/licenses-npm.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

web/bun.lock

Lines changed: 131 additions & 134 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,13 @@
99
"typecheck": "bun run --bun tsc --noEmit"
1010
},
1111
"dependencies": {
12-
"@astrojs/react": "4.4.2",
12+
"@astrojs/react": "^4.4.2",
13+
"@base-ui/react": "^1.2.0",
1314
"@explodingcamera/css": "^0.0.4",
1415
"@fontsource-variable/outfit": "^5.2.8",
15-
"@icons-pack/react-simple-icons": "^13.8.0",
16-
"@picocss/pico": "^2.1.1",
17-
"@radix-ui/react-accordion": "^1.2.12",
18-
"@radix-ui/react-dialog": "^1.1.15",
19-
"@radix-ui/react-tabs": "^1.1.13",
20-
"@tanstack/react-query": "^5.90.20",
16+
"@icons-pack/react-simple-icons": "^13.12.0",
17+
"@tanstack/react-query": "^5.90.21",
2118
"d3-array": "^3.2.4",
22-
"d3-axis": "^3.0.0",
2319
"d3-ease": "^3.0.1",
2420
"d3-geo": "^3.1.1",
2521
"d3-scale": "^4.0.2",
@@ -31,7 +27,7 @@
3127
"fets": "^0.8.5",
3228
"fuzzysort": "^3.1.0",
3329
"little-date": "^1.2.1",
34-
"lucide-react": "0.563.0",
30+
"lucide-react": "0.577.0",
3531
"react": "19.2.4",
3632
"react-dom": "19.2.4",
3733
"react-tag-autocomplete": "^7.5.1",
@@ -40,26 +36,25 @@
4036
},
4137
"devDependencies": {
4238
"@astrojs/check": "^0.9.6",
43-
"@biomejs/biome": "2.3.14",
44-
"@types/bun": "^1.3.8",
39+
"@biomejs/biome": "2.4.6",
40+
"@types/bun": "^1.3.10",
4541
"@types/d3-array": "^3.2.2",
46-
"@types/d3-axis": "^3.0.6",
4742
"@types/d3-ease": "^3.0.2",
4843
"@types/d3-geo": "^3.1.0",
4944
"@types/d3-scale": "^4.0.9",
5045
"@types/d3-selection": "^3.0.11",
5146
"@types/d3-shape": "^3.1.8",
5247
"@types/d3-transition": "^3.0.9",
5348
"@types/d3-zoom": "^3.0.8",
54-
"@types/react": "^19.2.13",
49+
"@types/react": "^19.2.14",
5550
"@types/react-dom": "^19.2.3",
5651
"@types/topojson-client": "^3.1.5",
5752
"@types/topojson-specification": "^1.0.5",
58-
"astro": "5.17.1",
59-
"rollup-plugin-license": "^3.6.0",
53+
"astro": "5.18.0",
54+
"rollup-plugin-license": "^3.7.0",
6055
"typescript": "^5.9.3"
6156
},
62-
"packageManager": "bun@1.3.8",
57+
"packageManager": "bun@1.3.10",
6358
"trustedDependencies": [
6459
"@biomejs/biome",
6560
"esbuild"

web/src/components/daterange/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,8 @@ export const DatePickerRange = ({ onSelect }: { onSelect: (range: DateRange) =>
4545
</label>
4646

4747
<div>
48-
<Dialog.Close asChild ref={closeRef}>
49-
<button className="secondary outline" type="button">
50-
Cancel
51-
</button>
48+
<Dialog.Close ref={closeRef} className="secondary outline">
49+
Cancel
5250
</Dialog.Close>
5351

5452
<button type="button" className="secondary" onClick={handleSelect}>

web/src/components/dialog.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
background-color: white;
5555
border: none;
5656
right: 0;
57+
top: 0;
5758
margin: 1rem;
5859
pointer-events: auto;
5960
border-radius: 1rem;

web/src/components/dialog.tsx

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
import * as Dia from "@radix-ui/react-dialog";
1+
import { Dialog as Dia } from "@base-ui/react";
22
import { XIcon } from "lucide-react";
33

44
import { cls } from "../utils";
55
import styles from "./dialog.module.css";
6+
import type { ReactElement } from "react";
67

78
export type DialogProps = {
89
title: string;
910
description?: string;
1011
hideDescription?: boolean;
11-
trigger: React.ReactNode | (() => React.ReactNode);
12+
trigger?: ReactElement | false;
1213
children: React.ReactNode;
1314
onOpenChange?: (open: boolean) => void;
1415
className?: string;
@@ -31,30 +32,30 @@ export const Dialog = ({
3132
}: DialogProps) => {
3233
return (
3334
<Dia.Root onOpenChange={onOpenChange}>
34-
<Dia.Trigger asChild>{typeof trigger === "function" ? trigger() : trigger}</Dia.Trigger>
35+
{trigger && <Dia.Trigger nativeButton={trigger.type === "button"} render={trigger} />}
3536
<Dia.Portal>
36-
<Dia.Overlay className={styles.overlay} />
37-
{showClose && (
38-
<Dia.Close asChild>
39-
<button type="button" className={styles.close}>
40-
<XIcon size="24" />
41-
</button>
42-
</Dia.Close>
43-
)}
37+
<Dia.Backdrop className={styles.overlay} />
4438

45-
<Dia.Content asChild>
46-
<article className={cls(styles.content, autoOverflow && styles.autoOverflow, className)}>
47-
<Dia.Title className={styles.title} hidden={hideTitle}>
48-
{title}
49-
</Dia.Title>
50-
{description && (
51-
<Dia.Description hidden={hideDescription} className={styles.description}>
52-
{description}
53-
</Dia.Description>
54-
)}
55-
{children}
56-
</article>
57-
</Dia.Content>
39+
<Dia.Viewport>
40+
{showClose && (
41+
<Dia.Close className={styles.close}>
42+
<XIcon size="24" />
43+
</Dia.Close>
44+
)}
45+
<Dia.Popup>
46+
<article className={cls(styles.content, autoOverflow && styles.autoOverflow, className)}>
47+
<Dia.Title className={styles.title} hidden={hideTitle}>
48+
{title}
49+
</Dia.Title>
50+
{description && (
51+
<Dia.Description hidden={hideDescription} className={styles.description}>
52+
{description}
53+
</Dia.Description>
54+
)}
55+
{children}
56+
</article>
57+
</Dia.Popup>
58+
</Dia.Viewport>
5859
</Dia.Portal>
5960
</Dia.Root>
6061
);

0 commit comments

Comments
 (0)