vault complete

This commit is contained in:
munimunigamer 2026-01-24 03:27:50 -06:00
parent 6e0940d368
commit d4e312ec8d
58 changed files with 4413 additions and 5140 deletions

View file

@ -8,15 +8,15 @@
const { isMobile } = getResponsiveModalContext();
</script>
{#if isMobile.current}
{#if isMobile.current}
<Drawer.Content
class={cn("max-h-[85vh] h-auto p-0 pb-[env(safe-area-inset-bottom)]", className)}
{...props}
>
{@render children?.()}
</Drawer.Content>
{:else}
{:else}
<Dialog.Content class={className} {...props}>
{@render children?.()}
</Dialog.Content>
{/if}
{/if}

View file

@ -9,11 +9,17 @@
</script>
{#if isMobile.current}
<Drawer.Footer class={cn("pt-2", className)} {...props}>
<Drawer.Footer class={cn("pt-2 border-t", className)} {...props}>
{@render children?.()}
</Drawer.Footer>
{:else}
<Dialog.Footer class={cn("p-4 border-t border-border shadow-[0_-1px_3px_rgba(0,0,0,0.05)] relative z-10 bg-background sm:rounded-b-lg", className)} {...props}>
<Dialog.Footer
class={cn(
"py-4 border-t border-border shadow-[0_-1px_3px_rgba(0,0,0,0.05)] relative z-10 bg-background sm:rounded-b-lg",
className,
)}
{...props}
>
{@render children?.()}
</Dialog.Footer>
{/if}

View file

@ -4,25 +4,39 @@
import { getResponsiveModalContext } from "./context";
import { cn } from "$lib/utils/cn";
import { X } from "lucide-svelte";
import { Button } from "$lib/components/ui/button";
let { children, class: className, ...props } = $props();
let { title, class: className, children, ...props } = $props();
const { isMobile } = getResponsiveModalContext();
</script>
{#if isMobile.current}
<Drawer.Header class={cn("text-left", className)} {...props}>
{@render children?.()}
<Drawer.Header class={cn("text-center", className)} {...props}>
{#if title}
<h2 class="text-lg font-semibold">{title}</h2>
{:else}
{@render children?.()}
{/if}
</Drawer.Header>
{:else}
<div class={cn("flex items-center justify-between p-4 border-b border-border shadow-sm relative z-10 bg-background sm:rounded-t-lg", className)}>
<div
class={cn(
"flex items-center justify-between py-4 border-b border-border shadow-sm relative z-10 bg-background sm:rounded-t-lg",
className,
)}
>
<Dialog.Header class="flex-1" {...props}>
{@render children?.()}
{#if title}
<h2 class="text-lg font-semibold">{title}</h2>
{:else}
{@render children?.()}
{/if}
</Dialog.Header>
<Dialog.Close
class="rounded-sm opacity-70 transition-opacity hover:opacity-100 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
>
<X class="size-5" />
<span class="sr-only">Close</span>
<Dialog.Close>
<Button variant="destructive" size="icon">
<X class="size-6!" />
<span class="sr-only">Close</span>
</Button>
</Dialog.Close>
</div>
{/if}

View file

@ -9,7 +9,7 @@
</script>
{#if isMobile.current}
<Drawer.Title class={cn("text-left", className)} {...props}>
<Drawer.Title class={cn("", className)} {...props}>
{@render children?.()}
</Drawer.Title>
{:else}