diff --git a/components.json b/components.json
new file mode 100644
index 0000000..a0b3ccb
--- /dev/null
+++ b/components.json
@@ -0,0 +1,22 @@
+{
+ "$schema": "https://ui.shadcn.com/schema.json",
+ "style": "new-york",
+ "rsc": false,
+ "tsx": true,
+ "tailwind": {
+ "config": "tailwind.config.js",
+ "css": "src/index.css",
+ "baseColor": "neutral",
+ "cssVariables": true,
+ "prefix": ""
+ },
+ "iconLibrary": "lucide",
+ "aliases": {
+ "components": "./src/components",
+ "utils": "./src/lib/utils",
+ "ui": "./src/components/ui",
+ "lib": "./src/lib",
+ "hooks": "./src/hooks"
+ },
+ "registries": {}
+}
diff --git a/package.json b/package.json
index 45e4b2f..3f848fe 100644
--- a/package.json
+++ b/package.json
@@ -3,16 +3,34 @@
"version": "0.1.1",
"private": true,
"dependencies": {
+ "@hookform/resolvers": "^5.2.2",
+ "@radix-ui/react-label": "^2.1.8",
+ "@radix-ui/react-popover": "^1.1.15",
+ "@radix-ui/react-select": "^2.2.6",
+ "@radix-ui/react-separator": "^1.1.8",
+ "@radix-ui/react-slider": "^1.3.6",
+ "@radix-ui/react-slot": "^1.2.4",
+ "@radix-ui/react-switch": "^1.2.6",
+ "@radix-ui/react-tooltip": "^1.2.8",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.8.0",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^13.5.0",
+ "class-variance-authority": "^0.7.1",
+ "clsx": "^2.1.1",
+ "lucide-react": "^0.554.0",
"npx": "^10.2.2",
"react": "^19.1.1",
"react-dom": "^19.1.1",
+ "react-hook-form": "^7.66.1",
+ "react-is": "^19.2.0",
"react-scripts": "5.0.1",
"recharts": "^3.3.0",
- "web-vitals": "^2.1.4"
+ "tailwind-merge": "^3.4.0",
+ "tailwindcss-animate": "^1.0.7",
+ "tw-animate-css": "^1.4.0",
+ "web-vitals": "^2.1.4",
+ "zod": "^4.1.13"
},
"scripts": {
"start": "cross-env HOST=0.0.0.0 BROWSER=none CHOKIDAR_USEPOLLING=true FAST_REFRESH=false react-scripts start",
@@ -41,11 +59,15 @@
},
"devDependencies": {
"@hint/configuration-web-recommended": "^8.2.24",
- "autoprefixer": "^10.4.21",
+ "@types/node": "^24.10.1",
+ "@types/react": "^19.2.7",
+ "@types/react-dom": "^19.2.3",
+ "autoprefixer": "^10.4.22",
"cross-env": "^10.1.0",
"hint": "^7.1.13",
"postcss": "^8.5.6",
"puppeteer": "^24.27.0",
- "tailwindcss": "^3.4.18"
+ "tailwindcss": "^3.4.18",
+ "typescript": "^4.9.5"
}
}
diff --git a/src/App.test.js b/src/App.test.tsx
similarity index 89%
rename from src/App.test.js
rename to src/App.test.tsx
index 1f03afe..ece4ad8 100644
--- a/src/App.test.js
+++ b/src/App.test.tsx
@@ -1,8 +1,10 @@
import { render, screen } from '@testing-library/react';
import App from './App';
+// @ts-ignore
test('renders learn react link', () => {
render(
{t.appSubtitle}
+{t.appSubtitle}
- {t.suggestion}: {suggestion.dose}{t.mg} ({t.instead} {suggestion.originalDose}{t.mg}) {t.at} {suggestion.time}. -
-{suggestion.text}
- )} -{t.additionalTooltip}
++ {t.suggestion}: {suggestion.dose}{t.mg} ({t.instead} {suggestion.originalDose}{t.mg}) {t.at} {suggestion.time}. +
+{suggestion.text}
+ )} +(
+ parentKey: P,
+ childKey: string,
+ value: any
+ ) => {
setAppState(prev => ({
...prev,
- [parentKey]: { ...prev[parentKey], [childKey]: value }
+ [parentKey]: { ...(prev[parentKey] as any), [childKey]: value }
}));
};
- const updateUiSetting = (key, value) => {
+ const updateUiSetting =