diff --git a/web/.prettierrc b/web/.prettierrc index 7ff36ad..c8756c1 100644 --- a/web/.prettierrc +++ b/web/.prettierrc @@ -1,20 +1,22 @@ { "useTabs": false, + "semi": true, "singleQuote": true, "trailingComma": "all", "printWidth": 100, - "plugins": [ - "prettier-plugin-svelte" - ], - "pluginSearchDirs": [ - "." - ], + "jsxBracketSameLine": true, "overrides": [ { "files": "*.svelte", "options": { - "parser": "svelte" + "parser": "svelte", + "plugins": [ + "prettier-plugin-svelte" + ] } } + ], + "pluginSearchDirs": [ + "." ] } diff --git a/web/bun.lockb b/web/bun.lockb index 56eee72..cbb3c04 100644 Binary files a/web/bun.lockb and b/web/bun.lockb differ diff --git a/web/components.json b/web/components.json index 83e6d22..0516b9c 100644 --- a/web/components.json +++ b/web/components.json @@ -3,7 +3,7 @@ "style": "default", "tailwind": { "config": "tailwind.config.js", - "css": "src/app.postcss", + "css": "src/app.css", "baseColor": "gray" }, "aliases": { diff --git a/web/package.json b/web/package.json index 2d5de07..69a651e 100644 --- a/web/package.json +++ b/web/package.json @@ -24,16 +24,19 @@ "prettier-plugin-svelte": "^2.10.1", "svelte": "^4.0.5", "svelte-check": "^3.4.3", + "sveltekit-superforms": "^1.9.0", "tailwindcss": "^3.3.2", "tslib": "^2.4.1", "typescript": "^5.0.0", "vite": "^4.4.2", - "vitest": "^0.34.0" + "vitest": "^0.34.0", + "zod": "^3.22.4" }, "type": "module", "dependencies": { "bits-ui": "^0.9.0", "clsx": "^2.0.0", + "formsnap": "^0.4.1", "jsonwebtoken": "^9.0.2", "lucide-svelte": "^0.292.0", "tailwind-merge": "^2.0.0", diff --git a/web/src/lib/components/ui/button/button.svelte b/web/src/lib/components/ui/button/button.svelte index c08852d..f5def68 100644 --- a/web/src/lib/components/ui/button/button.svelte +++ b/web/src/lib/components/ui/button/button.svelte @@ -1,6 +1,7 @@ + + + + {#if isChecked} + + {:else if isIndeterminate} + + {/if} + + diff --git a/web/src/lib/components/ui/checkbox/index.ts b/web/src/lib/components/ui/checkbox/index.ts new file mode 100644 index 0000000..ba3b7d7 --- /dev/null +++ b/web/src/lib/components/ui/checkbox/index.ts @@ -0,0 +1,6 @@ +import Root from './checkbox.svelte'; +export { + Root, + // + Root as Checkbox, +}; diff --git a/web/src/lib/components/ui/form/form-button.svelte b/web/src/lib/components/ui/form/form-button.svelte new file mode 100644 index 0000000..f72c768 --- /dev/null +++ b/web/src/lib/components/ui/form/form-button.svelte @@ -0,0 +1,10 @@ + + + + + diff --git a/web/src/lib/components/ui/form/form-checkbox.svelte b/web/src/lib/components/ui/form/form-checkbox.svelte new file mode 100644 index 0000000..9d57bf1 --- /dev/null +++ b/web/src/lib/components/ui/form/form-checkbox.svelte @@ -0,0 +1,27 @@ + + + { + onCheckedChange?.(v); + setValue(v); + }} + {...$$restProps} + on:click + on:keydown +/> + diff --git a/web/src/lib/components/ui/form/form-description.svelte b/web/src/lib/components/ui/form/form-description.svelte new file mode 100644 index 0000000..792d80a --- /dev/null +++ b/web/src/lib/components/ui/form/form-description.svelte @@ -0,0 +1,16 @@ + + + + + diff --git a/web/src/lib/components/ui/form/form-input.svelte b/web/src/lib/components/ui/form/form-input.svelte new file mode 100644 index 0000000..b7edb33 --- /dev/null +++ b/web/src/lib/components/ui/form/form-input.svelte @@ -0,0 +1,28 @@ + + + diff --git a/web/src/lib/components/ui/form/form-item.svelte b/web/src/lib/components/ui/form/form-item.svelte new file mode 100644 index 0000000..9605359 --- /dev/null +++ b/web/src/lib/components/ui/form/form-item.svelte @@ -0,0 +1,12 @@ + + +
+ +
diff --git a/web/src/lib/components/ui/form/form-label.svelte b/web/src/lib/components/ui/form/form-label.svelte new file mode 100644 index 0000000..55b281d --- /dev/null +++ b/web/src/lib/components/ui/form/form-label.svelte @@ -0,0 +1,21 @@ + + + diff --git a/web/src/lib/components/ui/form/form-native-select.svelte b/web/src/lib/components/ui/form/form-native-select.svelte new file mode 100644 index 0000000..4115ebe --- /dev/null +++ b/web/src/lib/components/ui/form/form-native-select.svelte @@ -0,0 +1,24 @@ + + + + + + diff --git a/web/src/lib/components/ui/form/form-radio-group.svelte b/web/src/lib/components/ui/form/form-radio-group.svelte new file mode 100644 index 0000000..bc69c50 --- /dev/null +++ b/web/src/lib/components/ui/form/form-radio-group.svelte @@ -0,0 +1,22 @@ + + + { + onValueChange?.(v); + setValue(v); + }} + {...$$restProps} +> + + + diff --git a/web/src/lib/components/ui/form/form-select-trigger.svelte b/web/src/lib/components/ui/form/form-select-trigger.svelte new file mode 100644 index 0000000..b4b1d9d --- /dev/null +++ b/web/src/lib/components/ui/form/form-select-trigger.svelte @@ -0,0 +1,17 @@ + + + + + + diff --git a/web/src/lib/components/ui/form/form-select.svelte b/web/src/lib/components/ui/form/form-select.svelte new file mode 100644 index 0000000..dc5aef5 --- /dev/null +++ b/web/src/lib/components/ui/form/form-select.svelte @@ -0,0 +1,20 @@ + + + { + onSelectedChange?.(v); + setValue(v ? v.value : undefined); + }} + {...$$restProps} +> + + + diff --git a/web/src/lib/components/ui/form/form-switch.svelte b/web/src/lib/components/ui/form/form-switch.svelte new file mode 100644 index 0000000..958ac41 --- /dev/null +++ b/web/src/lib/components/ui/form/form-switch.svelte @@ -0,0 +1,25 @@ + + + { + onCheckedChange?.(v); + setValue(v); + }} + {...$$restProps} + on:click + on:keydown +/> + diff --git a/web/src/lib/components/ui/form/form-textarea.svelte b/web/src/lib/components/ui/form/form-textarea.svelte new file mode 100644 index 0000000..4b4a481 --- /dev/null +++ b/web/src/lib/components/ui/form/form-textarea.svelte @@ -0,0 +1,32 @@ + + +