@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/dist/index.js CHANGED
@@ -2122,7 +2122,6 @@ function ZodForm({
2122
2122
  onError,
2123
2123
  onSubmit,
2124
2124
  onSuccess,
2125
- render,
2126
2125
  resetButtonText = "Reset",
2127
2126
  showResetButton = false,
2128
2127
  spacing = "4",
@@ -2222,16 +2221,6 @@ function ZodForm({
2222
2221
  config.onError(form.formState.errors);
2223
2222
  }
2224
2223
  }, [form.formState.errors, config.onError]);
2225
- if (render) {
2226
- return /* @__PURE__ */ React22.createElement(FormProvider2, { ...form }, render({
2227
- errors: form.formState.errors,
2228
- form,
2229
- isSubmitted: enhancedState.status !== "idle",
2230
- isSubmitting: enhancedState.isSubmitting,
2231
- isSuccess: enhancedState.isSuccess,
2232
- values: form.getValues()
2233
- }));
2234
- }
2235
2224
  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(
2236
2225
  FormStatus,
2237
2226
  {
@@ -2371,14 +2360,16 @@ var FormFieldHelpers = {
2371
2360
  * })
2372
2361
  * ```
2373
2362
  */
2374
- content: (title, description, options) => ({
2375
- className: options?.className,
2376
- description: description || void 0,
2377
- name: options?.name,
2378
- render: options?.render,
2379
- title: title || void 0,
2380
- type: "content"
2381
- }),
2363
+ content: (title, description, options) => {
2364
+ return {
2365
+ className: options?.className,
2366
+ description: description || void 0,
2367
+ name: options?.name,
2368
+ render: options?.render,
2369
+ title: title || void 0,
2370
+ type: "content"
2371
+ };
2372
+ },
2382
2373
  /**
2383
2374
  * Create a date field
2384
2375
  */