diff --git a/apps/docs/src/remix-hook-form/password-field.stories.tsx b/apps/docs/src/remix-hook-form/password-field.stories.tsx index 8024e6e2..5d91b126 100644 --- a/apps/docs/src/remix-hook-form/password-field.stories.tsx +++ b/apps/docs/src/remix-hook-form/password-field.stories.tsx @@ -123,7 +123,7 @@ const testDefaultValues = ({ canvas }: StoryContext) => { const testPasswordVisibilityToggle = async ({ canvas }: StoryContext) => { const passwordInput = canvas.getByLabelText('Password'); - + // Find the toggle button within the same form item as the password input const formItem = passwordInput.closest('[class*="FormItem"], .form-item, [data-testid="form-item"]') || @@ -136,7 +136,7 @@ const testPasswordVisibilityToggle = async ({ canvas }: StoryContext) => { // Click toggle to show password await userEvent.click(toggleButton); expect(passwordInput).toHaveAttribute('type', 'text'); - + // Find the hide button for the same field const hideButton = formItem?.querySelector('button[aria-label="Hide password"]') as HTMLElement; expect(hideButton).toBeInTheDocument(); @@ -144,7 +144,7 @@ const testPasswordVisibilityToggle = async ({ canvas }: StoryContext) => { // Click toggle to hide password again await userEvent.click(hideButton); expect(passwordInput).toHaveAttribute('type', 'password'); - + // Verify show button is back const showButtonAgain = formItem?.querySelector('button[aria-label="Show password"]') as HTMLElement; expect(showButtonAgain).toBeInTheDocument(); diff --git a/package.json b/package.json index 1a9afef4..16f2631c 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,7 @@ "name": "forms", "version": "0.2.0", "private": true, - "workspaces": [ - "apps/*", - "packages/*" - ], + "workspaces": ["apps/*", "packages/*"], "scripts": { "start": "yarn dev", "dev": "turbo run dev", diff --git a/packages/components/package.json b/packages/components/package.json index cd1945a4..c8eb783b 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@lambdacurry/forms", - "version": "0.19.1", + "version": "0.19.2", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/packages/components/src/remix-hook-form/form-error.tsx b/packages/components/src/remix-hook-form/form-error.tsx index a4a322c6..15c56bdf 100644 --- a/packages/components/src/remix-hook-form/form-error.tsx +++ b/packages/components/src/remix-hook-form/form-error.tsx @@ -1,9 +1,11 @@ import { useRemixFormContext } from 'remix-hook-form'; +import type { FieldComponents } from '../ui/form'; import { FormErrorField } from '../ui/form-error-field'; -import type { FormErrorFieldProps } from '../ui/form-error-field'; -export type FormErrorProps = Omit & { +export type FormErrorProps = { name?: string; + className?: string; + components?: Partial; }; export function FormError({ name = '_form', ...props }: FormErrorProps) { diff --git a/packages/components/src/ui/calendar.tsx b/packages/components/src/ui/calendar.tsx index 928b571a..8feb8baa 100644 --- a/packages/components/src/ui/calendar.tsx +++ b/packages/components/src/ui/calendar.tsx @@ -17,7 +17,6 @@ function Calendar({ }: React.ComponentProps & { buttonVariant?: React.ComponentProps['variant']; }) { - return (