Skip to content

Commit f5110f9

Browse files
committed
ADD: Nicer list rendering
1 parent 1cc92f5 commit f5110f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1549
-30
lines changed

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
"@tauri-apps/cli": "^2.2.5",
2727
"@types/pako": "^2.0.3",
2828
"autoprefixer": "^10.4.20",
29+
"bits-ui": "1.0.0-next.78",
2930
"clsx": "^2.1.1",
31+
"lucide-svelte": "^0.474.0",
3032
"svelte": "^5.0.0",
3133
"svelte-check": "^4.0.0",
3234
"tailwind-merge": "^2.6.0",

pnpm-lock.yaml

+115
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/tauri.conf.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"identifier": "de.kosro.splicerr",
66
"build": {
77
"beforeDevCommand": "pnpm dev",
8-
"devUrl": "http://localhost:1420",
8+
"devUrl": "http://localhost:1337",
99
"beforeBuildCommand": "pnpm build",
1010
"frontendDist": "../build"
1111
},

src/app.css

+7
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@
7474
}
7575
}
7676

77+
@layer base {
78+
@font-face {
79+
font-family: Inter;
80+
src: url('/fonts/Inter-Regular.woff2') format('woff2');
81+
}
82+
}
83+
7784
html,
7885
body {
7986
overflow: hidden;
+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<script lang="ts" module>
2+
import { type VariantProps, tv } from "tailwind-variants";
3+
export const badgeVariants = tv({
4+
base: "focus:ring-ring inline-flex select-none items-center rounded-md border px-1 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2",
5+
variants: {
6+
variant: {
7+
default:
8+
"bg-primary text-primary-foreground hover:bg-primary/80 border-transparent shadow",
9+
secondary:
10+
"bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent",
11+
destructive:
12+
"bg-destructive text-destructive-foreground hover:bg-destructive/80 border-transparent shadow",
13+
outline: "text-foreground",
14+
text:
15+
"text-muted-foreground hover:bg-secondary/80 border-transparent",
16+
},
17+
},
18+
defaultVariants: {
19+
variant: "default",
20+
},
21+
});
22+
23+
export type BadgeVariant = VariantProps<typeof badgeVariants>["variant"];
24+
</script>
25+
26+
<script lang="ts">
27+
import type { WithElementRef } from "bits-ui";
28+
import type { HTMLAnchorAttributes } from "svelte/elements";
29+
import { cn } from "$lib/utils.js";
30+
31+
let {
32+
ref = $bindable(null),
33+
href,
34+
class: className,
35+
variant = "default",
36+
children,
37+
...restProps
38+
}: WithElementRef<HTMLAnchorAttributes> & {
39+
variant?: BadgeVariant;
40+
} = $props();
41+
</script>
42+
43+
<svelte:element
44+
this={href ? "a" : "span"}
45+
bind:this={ref}
46+
{href}
47+
class={cn(badgeVariants({ variant }), className)}
48+
{...restProps}
49+
>
50+
{@render children?.()}
51+
</svelte:element>

src/lib/components/ui/badge/index.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { default as Badge } from "./badge.svelte";
2+
export { badgeVariants, type BadgeVariant } from "./badge.svelte";

0 commit comments

Comments
 (0)