@paragrav/rhf-utils 0.0.98 → 0.0.102

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.
@@ -1,11 +1,10 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useFlatFieldErrorsContextMaybe as s } from "../flat/context/useFlatFieldErrorsContext.mjs";
3
- import e from "../flat/FlatFieldErrorsList.mjs";
4
- const i = () => {
5
- var r;
6
- const o = (r = s()) == null ? void 0 : r.roots;
7
- return /* @__PURE__ */ t(e, { errors: o });
8
- }, a = i;
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import t from "../flat/context/useFlatFieldErrorsContext.mjs";
3
+ import s from "../flat/FlatFieldErrorsList.mjs";
4
+ const e = () => {
5
+ const r = t().roots;
6
+ return /* @__PURE__ */ o(s, { errors: r });
7
+ }, m = e;
9
8
  export {
10
- a as default
9
+ m as default
11
10
  };
@@ -8,7 +8,7 @@ import P from "../submit/error/setCtxErrorsByFormSubmitError.mjs";
8
8
  import S from "./_Controller.mjs";
9
9
  import T from "./_FormBase.mjs";
10
10
  function q({
11
- formId: n,
11
+ formId: x,
12
12
  formRef: C,
13
13
  //
14
14
  onSubmit: d,
@@ -33,29 +33,29 @@ function q({
33
33
  l,
34
34
  a
35
35
  ), B = (r, a) => {
36
- var x;
36
+ var n;
37
37
  const m = r instanceof N ? (
38
38
  // consumer can manually throw FormSubmitError (e.g., manual validation)
39
39
  r
40
40
  ) : (
41
41
  // if error is not FormSubmitError, consumer can provide global handler
42
- (x = e == null ? void 0 : e.onSubmitError) == null ? void 0 : x.call(e, r)
42
+ (n = e == null ? void 0 : e.onSubmitError) == null ? void 0 : n.call(e, r)
43
43
  );
44
44
  m && P(l, m), c == null || c(
45
45
  r,
46
46
  l,
47
47
  a
48
48
  );
49
- }, i = {
50
- formId: n,
49
+ }, u = {
50
+ formId: x,
51
51
  formRef: C,
52
52
  ctx: l,
53
53
  options: t,
54
54
  Controller: S
55
- }, u = (r) => {
55
+ }, i = (r) => {
56
56
  var m;
57
57
  const a = (m = e == null ? void 0 : e.Children) == null ? void 0 : m[r];
58
- return a && /* @__PURE__ */ o(a, { ...i });
58
+ return a && /* @__PURE__ */ o(a, { ...u });
59
59
  };
60
60
  return /* @__PURE__ */ F(
61
61
  T,
@@ -70,7 +70,7 @@ function q({
70
70
  className: [t == null ? void 0 : t.classNames, s == null ? void 0 : s.className].filter(Boolean).join(" "),
71
71
  onSubmit: b,
72
72
  children: [
73
- u("top"),
73
+ i("top"),
74
74
  (t == null ? void 0 : t.devTool) !== "disabled" && /* @__PURE__ */ o(
75
75
  D,
76
76
  {
@@ -79,9 +79,9 @@ function q({
79
79
  ...t == null ? void 0 : t.devTool
80
80
  }
81
81
  ),
82
- h && /* @__PURE__ */ o(h, { ...i }),
82
+ h && /* @__PURE__ */ o(h, { ...u }),
83
83
  f,
84
- u("bottom")
84
+ i("bottom")
85
85
  ]
86
86
  }
87
87
  );
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@paragrav/rhf-utils",
3
3
  "author": "paragrav.dev",
4
4
  "license": "MIT",
5
- "version": "0.0.98",
5
+ "version": "0.0.102",
6
6
  "description": "Integration utilities for react-hook-form.",
7
7
  "type": "module",
8
8
  "sideEffects": false,