-
+
+ {@render children?.()}
diff --git a/src/lib/components/ui/dialog/dialog-overlay.svelte b/src/lib/components/ui/dialog/dialog-overlay.svelte
index 1d376e4..1fe9593 100644
--- a/src/lib/components/ui/dialog/dialog-overlay.svelte
+++ b/src/lib/components/ui/dialog/dialog-overlay.svelte
@@ -1,21 +1,22 @@
+ bind:ref
+ class={cn(
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",
+ className
+ )}
+ {...restProps}
+>
+ {@render children?.()}
+
diff --git a/src/lib/components/ui/dialog/dialog-portal.svelte b/src/lib/components/ui/dialog/dialog-portal.svelte
deleted file mode 100644
index eb5d0a5..0000000
--- a/src/lib/components/ui/dialog/dialog-portal.svelte
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
diff --git a/src/lib/components/ui/dialog/dialog-title.svelte b/src/lib/components/ui/dialog/dialog-title.svelte
index 06574f3..4346b52 100644
--- a/src/lib/components/ui/dialog/dialog-title.svelte
+++ b/src/lib/components/ui/dialog/dialog-title.svelte
@@ -2,15 +2,18 @@
import { Dialog as DialogPrimitive } from "bits-ui";
import { cn } from "$lib/utils.js";
- type $$Props = DialogPrimitive.TitleProps;
-
- let className: $$Props["class"] = undefined;
- export { className as class };
+ let {
+ ref = $bindable(null),
+ class: className,
+ children,
+ ...restProps
+ }: DialogPrimitive.TitleProps = $props();
-
+ {@render children?.()}
diff --git a/src/lib/components/ui/dialog/index.ts b/src/lib/components/ui/dialog/index.ts
index b17ba5e..3286ab7 100644
--- a/src/lib/components/ui/dialog/index.ts
+++ b/src/lib/components/ui/dialog/index.ts
@@ -1,7 +1,6 @@
import { Dialog as DialogPrimitive } from "bits-ui";
import Title from "./dialog-title.svelte";
-import Portal from "./dialog-portal.svelte";
import Footer from "./dialog-footer.svelte";
import Header from "./dialog-header.svelte";
import Overlay from "./dialog-overlay.svelte";
@@ -11,6 +10,7 @@ import Description from "./dialog-description.svelte";
const Root = DialogPrimitive.Root;
const Trigger = DialogPrimitive.Trigger;
const Close = DialogPrimitive.Close;
+const Portal = DialogPrimitive.Portal;
export {
Root,
diff --git a/src/lib/components/ui/input/index.ts b/src/lib/components/ui/input/index.ts
index 75e3bc2..f47b6d3 100644
--- a/src/lib/components/ui/input/index.ts
+++ b/src/lib/components/ui/input/index.ts
@@ -1,27 +1,5 @@
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,
//
diff --git a/src/lib/components/ui/input/input.svelte b/src/lib/components/ui/input/input.svelte
index cab1457..328634f 100644
--- a/src/lib/components/ui/input/input.svelte
+++ b/src/lib/components/ui/input/input.svelte
@@ -1,42 +1,22 @@
diff --git a/src/lib/components/ui/label/label.svelte b/src/lib/components/ui/label/label.svelte
index 2a7d479..35d0619 100644
--- a/src/lib/components/ui/label/label.svelte
+++ b/src/lib/components/ui/label/label.svelte
@@ -2,20 +2,21 @@
import { Label as LabelPrimitive } from "bits-ui";
import { cn } from "$lib/utils.js";
- type $$Props = LabelPrimitive.Props;
- type $$Events = LabelPrimitive.Events;
-
- let className: $$Props["class"] = undefined;
- export { className as class };
+ let {
+ ref = $bindable(null),
+ class: className,
+ children,
+ ...restProps
+ }: LabelPrimitive.RootProps = $props();
-
+ {@render children?.()}
diff --git a/src/lib/components/ui/table/table-body.svelte b/src/lib/components/ui/table/table-body.svelte
index f2109d6..6c20c01 100644
--- a/src/lib/components/ui/table/table-body.svelte
+++ b/src/lib/components/ui/table/table-body.svelte
@@ -1,13 +1,16 @@
-
-
+
+ {@render children?.()}
diff --git a/src/lib/components/ui/table/table-caption.svelte b/src/lib/components/ui/table/table-caption.svelte
index b838270..2b0cba5 100644
--- a/src/lib/components/ui/table/table-caption.svelte
+++ b/src/lib/components/ui/table/table-caption.svelte
@@ -1,13 +1,16 @@
-
-
+
+ {@render children?.()}
diff --git a/src/lib/components/ui/table/table-cell.svelte b/src/lib/components/ui/table/table-cell.svelte
index fcb04f6..0536552 100644
--- a/src/lib/components/ui/table/table-cell.svelte
+++ b/src/lib/components/ui/table/table-cell.svelte
@@ -1,18 +1,20 @@
-
+ {@render children?.()}
|
diff --git a/src/lib/components/ui/table/table-footer.svelte b/src/lib/components/ui/table/table-footer.svelte
index a2ba75d..0267c47 100644
--- a/src/lib/components/ui/table/table-footer.svelte
+++ b/src/lib/components/ui/table/table-footer.svelte
@@ -1,13 +1,16 @@
-
-
+
+ {@render children?.()}
diff --git a/src/lib/components/ui/table/table-head.svelte b/src/lib/components/ui/table/table-head.svelte
index 49ab7a9..5300ce6 100644
--- a/src/lib/components/ui/table/table-head.svelte
+++ b/src/lib/components/ui/table/table-head.svelte
@@ -1,19 +1,23 @@
-
+ {@render children?.()}
|
diff --git a/src/lib/components/ui/table/table-header.svelte b/src/lib/components/ui/table/table-header.svelte
index a3e59ee..684a57b 100644
--- a/src/lib/components/ui/table/table-header.svelte
+++ b/src/lib/components/ui/table/table-header.svelte
@@ -1,14 +1,16 @@
-
-
-
+
+ {@render children?.()}
diff --git a/src/lib/components/ui/table/table-row.svelte b/src/lib/components/ui/table/table-row.svelte
index 731c5d5..9e693bc 100644
--- a/src/lib/components/ui/table/table-row.svelte
+++ b/src/lib/components/ui/table/table-row.svelte
@@ -1,23 +1,23 @@
-
+ {@render children?.()}
diff --git a/src/lib/components/ui/table/table.svelte b/src/lib/components/ui/table/table.svelte
index 788d4ee..e3a95b6 100644
--- a/src/lib/components/ui/table/table.svelte
+++ b/src/lib/components/ui/table/table.svelte
@@ -1,15 +1,18 @@
-
-
+
diff --git a/src/lib/components/ui/tabs/index.ts b/src/lib/components/ui/tabs/index.ts
new file mode 100644
index 0000000..f1ab372
--- /dev/null
+++ b/src/lib/components/ui/tabs/index.ts
@@ -0,0 +1,18 @@
+import { Tabs as TabsPrimitive } from "bits-ui";
+import Content from "./tabs-content.svelte";
+import List from "./tabs-list.svelte";
+import Trigger from "./tabs-trigger.svelte";
+
+const Root = TabsPrimitive.Root;
+
+export {
+ Root,
+ Content,
+ List,
+ Trigger,
+ //
+ Root as Tabs,
+ Content as TabsContent,
+ List as TabsList,
+ Trigger as TabsTrigger,
+};
diff --git a/src/lib/components/ui/tabs/tabs-content.svelte b/src/lib/components/ui/tabs/tabs-content.svelte
new file mode 100644
index 0000000..a25fe81
--- /dev/null
+++ b/src/lib/components/ui/tabs/tabs-content.svelte
@@ -0,0 +1,22 @@
+
+
+
+ {@render children?.()}
+
diff --git a/src/lib/components/ui/tabs/tabs-list.svelte b/src/lib/components/ui/tabs/tabs-list.svelte
new file mode 100644
index 0000000..2381115
--- /dev/null
+++ b/src/lib/components/ui/tabs/tabs-list.svelte
@@ -0,0 +1,22 @@
+
+
+
+ {@render children?.()}
+
diff --git a/src/lib/components/ui/tabs/tabs-trigger.svelte b/src/lib/components/ui/tabs/tabs-trigger.svelte
new file mode 100644
index 0000000..d36f608
--- /dev/null
+++ b/src/lib/components/ui/tabs/tabs-trigger.svelte
@@ -0,0 +1,22 @@
+
+
+
+ {@render children?.()}
+
diff --git a/src/lib/utils.ts b/src/lib/utils.ts
index 8871245..ac680b3 100644
--- a/src/lib/utils.ts
+++ b/src/lib/utils.ts
@@ -1,62 +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
- };
-};
\ No newline at end of file
diff --git a/src/routes/clients/+page.svelte b/src/routes/clients/+page.svelte
index 20e6fef..853f68d 100644
--- a/src/routes/clients/+page.svelte
+++ b/src/routes/clients/+page.svelte
@@ -2,7 +2,7 @@
import * as Table from '$lib/components/ui/table';
import * as Dialog from '$lib/components/ui/dialog';
import { Badge } from '$lib/components/ui/badge';
- import { Button } from '$lib/components/ui/button';
+ import { Button, buttonVariants } from '$lib/components/ui/button';
import { Input } from '$lib/components/ui/input';
import { LucidePlus } from 'lucide-svelte';
import type { PageData } from './$types';
@@ -64,11 +64,9 @@
-
-
+
+
+ Add Client