@rachelallyson/hero-hook-form 2.1.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -3
- package/dist/index.d.ts +825 -16
- package/dist/index.js +238 -137
- package/dist/react/index.d.ts +825 -16
- package/dist/react/index.js +238 -137
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,60 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## [2.
|
|
5
|
+
## [2.2.0] - 2026-01-13
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **Content Field Type**: New `content` field type for adding headers, questions, or custom content between form fields
|
|
10
|
+
- Supports simple title/description rendering
|
|
11
|
+
- Supports custom render functions for full control
|
|
12
|
+
- Works seamlessly with all form types (ZodForm, ConfigurableForm, ServerActionForm)
|
|
13
|
+
- Does not require a schema field name, making it perfect for non-form content
|
|
14
|
+
- Added `FormFieldHelpers.content()` helper function
|
|
15
|
+
- Added `BasicFormBuilder.content()` builder method
|
|
16
|
+
- Comprehensive test coverage with 7 passing tests
|
|
17
|
+
|
|
18
|
+
### Example Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
// Simple header
|
|
22
|
+
{
|
|
23
|
+
type: "content",
|
|
24
|
+
title: "Personal Information",
|
|
25
|
+
description: "Please provide your details below."
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Using helper
|
|
29
|
+
FormFieldHelpers.content("Section Header", "Description text")
|
|
30
|
+
|
|
31
|
+
// Using builder
|
|
32
|
+
createBasicFormBuilder()
|
|
33
|
+
.input("name", "Name")
|
|
34
|
+
.content("Section Header")
|
|
35
|
+
.input("email", "Email")
|
|
36
|
+
.build()
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## [2.1.3] - 2026-01-13
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- **Cypress Form Submission Helpers**: Improved reliability of `cy.submitForm()` and related submission helpers
|
|
44
|
+
- Added form existence verification before submission
|
|
45
|
+
- Added submit button visibility and enabled state checks
|
|
46
|
+
- Implemented retry logic for better handling of timing issues
|
|
47
|
+
- Fixed `submitAndExpectSuccess()`, `submitAndExpectErrors()`, and `interceptFormSubmission()` helpers
|
|
48
|
+
- Made `expectFieldError()` more flexible by making `errorMessage` parameter optional
|
|
49
|
+
- Fixed TypeScript type compatibility issues in `getFormData()`
|
|
50
|
+
- All helpers now properly wait for forms to be ready before interacting
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
|
|
54
|
+
- **Test Coverage**: Added comprehensive tests for `cy.submitForm()` helper in ZodForm component tests
|
|
55
|
+
- Tests successful form submission
|
|
56
|
+
- Tests validation error handling with submission helpers
|
|
57
|
+
|
|
58
|
+
## [2.1.2] - 2026-01-13
|
|
6
59
|
|
|
7
60
|
### Added
|
|
8
61
|
|
|
@@ -15,14 +68,14 @@ All notable changes to this project will be documented in this file.
|
|
|
15
68
|
- **ZodForm FormProvider**: Wrapped ZodForm component with FormProvider to ensure form context is properly available
|
|
16
69
|
- Fixes issues with form context not being accessible in nested components
|
|
17
70
|
|
|
18
|
-
## [2.1.1] -
|
|
71
|
+
## [2.1.1] - 2026-01-12
|
|
19
72
|
|
|
20
73
|
### Fixed
|
|
21
74
|
|
|
22
75
|
- **ServerActionForm imports**: Use `#ui` alias for HeroUI imports to support both `@heroui/react` and individual package imports
|
|
23
76
|
- Ensures compatibility across different HeroUI installation patterns
|
|
24
77
|
|
|
25
|
-
## [2.1.0] -
|
|
78
|
+
## [2.1.0] - 2026-01-12
|
|
26
79
|
|
|
27
80
|
### Added
|
|
28
81
|
|