fix(ui): Bump cva and minor type fixes (#5818)

**What**
- Bumps `class-variance-authority` to new beta version - `cva@beta`.
- Updates all usages of `cva` to new API.
- Clear up the naming of types in `usePrompt`

**Why**
- A bug in how `class-variance-authority` exported its types mean that we were relying on patching the package to ensure that the correct types made it into the build of our UI package. This was important to ensure intellisense for component variants, such as `<Button size="large" />`. Previously in the UI monorepo, having the patch was enough to ensure that the correct types made it into the build, but that was not the case after we moved the design system to the core repo. The issue with types is fixed in the `@1` version of `cva` which is currently in beta. I have pinpointed the version to the current beta version to ensure stability despite the package currently being in beta.
This commit is contained in:
Kasper Fabricius Kristensen
2023-12-07 21:13:44 +01:00
committed by GitHub
parent 85cda7ce37
commit 591ba2388d
21 changed files with 228 additions and 305 deletions

View File

@@ -100,9 +100,9 @@
"@radix-ui/react-tooltip": "^1.0.6",
"@react-aria/datepicker": "^3.5.0",
"@react-stately/datepicker": "^3.5.0",
"class-variance-authority": "^0.6.1",
"clsx": "^1.2.1",
"copy-to-clipboard": "^3.3.3",
"cva": "1.0.0-beta.1",
"date-fns": "^2.30.0",
"prism-react-renderer": "^2.0.6",
"react-currency-input-field": "^3.6.11",