diff --git a/ui/src/lib/components/ui/card/card-description.svelte b/ui/src/lib/components/ui/card/card-description.svelte
index 9a35919a5..da026644a 100644
--- a/ui/src/lib/components/ui/card/card-description.svelte
+++ b/ui/src/lib/components/ui/card/card-description.svelte
@@ -1,13 +1,16 @@
-
diff --git a/ui/src/lib/components/ui/card/card-footer.svelte b/ui/src/lib/components/ui/card/card-footer.svelte
index 32f90bbb1..6894149ed 100644
--- a/ui/src/lib/components/ui/card/card-footer.svelte
+++ b/ui/src/lib/components/ui/card/card-footer.svelte
@@ -1,13 +1,16 @@
-
-
+
+ {@render children?.()}
diff --git a/ui/src/lib/components/ui/card/card-header.svelte b/ui/src/lib/components/ui/card/card-header.svelte
index e4745286a..1baa92cbf 100644
--- a/ui/src/lib/components/ui/card/card-header.svelte
+++ b/ui/src/lib/components/ui/card/card-header.svelte
@@ -1,13 +1,16 @@
-
-
+
+ {@render children?.()}
diff --git a/ui/src/lib/components/ui/card/card-title.svelte b/ui/src/lib/components/ui/card/card-title.svelte
index 099ae93f5..a20162061 100644
--- a/ui/src/lib/components/ui/card/card-title.svelte
+++ b/ui/src/lib/components/ui/card/card-title.svelte
@@ -1,21 +1,25 @@
-
-
-
+ {@render children?.()}
+
diff --git a/ui/src/lib/components/ui/card/card.svelte b/ui/src/lib/components/ui/card/card.svelte
index 43812d1b5..c7531d50c 100644
--- a/ui/src/lib/components/ui/card/card.svelte
+++ b/ui/src/lib/components/ui/card/card.svelte
@@ -1,22 +1,20 @@
-
-
+ {@render children?.()}
diff --git a/ui/src/lib/components/ui/card/index.ts b/ui/src/lib/components/ui/card/index.ts
index bcc031d00..0f9084d16 100644
--- a/ui/src/lib/components/ui/card/index.ts
+++ b/ui/src/lib/components/ui/card/index.ts
@@ -20,5 +20,3 @@ export {
Header as CardHeader,
Title as CardTitle,
};
-
-export type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
diff --git a/ui/src/lib/components/ui/input/index.ts b/ui/src/lib/components/ui/input/index.ts
deleted file mode 100644
index 75e3bc251..000000000
--- a/ui/src/lib/components/ui/input/index.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import Root from "./input.svelte";
-
-export type FormInputEvent
= T & {
- currentTarget: EventTarget & HTMLInputElement;
-};
-export type InputEvents = {
- blur: FormInputEvent;
- change: FormInputEvent;
- click: FormInputEvent;
- focus: FormInputEvent;
- focusin: FormInputEvent;
- focusout: FormInputEvent;
- keydown: FormInputEvent;
- keypress: FormInputEvent;
- keyup: FormInputEvent;
- mouseover: FormInputEvent;
- mouseenter: FormInputEvent;
- mouseleave: FormInputEvent;
- mousemove: FormInputEvent;
- paste: FormInputEvent;
- input: FormInputEvent;
- wheel: FormInputEvent;
-};
-
-export {
- Root,
- //
- Root as Input,
-};
diff --git a/ui/src/lib/components/ui/input/input.svelte b/ui/src/lib/components/ui/input/input.svelte
deleted file mode 100644
index 4d585016d..000000000
--- a/ui/src/lib/components/ui/input/input.svelte
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
diff --git a/ui/src/lib/components/ui/label/label.svelte b/ui/src/lib/components/ui/label/label.svelte
index 0ae7acc13..247d23cc7 100644
--- a/ui/src/lib/components/ui/label/label.svelte
+++ b/ui/src/lib/components/ui/label/label.svelte
@@ -2,18 +2,18 @@
import { Label as LabelPrimitive } from "bits-ui";
import { cn } from "$lib/utils.js";
- type $$Props = LabelPrimitive.Props;
-
- let className: $$Props["class"] = undefined;
- export { className as class };
+ let {
+ ref = $bindable(null),
+ class: className,
+ ...restProps
+ }: LabelPrimitive.RootProps = $props();
-
-
+ {...restProps}
+/>
diff --git a/ui/src/lib/components/ui/radio-group/index.ts b/ui/src/lib/components/ui/radio-group/index.ts
index feefa7937..90b33fe5b 100644
--- a/ui/src/lib/components/ui/radio-group/index.ts
+++ b/ui/src/lib/components/ui/radio-group/index.ts
@@ -1,15 +1,10 @@
-import { RadioGroup as RadioGroupPrimitive } from "bits-ui";
-
import Root from "./radio-group.svelte";
import Item from "./radio-group-item.svelte";
-const Input = RadioGroupPrimitive.Input;
export {
Root,
- Input,
Item,
//
Root as RadioGroup,
- Input as RadioGroupInput,
Item as RadioGroupItem,
};
diff --git a/ui/src/lib/components/ui/radio-group/radio-group-item.svelte b/ui/src/lib/components/ui/radio-group/radio-group-item.svelte
index a59cdd6aa..2cb2f2a2f 100644
--- a/ui/src/lib/components/ui/radio-group/radio-group-item.svelte
+++ b/ui/src/lib/components/ui/radio-group/radio-group-item.svelte
@@ -1,30 +1,30 @@
-
-
-
-
-
+ {#snippet children({ checked })}
+
+ {#if checked}
+
+ {/if}
+
+ {/snippet}
diff --git a/ui/src/lib/components/ui/radio-group/radio-group.svelte b/ui/src/lib/components/ui/radio-group/radio-group.svelte
index 99bbfe2a1..47172bdbd 100644
--- a/ui/src/lib/components/ui/radio-group/radio-group.svelte
+++ b/ui/src/lib/components/ui/radio-group/radio-group.svelte
@@ -1,14 +1,15 @@
-
-
-
+
diff --git a/ui/src/lib/components/ui/select/index.ts b/ui/src/lib/components/ui/select/index.ts
deleted file mode 100644
index 5a9dd8784..000000000
--- a/ui/src/lib/components/ui/select/index.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { Select as SelectPrimitive } from 'bits-ui';
-
-import Label from './select-label.svelte';
-import Item from './select-item.svelte';
-import Content from './select-content.svelte';
-import Trigger from './select-trigger.svelte';
-import Separator from './select-separator.svelte';
-
-const Root = SelectPrimitive.Root;
-const Group = SelectPrimitive.Group;
-const Input = SelectPrimitive.Input;
-const Value = SelectPrimitive.Value;
-
-export {
- Root,
- Item,
- Group,
- Input,
- Label,
- Value,
- Content,
- Trigger,
- Separator,
- //
- Root as Select,
- Item as SelectItem,
- Group as SelectGroup,
- Input as SelectInput,
- Label as SelectLabel,
- Value as SelectValue,
- Content as SelectContent,
- Trigger as SelectTrigger,
- Separator as SelectSeparator
-};
diff --git a/ui/src/lib/components/ui/select/select-content.svelte b/ui/src/lib/components/ui/select/select-content.svelte
deleted file mode 100644
index 67a40c213..000000000
--- a/ui/src/lib/components/ui/select/select-content.svelte
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
diff --git a/ui/src/lib/components/ui/select/select-item.svelte b/ui/src/lib/components/ui/select/select-item.svelte
deleted file mode 100644
index b589dd1ea..000000000
--- a/ui/src/lib/components/ui/select/select-item.svelte
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
-
- {label || value}
-
-
diff --git a/ui/src/lib/components/ui/select/select-label.svelte b/ui/src/lib/components/ui/select/select-label.svelte
deleted file mode 100644
index 3c356073b..000000000
--- a/ui/src/lib/components/ui/select/select-label.svelte
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
diff --git a/ui/src/lib/components/ui/select/select-separator.svelte b/ui/src/lib/components/ui/select/select-separator.svelte
deleted file mode 100644
index 64d1886ff..000000000
--- a/ui/src/lib/components/ui/select/select-separator.svelte
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
diff --git a/ui/src/lib/components/ui/select/select-trigger.svelte b/ui/src/lib/components/ui/select/select-trigger.svelte
deleted file mode 100644
index 9fad634bf..000000000
--- a/ui/src/lib/components/ui/select/select-trigger.svelte
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-span]:line-clamp-1',
- className
- )}
- {...$$restProps}
->
-
-
-
-
-
diff --git a/ui/src/lib/components/ui/separator/separator.svelte b/ui/src/lib/components/ui/separator/separator.svelte
index be3843aba..839494d8b 100644
--- a/ui/src/lib/components/ui/separator/separator.svelte
+++ b/ui/src/lib/components/ui/separator/separator.svelte
@@ -2,21 +2,21 @@
import { Separator as SeparatorPrimitive } from "bits-ui";
import { cn } from "$lib/utils.js";
- type $$Props = SeparatorPrimitive.Props;
-
- let className: $$Props["class"] = undefined;
- export let orientation: $$Props["orientation"] = "horizontal";
- export let decorative: $$Props["decorative"] = undefined;
- export { className as class };
+ let {
+ ref = $bindable(null),
+ class: className,
+ orientation = "horizontal",
+ ...restProps
+ }: SeparatorPrimitive.RootProps = $props();
diff --git a/ui/src/lib/components/ui/table/table-body.svelte b/ui/src/lib/components/ui/table/table-body.svelte
index f2109d676..6c20c017a 100644
--- a/ui/src/lib/components/ui/table/table-body.svelte
+++ b/ui/src/lib/components/ui/table/table-body.svelte
@@ -1,13 +1,16 @@
-
-
+
+ {@render children?.()}
diff --git a/ui/src/lib/components/ui/table/table-caption.svelte b/ui/src/lib/components/ui/table/table-caption.svelte
index c22f1d67d..2b0cba564 100644
--- a/ui/src/lib/components/ui/table/table-caption.svelte
+++ b/ui/src/lib/components/ui/table/table-caption.svelte
@@ -1,13 +1,16 @@
-
-
+
+ {@render children?.()}
diff --git a/ui/src/lib/components/ui/table/table-cell.svelte b/ui/src/lib/components/ui/table/table-cell.svelte
index 4df632602..d8598560d 100644
--- a/ui/src/lib/components/ui/table/table-cell.svelte
+++ b/ui/src/lib/components/ui/table/table-cell.svelte
@@ -1,21 +1,23 @@
[role=checkbox]]:translate-y-[2px]",
className
)}
- {...$$restProps}
- on:click
- on:keydown
+ {...restProps}
>
-
+ {@render children?.()}
|
diff --git a/ui/src/lib/components/ui/table/table-footer.svelte b/ui/src/lib/components/ui/table/table-footer.svelte
index 3369ed8ed..0267c47e0 100644
--- a/ui/src/lib/components/ui/table/table-footer.svelte
+++ b/ui/src/lib/components/ui/table/table-footer.svelte
@@ -1,13 +1,16 @@
-
-
+
+ {@render children?.()}
diff --git a/ui/src/lib/components/ui/table/table-head.svelte b/ui/src/lib/components/ui/table/table-head.svelte
index aa26fdd15..45b2896d1 100644
--- a/ui/src/lib/components/ui/table/table-head.svelte
+++ b/ui/src/lib/components/ui/table/table-head.svelte
@@ -1,19 +1,23 @@
[role=checkbox]]:translate-y-[2px]",
+ "text-muted-foreground h-10 px-2 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
className
)}
- {...$$restProps}
+ {...restProps}
>
-
+ {@render children?.()}
|
diff --git a/ui/src/lib/components/ui/table/table-header.svelte b/ui/src/lib/components/ui/table/table-header.svelte
index a3e59eed8..684a57b16 100644
--- a/ui/src/lib/components/ui/table/table-header.svelte
+++ b/ui/src/lib/components/ui/table/table-header.svelte
@@ -1,14 +1,16 @@
-
-
-
+
+ {@render children?.()}
diff --git a/ui/src/lib/components/ui/table/table-row.svelte b/ui/src/lib/components/ui/table/table-row.svelte
index 33478481f..9e693bc1e 100644
--- a/ui/src/lib/components/ui/table/table-row.svelte
+++ b/ui/src/lib/components/ui/table/table-row.svelte
@@ -1,23 +1,23 @@
-
+ {@render children?.()}
diff --git a/ui/src/lib/components/ui/table/table.svelte b/ui/src/lib/components/ui/table/table.svelte
index 788d4ee33..e3a95b632 100644
--- a/ui/src/lib/components/ui/table/table.svelte
+++ b/ui/src/lib/components/ui/table/table.svelte
@@ -1,15 +1,18 @@
-
-
+
diff --git a/ui/src/lib/components/ui/toggle-group/index.ts b/ui/src/lib/components/ui/toggle-group/index.ts
deleted file mode 100644
index 62a451158..000000000
--- a/ui/src/lib/components/ui/toggle-group/index.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import type { VariantProps } from 'tailwind-variants';
-import { getContext, setContext } from 'svelte';
-import Root from './toggle-group.svelte';
-import Item from './toggle-group-item.svelte';
-import type { toggleVariants } from '$lib/components/ui/toggle/index.js';
-
-export type ToggleVariants = VariantProps;
-
-export function setToggleGroupCtx(props: ToggleVariants) {
- setContext('toggleGroup', props);
-}
-
-export function getToggleGroupCtx() {
- return getContext('toggleGroup');
-}
-
-export {
- Root,
- Item,
- //
- Root as ToggleGroup,
- Item as ToggleGroupItem
-};
diff --git a/ui/src/lib/components/ui/toggle-group/toggle-group-item.svelte b/ui/src/lib/components/ui/toggle-group/toggle-group-item.svelte
deleted file mode 100644
index d86212a6a..000000000
--- a/ui/src/lib/components/ui/toggle-group/toggle-group-item.svelte
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
diff --git a/ui/src/lib/components/ui/toggle-group/toggle-group.svelte b/ui/src/lib/components/ui/toggle-group/toggle-group.svelte
deleted file mode 100644
index 178bec13c..000000000
--- a/ui/src/lib/components/ui/toggle-group/toggle-group.svelte
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
diff --git a/ui/src/lib/components/ui/toggle/index.ts b/ui/src/lib/components/ui/toggle/index.ts
index 5a724f87f..8cb2936fc 100644
--- a/ui/src/lib/components/ui/toggle/index.ts
+++ b/ui/src/lib/components/ui/toggle/index.ts
@@ -1,31 +1,13 @@
-import { type VariantProps, tv } from 'tailwind-variants';
-import Root from './toggle.svelte';
-
-export const toggleVariants = tv({
- base: 'inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground',
- variants: {
- variant: {
- default: 'bg-transparent',
- outline:
- 'border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground'
- },
- size: {
- default: 'h-9 px-3',
- sm: 'h-8 px-2',
- lg: 'h-10 px-3'
- }
- },
- defaultVariants: {
- variant: 'default',
- size: 'default'
- }
-});
-
-export type Variant = VariantProps['variant'];
-export type Size = VariantProps['size'];
+import Root from "./toggle.svelte";
+export {
+ toggleVariants,
+ type ToggleSize,
+ type ToggleVariant,
+ type ToggleVariants,
+} from "./toggle.svelte";
export {
Root,
//
- Root as Toggle
+ Root as Toggle,
};
diff --git a/ui/src/lib/components/ui/toggle/toggle.svelte b/ui/src/lib/components/ui/toggle/toggle.svelte
index 6aa6afa71..9c76a8600 100644
--- a/ui/src/lib/components/ui/toggle/toggle.svelte
+++ b/ui/src/lib/components/ui/toggle/toggle.svelte
@@ -1,27 +1,51 @@
-
+
+
-
-
+ {...restProps}
+/>
diff --git a/ui/src/lib/utils.ts b/ui/src/lib/utils.ts
index eba19d86a..256f86ff7 100644
--- a/ui/src/lib/utils.ts
+++ b/ui/src/lib/utils.ts
@@ -1,56 +1,6 @@
import { type ClassValue, clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
-import { cubicOut } from 'svelte/easing';
-import type { TransitionConfig } from 'svelte/transition';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
-
-type FlyAndScaleParams = {
- y?: number;
- x?: number;
- start?: number;
- duration?: number;
-};
-
-export const flyAndScale = (
- node: Element,
- params: FlyAndScaleParams = { y: -8, x: 0, start: 0.95, duration: 150 }
-): TransitionConfig => {
- const style = getComputedStyle(node);
- const transform = style.transform === 'none' ? '' : style.transform;
-
- const scaleConversion = (valueA: number, scaleA: [number, number], scaleB: [number, number]) => {
- const [minA, maxA] = scaleA;
- const [minB, maxB] = scaleB;
-
- const percentage = (valueA - minA) / (maxA - minA);
- const valueB = percentage * (maxB - minB) + minB;
-
- return valueB;
- };
-
- const styleToString = (style: Record): string => {
- return Object.keys(style).reduce((str, key) => {
- if (style[key] === undefined) return str;
- return str + `${key}:${style[key]};`;
- }, '');
- };
-
- return {
- duration: params.duration ?? 200,
- delay: 0,
- css: (t) => {
- const y = scaleConversion(t, [0, 1], [params.y ?? 5, 0]);
- const x = scaleConversion(t, [0, 1], [params.x ?? 0, 0]);
- const scale = scaleConversion(t, [0, 1], [params.start ?? 0.95, 1]);
-
- return styleToString({
- transform: `${transform} translate3d(${x}px, ${y}px, 0) scale(${scale})`,
- opacity: t
- });
- },
- easing: cubicOut
- };
-};
diff --git a/ui/src/routes/+page.svelte b/ui/src/routes/+page.svelte
index f4b3ea36b..8f0a35e90 100644
--- a/ui/src/routes/+page.svelte
+++ b/ui/src/routes/+page.svelte
@@ -177,7 +177,7 @@
{#snippet contextMenu(e: maplibregl.MapMouseEvent, close: CloseFn)}