@rachelallyson/hero-hook-form 2.2.0 → 2.3.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 +33 -0
- package/dist/index.d.ts +922 -40
- package/dist/index.js +10 -19
- package/dist/react/index.d.ts +922 -40
- package/dist/react/index.js +10 -19
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -2127,7 +2127,6 @@ function ZodForm({
|
|
|
2127
2127
|
onError,
|
|
2128
2128
|
onSubmit,
|
|
2129
2129
|
onSuccess,
|
|
2130
|
-
render,
|
|
2131
2130
|
resetButtonText = "Reset",
|
|
2132
2131
|
showResetButton = false,
|
|
2133
2132
|
spacing = "4",
|
|
@@ -2227,16 +2226,6 @@ function ZodForm({
|
|
|
2227
2226
|
config.onError(form.formState.errors);
|
|
2228
2227
|
}
|
|
2229
2228
|
}, [form.formState.errors, config.onError]);
|
|
2230
|
-
if (render) {
|
|
2231
|
-
return /* @__PURE__ */ React22.createElement(FormProvider2, { ...form }, render({
|
|
2232
|
-
errors: form.formState.errors,
|
|
2233
|
-
form,
|
|
2234
|
-
isSubmitted: enhancedState.status !== "idle",
|
|
2235
|
-
isSubmitting: enhancedState.isSubmitting,
|
|
2236
|
-
isSuccess: enhancedState.isSuccess,
|
|
2237
|
-
values: form.getValues()
|
|
2238
|
-
}));
|
|
2239
|
-
}
|
|
2240
2229
|
return /* @__PURE__ */ React22.createElement(FormProvider2, { ...form }, /* @__PURE__ */ React22.createElement("form", { className, role: "form", onSubmit: handleFormSubmit }, title && /* @__PURE__ */ React22.createElement("div", { className: "mb-6" }, /* @__PURE__ */ React22.createElement("h2", { className: "text-xl font-semibold text-foreground mb-2" }, title), subtitle && /* @__PURE__ */ React22.createElement("p", { className: "text-sm text-muted-foreground" }, subtitle)), /* @__PURE__ */ React22.createElement(
|
|
2241
2230
|
FormStatus,
|
|
2242
2231
|
{
|
|
@@ -2376,14 +2365,16 @@ var FormFieldHelpers = {
|
|
|
2376
2365
|
* })
|
|
2377
2366
|
* ```
|
|
2378
2367
|
*/
|
|
2379
|
-
content: (title, description, options) =>
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2368
|
+
content: (title, description, options) => {
|
|
2369
|
+
return {
|
|
2370
|
+
className: options?.className,
|
|
2371
|
+
description: description || void 0,
|
|
2372
|
+
name: options?.name,
|
|
2373
|
+
render: options?.render,
|
|
2374
|
+
title: title || void 0,
|
|
2375
|
+
type: "content"
|
|
2376
|
+
};
|
|
2377
|
+
},
|
|
2387
2378
|
/**
|
|
2388
2379
|
* Create a date field
|
|
2389
2380
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rachelallyson/hero-hook-form",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Typed form helpers that combine React Hook Form and HeroUI components.",
|
|
5
5
|
"author": "Rachel Higley",
|
|
6
6
|
"homepage": "https://rachelallyson.github.io/hero-hook-form/",
|