From f1b8ab29e488980002fe444e82a012052b7e23a6 Mon Sep 17 00:00:00 2001 From: Chukwuma Nwaugha Date: Wed, 20 Nov 2024 15:32:59 +0000 Subject: [PATCH] add shadcn input component --- app/src/lib/components/ui/input/index.ts | 29 ++++++++++++++ app/src/lib/components/ui/input/input.svelte | 42 ++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 app/src/lib/components/ui/input/index.ts create mode 100644 app/src/lib/components/ui/input/input.svelte diff --git a/app/src/lib/components/ui/input/index.ts b/app/src/lib/components/ui/input/index.ts new file mode 100644 index 0000000..75e3bc2 --- /dev/null +++ b/app/src/lib/components/ui/input/index.ts @@ -0,0 +1,29 @@ +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/app/src/lib/components/ui/input/input.svelte b/app/src/lib/components/ui/input/input.svelte new file mode 100644 index 0000000..446230b --- /dev/null +++ b/app/src/lib/components/ui/input/input.svelte @@ -0,0 +1,42 @@ + + +