Skip to content

Commit 461abfe

Browse files
authored
Merge pull request #117 from lambda-curry/copilot/fix-a8efc617-34f3-479f-9120-1d323e282ceb
2 parents a581d43 + 0a581b4 commit 461abfe

5 files changed

Lines changed: 11 additions & 12 deletions

File tree

apps/docs/src/remix-hook-form/password-field.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const testDefaultValues = ({ canvas }: StoryContext) => {
123123

124124
const 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();

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
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",

packages/components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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",

packages/components/src/remix-hook-form/form-error.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { useRemixFormContext } from 'remix-hook-form';
2+
import type { FieldComponents } from '../ui/form';
23
import { 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

911
export function FormError({ name = '_form', ...props }: FormErrorProps) {

packages/components/src/ui/calendar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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',

0 commit comments

Comments
 (0)