diff --git a/bun.lockb b/bun.lockb
index 286acb2..ac4a2ac 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/package.json b/package.json
index 2f881c0..33c31d9 100644
--- a/package.json
+++ b/package.json
@@ -1,49 +1,49 @@
{
- "name": "link-shortener-svelte",
- "version": "0.0.1",
- "private": true,
- "scripts": {
- "dev": "vite dev",
- "build": "vite build",
- "preview": "vite preview",
- "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
- "lint": "prettier --plugin-search-dir . --check .",
- "format": "prettier --write ."
- },
- "devDependencies": {
- "@sveltejs/adapter-node": "^1.3.1",
- "@sveltejs/kit": "^1.20.4",
- "autoprefixer": "^10.4.14",
- "bun-types": "^1.0.11",
- "drizzle-kit": "^0.20.1",
- "postcss": "^8.4.24",
- "postcss-load-config": "^4.0.1",
- "prettier": "^3.1.0",
- "prettier-plugin-svelte": "^3.1.0",
- "prettier-plugin-tailwindcss": "^0.5.7",
- "svelte": "^4.0.5",
- "svelte-adapter-bun": "^0.5.1",
- "svelte-check": "^3.4.3",
- "tailwindcss": "^3.3.2",
- "tslib": "^2.4.1",
- "typescript": "^5.0.0",
- "vite": "^4.4.2"
- },
- "type": "module",
- "dependencies": {
- "argon2": "^0.31.2",
- "bits-ui": "^0.9.8",
- "clsx": "^2.0.0",
- "drizzle-orm": "^0.29.0",
- "formsnap": "^0.4.1",
- "lucide-svelte": "^0.292.0",
- "mode-watcher": "^0.0.7",
- "nanoid": "^5.0.3",
- "postgres": "^3.4.3",
- "sveltekit-superforms": "^1.10.1",
- "tailwind-merge": "^2.0.0",
- "tailwind-variants": "^0.1.18",
- "zod": "^3.22.4"
- }
+ "name": "link-shortener-svelte",
+ "version": "0.0.1",
+ "private": true,
+ "scripts": {
+ "dev": "vite dev",
+ "build": "vite build",
+ "preview": "vite preview",
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
+ "lint": "prettier --plugin-search-dir . --check .",
+ "format": "prettier --write ."
+ },
+ "devDependencies": {
+ "@sveltejs/adapter-node": "^1.3.1",
+ "@sveltejs/kit": "^1.20.4",
+ "autoprefixer": "^10.4.14",
+ "bun-types": "^1.0.11",
+ "drizzle-kit": "^0.20.1",
+ "postcss": "^8.4.24",
+ "postcss-load-config": "^4.0.1",
+ "prettier": "^3.1.0",
+ "prettier-plugin-svelte": "^3.1.0",
+ "prettier-plugin-tailwindcss": "^0.5.7",
+ "svelte": "^4.0.5",
+ "svelte-adapter-bun": "^0.5.1",
+ "svelte-check": "^3.4.3",
+ "tailwindcss": "^3.3.2",
+ "tslib": "^2.4.1",
+ "typescript": "^5.0.0",
+ "vite": "^4.4.2"
+ },
+ "type": "module",
+ "dependencies": {
+ "argon2": "^0.31.2",
+ "bits-ui": "^0.9.8",
+ "clsx": "^2.0.0",
+ "drizzle-orm": "^0.29.0",
+ "formsnap": "^0.4.1",
+ "lucide-svelte": "^0.292.0",
+ "mode-watcher": "^0.0.7",
+ "nanoid": "^5.0.3",
+ "postgres": "^3.4.3",
+ "sveltekit-superforms": "^1.10.1",
+ "tailwind-merge": "^2.0.0",
+ "tailwind-variants": "^0.1.18",
+ "zod": "^3.22.4"
+ }
}
diff --git a/src/lib/components/UserIcon.svelte b/src/lib/components/UserIcon.svelte
new file mode 100644
index 0000000..af1e72e
--- /dev/null
+++ b/src/lib/components/UserIcon.svelte
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
+
+ {email}
+
+ goto('/profile')}>
+ Profile
+
+
+ (dialogOpen = true)}
+ class="text-destructive data-[highlighted]:bg-destructive">
+ Log Out
+
+
+
+
+
+
+
+ Are you absolutely sure?
+
+ You are about to log out of this account.
+
+
+
+ Cancel
+
+
+
+
diff --git a/src/lib/components/sidebar.svelte b/src/lib/components/sidebar.svelte
index 8f31b93..79b3d83 100644
--- a/src/lib/components/sidebar.svelte
+++ b/src/lib/components/sidebar.svelte
@@ -1,31 +1,21 @@
+ class={cn(
+ 'flex h-full min-w-[350px] flex-col justify-between border-r p-4',
+ className,
+ )}>
@@ -49,55 +39,7 @@
-
-
-
-
-
-
-
-
-
- {email}
-
- goto('/profile')}>
- Profile
-
-
- (dialogOpen = true)}
- class="text-destructive data-[highlighted]:bg-destructive">
- Log Out
-
-
-
-
-
-
-
-
- Are you absolutely sure?
-
- You are about to log out of this account.
-
-
-
- Cancel
-
-
-
-
-
+
diff --git a/src/lib/components/ui/sheet/index.ts b/src/lib/components/ui/sheet/index.ts
new file mode 100644
index 0000000..a156219
--- /dev/null
+++ b/src/lib/components/ui/sheet/index.ts
@@ -0,0 +1,106 @@
+import { Dialog as SheetPrimitive } from "bits-ui";
+import { tv, type VariantProps } from "tailwind-variants";
+
+import Portal from "./sheet-portal.svelte";
+import Overlay from "./sheet-overlay.svelte";
+import Content from "./sheet-content.svelte";
+import Header from "./sheet-header.svelte";
+import Footer from "./sheet-footer.svelte";
+import Title from "./sheet-title.svelte";
+import Description from "./sheet-description.svelte";
+
+const Root = SheetPrimitive.Root;
+const Close = SheetPrimitive.Close;
+const Trigger = SheetPrimitive.Trigger;
+
+export {
+ Root,
+ Close,
+ Trigger,
+ Portal,
+ Overlay,
+ Content,
+ Header,
+ Footer,
+ Title,
+ Description,
+ //
+ Root as Sheet,
+ Close as SheetClose,
+ Trigger as SheetTrigger,
+ Portal as SheetPortal,
+ Overlay as SheetOverlay,
+ Content as SheetContent,
+ Header as SheetHeader,
+ Footer as SheetFooter,
+ Title as SheetTitle,
+ Description as SheetDescription
+};
+
+export const sheetVariants = tv({
+ base: "fixed z-50 gap-4 bg-background p-6 shadow-lg",
+ variants: {
+ side: {
+ top: "inset-x-0 top-0 border-b",
+ bottom: "inset-x-0 bottom-0 border-t",
+ left: "inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
+ right: "inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"
+ }
+ },
+ defaultVariants: {
+ side: "right"
+ }
+});
+
+export const sheetTransitions = {
+ top: {
+ in: {
+ y: "-100%",
+ duration: 500,
+ opacity: 1
+ },
+ out: {
+ y: "-100%",
+ duration: 300,
+ opacity: 1
+ }
+ },
+ bottom: {
+ in: {
+ y: "100%",
+ duration: 500,
+ opacity: 1
+ },
+ out: {
+ y: "100%",
+ duration: 300,
+ opacity: 1
+ }
+ },
+ left: {
+ in: {
+ x: "-100%",
+ duration: 500,
+ opacity: 1
+ },
+ out: {
+ x: "-100%",
+ duration: 300,
+ opacity: 1
+ }
+ },
+ right: {
+ in: {
+ x: "100%",
+ duration: 500,
+ opacity: 1
+ },
+ out: {
+ x: "100%",
+ duration: 300,
+ opacity: 1
+ }
+ }
+};
+
+export type Side = VariantProps
["side"];
diff --git a/src/lib/components/ui/sheet/sheet-content.svelte b/src/lib/components/ui/sheet/sheet-content.svelte
new file mode 100644
index 0000000..4e51692
--- /dev/null
+++ b/src/lib/components/ui/sheet/sheet-content.svelte
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+ Close
+
+
+
diff --git a/src/lib/components/ui/sheet/sheet-description.svelte b/src/lib/components/ui/sheet/sheet-description.svelte
new file mode 100644
index 0000000..1e1a23a
--- /dev/null
+++ b/src/lib/components/ui/sheet/sheet-description.svelte
@@ -0,0 +1,16 @@
+
+
+
+
+
diff --git a/src/lib/components/ui/sheet/sheet-footer.svelte b/src/lib/components/ui/sheet/sheet-footer.svelte
new file mode 100644
index 0000000..36c0cca
--- /dev/null
+++ b/src/lib/components/ui/sheet/sheet-footer.svelte
@@ -0,0 +1,19 @@
+
+
+
+
+
diff --git a/src/lib/components/ui/sheet/sheet-header.svelte b/src/lib/components/ui/sheet/sheet-header.svelte
new file mode 100644
index 0000000..b2d63db
--- /dev/null
+++ b/src/lib/components/ui/sheet/sheet-header.svelte
@@ -0,0 +1,16 @@
+
+
+
+
+
diff --git a/src/lib/components/ui/sheet/sheet-overlay.svelte b/src/lib/components/ui/sheet/sheet-overlay.svelte
new file mode 100644
index 0000000..054307a
--- /dev/null
+++ b/src/lib/components/ui/sheet/sheet-overlay.svelte
@@ -0,0 +1,24 @@
+
+
+
diff --git a/src/lib/components/ui/sheet/sheet-portal.svelte b/src/lib/components/ui/sheet/sheet-portal.svelte
new file mode 100644
index 0000000..df9e1b9
--- /dev/null
+++ b/src/lib/components/ui/sheet/sheet-portal.svelte
@@ -0,0 +1,13 @@
+
+
+
+
+
diff --git a/src/lib/components/ui/sheet/sheet-title.svelte b/src/lib/components/ui/sheet/sheet-title.svelte
new file mode 100644
index 0000000..b50ea5f
--- /dev/null
+++ b/src/lib/components/ui/sheet/sheet-title.svelte
@@ -0,0 +1,16 @@
+
+
+
+
+
diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte
index 67254cd..8b8820f 100644
--- a/src/routes/(app)/+layout.svelte
+++ b/src/routes/(app)/+layout.svelte
@@ -1,13 +1,61 @@
-
-
-
+
+
+
+
+
+
+
+
+
+ Shortener
+
+
+
+
+
+
+
+
+
+
+
+