Skip to content

Commit

Permalink
Fix react-hook-form package version
Browse files Browse the repository at this point in the history
  • Loading branch information
apuntovanini committed May 28, 2024
1 parent b25d2b2 commit b870ad1
Show file tree
Hide file tree
Showing 18 changed files with 75 additions and 63 deletions.
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"next-docs-ui": "^7.1.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.51.4",
"react-hook-form": "^7.51.5",
"react-router-dom": "^6.23.1",
"react-use": "^17.5.0",
"recharts": "^2.12.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/forms/calendar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"react": "^18.3.1",
"react-datepicker": "^6.9.0",
"react-day-picker": "^8.10.1",
"react-hook-form": "^7.51.4"
"react-hook-form": "^7.51.5"
},
"devDependencies": {
"@types/react": "^18.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/forms/checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@uidu/lib": "workspace:^",
"class-variance-authority": "^0.7.0",
"react": "^18.3.1",
"react-hook-form": "^7.51.4"
"react-hook-form": "^7.51.5"
},
"devDependencies": {
"@types/react": "^18.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/forms/form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@uidu/lib": "workspace:^",
"class-variance-authority": "^0.7.0",
"react": "^18.3.1",
"react-hook-form": "^7.51.4"
"react-hook-form": "^7.51.5"
},
"devDependencies": {
"@types/react": "^18.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/forms/input/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@uidu/lib": "workspace:^",
"class-variance-authority": "^0.7.0",
"react": "^18.3.1",
"react-hook-form": "^7.51.4"
"react-hook-form": "^7.51.5"
},
"devDependencies": {
"@types/react": "^18.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/forms/multiselect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@uidu/lib": "workspace:^",
"class-variance-authority": "^0.7.0",
"react": "^18.3.1",
"react-hook-form": "^7.51.4",
"react-hook-form": "^7.51.5",
"react-use": "^17.5.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/forms/pin-code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@uidu/lib": "workspace:^",
"class-variance-authority": "^0.7.0",
"react": "^18.3.1",
"react-hook-form": "^7.51.4"
"react-hook-form": "^7.51.5"
},
"devDependencies": {
"@types/react": "^18.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/forms/radio-group/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@uidu/form-ui": "workspace:^",
"@uidu/lib": "workspace:^",
"react": "^18.3.1",
"react-hook-form": "^7.51.4"
"react-hook-form": "^7.51.5"
},
"devDependencies": {
"@types/react": "^18.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/forms/select/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@uidu/lib": "workspace:^",
"class-variance-authority": "^0.7.0",
"react": "^18.3.1",
"react-hook-form": "^7.51.4"
"react-hook-form": "^7.51.5"
},
"devDependencies": {
"@types/react": "^18.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/forms/slider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@radix-ui/react-slider": "^1.1.2",
"@uidu/lib": "workspace:^",
"react": "^18.3.1",
"react-hook-form": "^7.51.4"
"react-hook-form": "^7.51.5"
},
"devDependencies": {
"@types/react": "^18.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/forms/switch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@radix-ui/react-switch": "^1.0.3",
"@uidu/lib": "workspace:^",
"react": "^18.3.1",
"react-hook-form": "^7.51.4"
"react-hook-form": "^7.51.5"
},
"devDependencies": {
"@types/react": "^18.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/forms/textarea/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@uidu/lib": "workspace:^",
"class-variance-authority": "^0.7.0",
"react": "^18.3.1",
"react-hook-form": "^7.51.4"
"react-hook-form": "^7.51.5"
},
"devDependencies": {
"@types/react": "^18.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/forms/toggle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@uidu/lib": "workspace:^",
"class-variance-authority": "^0.7.0",
"react": "^18.3.1",
"react-hook-form": "^7.51.4"
"react-hook-form": "^7.51.5"
},
"devDependencies": {
"@types/react": "^18.3.2",
Expand Down
66 changes: 39 additions & 27 deletions packages/components/forms/toggle/src/RHFToggle.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,42 @@
import { Control, Controller, FieldValues, RegisterOptions } from "react-hook-form";
import { Toggle } from "./toggle";
import {
Control,
Controller,
FieldValues,
RegisterOptions,
} from 'react-hook-form';
import { Toggle } from './toggle';


export function RHFToggle({ name, control, rules, ...rest }: {
name: string
control: Control;
rules: Omit<
RegisterOptions<FieldValues, string>,
'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'
>
export function RHFToggle({
name,
control,
rules,
...rest
}: {
name: string;
control: Control;
rules: Omit<
RegisterOptions<FieldValues, string>,
'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'
>;
}) {
return (
<Controller
name={name}
control={control}
rules={rules}
render={({ field: { name, onChange, ref, value = "", disabled, onBlur } }) => (
<Toggle
id={name}
onPressedChange={onChange}
ref={ref}
value={value}
disabled={disabled}
onBlur={onBlur}
{...rest}
/>
)} />
)
return (
<Controller
name={name}
control={control}
rules={rules}
render={({
field: { name, onChange, ref, value = '', disabled, onBlur },
}) => (
<Toggle
id={name}
onPressedChange={onChange}
ref={ref}
value={value}
disabled={disabled}
onBlur={onBlur}
{...rest}
/>
)}
/>
);
}
2 changes: 1 addition & 1 deletion packages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"date-fns": "^3.6.0",
"embla-carousel-react": "8.0.4",
"next-themes": "^0.3.0",
"react-hook-form": "^7.51.4",
"react-hook-form": "^7.51.5",
"react-resizable-panels": "^2.0.19",
"tailwind-merge": "^2.3.0",
"tailwindcss": "^3.4.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/src/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@uidu/toast-ui": "workspace:^",
"@uidu/tooltip-ui": "workspace:^",
"react": "^18.3.1",
"react-hook-form": "^7.51.4"
"react-hook-form": "^7.51.5"
},
"devDependencies": {
"@types/react": "^18.3.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/src/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@uidu/toggle-ui": "workspace:^",
"class-variance-authority": "^0.7.0",
"react": "^18.3.1",
"react-hook-form": "^7.51.4"
"react-hook-form": "^7.51.5"
},
"devDependencies": {
"@types/react": "^18.3.2",
Expand Down
40 changes: 20 additions & 20 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7589,7 +7589,7 @@ __metadata:
react: "npm:^18.3.1"
react-datepicker: "npm:^6.9.0"
react-day-picker: "npm:^8.10.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
tsup: "npm:^8.0.2"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -7630,7 +7630,7 @@ __metadata:
"@uidu/lib": "workspace:^"
class-variance-authority: "npm:^0.7.0"
react: "npm:^18.3.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
tsup: "npm:^8.0.2"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -7719,7 +7719,7 @@ __metadata:
"@uidu/toast-ui": "workspace:^"
"@uidu/tooltip-ui": "workspace:^"
react: "npm:^18.3.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
tsup: "npm:^8.0.2"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -7800,7 +7800,7 @@ __metadata:
"@uidu/lib": "workspace:^"
class-variance-authority: "npm:^0.7.0"
react: "npm:^18.3.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
tsup: "npm:^8.0.2"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -7829,7 +7829,7 @@ __metadata:
"@uidu/toggle-ui": "workspace:^"
class-variance-authority: "npm:^0.7.0"
react: "npm:^18.3.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
tsup: "npm:^8.0.2"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -7892,7 +7892,7 @@ __metadata:
prettier-plugin-tailwindcss: "npm:^0.5.14"
react: "npm:^18.3.1"
react-dom: "npm:^18.3.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
react-router-dom: "npm:^6.23.1"
react-use: "npm:^17.5.0"
recharts: "npm:^2.12.7"
Expand Down Expand Up @@ -7934,7 +7934,7 @@ __metadata:
"@uidu/lib": "workspace:^"
class-variance-authority: "npm:^0.7.0"
react: "npm:^18.3.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
tsup: "npm:^8.0.2"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -8004,7 +8004,7 @@ __metadata:
"@uidu/lib": "workspace:^"
class-variance-authority: "npm:^0.7.0"
react: "npm:^18.3.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
react-use: "npm:^17.5.0"
tsup: "npm:^8.0.2"
languageName: unknown
Expand Down Expand Up @@ -8046,7 +8046,7 @@ __metadata:
"@uidu/lib": "workspace:^"
class-variance-authority: "npm:^0.7.0"
react: "npm:^18.3.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
tsup: "npm:^8.0.2"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -8085,7 +8085,7 @@ __metadata:
"@uidu/form-ui": "workspace:^"
"@uidu/lib": "workspace:^"
react: "npm:^18.3.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
tsup: "npm:^8.0.2"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -8124,7 +8124,7 @@ __metadata:
"@uidu/lib": "workspace:^"
class-variance-authority: "npm:^0.7.0"
react: "npm:^18.3.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
tsup: "npm:^8.0.2"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -8173,7 +8173,7 @@ __metadata:
"@types/react": "npm:^18.3.2"
"@uidu/lib": "workspace:^"
react: "npm:^18.3.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
tsup: "npm:^8.0.2"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -8223,7 +8223,7 @@ __metadata:
"@types/react": "npm:^18.3.2"
"@uidu/lib": "workspace:^"
react: "npm:^18.3.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
tsup: "npm:^8.0.2"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -8261,7 +8261,7 @@ __metadata:
"@uidu/lib": "workspace:^"
class-variance-authority: "npm:^0.7.0"
react: "npm:^18.3.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
tsup: "npm:^8.0.2"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -8302,7 +8302,7 @@ __metadata:
"@uidu/lib": "workspace:^"
class-variance-authority: "npm:^0.7.0"
react: "npm:^18.3.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
tsup: "npm:^8.0.2"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -8342,7 +8342,7 @@ __metadata:
embla-carousel-react: "npm:8.0.4"
next-themes: "npm:^0.3.0"
react: "npm:^18.3.1"
react-hook-form: "npm:^7.51.4"
react-hook-form: "npm:^7.51.5"
react-resizable-panels: "npm:^2.0.19"
tailwind-merge: "npm:^2.3.0"
tailwindcss: "npm:^3.4.3"
Expand Down Expand Up @@ -19557,12 +19557,12 @@ __metadata:
languageName: node
linkType: hard

"react-hook-form@npm:^7.51.4":
version: 7.51.4
resolution: "react-hook-form@npm:7.51.4"
"react-hook-form@npm:^7.51.5":
version: 7.51.5
resolution: "react-hook-form@npm:7.51.5"
peerDependencies:
react: ^16.8.0 || ^17 || ^18
checksum: 10/1edb032284c127756ad4b99be5da55407dac311afa05f534ad882971088efef6c1debd339f2d9783a572fe17f97d206dbeb9b5b0cdd4e7599cd86a3485e45ad0
checksum: 10/f4ff77989202b1faf2dede7a7730210635a6225189dcaeaeb191cea12422bcb97d2adfef0712c50d13bf5c5e14b8debc00fbba16491f86a6d24945a52cacfa59
languageName: node
linkType: hard

Expand Down

0 comments on commit b870ad1

Please sign in to comment.