Files
supabase/packages/ui/package.json
Gildas Garcia 1150d32462 fix: number inputs does not allow some editions (#46538)
## Problem

Because we have controller inputs and zod validation on numbers, many of
them cannot be cleared correctly as deleting their value resets it to
`0`.

## Solution

Update the `Input` component to allow those editions by always storing
and displaying the user entered value

## How to test

- Open the webhook page and add/edit one
- Clear its timeout value and observe that it is not reset to `0`
- Same for:
  - Database network restrictions
  - API settings max rows
  - Disk size modal

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Standardized numeric form input handling across examples, settings,
and modals — inputs now rely on form bindings and schema coercion for
consistent parsing and simplified behavior.

* **Chores**
* Added form resolver utilities and a user-event testing library to
development dependencies.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-02 14:38:01 +02:00

64 lines
1.9 KiB
JSON

{
"name": "ui",
"version": "0.0.0",
"main": "./index.tsx",
"types": "./index.tsx",
"license": "MIT",
"sideEffects": false,
"scripts": {
"preinstall": "npx only-allow pnpm",
"typecheck": "tsc --noEmit",
"generate-tailwind-classes": "tsx ./scripts/generate-tailwind-classes.ts",
"clean": "rimraf node_modules .turbo tsconfig.tsbuildinfo",
"test": "vitest",
"test:ci": "vitest --run --coverage",
"test:report": "open coverage/lcov-report/index.html"
},
"dependencies": {
"@tailwindcss/forms": "^0.5.11",
"@tailwindcss/typography": "^0.5.19",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"color": "^4.2.3",
"date-fns": "^2.30.0",
"framer-motion": "^11.18.2",
"input-otp": "^1.4.2",
"lodash": "catalog:",
"lucide-react": "^0.436.0",
"prop-types": "^15.7.2",
"radix-ui": "catalog:",
"react": "catalog:",
"react-accessible-treeview": "^2.11.2",
"react-copy-to-clipboard": "^5.1.0",
"react-day-picker": "^9.11.1",
"react-dom": "catalog:",
"react-hook-form": "^7.71.2",
"react-intersection-observer": "^9.8.2",
"react-resizable-panels": "^4.6.5",
"recharts": "catalog:",
"sonner": "^1.5.0",
"tailwind-merge": "^3.5.0",
"tailwindcss": "catalog:",
"vaul": "^1.1.2"
},
"devDependencies": {
"@hookform/resolvers": "^3.1.1",
"@testing-library/jest-dom": "^6.6.0",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.0.0",
"@types/lodash": "4.17.5",
"@types/node": "catalog:",
"@types/react": "catalog:",
"@types/react-copy-to-clipboard": "^5.0.4",
"@types/react-dom": "catalog:",
"@vitest/coverage-v8": "catalog:",
"config": "workspace:*",
"tsconfig": "workspace:*",
"tsx": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "catalog:"
}
}