File tree Expand file tree Collapse file tree
apps/docs/src/remix-hook-form Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ const testDefaultValues = ({ canvas }: StoryContext) => {
123123
124124const testPasswordVisibilityToggle = async ( { canvas } : StoryContext ) => {
125125 const passwordInput = canvas . getByLabelText ( 'Password' ) ;
126-
126+
127127 // Find the toggle button within the same form item as the password input
128128 const formItem =
129129 passwordInput . closest ( '[class*="FormItem"], .form-item, [data-testid="form-item"]' ) ||
@@ -136,15 +136,15 @@ const testPasswordVisibilityToggle = async ({ canvas }: StoryContext) => {
136136 // Click toggle to show password
137137 await userEvent . click ( toggleButton ) ;
138138 expect ( passwordInput ) . toHaveAttribute ( 'type' , 'text' ) ;
139-
139+
140140 // Find the hide button for the same field
141141 const hideButton = formItem ?. querySelector ( 'button[aria-label="Hide password"]' ) as HTMLElement ;
142142 expect ( hideButton ) . toBeInTheDocument ( ) ;
143143
144144 // Click toggle to hide password again
145145 await userEvent . click ( hideButton ) ;
146146 expect ( passwordInput ) . toHaveAttribute ( 'type' , 'password' ) ;
147-
147+
148148 // Verify show button is back
149149 const showButtonAgain = formItem ?. querySelector ( 'button[aria-label="Show password"]' ) as HTMLElement ;
150150 expect ( showButtonAgain ) . toBeInTheDocument ( ) ;
Original file line number Diff line number Diff line change 22 "name" : " forms" ,
33 "version" : " 0.2.0" ,
44 "private" : true ,
5- "workspaces" : [
6- " apps/*" ,
7- " packages/*"
8- ],
5+ "workspaces" : [" apps/*" , " packages/*" ],
96 "scripts" : {
107 "start" : " yarn dev" ,
118 "dev" : " turbo run dev" ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @lambdacurry/forms" ,
3- "version" : " 0.19.1 " ,
3+ "version" : " 0.19.2 " ,
44 "type" : " module" ,
55 "main" : " ./dist/index.js" ,
66 "types" : " ./dist/index.d.ts" ,
Original file line number Diff line number Diff line change 11import { useRemixFormContext } from 'remix-hook-form' ;
2+ import type { FieldComponents } from '../ui/form' ;
23import { FormErrorField } from '../ui/form-error-field' ;
3- import type { FormErrorFieldProps } from '../ui/form-error-field' ;
44
5- export type FormErrorProps = Omit < FormErrorFieldProps , 'control' > & {
5+ export type FormErrorProps = {
66 name ?: string ;
7+ className ?: string ;
8+ components ?: Partial < FieldComponents > ;
79} ;
810
911export function FormError ( { name = '_form' , ...props } : FormErrorProps ) {
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ function Calendar({
1717} : React . ComponentProps < typeof DayPicker > & {
1818 buttonVariant ?: React . ComponentProps < typeof Button > [ 'variant' ] ;
1919} ) {
20-
2120 return (
2221 < DayPicker
2322 showOutsideDays = { showOutsideDays }
@@ -47,7 +46,8 @@ function Calendar({
4746 ) ,
4847 month_caption : 'flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)' ,
4948 dropdowns : 'w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5' ,
50- dropdown_root : 'relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md' ,
49+ dropdown_root :
50+ 'relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md' ,
5151 dropdown : 'absolute inset-0 opacity-0' ,
5252 caption_label : cn (
5353 'select-none font-medium' ,
You can’t perform that action at this time.
0 commit comments