blob: 4cf16edadba46bab0c2a1fa7a5063518dc463bd5 [file] [log] [blame]
Skyler Grey7177bbd2023-06-01 03:26:31 +02001<script lang="ts">
2 import type { HTMLInputAttributes } from "svelte/elements";
3 import { cn } from "$lib/utils";
4
5 let className: string | undefined | null = undefined;
6
7 export let value: HTMLInputAttributes["value"] = undefined;
Skyler Grey51e9e632023-06-03 10:20:11 +02008 export let element: HTMLInputElement;
Skyler Grey7177bbd2023-06-01 03:26:31 +02009 export { className as class };
10</script>
11
12<input
13 class={cn(
14 "flex h-10 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
15 className
16 )}
Skyler Grey51e9e632023-06-03 10:20:11 +020017 bind:this={element}
Skyler Grey7177bbd2023-06-01 03:26:31 +020018 bind:value
19 on:blur
20 on:change
21 on:click
22 on:focus
23 on:keydown
24 on:keypress
25 on:keyup
26 on:mouseover
27 on:mouseenter
28 on:mouseleave
29 on:paste
30 on:input
31 {...$$restProps}
32/>