Skip to content

Commit

Permalink
refactor: update zod import (#2466)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmitch14 authored Jan 28, 2024
1 parent a465432 commit 7df1007
Show file tree
Hide file tree
Showing 30 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion apps/www/app/examples/forms/account/account-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { zodResolver } from "@hookform/resolvers/zod"
import { CalendarIcon, CaretSortIcon, CheckIcon } from "@radix-ui/react-icons"
import { format } from "date-fns"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { cn } from "@/lib/utils"
import { Button } from "@/registry/new-york/ui/button"
Expand Down
2 changes: 1 addition & 1 deletion apps/www/app/examples/forms/appearance/appearance-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { zodResolver } from "@hookform/resolvers/zod"
import { ChevronDownIcon } from "@radix-ui/react-icons"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { cn } from "@/lib/utils"
import { Button, buttonVariants } from "@/registry/new-york/ui/button"
Expand Down
2 changes: 1 addition & 1 deletion apps/www/app/examples/forms/display/display-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/new-york/ui/button"
import { Checkbox } from "@/registry/new-york/ui/checkbox"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Link from "next/link"
import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/new-york/ui/button"
import { Checkbox } from "@/registry/new-york/ui/checkbox"
Expand Down
2 changes: 1 addition & 1 deletion apps/www/app/examples/forms/profile-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Link from "next/link"
import { zodResolver } from "@hookform/resolvers/zod"
import { useFieldArray, useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { cn } from "@/lib/utils"
import { Button } from "@/registry/new-york/ui/button"
Expand Down
6 changes: 3 additions & 3 deletions apps/www/content/docs/components/form.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Define the shape of your form using a Zod schema. You can read more about using
```tsx showLineNumbers {3,5-7}
"use client"

import * as z from "zod"
import { z } from "zod"

const formSchema = z.object({
username: z.string().min(2).max(50),
Expand All @@ -144,7 +144,7 @@ Use the `useForm` hook from `react-hook-form` to create a form.

import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

const formSchema = z.object({
username: z.string().min(2, {
Expand Down Expand Up @@ -181,7 +181,7 @@ We can now use the `<Form />` components to build our form.

import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/components/ui/button"
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/www/lib/validations/log.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as z from "zod"
import { z } from "zod"

export const logSchema = z.object({
event: z.enum(["copy_primitive"]),
Expand Down
2 changes: 1 addition & 1 deletion apps/www/lib/validations/og.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as z from "zod"
import { z } from "zod"

export const ogImageSchema = z.object({
heading: z.string(),
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/default/example/calendar-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { zodResolver } from "@hookform/resolvers/zod"
import { format } from "date-fns"
import { CalendarIcon } from "lucide-react"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { cn } from "@/lib/utils"
import { Button } from "@/registry/default/ui/button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { zodResolver } from "@hookform/resolvers/zod"
import { format } from "date-fns"
import { CalendarIcon } from "lucide-react"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { cn } from "@/lib/utils"
import { Button } from "@/registry/default/ui/button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/default/ui/button"
import { Checkbox } from "@/registry/default/ui/checkbox"
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/default/example/checkbox-form-single.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Link from "next/link"
import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/default/ui/button"
import { Checkbox } from "@/registry/default/ui/checkbox"
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/default/example/combobox-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { zodResolver } from "@hookform/resolvers/zod"
import { Check, ChevronsUpDown } from "lucide-react"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { cn } from "@/lib/utils"
import { Button } from "@/registry/default/ui/button"
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/default/example/date-picker-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { zodResolver } from "@hookform/resolvers/zod"
import { format } from "date-fns"
import { CalendarIcon } from "lucide-react"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { cn } from "@/lib/utils"
import { Button } from "@/registry/default/ui/button"
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/default/example/input-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/default/ui/button"
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/default/example/radio-group-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/default/ui/button"
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/default/example/select-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Link from "next/link"
import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/default/ui/button"
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/default/example/switch-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/default/ui/button"
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/default/example/textarea-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/default/ui/button"
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/new-york/example/calendar-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { zodResolver } from "@hookform/resolvers/zod"
import { CalendarIcon } from "@radix-ui/react-icons"
import { format } from "date-fns"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { cn } from "@/lib/utils"
import { Button } from "@/registry/new-york/ui/button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/new-york/ui/button"
import { Checkbox } from "@/registry/new-york/ui/checkbox"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Link from "next/link"
import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/new-york/ui/button"
import { Checkbox } from "@/registry/new-york/ui/checkbox"
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/new-york/example/combobox-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { zodResolver } from "@hookform/resolvers/zod"
import { CaretSortIcon, CheckIcon } from "@radix-ui/react-icons"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { cn } from "@/lib/utils"
import { Button } from "@/registry/new-york/ui/button"
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/new-york/example/date-picker-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { zodResolver } from "@hookform/resolvers/zod"
import { CalendarIcon } from "@radix-ui/react-icons"
import { format } from "date-fns"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { cn } from "@/lib/utils"
import { Button } from "@/registry/new-york/ui/button"
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/new-york/example/input-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/new-york/ui/button"
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/new-york/example/radio-group-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/new-york/ui/button"
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/new-york/example/select-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import Link from "next/link"
import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/new-york/ui/button"
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/new-york/example/switch-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/new-york/ui/button"
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/new-york/example/textarea-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { zodResolver } from "@hookform/resolvers/zod"
import { useForm } from "react-hook-form"
import * as z from "zod"
import { z } from "zod"

import { Button } from "@/registry/new-york/ui/button"
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/www/registry/schema.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as z from "zod"
import { z } from "zod"

export const registrySchema = z.array(
z.object({
Expand Down

1 comment on commit 7df1007

@vercel
Copy link

@vercel vercel bot commented on 7df1007 Jan 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ui – ./apps/www

ui-shadcn-pro.vercel.app
example-playground.vercel.app
ui.shadcn.com
ui-git-main-shadcn-pro.vercel.app

Please sign in to comment.