@fuf-stack/uniform 1.16.0 → 1.17.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.
Files changed (163) hide show
  1. package/dist/Checkboxes/index.d.cts +1 -1
  2. package/dist/Checkboxes/index.d.ts +1 -1
  3. package/dist/FieldArray/index.d.cts +1 -1
  4. package/dist/FieldArray/index.d.ts +1 -1
  5. package/dist/FieldCard/index.cjs +1 -1
  6. package/dist/FieldCard/index.d.cts +1 -1
  7. package/dist/FieldCard/index.d.ts +1 -1
  8. package/dist/FieldCard/index.js +1 -1
  9. package/dist/{FieldCard-DcMORXZR.cjs → FieldCard-38ZBBWyE.cjs} +52 -8
  10. package/dist/FieldCard-38ZBBWyE.cjs.map +1 -0
  11. package/dist/{FieldCard-DZSiMFoO.js → FieldCard-7XiCb6jZ.js} +52 -8
  12. package/dist/FieldCard-7XiCb6jZ.js.map +1 -0
  13. package/dist/Grid/index.d.cts +1 -1
  14. package/dist/Grid/index.d.ts +1 -1
  15. package/dist/Input/index.d.cts +1 -1
  16. package/dist/Input/index.d.ts +1 -1
  17. package/dist/RadioBoxes/index.d.cts +1 -1
  18. package/dist/RadioBoxes/index.d.ts +1 -1
  19. package/dist/RadioTabs/index.d.ts +1 -1
  20. package/dist/Radios/index.d.cts +1 -1
  21. package/dist/Radios/index.d.ts +1 -1
  22. package/dist/Select/index.d.cts +1 -1
  23. package/dist/Select/index.d.ts +1 -1
  24. package/dist/Slider/index.d.cts +1 -1
  25. package/dist/Slider/index.d.ts +1 -1
  26. package/dist/SubmitButton/index.d.cts +1 -1
  27. package/dist/SubmitButton/index.d.ts +1 -1
  28. package/dist/Switch/index.d.cts +1 -1
  29. package/dist/Switch/index.d.ts +1 -1
  30. package/dist/SwitchBox/index.d.cts +1 -1
  31. package/dist/SwitchBox/index.d.ts +1 -1
  32. package/dist/TextArea/index.d.cts +1 -1
  33. package/dist/TextArea/index.d.ts +1 -1
  34. package/dist/helpers/index.d.cts +186 -2
  35. package/dist/helpers/index.d.cts.map +1 -0
  36. package/dist/helpers/index.d.ts +186 -2
  37. package/dist/helpers/index.d.ts.map +1 -0
  38. package/dist/hooks/useClientValidation/index.d.cts +1 -1
  39. package/dist/hooks/useClientValidation/index.d.ts +1 -1
  40. package/dist/hooks/useController/index.d.cts +1 -1
  41. package/dist/hooks/useController/index.d.ts +2 -1
  42. package/dist/hooks/useFormContext/index.d.cts +1 -1
  43. package/dist/hooks/useFormContext/index.d.ts +1 -1
  44. package/dist/hooks/useUniformField/index.d.cts +1 -1
  45. package/dist/hooks/useUniformField/index.d.ts +3 -3
  46. package/dist/hooks/useUniformFieldArray/index.d.cts +1 -1
  47. package/dist/hooks/useUniformFieldArray/index.d.ts +4 -24
  48. package/dist/hooks/useWatchUserChange/index.d.cts +1 -1
  49. package/dist/hooks/useWatchUserChange/index.d.ts +1 -1
  50. package/dist/{index-BZrLB2p0.d.cts → index-796vjEop.d.ts} +34 -34
  51. package/dist/index-796vjEop.d.ts.map +1 -0
  52. package/dist/{index-2SVlCM0Y.d.cts → index-B62CWrcm.d.ts} +21 -21
  53. package/dist/index-B62CWrcm.d.ts.map +1 -0
  54. package/dist/{index-DS4AP9pV.d.ts → index-BD9y--o2.d.cts} +6 -6
  55. package/dist/{index-DymdaDrj.d.cts.map → index-BD9y--o2.d.cts.map} +1 -1
  56. package/dist/{index-BbA9HcNa.d.cts → index-BFLKkqA3.d.ts} +3 -3
  57. package/dist/{index-CCeHSmIe.d.ts.map → index-BFLKkqA3.d.ts.map} +1 -1
  58. package/dist/{index-CJ90vm9t.d.ts → index-BV_YDI6g.d.ts} +6 -6
  59. package/dist/{index-CJ90vm9t.d.ts.map → index-BV_YDI6g.d.ts.map} +1 -1
  60. package/dist/{index-CCeHSmIe.d.ts → index-BW9EUWZE.d.cts} +2 -2
  61. package/dist/{index-BbA9HcNa.d.cts.map → index-BW9EUWZE.d.cts.map} +1 -1
  62. package/dist/{index-DymdaDrj.d.cts → index-B_1td56I.d.ts} +6 -6
  63. package/dist/{index-DS4AP9pV.d.ts.map → index-B_1td56I.d.ts.map} +1 -1
  64. package/dist/{index-noH6pESQ.d.ts → index-BgXr1v45.d.cts} +34 -34
  65. package/dist/index-BgXr1v45.d.cts.map +1 -0
  66. package/dist/{index-tIGuHSXb.d.ts → index-C3CvgmJw.d.ts} +4 -4
  67. package/dist/{index-tIGuHSXb.d.ts.map → index-C3CvgmJw.d.ts.map} +1 -1
  68. package/dist/{index-B2IL9Zt7.d.cts → index-C4-1V8jn.d.ts} +3 -3
  69. package/dist/{index-CPcJGZVS.d.ts.map → index-C4-1V8jn.d.ts.map} +1 -1
  70. package/dist/{index-D-ucmG60.d.ts → index-CB00FCyi.d.ts} +21 -21
  71. package/dist/index-CB00FCyi.d.ts.map +1 -0
  72. package/dist/index-CFBmva_r.d.ts +1 -0
  73. package/dist/index-COwP53Gx.d.ts +278 -0
  74. package/dist/{index-CRYEKT3o.d.ts.map → index-COwP53Gx.d.ts.map} +1 -1
  75. package/dist/{index-Ct2YYfiU.d.cts → index-CUy2EDqc.d.cts} +6 -6
  76. package/dist/{index-Ct2YYfiU.d.cts.map → index-CUy2EDqc.d.cts.map} +1 -1
  77. package/dist/{index-CpVfOXNv.d.cts → index-CbAh0Kfo.d.cts} +3 -3
  78. package/dist/{index-CpVfOXNv.d.cts.map → index-CbAh0Kfo.d.cts.map} +1 -1
  79. package/dist/{index-FHPC_VE1.d.ts → index-Cj-PU3Ck.d.ts} +35 -35
  80. package/dist/{index-FHPC_VE1.d.ts.map → index-Cj-PU3Ck.d.ts.map} +1 -1
  81. package/dist/{index-CdXOAPMb.d.ts → index-CrxSEKKb.d.cts} +48 -48
  82. package/dist/index-CrxSEKKb.d.cts.map +1 -0
  83. package/dist/{index-DYErnCVV.d.cts → index-D3RMbKbP.d.cts} +36 -36
  84. package/dist/{index-DYErnCVV.d.cts.map → index-D3RMbKbP.d.cts.map} +1 -1
  85. package/dist/{index-DaBgwR1t.d.cts → index-DAeb_8Q4.d.cts} +21 -21
  86. package/dist/{index-DaBgwR1t.d.cts.map → index-DAeb_8Q4.d.cts.map} +1 -1
  87. package/dist/{index-CPcJGZVS.d.ts → index-DEJghucW.d.cts} +3 -3
  88. package/dist/{index-B2IL9Zt7.d.cts.map → index-DEJghucW.d.cts.map} +1 -1
  89. package/dist/{index-lot50R9R.d.ts → index-DJbdReTK.d.ts} +3 -3
  90. package/dist/{index-lot50R9R.d.ts.map → index-DJbdReTK.d.ts.map} +1 -1
  91. package/dist/{index-CZ5EIIjq.d.cts → index-DTURD6sl.d.cts} +6 -6
  92. package/dist/{index-CZ5EIIjq.d.cts.map → index-DTURD6sl.d.cts.map} +1 -1
  93. package/dist/{index-BKCiuwim.d.cts → index-DebErIUS.d.ts} +48 -48
  94. package/dist/{index-CdXOAPMb.d.ts.map → index-DebErIUS.d.ts.map} +1 -1
  95. package/dist/{index-D5rTKWm9.d.cts → index-DfGCI-K_.d.cts} +99 -99
  96. package/dist/index-DfGCI-K_.d.cts.map +1 -0
  97. package/dist/{index-Djc5tmi3.d.ts → index-DjDR6FpI.d.ts} +36 -36
  98. package/dist/{index-Djc5tmi3.d.ts.map → index-DjDR6FpI.d.ts.map} +1 -1
  99. package/dist/{index-PU5WNOH9.d.cts → index-DsyY9X04.d.cts} +3 -3
  100. package/dist/{index-PU5WNOH9.d.cts.map → index-DsyY9X04.d.cts.map} +1 -1
  101. package/dist/{index-BuX42Bbd.d.ts → index-DxfiwbJb.d.cts} +18 -6
  102. package/dist/index-DxfiwbJb.d.cts.map +1 -0
  103. package/dist/{index-DubKudrE.d.ts → index-Dy0m4FQj.d.ts} +6 -6
  104. package/dist/{index-DubKudrE.d.ts.map → index-Dy0m4FQj.d.ts.map} +1 -1
  105. package/dist/{index-BDvr4eaz.d.ts → index-Y8XsRdxS.d.cts} +21 -21
  106. package/dist/{index-2SVlCM0Y.d.cts.map → index-Y8XsRdxS.d.cts.map} +1 -1
  107. package/dist/{index-DW1uBiAf.d.cts → index-gWYaaO6O.d.ts} +18 -6
  108. package/dist/index-gWYaaO6O.d.ts.map +1 -0
  109. package/dist/index-lQ_hGQ08.d.cts +1 -0
  110. package/dist/{index-hacHTzh4.d.cts → index-nVYabHcT.d.cts} +33 -33
  111. package/dist/{index-hacHTzh4.d.cts.map → index-nVYabHcT.d.cts.map} +1 -1
  112. package/dist/{index-CVY05bZf.d.ts → index-pE9osud2.d.ts} +3 -3
  113. package/dist/{index-CVY05bZf.d.ts.map → index-pE9osud2.d.ts.map} +1 -1
  114. package/dist/index.cjs +1 -1
  115. package/dist/index.d.cts +22 -22
  116. package/dist/index.d.ts +24 -23
  117. package/dist/index.js +1 -1
  118. package/dist/partials/FieldCopyTestIdButton/index.d.cts +1 -1
  119. package/dist/partials/FieldCopyTestIdButton/index.d.ts +1 -1
  120. package/dist/partials/FieldValidationError/index.d.cts +1 -1
  121. package/dist/partials/FieldValidationError/index.d.ts +1 -1
  122. package/dist/{useClientValidation-Bv0yxTyV.d.ts → useClientValidation-Bg0q3Axc.d.ts} +1 -1
  123. package/dist/{useClientValidation-Bv0yxTyV.d.ts.map → useClientValidation-Bg0q3Axc.d.ts.map} +1 -1
  124. package/dist/{useClientValidation-DSMw7f-t.d.cts → useClientValidation-BvPDQmf6.d.cts} +1 -1
  125. package/dist/{useClientValidation-DSMw7f-t.d.cts.map → useClientValidation-BvPDQmf6.d.cts.map} +1 -1
  126. package/dist/{useController-Co8wbo-Y.d.ts → useController-BJ2SBdky.d.ts} +1 -1
  127. package/dist/{useController-Co8wbo-Y.d.ts.map → useController-BJ2SBdky.d.ts.map} +1 -1
  128. package/dist/{useController-B-DhUPpA.d.cts → useController-C6Pg9T_3.d.cts} +1 -1
  129. package/dist/{useController-B-DhUPpA.d.cts.map → useController-C6Pg9T_3.d.cts.map} +1 -1
  130. package/dist/{useFormContext-DDx8LD8e.d.ts → useFormContext-B2TS6xq0.d.ts} +3 -3
  131. package/dist/useFormContext-B2TS6xq0.d.ts.map +1 -0
  132. package/dist/{useFormContext-oEivkWtB.d.cts → useFormContext-n3WYgGkW.d.cts} +19 -19
  133. package/dist/useFormContext-n3WYgGkW.d.cts.map +1 -0
  134. package/dist/{useUniformField-q3GCAV85.d.ts → useUniformField-CXSaAVTt.d.ts} +3 -3
  135. package/dist/{useUniformField-q3GCAV85.d.ts.map → useUniformField-CXSaAVTt.d.ts.map} +1 -1
  136. package/dist/{useUniformField-DFXQO9dw.d.cts → useUniformField-ETnay_UI.d.cts} +3 -3
  137. package/dist/{useUniformField-DFXQO9dw.d.cts.map → useUniformField-ETnay_UI.d.cts.map} +1 -1
  138. package/dist/{useUniformFieldArray-B3smveBW.d.cts → useUniformFieldArray-4pUdrWYT.d.cts} +14 -14
  139. package/dist/{useUniformFieldArray-B3smveBW.d.cts.map → useUniformFieldArray-4pUdrWYT.d.cts.map} +1 -1
  140. package/dist/{useUniformFieldArray-CmACueEO.d.ts → useUniformFieldArray-COtgcAnp.d.ts} +3 -3
  141. package/dist/{useUniformFieldArray-CmACueEO.d.ts.map → useUniformFieldArray-COtgcAnp.d.ts.map} +1 -1
  142. package/dist/{useWatchUserChange-JMU-vN92.d.ts → useWatchUserChange-DX6gUHvM.d.ts} +1 -1
  143. package/dist/{useWatchUserChange-JMU-vN92.d.ts.map → useWatchUserChange-DX6gUHvM.d.ts.map} +1 -1
  144. package/dist/{useWatchUserChange-DahNCPDG.d.cts → useWatchUserChange-cI5-j6M4.d.cts} +1 -1
  145. package/dist/{useWatchUserChange-DahNCPDG.d.cts.map → useWatchUserChange-cI5-j6M4.d.cts.map} +1 -1
  146. package/package.json +2 -2
  147. package/dist/FieldCard-DZSiMFoO.js.map +0 -1
  148. package/dist/FieldCard-DcMORXZR.cjs.map +0 -1
  149. package/dist/index-BDvr4eaz.d.ts.map +0 -1
  150. package/dist/index-BKCiuwim.d.cts.map +0 -1
  151. package/dist/index-BPjrrFuM.d.ts +0 -186
  152. package/dist/index-BPjrrFuM.d.ts.map +0 -1
  153. package/dist/index-BTr_gid3.d.cts +0 -186
  154. package/dist/index-BTr_gid3.d.cts.map +0 -1
  155. package/dist/index-BZrLB2p0.d.cts.map +0 -1
  156. package/dist/index-BuX42Bbd.d.ts.map +0 -1
  157. package/dist/index-CRYEKT3o.d.ts +0 -278
  158. package/dist/index-D-ucmG60.d.ts.map +0 -1
  159. package/dist/index-D5rTKWm9.d.cts.map +0 -1
  160. package/dist/index-DW1uBiAf.d.cts.map +0 -1
  161. package/dist/index-noH6pESQ.d.ts.map +0 -1
  162. package/dist/useFormContext-DDx8LD8e.d.ts.map +0 -1
  163. package/dist/useFormContext-oEivkWtB.d.cts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"useUniformField-DFXQO9dw.d.cts","names":[],"sources":["../src/hooks/useUniformField/useUniformField.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UA0CiB,2CACM,cAAc;;EADpB,IAAA,EAKT,IALS,CAKJ,YALI,CAAqB,GAAA,MAAA;EACf;EAAc,SAAA,CAAA,EAAA,MAAA;EAIxB;EAAL,QAAA,CAAA,EAAA,OAAA;EAME;EAIwB,KAAA,CAAA,EAJxB,SAIwB;EAApB;EAAmB,MAAA,CAAA,EAAA,MAAA;EAKhB;EACM,SAAA,CAAA,EANT,mBAMS,CANW,QAMX,CAAA;EAAc;EAKO,IAAA,CAAA,EAAA,MAAA,GAAA,QAAA,GAAA,UAAA;;AAAjC,UANM,qBAMN,CAAA,qBALY,WAKZ,GAL0B,WAK1B,CAAA,CAAA;EAEmC;EAAf,SAAA,EAAA,MAAA,GAAA,SAAA;EAAlB;EAMJ,OAAA,EARE,UAQF,CAAA,OARoB,cAQpB,CARmC,YAQnC,CAAA,CAAA,CAAA,SAAA,CAAA;EAEO;EAEyB,SAAA,EAV5B,UAU4B,CAAA,OAVV,cAUU,CAVK,YAUL,CAAA,CAAA,CAAA,WAAA,CAAA;EAAd;EAAlB,YAAA,EAAA,OAAA;EAEiC;EAAlB,QAAA,EAAA,OAAA,GAAA,SAAA;EAEmB;EAAlB,KAAA,EARhB,U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AAA,CAAA,CAAA,WAAA,CAAA;EAE2B;EAAd,OAAA,EAAA,OAAA;EAAlB;EAIwC,KAAA,EAVtC,SAUsC,GAAA,IAAA;EAAf;EAAlB,MAAA,EARJ,UAQI,CAAA,OARc,aAQd,CAR4B,YAQ5B,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA,QAAA,CAAA;EAAU;EAiCX,QAAA,EAvCD,UA6MX,CAAA,OA7M6B,aA6M7B,CA7M2C,YA6M3C,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA,UAAA,CAAA;EArKsB;EAAc,GAAA,EAtC9B,UAsC8B,CAAA,OAtCZ,aAsCY,CAtCE,YAsCF,CAAA,CAAA,CAAA,OAAA,CAAA,CAAA,KAAA,CAAA;EAGL;EAAc,QAAA,EAAA,OAAA;EAApC;EACe,UAAA,EAtCX,UAsCW,CAAA,OAtCO,cAsCP,CAtCsB,YAsCtB,CAAA,CAAA,CAAA,YAAA,CAAA;EAAtB;EAAqB,MAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cALX,uCACU,cAAc,yCAG3B,sBAAsB,cAAc,cAC3C,sBAAsB"}
@@ -1,7 +1,7 @@
1
- import { r as useController } from "./useController-B-DhUPpA.cjs";
2
- import { n as useFormContext } from "./useFormContext-oEivkWtB.cjs";
1
+ import { r as useController } from "./useController-C6Pg9T_3.cjs";
2
+ import { n as useFormContext } from "./useFormContext-n3WYgGkW.cjs";
3
3
  import { ReactNode } from "react";
4
- import * as react_hook_form14 from "react-hook-form";
4
+ import * as react_hook_form0 from "react-hook-form";
5
5
  import { ArrayPath, FieldValues } from "react-hook-form";
6
6
  import * as _heroui_input0 from "@heroui/input";
7
7
 
@@ -44,36 +44,36 @@ declare const useUniformFieldArray: <TFieldValues extends FieldValues = FieldVal
44
44
  label
45
45
  }: UseUniformFieldArrayProps<TFieldValues>) => {
46
46
  ariaLabel: string | undefined;
47
- control: react_hook_form14.Control<TFieldValues, any, TFieldValues>;
47
+ control: react_hook_form0.Control<TFieldValues, any, TFieldValues>;
48
48
  debugMode: ReturnType<typeof useFormContext<TFieldValues_1>>["debugMode"];
49
49
  defaultValue: unknown;
50
50
  disabled: boolean | undefined;
51
- error: react_hook_form14.FieldError[] | undefined;
51
+ error: react_hook_form0.FieldError[] | undefined;
52
52
  errorMessage: ReactNode | null;
53
- field: Omit<react_hook_form14.ControllerRenderProps<TFieldValues>, "value" | "onChange"> & {
53
+ field: Omit<react_hook_form0.ControllerRenderProps<TFieldValues>, "value" | "onChange"> & {
54
54
  onChange: (...event: any[]) => void;
55
55
  value: string;
56
56
  };
57
57
  getErrorMessageProps: ReturnType<typeof _heroui_input0.useInput>["getErrorMessageProps"];
58
58
  getHelperWrapperProps: ReturnType<typeof _heroui_input0.useInput>["getHelperWrapperProps"];
59
59
  getLabelProps: ReturnType<typeof _heroui_input0.useInput>["getLabelProps"];
60
- getValues: react_hook_form14.UseFormGetValues<TFieldValues>;
60
+ getValues: react_hook_form0.UseFormGetValues<TFieldValues>;
61
61
  invalid: boolean;
62
62
  label: ReactNode | null;
63
63
  onBlur: ReturnType<typeof useController>["field"]["onBlur"];
64
64
  onChange: ReturnType<typeof useController>["field"]["onChange"];
65
65
  ref: ReturnType<typeof useController>["field"]["ref"];
66
66
  required: boolean;
67
- resetField: react_hook_form14.UseFormResetField<TFieldValues>;
67
+ resetField: react_hook_form0.UseFormResetField<TFieldValues>;
68
68
  testId: string;
69
- fields: react_hook_form14.FieldArrayWithId<TFieldValues, ArrayPath<TFieldValues>, "id">[];
70
- append: react_hook_form14.UseFieldArrayAppend<TFieldValues, ArrayPath<TFieldValues>>;
71
- remove: react_hook_form14.UseFieldArrayRemove;
72
- insert: react_hook_form14.UseFieldArrayInsert<TFieldValues, ArrayPath<TFieldValues>>;
73
- move: react_hook_form14.UseFieldArrayMove;
69
+ fields: react_hook_form0.FieldArrayWithId<TFieldValues, ArrayPath<TFieldValues>, "id">[];
70
+ append: react_hook_form0.UseFieldArrayAppend<TFieldValues, ArrayPath<TFieldValues>>;
71
+ remove: react_hook_form0.UseFieldArrayRemove;
72
+ insert: react_hook_form0.UseFieldArrayInsert<TFieldValues, ArrayPath<TFieldValues>>;
73
+ move: react_hook_form0.UseFieldArrayMove;
74
74
  disableAnimation: boolean;
75
75
  elementInitialValue: {};
76
76
  };
77
77
  //#endregion
78
78
  export { useUniformFieldArray as n, UseUniformFieldArrayProps as t };
79
- //# sourceMappingURL=useUniformFieldArray-B3smveBW.d.cts.map
79
+ //# sourceMappingURL=useUniformFieldArray-4pUdrWYT.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useUniformFieldArray-B3smveBW.d.cts","names":[],"sources":["../src/hooks/useUniformFieldArray/useUniformFieldArray.ts"],"sourcesContent":[],"mappings":";;;;;;;;UAYiB,+CACM,cAAc;;QAG7B,UAAU;;;EAJD;EACM,mBAAA,CAAA,EAAA,OAAA;EAAc;EAGnB,uBAAA,CAAA,EAAA,OAAA;EAAV;EAYE,QAAA,CAAA,EAAA,OAAA;EAAS;EAeN,MAAA,CAAA,EAAA,MAAA;EACU;EAAc,KAAA,CAAA,EAhB3B,SAgB2B;;;;;;;;;;;;;;cADxB,4CACU,cAAc;;;uBACnC;;;UAAA;;GAQC,0BAA0B;;;;;;;;;;;;;;;;;EAuDpB,KAAA,WAAA,GAAA,IAAA;EAAA,MAAA,EAAA,UAAA,CAAA,oBAAA,CAAA,CAAA,OAAA,CAAA,CAAA,QAAA,CAAA;EAKwC,QAAA,EAAA,UAAA,CAAA,OALxC,aAKwC,CAAA,CAAA,OAAA,CAAA,CAAA,UAAA,CAAA;EAAA,GAAA,EACyB,UADzB,CAAA,OAAA,aAAA,CAAA,CAAA,OAAA,CAAA,CAAA,KAAA,CAAA;EACyB,QAAA,EAAA,OAAA"}
1
+ {"version":3,"file":"useUniformFieldArray-4pUdrWYT.d.cts","names":[],"sources":["../src/hooks/useUniformFieldArray/useUniformFieldArray.ts"],"sourcesContent":[],"mappings":";;;;;;;;UAYiB,+CACM,cAAc;;QAG7B,UAAU;;;EAJD;EACM,mBAAA,CAAA,EAAA,OAAA;EAAc;EAGnB,uBAAA,CAAA,EAAA,OAAA;EAAV;EAYE,QAAA,CAAA,EAAA,OAAA;EAAS;EAeN,MAAA,CAAA,EAAA,MAAA;EACU;EAAc,KAAA,CAAA,EAhB3B,SAgB2B;;;;;;;;;;;;;;cADxB,4CACU,cAAc;;;uBACnC;;;UAAA;;GAQC,0BAA0B;;;;;;;;;;;;;;;;;EAuDpB,KAAA,WAAA,GAAA,IAAA;EAAA,MAAA,EAAA,UAAA,CAAA,oBAAA,CAAA,CAAA,OAAA,CAAA,CAAA,QAAA,CAAA;EAKwC,QAAA,EAAA,UAAA,CAAA,OALxC,aAKwC,CAAA,CAAA,OAAA,CAAA,CAAA,UAAA,CAAA;EAAA,GAAA,EACyB,UADzB,CAAA,OAAA,aAAA,CAAA,CAAA,OAAA,CAAA,CAAA,KAAA,CAAA;EACyB,QAAA,EAAA,OAAA"}
@@ -1,5 +1,5 @@
1
- import { r as useController$1 } from "./useController-Co8wbo-Y.js";
2
- import { n as useFormContext$1 } from "./useFormContext-DDx8LD8e.js";
1
+ import { r as useController$1 } from "./useController-BJ2SBdky.js";
2
+ import { n as useFormContext$1 } from "./useFormContext-B2TS6xq0.js";
3
3
  import { ReactNode } from "react";
4
4
  import * as react_hook_form0 from "react-hook-form";
5
5
  import { ArrayPath, FieldValues } from "react-hook-form";
@@ -76,4 +76,4 @@ declare const useUniformFieldArray: <TFieldValues extends FieldValues = FieldVal
76
76
  };
77
77
  //#endregion
78
78
  export { useUniformFieldArray as n, UseUniformFieldArrayProps as t };
79
- //# sourceMappingURL=useUniformFieldArray-CmACueEO.d.ts.map
79
+ //# sourceMappingURL=useUniformFieldArray-COtgcAnp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useUniformFieldArray-CmACueEO.d.ts","names":[],"sources":["../src/hooks/useUniformFieldArray/useUniformFieldArray.ts"],"sourcesContent":[],"mappings":";;;;;;;;UA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UAAA,CAAA;EAAA,GAAA,EACyB,UADzB,CAAA,OAAA,eAAA,CAAA,CAAA,OAAA,CAAA,CAAA,KAAA,CAAA;EACyB,QAAA,EAAA,OAAA"}
@@ -77,4 +77,4 @@ declare const useWatchUserChange: <TFieldValues extends FieldValues = FieldValue
77
77
  }: UseWatchUserChangeOptions<TFieldValues>) => void;
78
78
  //#endregion
79
79
  export { useWatchUserChange as n, UseWatchUserChangeOptions as t };
80
- //# sourceMappingURL=useWatchUserChange-JMU-vN92.d.ts.map
80
+ //# sourceMappingURL=useWatchUserChange-DX6gUHvM.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useWatchUserChange-JMU-vN92.d.ts","names":[],"sources":["../src/hooks/useWatchUserChange/useWatchUserChange.ts"],"sourcesContent":[],"mappings":";;;UAYiB,+CAA+C;;EAA/C,KAAA,EAER,IAFQ,CAEH,YAFG,CAAA;EAA+C;;;;EAUhD,QAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,OAAA,EAAA;IACoB,QAAA,EADpB,eACoB,CADJ,YACI,CAAA;IAAlB,UAAA,EAAA,iBAAA,CAAkB,YAAlB,CAAA;IACQ,KAAA,EAAb,YAAa,CAAA,YAAA,CAAA;EAAb,CAAA,EAAA,GAAA,IAAA;;AA8Db;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,0CACU,cAAc;SACnC;;GAGC,0BAA0B"}
1
+ {"version":3,"file":"useWatchUserChange-DX6gUHvM.d.ts","names":[],"sources":["../src/hooks/useWatchUserChange/useWatchUserChange.ts"],"sourcesContent":[],"mappings":";;;UAYiB,+CAA+C;;EAA/C,KAAA,EAER,IAFQ,CAEH,YAFG,CAAA;EAA+C;;;;EAUhD,QAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,OAAA,EAAA;IACoB,QAAA,EADpB,eACoB,CADJ,YACI,CAAA;IAAlB,UAAA,EAAA,iBAAA,CAAkB,YAAlB,CAAA;IACQ,KAAA,EAAb,YAAa,CAAA,YAAA,CAAA;EAAb,CAAA,EAAA,GAAA,IAAA;;AA8Db;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,0CACU,cAAc;SACnC;;GAGC,0BAA0B"}
@@ -77,4 +77,4 @@ declare const useWatchUserChange: <TFieldValues extends FieldValues = FieldValue
77
77
  }: UseWatchUserChangeOptions<TFieldValues>) => void;
78
78
  //#endregion
79
79
  export { useWatchUserChange as n, UseWatchUserChangeOptions as t };
80
- //# sourceMappingURL=useWatchUserChange-DahNCPDG.d.cts.map
80
+ //# sourceMappingURL=useWatchUserChange-cI5-j6M4.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useWatchUserChange-DahNCPDG.d.cts","names":[],"sources":["../src/hooks/useWatchUserChange/useWatchUserChange.ts"],"sourcesContent":[],"mappings":";;;UAYiB,+CAA+C;;EAA/C,KAAA,EAER,IAFQ,CAEH,YAFG,CAAA;EAA+C;;;;EAUhD,QAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,OAAA,EAAA;IACoB,QAAA,EADpB,eACoB,CADJ,YACI,CAAA;IAAlB,UAAA,EAAA,iBAAA,CAAkB,YAAlB,CAAA;IACQ,KAAA,EAAb,YAAa,CAAA,YAAA,CAAA;EAAb,CAAA,EAAA,GAAA,IAAA;;AA8Db;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,0CACU,cAAc;SACnC;;GAGC,0BAA0B"}
1
+ {"version":3,"file":"useWatchUserChange-cI5-j6M4.d.cts","names":[],"sources":["../src/hooks/useWatchUserChange/useWatchUserChange.ts"],"sourcesContent":[],"mappings":";;;UAYiB,+CAA+C;;EAA/C,KAAA,EAER,IAFQ,CAEH,YAFG,CAAA;EAA+C;;;;EAUhD,QAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,OAAA,EAAA;IACoB,QAAA,EADpB,eACoB,CADJ,YACI,CAAA;IAAlB,UAAA,EAAA,iBAAA,CAAkB,YAAlB,CAAA;IACQ,KAAA,EAAb,YAAa,CAAA,YAAA,CAAA;EAAb,CAAA,EAAA,GAAA,IAAA;;AA8Db;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,0CACU,cAAc;SACnC;;GAGC,0BAA0B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fuf-stack/uniform",
3
- "version": "1.16.0",
3
+ "version": "1.17.0",
4
4
  "description": "fuf react form library",
5
5
  "author": "Fröhlich ∧ Frei",
6
6
  "homepage": "https://github.com/fuf-stack/pixels#readme",
@@ -181,5 +181,5 @@
181
181
  "react": "19.2.3",
182
182
  "react-dom": "19.2.3"
183
183
  },
184
- "gitHead": "fa9efd9affa263c0e08601cd349d955bc16a8605"
184
+ "gitHead": "365699fbe80df25401be55ab25cbe362f723e0c1"
185
185
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"FieldCard-DZSiMFoO.js","names":["FieldValidationError","FieldCardValidationError"],"sources":["../src/FieldCard/subcomponents/FieldCardValidationError.tsx","../src/FieldCard/FieldCard.tsx"],"sourcesContent":["import {\n AnimatePresence,\n motion,\n useReducedMotion,\n} from '@fuf-stack/pixel-motion';\nimport { cn } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../../hooks/useUniformField';\nimport FieldValidationError from '../../partials/FieldValidationError/FieldValidationError';\n\nexport interface FieldCardValidationErrorProps {\n /** CSS class name for the error footer wrapper */\n className?: string;\n /** Field name */\n name: string;\n}\n\n/**\n * Renders validation errors in the footer of a FieldCard component.\n *\n * This component handles displaying field-level validation errors with proper\n * accessibility attributes and animates them in/out using Framer Motion.\n */\nconst FieldCardValidationError = ({\n className = undefined,\n name,\n}: FieldCardValidationErrorProps) => {\n const { error, getErrorMessageProps, getHelperWrapperProps, testId } =\n useUniformField({\n name,\n });\n\n // disable all animation if user prefers reduced motion\n const disableAnimation = useReducedMotion();\n\n // Always show object-level errors (_errors) as they represent explicit\n // validation rules (e.g., refineObject custom validators)\n // @ts-expect-error - error._errors exists but not typed\n const hasErrors = !!error?._errors;\n\n return (\n <AnimatePresence initial={!disableAnimation}>\n {hasErrors ? (\n <motion.div\n key=\"field-card-errors\"\n exit={disableAnimation ? undefined : { opacity: 0, height: 0 }}\n initial={disableAnimation ? false : { height: 0, opacity: 0 }}\n style={{ overflow: 'hidden' }}\n transition={{ duration: 0.4, ease: 'circOut' }}\n animate={\n disableAnimation ? undefined : { opacity: 1, height: 'auto' }\n }\n >\n <div\n {...getHelperWrapperProps()}\n className={cn(getHelperWrapperProps()?.className, className)}\n >\n <div {...getErrorMessageProps()}>\n <FieldValidationError\n // @ts-expect-error - error._errors exists but not typed\n error={error._errors}\n testId={testId}\n />\n </div>\n </div>\n </motion.div>\n ) : null}\n </AnimatePresence>\n );\n};\n\nexport default FieldCardValidationError;\n","import type { TVClassName } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { checkFieldIsRequired, useFormContext } from '../hooks/useFormContext';\nimport { useUniformField } from '../hooks/useUniformField';\nimport FieldCardValidationError from './subcomponents/FieldCardValidationError';\n\n/**\n * Recursively checks if any child field with an error is also touched.\n * Returns true if at least one touched child has an error.\n */\nexport const hasVisibleChildErrors = (\n errors: Record<string, unknown> | undefined,\n touched: Record<string, unknown> | undefined,\n): boolean => {\n if (!errors || !touched) {\n return false;\n }\n\n return Object.keys(errors)\n .filter((key) => {\n // Skip object-level errors (_errors) - those are handled separately\n return key !== '_errors';\n })\n .some((key) => {\n const errorValue = errors[key];\n const touchedValue = touched[key];\n\n // If this key doesn't exist in both errors and touched, skip\n if (errorValue === undefined || touchedValue === undefined) {\n return false;\n }\n\n // If errorValue is an array, it's a leaf field error\n if (Array.isArray(errorValue)) {\n // touchedValue being truthy means the field is touched\n return !!touchedValue;\n }\n\n // Recursively check nested objects\n if (typeof errorValue === 'object' && errorValue !== null) {\n return hasVisibleChildErrors(\n errorValue as Record<string, unknown>,\n touchedValue as Record<string, unknown>,\n );\n }\n\n return false;\n });\n};\n\nexport const fieldCardVariants = tv({\n slots: {\n /** base class for the field card wrapper */\n base: [\n // base styles\n 'overflow-hidden rounded-small border bg-content1',\n // animate border color change, respect reduced motion\n 'transition-colors duration-150 motion-reduce:transition-none',\n ],\n /** class for the label/header */\n label: [\n // override HeroUI label positioning and display\n 'pointer-events-auto! static! z-auto! block! w-full!',\n // reset any transforms or translations\n 'translate-x-0! translate-y-0! transform-none!',\n // card header styling - use text-medium (16px) for proper header size\n 'rounded-t-small border-b p-3 font-semibold text-medium',\n // animate border and text color change, respect reduced motion\n 'transition-colors duration-150 motion-reduce:transition-none',\n ],\n /** class for the content */\n content: [\n // same as p-3 of Card component\n 'p-3',\n // default grid for form components (see Grid component)\n 'grid gap-4',\n ],\n /** class for the error footer wrapper */\n errorFooter: [\n 'border-t',\n // force helper to be visible and add padding (pt-1 to compensate for inner content's top padding)\n 'block px-3 pb-2 pt-1',\n // animate border color change, respect reduced motion\n 'transition-colors duration-150 motion-reduce:transition-none',\n ],\n },\n variants: {\n invalid: {\n true: {\n base: 'border-danger-200',\n label: 'border-danger-200 text-danger',\n errorFooter: 'border-danger-200',\n },\n false: {\n base: 'border-divider',\n label: 'border-divider text-foreground',\n errorFooter: 'border-divider',\n },\n },\n },\n defaultVariants: {\n invalid: false,\n },\n});\n\ntype ClassName = TVClassName<typeof fieldCardVariants>;\n\nexport interface FieldCardProps {\n /** Content to render inside the card */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** Label content for the card header */\n label: ReactNode;\n /** Field name for validation */\n name: string;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * FieldCard component - A card-styled container with label header and error footer\n *\n * Displays form field content in a card layout with:\n * - Label/title in the header\n * - Content in the body\n * - Validation errors in the footer\n * - Danger outline when validation errors exist\n */\nconst FieldCard = ({\n children,\n className: _className = undefined,\n name,\n ...uniformFieldProps\n}: FieldCardProps) => {\n const { error, getLabelProps, label } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n const {\n control,\n formState: { touchedFields, submitCount },\n validation,\n } = useFormContext();\n\n // Check if any registered child field is required\n const validationInstance = validation?.baseInstance ?? validation?.instance;\n const registeredFields: string[] = Array.from(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (control as any)._names?.mount ?? [],\n );\n const childFieldPrefix = `${name}.`;\n const isRequired = validationInstance\n ? registeredFields\n .filter((f) => {\n return f.startsWith(childFieldPrefix);\n })\n .some((f) => {\n return checkFieldIsRequired(\n validationInstance,\n f.split('.').filter((k) => {\n return k !== '';\n }),\n );\n })\n : false;\n\n // Get touched state for this field's children by traversing the path\n const getNestedValue = (\n obj: Record<string, unknown> | undefined,\n path: string,\n ): Record<string, unknown> | undefined => {\n if (!obj) {\n return undefined;\n }\n const keys = path.split('.');\n let current: unknown = obj;\n keys.every((key) => {\n if (current && typeof current === 'object') {\n current = (current as Record<string, unknown>)[key];\n return true;\n }\n current = undefined;\n return false;\n });\n return current as Record<string, unknown> | undefined;\n };\n\n const fieldTouched = getNestedValue(\n touchedFields as Record<string, unknown>,\n name,\n );\n\n // Check for object-level errors (_errors) - always show these as they represent\n // explicit object-level validation rules (e.g., refineObject custom validators)\n // @ts-expect-error - error._errors exists but not typed\n const hasObjectErrors = !!error?._errors;\n\n // Check if any child field with an error is also touched\n const hasChildErrors =\n submitCount > 0 ||\n hasVisibleChildErrors(\n error as unknown as Record<string, unknown>,\n fieldTouched,\n );\n\n // Show invalid state if there are object errors or visible child errors\n const showInvalid = hasObjectErrors || hasChildErrors;\n\n // className from slots\n const variants = fieldCardVariants({ invalid: showInvalid });\n const className = variantsToClassNames(variants, _className, 'base');\n\n return (\n <div className={className.base}>\n {/* card header with label */}\n {label ? (\n <div\n {...getLabelProps()}\n aria-level={3}\n // Override getLabelProps className to use our own invalid styling based on hasErrors,\n // not HeroUI's which is based on any child field being invalid\n className={className.label}\n role=\"heading\"\n >\n {label}\n {/* Manual asterisk: getLabelProps uses schema-required for the object itself,\n but FieldCard needs asterisk based on whether any CHILD field is required */}\n {isRequired ? (\n <span aria-hidden=\"true\" className=\"ml-0.5 text-danger\">\n *\n </span>\n ) : null}\n </div>\n ) : null}\n\n {/* card content */}\n <div className={className.content}>{children}</div>\n\n {/* card footer with validation errors */}\n <FieldCardValidationError className={className.errorFooter} name={name} />\n </div>\n );\n};\n\nexport default FieldCard;\n"],"mappings":";;;;;;;;;;;;;;AAuBA,MAAM,4BAA4B,EAChC,YAAY,QACZ,WACmC;CACnC,MAAM,EAAE,OAAO,sBAAsB,uBAAuB,WAC1D,gBAAgB,EACd,MACD,CAAC;CAGJ,MAAM,mBAAmB,kBAAkB;CAK3C,MAAM,YAAY,CAAC,CAAC,OAAO;AAE3B,QACE,oBAAC;EAAgB,SAAS,CAAC;YACxB,YACC,oBAAC,OAAO;GAEN,MAAM,mBAAmB,SAAY;IAAE,SAAS;IAAG,QAAQ;IAAG;GAC9D,SAAS,mBAAmB,QAAQ;IAAE,QAAQ;IAAG,SAAS;IAAG;GAC7D,OAAO,EAAE,UAAU,UAAU;GAC7B,YAAY;IAAE,UAAU;IAAK,MAAM;IAAW;GAC9C,SACE,mBAAmB,SAAY;IAAE,SAAS;IAAG,QAAQ;IAAQ;aAG/D,oBAAC;IACC,GAAI,uBAAuB;IAC3B,WAAW,GAAG,uBAAuB,EAAE,WAAW,UAAU;cAE5D,oBAAC;KAAI,GAAI,sBAAsB;eAC7B,oBAACA;MAEC,OAAO,MAAM;MACL;OACR;MACE;KACF;KApBF,oBAqBO,GACX;GACY;;AAItB,uCAAe;;;;;;;;AC1Df,MAAa,yBACX,QACA,YACY;AACZ,KAAI,CAAC,UAAU,CAAC,QACd,QAAO;AAGT,QAAO,OAAO,KAAK,OAAO,CACvB,QAAQ,QAAQ;AAEf,SAAO,QAAQ;G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IAAI;EAC5B,IAAI,UAAmB;AACvB,OAAK,OAAO,QAAQ;AAClB,OAAI,WAAW,OAAO,YAAY,UAAU;AAC1C,cAAW,QAAoC;AAC/C,WAAO;;AAET,aAAU;AACV,UAAO;IACP;AACF,SAAO;;CAGT,MAAM,eAAe,eACnB,eACA,KACD;CAKD,MAAM,kBAAkB,CAAC,CAAC,OAAO;CAGjC,MAAM,iBACJ,cAAc,KACd,sBACE,OACA,aACD;CAOH,MAAM,YAAY,qBADD,kBAAkB,EAAE,SAHjB,mBAAmB,gBAGoB,CAAC,EACX,YAAY,OAAO;AAEpE,QACE,qBAAC;EAAI,WAAW,UAAU;;GAEvB,QACC,qBAAC;IACC,GAAI,eAAe;IACnB,cAAY;IAGZ,WAAW,UAAU;IACrB,MAAK;eAEJ,OAGA,aACC,oBAAC;KAAK,eAAY;KAAO,WAAU;eAAqB;MAEjD,GACL;KACA,GACJ;GAGJ,oBAAC;IAAI,WAAW,UAAU;IAAU;KAAe;GAGnD,oBAACC;IAAyB,WAAW,UAAU;IAAmB;KAAQ;;GACtE;;AAIV,wBAAe"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FieldCard-DcMORXZR.cjs","names":["useUniformField","AnimatePresence","motion","FieldValidationError","useUniformField","useFormContext","checkFieldIsRequired","FieldCardValidationError"],"sources":["../src/FieldCard/subcomponents/FieldCardValidationError.tsx","../src/FieldCard/FieldCard.tsx"],"sourcesContent":["import {\n AnimatePresence,\n motion,\n useReducedMotion,\n} from '@fuf-stack/pixel-motion';\nimport { cn } from '@fuf-stack/pixel-utils';\n\nimport { useUniformField } from '../../hooks/useUniformField';\nimport FieldValidationError from '../../partials/FieldValidationError/FieldValidationError';\n\nexport interface FieldCardValidationErrorProps {\n /** CSS class name for the error footer wrapper */\n className?: string;\n /** Field name */\n name: string;\n}\n\n/**\n * Renders validation errors in the footer of a FieldCard component.\n *\n * This component handles displaying field-level validation errors with proper\n * accessibility attributes and animates them in/out using Framer Motion.\n */\nconst FieldCardValidationError = ({\n className = undefined,\n name,\n}: FieldCardValidationErrorProps) => {\n const { error, getErrorMessageProps, getHelperWrapperProps, testId } =\n useUniformField({\n name,\n });\n\n // disable all animation if user prefers reduced motion\n const disableAnimation = useReducedMotion();\n\n // Always show object-level errors (_errors) as they represent explicit\n // validation rules (e.g., refineObject custom validators)\n // @ts-expect-error - error._errors exists but not typed\n const hasErrors = !!error?._errors;\n\n return (\n <AnimatePresence initial={!disableAnimation}>\n {hasErrors ? (\n <motion.div\n key=\"field-card-errors\"\n exit={disableAnimation ? undefined : { opacity: 0, height: 0 }}\n initial={disableAnimation ? false : { height: 0, opacity: 0 }}\n style={{ overflow: 'hidden' }}\n transition={{ duration: 0.4, ease: 'circOut' }}\n animate={\n disableAnimation ? undefined : { opacity: 1, height: 'auto' }\n }\n >\n <div\n {...getHelperWrapperProps()}\n className={cn(getHelperWrapperProps()?.className, className)}\n >\n <div {...getErrorMessageProps()}>\n <FieldValidationError\n // @ts-expect-error - error._errors exists but not typed\n error={error._errors}\n testId={testId}\n />\n </div>\n </div>\n </motion.div>\n ) : null}\n </AnimatePresence>\n );\n};\n\nexport default FieldCardValidationError;\n","import type { TVClassName } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { checkFieldIsRequired, useFormContext } from '../hooks/useFormContext';\nimport { useUniformField } from '../hooks/useUniformField';\nimport FieldCardValidationError from './subcomponents/FieldCardValidationError';\n\n/**\n * Recursively checks if any child field with an error is also touched.\n * Returns true if at least one touched child has an error.\n */\nexport const hasVisibleChildErrors = (\n errors: Record<string, unknown> | undefined,\n touched: Record<string, unknown> | undefined,\n): boolean => {\n if (!errors || !touched) {\n return false;\n }\n\n return Object.keys(errors)\n .filter((key) => {\n // Skip object-level errors (_errors) - those are handled separately\n return key !== '_errors';\n })\n .some((key) => {\n const errorValue = errors[key];\n const touchedValue = touched[key];\n\n // If this key doesn't exist in both errors and touched, skip\n if (errorValue === undefined || touchedValue === undefined) {\n return false;\n }\n\n // If errorValue is an array, it's a leaf field error\n if (Array.isArray(errorValue)) {\n // touchedValue being truthy means the field is touched\n return !!touchedValue;\n }\n\n // Recursively check nested objects\n if (typeof errorValue === 'object' && errorValue !== null) {\n return hasVisibleChildErrors(\n errorValue as Record<string, unknown>,\n touchedValue as Record<string, unknown>,\n );\n }\n\n return false;\n });\n};\n\nexport const fieldCardVariants = tv({\n slots: {\n /** base class for the field card wrapper */\n base: [\n // base styles\n 'overflow-hidden rounded-small border bg-content1',\n // animate border color change, respect reduced motion\n 'transition-colors duration-150 motion-reduce:transition-none',\n ],\n /** class for the label/header */\n label: [\n // override HeroUI label positioning and display\n 'pointer-events-auto! static! z-auto! block! w-full!',\n // reset any transforms or translations\n 'translate-x-0! translate-y-0! transform-none!',\n // card header styling - use text-medium (16px) for proper header size\n 'rounded-t-small border-b p-3 font-semibold text-medium',\n // animate border and text color change, respect reduced motion\n 'transition-colors duration-150 motion-reduce:transition-none',\n ],\n /** class for the content */\n content: [\n // same as p-3 of Card component\n 'p-3',\n // default grid for form components (see Grid component)\n 'grid gap-4',\n ],\n /** class for the error footer wrapper */\n errorFooter: [\n 'border-t',\n // force helper to be visible and add padding (pt-1 to compensate for inner content's top padding)\n 'block px-3 pb-2 pt-1',\n // animate border color change, respect reduced motion\n 'transition-colors duration-150 motion-reduce:transition-none',\n ],\n },\n variants: {\n invalid: {\n true: {\n base: 'border-danger-200',\n label: 'border-danger-200 text-danger',\n errorFooter: 'border-danger-200',\n },\n false: {\n base: 'border-divider',\n label: 'border-divider text-foreground',\n errorFooter: 'border-divider',\n },\n },\n },\n defaultVariants: {\n invalid: false,\n },\n});\n\ntype ClassName = TVClassName<typeof fieldCardVariants>;\n\nexport interface FieldCardProps {\n /** Content to render inside the card */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** Label content for the card header */\n label: ReactNode;\n /** Field name for validation */\n name: string;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * FieldCard component - A card-styled container with label header and error footer\n *\n * Displays form field content in a card layout with:\n * - Label/title in the header\n * - Content in the body\n * - Validation errors in the footer\n * - Danger outline when validation errors exist\n */\nconst FieldCard = ({\n children,\n className: _className = undefined,\n name,\n ...uniformFieldProps\n}: FieldCardProps) => {\n const { error, getLabelProps, label } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n const {\n control,\n formState: { touchedFields, submitCount },\n validation,\n } = useFormContext();\n\n // Check if any registered child field is required\n const validationInstance = validation?.baseInstance ?? validation?.instance;\n const registeredFields: string[] = Array.from(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (control as any)._names?.mount ?? [],\n );\n const childFieldPrefix = `${name}.`;\n const isRequired = validationInstance\n ? registeredFields\n .filter((f) => {\n return f.startsWith(childFieldPrefix);\n })\n .some((f) => {\n return checkFieldIsRequired(\n validationInstance,\n f.split('.').filter((k) => {\n return k !== '';\n }),\n );\n })\n : false;\n\n // Get touched state for this field's children by traversing the path\n const getNestedValue = (\n obj: Record<string, unknown> | undefined,\n path: string,\n ): Record<string, unknown> | undefined => {\n if (!obj) {\n return undefined;\n }\n const keys = path.split('.');\n let current: unknown = obj;\n keys.every((key) => {\n if (current && typeof current === 'object') {\n current = (current as Record<string, unknown>)[key];\n return true;\n }\n current = undefined;\n return false;\n });\n return current as Record<string, unknown> | undefined;\n };\n\n const fieldTouched = getNestedValue(\n touchedFields as Record<string, unknown>,\n name,\n );\n\n // Check for object-level errors (_errors) - always show these as they represent\n // explicit object-level validation rules (e.g., refineObject custom validators)\n // @ts-expect-error - error._errors exists but not typed\n const hasObjectErrors = !!error?._errors;\n\n // Check if any child field with an error is also touched\n const hasChildErrors =\n submitCount > 0 ||\n hasVisibleChildErrors(\n error as unknown as Record<string, unknown>,\n fieldTouched,\n );\n\n // Show invalid state if there are object errors or visible child errors\n const showInvalid = hasObjectErrors || hasChildErrors;\n\n // className from slots\n const variants = fieldCardVariants({ invalid: showInvalid });\n const className = variantsToClassNames(variants, _className, 'base');\n\n return (\n <div className={className.base}>\n {/* card header with label */}\n {label ? (\n <div\n {...getLabelProps()}\n aria-level={3}\n // Override getLabelProps className to use our own invalid styling based on hasErrors,\n // not HeroUI's which is based on any child field being invalid\n className={className.label}\n role=\"heading\"\n >\n {label}\n {/* Manual asterisk: getLabelProps uses schema-required for the object itself,\n but FieldCard needs asterisk based on whether any CHILD field is required */}\n {isRequired ? (\n <span aria-hidden=\"true\" className=\"ml-0.5 text-danger\">\n *\n </span>\n ) : null}\n </div>\n ) : null}\n\n {/* card content */}\n <div className={className.content}>{children}</div>\n\n {/* card footer with validation errors */}\n <FieldCardValidationError className={className.errorFooter} name={name} />\n </div>\n );\n};\n\nexport default FieldCard;\n"],"mappings":";;;;;;;;;;;;;;;AAuBA,MAAM,4BAA4B,EAChC,YAAY,QACZ,WACmC;CACnC,MAAM,EAAE,OAAO,sBAAsB,uBAAuB,WAC1DA,wCAAgB,EACd,MACD,CAAC;CAGJ,MAAM,kEAAqC;CAK3C,MAAM,YAAY,CAAC,CAAC,OAAO;AAE3B,QACE,2CAACC;EAAgB,SAAS,CAAC;YACxB,YACC,2CAACC,+BAAO;GAEN,MAAM,mBAAmB,SAAY;IAAE,SAAS;IAAG,QAAQ;IAAG;GAC9D,SAAS,mBAAmB,QAAQ;IAAE,QAAQ;IAAG,SAAS;IAAG;GAC7D,OAAO,EAAE,UAAU,UAAU;GAC7B,YAAY;IAAE,UAAU;IAAK,MAAM;IAAW;GAC9C,SACE,mBAAmB,SAAY;IAAE,SAAS;IAAG,QAAQ;IAAQ;aAG/D,2CAAC;IACC,GAAI,uBAAuB;IAC3B,0CAAc,uBAAuB,EAAE,WAAW,UAAU;cAE5D,2CAAC;KAAI,GAAI,sBAAsB;eAC7B,2CAACC;MAEC,OAAO,MAAM;MACL;OACR;MACE;KACF;KApBF,oBAqBO,GACX;GACY;;AAItB,uCAAe;;;;;;;;AC1Df,MAAa,yBACX,QACA,YACY;AACZ,KAAI,CAAC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;;;;;;;;;;;;;;;KA5KI,YAAA,GAAe,eAAe;KAC9B,SAAA,GAAY,mBAAmB;UAEnB,WAAA,SAAoB;;;;cAIvB;;;;eAIC;;;;;;;;;;;;;;;;;;iBAkBE;;;;;;;;;;;;;;;;;;;;;;cAuBX;;;;;;;;;;;;GAYH,gBAAW,kBAAA,CAAA,GAAA,CAAA"}
@@ -1,186 +0,0 @@
1
- //#region src/helpers/createOptionValueConverter/createOptionValueConverter.d.ts
2
- /**
3
- * Creates a converter function that preserves the original type (string, number, or boolean)
4
- * of option values when converting from string keys back to their original type.
5
- *
6
- * This is useful for radio/select components where the underlying UI library
7
- * uses string keys internally, but we want to preserve number/boolean values in the form state.
8
- *
9
- * @param options - Array of options with a value property that can be string, number, or boolean
10
- * @returns An object with:
11
- * - `convertToOriginalType`: Function to convert a string key back to its original type
12
- * - `numberValueKeys`: Set of string representations of number values (for internal use)
13
- * - `booleanValueKeys`: Map of string representations to boolean values (for internal use)
14
- */
15
- declare const createOptionValueConverter: <T extends {
16
- value: string | number | boolean;
17
- }>(options: T[]) => {
18
- booleanValueKeys: Map<string, boolean>;
19
- convertToOriginalType: (key: string | number | boolean) => string | number | boolean;
20
- numberValueKeys: Set<string>;
21
- };
22
- //#endregion
23
- //#region src/helpers/nullishFields/nullishFields.d.ts
24
- /** Key used to wrap flat array elements when converting to form format */
25
- declare const flatArrayKey = "__FLAT__";
26
- /**
27
- * Checks if a value is considered "empty" for validation display purposes.
28
- *
29
- * Used by useUniformField to determine when to show validation errors.
30
- * Empty values don't trigger immediate error display (user must interact first).
31
- *
32
- * Handles:
33
- * - Primitives: null, undefined, ''
34
- * - Marker strings: __NULL__, __FALSE__, __ZERO__ (converted via fromNullishString)
35
- * - Empty arrays: []
36
- * - Objects with all empty values: {a: null, b: ''}
37
- * - Flat array wrappers: {__FLAT__: null} or {__FLAT__: ''}
38
- *
39
- * @param value - The value to check (will be converted via fromNullishString first)
40
- * @returns true if the value is empty
41
- *
42
- * @example
43
- * isValueEmpty(null) // true
44
- * isValueEmpty('') // true
45
- * isValueEmpty('__NULL__') // true (marker string)
46
- * isValueEmpty([]) // true (empty array)
47
- * isValueEmpty({a: null}) // true (object with all empty values)
48
- * isValueEmpty({__FLAT__: null}) // true (flat array wrapper with empty value)
49
- * isValueEmpty({__FLAT__: ''}) // true
50
- * isValueEmpty('hello') // false
51
- * isValueEmpty([1, 2]) // false
52
- * isValueEmpty({a: 'value'}) // false
53
- * isValueEmpty({__FLAT__: 'value'}) // false
54
- */
55
- declare const isValueEmpty: (value: unknown) => boolean;
56
- /**
57
- * Converts marker strings back to their original values when processing arrays
58
- */
59
- declare const fromNullishString: (value: unknown) => unknown;
60
- /**
61
- * Converts null/falsy values to marker strings for JSON processing
62
- */
63
- declare const toNullishString: (value: unknown) => unknown;
64
- /**
65
- * Converts field values to a format suitable for forms by:
66
- * - Wrapping arrays of primitives as objects using the flatArrayKey `__FLAT__`
67
- * to satisfy RHF's requirement that array fields contain objects
68
- * - Removing empty strings and null values from objects
69
- *
70
- * This conversion is required because React Hook Form does not support arrays with
71
- * flat values (string, number, boolean, null). Array fields must contain objects.
72
- * We work around this by wrapping primitive entries: `{ __FLAT__: <value> }`.
73
- *
74
- * @example
75
- * const fields = {
76
- * name: 'John',
77
- * scores: [0, null, 75, false],
78
- * scoresDetailed: [
79
- * { score: 1 },
80
- * { score: null },
81
- * { score: 0 },
82
- * { score: false },
83
- * { score: '' },
84
- * ],
85
- * contact: {
86
- * email: '',
87
- * phone: null,
88
- * address: '123 Main St'
89
- * }
90
- * };
91
- *
92
- * // Result:
93
- * {
94
- * name: 'John',
95
- * scores: [
96
- * { __FLAT__: 0 },
97
- * { __FLAT__: null },
98
- * { __FLAT__: 75 },
99
- * { __FLAT__: false }
100
- * ],
101
- * // Arrays of objects are left as objects; empty/null properties are removed
102
- * scoresDetailed: [
103
- * { score: 1 },
104
- * {}, // null score removed
105
- * { score: 0 },
106
- * { score: false },
107
- * {}, // empty string removed
108
- * ],
109
- * contact: {
110
- * address: '123 Main St'
111
- * }
112
- * }
113
- */
114
- declare const toFormFormat: (fields: Record<string, unknown>) => Record<string, unknown>;
115
- /**
116
- * Converts form state to a format suitable for validation by:
117
- * - Unwrapping flat array wrappers `{ __FLAT__: <value> }` back to primitives
118
- * - Converting legacy string markers (__NULL__, __FALSE__, __ZERO__) back to their original values
119
- * - Removing fields whose converted value is empty string or null
120
- * - Removing empty arrays
121
- *
122
- * @example
123
- * const formState = {
124
- * name: 'John',
125
- * scores: [
126
- * { __FLAT__: 75 },
127
- * { __FLAT__: 0 },
128
- * { __FLAT__: null },
129
- * { __FLAT__: false }
130
- * ],
131
- * emptyArray: [],
132
- * scoresDetailed: [
133
- * { score: 1 },
134
- * {},
135
- * { score: 0 },
136
- * { score: false },
137
- * {},
138
- * ],
139
- * contact: {
140
- * address: '123 Main St',
141
- * fax: null
142
- * }
143
- * };
144
- *
145
- * // Result:
146
- * {
147
- * name: 'John',
148
- * scores: [75, 0, null, false],
149
- * // emptyArray is removed
150
- * // Objects inside arrays remain objects; empty entries remain empty objects
151
- * scoresDetailed: [
152
- * { score: 1 },
153
- * {},
154
- * { score: 0 },
155
- * { score: false },
156
- * {},
157
- * ],
158
- * contact: {
159
- * address: '123 Main St'
160
- * }
161
- * }
162
- */
163
- declare const toValidationFormat: (formState: Record<string, unknown> | null | undefined) => Record<string, unknown> | null | undefined;
164
- /**
165
- * Converts a field name to a testId by removing flat array key segments and slugifying.
166
- * Removes all occurrences of `flatArrayKey` from the field name and applies slugify transformation.
167
- *
168
- * This is used to generate stable testIds for form fields that don't include
169
- * the internal `__FLAT__` marker used for flat arrays.
170
- *
171
- * @param name - The field name as a string (e.g., 'tags.0.__FLAT__') or array path (e.g., ['tags', '0', '__FLAT__'])
172
- * @returns The slugified field name with all flat array key segments removed (e.g., 'tags_0')
173
- *
174
- * @example
175
- * ```ts
176
- * nameToTestId('tags.0.__FLAT__') // => 'tags_0'
177
- * nameToTestId('array.0.__FLAT__') // => 'array_0'
178
- * nameToTestId('nested.array.0.__FLAT__.field') // => 'nested_array_0_field'
179
- * nameToTestId('simple.field') // => 'simple_field'
180
- * nameToTestId(['tags', '0', '__FLAT__']) // => 'tags_0'
181
- * ```
182
- */
183
- declare const nameToTestId: (name: string | readonly string[]) => string;
184
- //#endregion
185
- export { toFormFormat as a, createOptionValueConverter as c, nameToTestId as i, fromNullishString as n, toNullishString as o, isValueEmpty as r, toValidationFormat as s, flatArrayKey as t };
186
- //# sourceMappingURL=index-BPjrrFuM.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-BPjrrFuM.d.ts","names":[],"sources":["../src/helpers/createOptionValueConverter/createOptionValueConverter.ts","../src/helpers/nullishFields/nullishFields.ts"],"sourcesContent":[],"mappings":";;AAeA;;;;;;;;ACZA;AAsCA;AA0BA;AAsCA;AA6Ea,cDvKA,0BC+LgC,EAAA,CAAA,UAAA;EAmDhC,KAAA,EAAA,MAAA,GAAA,MA6EZ,GAAA,OAAA;AAqBD,CAAA,CAAA,CAAA,OAAa,EDjVF,CCiVE,EAAA,EAAA,GAsBZ;;;;;;;;AD1WY,cCZA,YAAA,GD8DZ,UAAA;;;;;;;;AC9DD;AAsCA;AA0BA;AAsCA;AA6EA;AA2EA;AAkGA;;;;;;;;;;;;;;;;cA1Ta;;;;cA0BA;;;;cAsCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6EA,uBAAwB,4BAwBE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmD1B,gCACA,+CACV;;;;;;;;;;;;;;;;;;;;cAgGU"}
@@ -1,186 +0,0 @@
1
- //#region src/helpers/createOptionValueConverter/createOptionValueConverter.d.ts
2
- /**
3
- * Creates a converter function that preserves the original type (string, number, or boolean)
4
- * of option values when converting from string keys back to their original type.
5
- *
6
- * This is useful for radio/select components where the underlying UI library
7
- * uses string keys internally, but we want to preserve number/boolean values in the form state.
8
- *
9
- * @param options - Array of options with a value property that can be string, number, or boolean
10
- * @returns An object with:
11
- * - `convertToOriginalType`: Function to convert a string key back to its original type
12
- * - `numberValueKeys`: Set of string representations of number values (for internal use)
13
- * - `booleanValueKeys`: Map of string representations to boolean values (for internal use)
14
- */
15
- declare const createOptionValueConverter: <T extends {
16
- value: string | number | boolean;
17
- }>(options: T[]) => {
18
- booleanValueKeys: Map<string, boolean>;
19
- convertToOriginalType: (key: string | number | boolean) => string | number | boolean;
20
- numberValueKeys: Set<string>;
21
- };
22
- //#endregion
23
- //#region src/helpers/nullishFields/nullishFields.d.ts
24
- /** Key used to wrap flat array elements when converting to form format */
25
- declare const flatArrayKey = "__FLAT__";
26
- /**
27
- * Checks if a value is considered "empty" for validation display purposes.
28
- *
29
- * Used by useUniformField to determine when to show validation errors.
30
- * Empty values don't trigger immediate error display (user must interact first).
31
- *
32
- * Handles:
33
- * - Primitives: null, undefined, ''
34
- * - Marker strings: __NULL__, __FALSE__, __ZERO__ (converted via fromNullishString)
35
- * - Empty arrays: []
36
- * - Objects with all empty values: {a: null, b: ''}
37
- * - Flat array wrappers: {__FLAT__: null} or {__FLAT__: ''}
38
- *
39
- * @param value - The value to check (will be converted via fromNullishString first)
40
- * @returns true if the value is empty
41
- *
42
- * @example
43
- * isValueEmpty(null) // true
44
- * isValueEmpty('') // true
45
- * isValueEmpty('__NULL__') // true (marker string)
46
- * isValueEmpty([]) // true (empty array)
47
- * isValueEmpty({a: null}) // true (object with all empty values)
48
- * isValueEmpty({__FLAT__: null}) // true (flat array wrapper with empty value)
49
- * isValueEmpty({__FLAT__: ''}) // true
50
- * isValueEmpty('hello') // false
51
- * isValueEmpty([1, 2]) // false
52
- * isValueEmpty({a: 'value'}) // false
53
- * isValueEmpty({__FLAT__: 'value'}) // false
54
- */
55
- declare const isValueEmpty: (value: unknown) => boolean;
56
- /**
57
- * Converts marker strings back to their original values when processing arrays
58
- */
59
- declare const fromNullishString: (value: unknown) => unknown;
60
- /**
61
- * Converts null/falsy values to marker strings for JSON processing
62
- */
63
- declare const toNullishString: (value: unknown) => unknown;
64
- /**
65
- * Converts field values to a format suitable for forms by:
66
- * - Wrapping arrays of primitives as objects using the flatArrayKey `__FLAT__`
67
- * to satisfy RHF's requirement that array fields contain objects
68
- * - Removing empty strings and null values from objects
69
- *
70
- * This conversion is required because React Hook Form does not support arrays with
71
- * flat values (string, number, boolean, null). Array fields must contain objects.
72
- * We work around this by wrapping primitive entries: `{ __FLAT__: <value> }`.
73
- *
74
- * @example
75
- * const fields = {
76
- * name: 'John',
77
- * scores: [0, null, 75, false],
78
- * scoresDetailed: [
79
- * { score: 1 },
80
- * { score: null },
81
- * { score: 0 },
82
- * { score: false },
83
- * { score: '' },
84
- * ],
85
- * contact: {
86
- * email: '',
87
- * phone: null,
88
- * address: '123 Main St'
89
- * }
90
- * };
91
- *
92
- * // Result:
93
- * {
94
- * name: 'John',
95
- * scores: [
96
- * { __FLAT__: 0 },
97
- * { __FLAT__: null },
98
- * { __FLAT__: 75 },
99
- * { __FLAT__: false }
100
- * ],
101
- * // Arrays of objects are left as objects; empty/null properties are removed
102
- * scoresDetailed: [
103
- * { score: 1 },
104
- * {}, // null score removed
105
- * { score: 0 },
106
- * { score: false },
107
- * {}, // empty string removed
108
- * ],
109
- * contact: {
110
- * address: '123 Main St'
111
- * }
112
- * }
113
- */
114
- declare const toFormFormat: (fields: Record<string, unknown>) => Record<string, unknown>;
115
- /**
116
- * Converts form state to a format suitable for validation by:
117
- * - Unwrapping flat array wrappers `{ __FLAT__: <value> }` back to primitives
118
- * - Converting legacy string markers (__NULL__, __FALSE__, __ZERO__) back to their original values
119
- * - Removing fields whose converted value is empty string or null
120
- * - Removing empty arrays
121
- *
122
- * @example
123
- * const formState = {
124
- * name: 'John',
125
- * scores: [
126
- * { __FLAT__: 75 },
127
- * { __FLAT__: 0 },
128
- * { __FLAT__: null },
129
- * { __FLAT__: false }
130
- * ],
131
- * emptyArray: [],
132
- * scoresDetailed: [
133
- * { score: 1 },
134
- * {},
135
- * { score: 0 },
136
- * { score: false },
137
- * {},
138
- * ],
139
- * contact: {
140
- * address: '123 Main St',
141
- * fax: null
142
- * }
143
- * };
144
- *
145
- * // Result:
146
- * {
147
- * name: 'John',
148
- * scores: [75, 0, null, false],
149
- * // emptyArray is removed
150
- * // Objects inside arrays remain objects; empty entries remain empty objects
151
- * scoresDetailed: [
152
- * { score: 1 },
153
- * {},
154
- * { score: 0 },
155
- * { score: false },
156
- * {},
157
- * ],
158
- * contact: {
159
- * address: '123 Main St'
160
- * }
161
- * }
162
- */
163
- declare const toValidationFormat: (formState: Record<string, unknown> | null | undefined) => Record<string, unknown> | null | undefined;
164
- /**
165
- * Converts a field name to a testId by removing flat array key segments and slugifying.
166
- * Removes all occurrences of `flatArrayKey` from the field name and applies slugify transformation.
167
- *
168
- * This is used to generate stable testIds for form fields that don't include
169
- * the internal `__FLAT__` marker used for flat arrays.
170
- *
171
- * @param name - The field name as a string (e.g., 'tags.0.__FLAT__') or array path (e.g., ['tags', '0', '__FLAT__'])
172
- * @returns The slugified field name with all flat array key segments removed (e.g., 'tags_0')
173
- *
174
- * @example
175
- * ```ts
176
- * nameToTestId('tags.0.__FLAT__') // => 'tags_0'
177
- * nameToTestId('array.0.__FLAT__') // => 'array_0'
178
- * nameToTestId('nested.array.0.__FLAT__.field') // => 'nested_array_0_field'
179
- * nameToTestId('simple.field') // => 'simple_field'
180
- * nameToTestId(['tags', '0', '__FLAT__']) // => 'tags_0'
181
- * ```
182
- */
183
- declare const nameToTestId: (name: string | readonly string[]) => string;
184
- //#endregion
185
- export { toFormFormat as a, createOptionValueConverter as c, nameToTestId as i, fromNullishString as n, toNullishString as o, isValueEmpty as r, toValidationFormat as s, flatArrayKey as t };
186
- //# sourceMappingURL=index-BTr_gid3.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-BTr_gid3.d.cts","names":[],"sources":["../src/helpers/createOptionValueConverter/createOptionValueConverter.ts","../src/helpers/nullishFields/nullishFields.ts"],"sourcesContent":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