diff --git a/apps/web/src/lib/components/ui/Button.svelte b/apps/web/src/lib/components/ui/Button.svelte new file mode 100644 index 0000000..e7ab5d8 --- /dev/null +++ b/apps/web/src/lib/components/ui/Button.svelte @@ -0,0 +1,128 @@ + + + diff --git a/apps/web/src/lib/components/ui/Input.svelte b/apps/web/src/lib/components/ui/Input.svelte new file mode 100644 index 0000000..f170a9d --- /dev/null +++ b/apps/web/src/lib/components/ui/Input.svelte @@ -0,0 +1,174 @@ + + + +
+ + {label} + + {@render right?.()} +
+ +
+ {#if left} +
+
+ {@render left()} +
+
+ {/if} + + + + {#if right} +
+
+ {@render right()} +
+
+ {/if} +
+ + {#if helperText && !error} + + {helperText} + + {/if} + + {#if error} + + {error} + + {/if} +
diff --git a/apps/web/src/lib/components/ui/Select.svelte b/apps/web/src/lib/components/ui/Select.svelte new file mode 100644 index 0000000..d94f806 --- /dev/null +++ b/apps/web/src/lib/components/ui/Select.svelte @@ -0,0 +1,287 @@ + + + +
+ + {label} + + {@render labelRight?.()} +
+ + + + +
+ {#if triggerLeft} + + {@render triggerLeft()} + + {/if} + +
+ +
+ {#if canClear} + + + + {/if} + + + +
+
+
+ + + + +
+ {#if hasGroups} + {#each groups as [groupLabel, groupItems] (groupLabel)} + + + {groupLabel} + + {#each groupItems as item (item.value)} + + {item.label} + + + + + {/each} + + {/each} + {:else} + {#each items as item (item.value)} + + {item.label} + + + + + {/each} + {/if} +
+
+
+
+ + +
+ + {#if helperText && !error} + + {helperText} + + {/if} + + {#if error} + + {error} + + {/if} +