Skip to content

Commit 3bbbfb0

Browse files
authored
build: bump react-hook-form version
Bumps react-hook-form to 7.65.0. Also exports some types so that mono doesn't need a rhf dependency.
1 parent 18442e4 commit 3bbbfb0

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

packages/gamut/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"react-aria-components": "1.8.0",
2222
"react-aria-tabpanel": "^4.4.0",
2323
"react-focus-on": "^3.10.0",
24-
"react-hook-form": "^7.53.1",
24+
"react-hook-form": "^7.65.0",
2525
"react-player": "^2.16.0",
2626
"react-select": "^5.2.2",
2727
"react-truncate-markup": "^5.1.2",

packages/gamut/src/ConnectedForm/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ export {
1212
useGetInitialFormValue,
1313
useSubmitState,
1414
} from './utils';
15+
export type { Validate, UseFormReturn, SubmitHandler } from 'react-hook-form';

packages/gamut/src/Form/types.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { UnpackNestedValue } from 'react-hook-form';
2-
31
export type FormValues<T> = {
4-
[key in keyof T]?: UnpackNestedValue<T[key]>;
2+
[key in keyof T]?: T[key];
53
};
4+
65
export { CheckboxPaddingProps } from './inputs/Checkbox';
76

87
export interface BaseInputProps {

packages/gamut/src/GridForm/GridForm.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
DefaultValues,
66
Mode,
77
SubmitHandler,
8-
UnpackNestedValue,
98
} from 'react-hook-form';
109

1110
import { ButtonProps } from '../Button';
@@ -111,7 +110,7 @@ export function GridForm<Values extends FormValues<Values>>({
111110
isGridFormSection(field) ? field.fields : field
112111
);
113112

114-
type Defaults = UnpackNestedValue<DeepPartial<Values>>;
113+
type Defaults = DeepPartial<Values>;
115114

116115
const defaultValues = flatFields.reduce<Defaults>(
117116
// since our checkbox is a controlled input, it needs to be provided with a default value in order to reset correctly.

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15806,10 +15806,10 @@ react-helmet-async@^2.0.5:
1580615806
react-fast-compare "^3.2.2"
1580715807
shallowequal "^1.1.0"
1580815808

15809-
react-hook-form@^7.53.1:
15810-
version "7.53.1"
15811-
resolved "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.53.1.tgz#3f2cd1ed2b3af99416a4ac674da2d526625add67"
15812-
integrity sha512-6aiQeBda4zjcuaugWvim9WsGqisoUk+etmFEsSUMm451/Ic8L/UAb7sRtMj3V+Hdzm6mMjU1VhiSzYUZeBm0Vg==
15809+
react-hook-form@^7.65.0:
15810+
version "7.66.0"
15811+
resolved "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.66.0.tgz#1a09ea9d0ebb3bdda5073b08a486538d37d9c0d4"
15812+
integrity sha512-xXBqsWGKrY46ZqaHDo+ZUYiMUgi8suYu5kdrS20EG8KiL7VRQitEbNjm+UcrDYrNi1YLyfpmAeGjCZYXLT9YBw==
1581315813

1581415814
1581515815
version "18.1.0"

0 commit comments

Comments
 (0)