@fuf-stack/uniform 1.4.1 → 1.5.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 (187) hide show
  1. package/dist/Checkboxes/index.cjs +16 -0
  2. package/dist/{RadioGroup → Checkboxes}/index.cjs.map +1 -1
  3. package/dist/Checkboxes/index.d.cts +10 -0
  4. package/dist/Checkboxes/index.d.ts +10 -0
  5. package/dist/Checkboxes/index.js +16 -0
  6. package/dist/{CheckboxGroup-B1g42iP0.d.cts → Checkboxes-CR0Uu2g9.d.cts} +9 -9
  7. package/dist/{CheckboxGroup-B1g42iP0.d.ts → Checkboxes-CR0Uu2g9.d.ts} +9 -9
  8. package/dist/FieldArray/index.cjs +5 -5
  9. package/dist/FieldArray/index.d.cts +2 -2
  10. package/dist/FieldArray/index.d.ts +2 -2
  11. package/dist/FieldArray/index.js +4 -4
  12. package/dist/FieldArray-EP4otr2x.d.cts +160 -0
  13. package/dist/FieldArray-EP4otr2x.d.ts +160 -0
  14. package/dist/{FieldValidationError-CU_xw0BL.d.ts → FieldValidationError-DwtLkGMo.d.cts} +2 -2
  15. package/dist/{FieldValidationError-CU_xw0BL.d.cts → FieldValidationError-DwtLkGMo.d.ts} +2 -2
  16. package/dist/Form/index.cjs +6 -4
  17. package/dist/Form/index.cjs.map +1 -1
  18. package/dist/Form/index.js +5 -3
  19. package/dist/Input/index.cjs +5 -5
  20. package/dist/Input/index.d.cts +2 -2
  21. package/dist/Input/index.d.ts +2 -2
  22. package/dist/Input/index.js +4 -4
  23. package/dist/{Input-C6ujfEkn.d.ts → Input-CCIEnvIp.d.ts} +1 -1
  24. package/dist/{Input-BQkZtJx8.d.cts → Input-D7HT_8jf.d.cts} +1 -1
  25. package/dist/RadioBoxes/index.cjs +5 -5
  26. package/dist/RadioBoxes/index.d.cts +3 -2
  27. package/dist/RadioBoxes/index.d.ts +3 -2
  28. package/dist/RadioBoxes/index.js +4 -4
  29. package/dist/{RadioBoxes-CE3mYoFk.d.cts → RadioBoxes-DpkI28l0.d.cts} +3 -2
  30. package/dist/{RadioBoxes-CE3mYoFk.d.ts → RadioBoxes-DpkI28l0.d.ts} +3 -2
  31. package/dist/RadioTabs/index.cjs +5 -5
  32. package/dist/RadioTabs/index.d.cts +2 -2
  33. package/dist/RadioTabs/index.d.ts +2 -2
  34. package/dist/RadioTabs/index.js +4 -4
  35. package/dist/{RadioTabs-BCWW3tru.d.cts → RadioTabs-DTDcAZoH.d.cts} +1 -1
  36. package/dist/{RadioTabs-BCWW3tru.d.ts → RadioTabs-DTDcAZoH.d.ts} +1 -1
  37. package/dist/Radios/index.cjs +16 -0
  38. package/dist/Radios/index.cjs.map +1 -0
  39. package/dist/Radios/index.d.cts +9 -0
  40. package/dist/Radios/index.d.ts +9 -0
  41. package/dist/Radios/index.js +16 -0
  42. package/dist/{RadioGroup-CAOX80Xx.d.cts → Radios-DprlJhoq.d.cts} +9 -9
  43. package/dist/{RadioGroup-CAOX80Xx.d.ts → Radios-DprlJhoq.d.ts} +9 -9
  44. package/dist/Select/index.cjs +5 -5
  45. package/dist/Select/index.d.cts +2 -2
  46. package/dist/Select/index.d.ts +2 -2
  47. package/dist/Select/index.js +4 -4
  48. package/dist/{Select-CTRWinmO.d.cts → Select-CDkZmZp2.d.cts} +1 -1
  49. package/dist/{Select-CTRWinmO.d.ts → Select-CDkZmZp2.d.ts} +1 -1
  50. package/dist/SubmitButton/index.cjs +6 -4
  51. package/dist/SubmitButton/index.cjs.map +1 -1
  52. package/dist/SubmitButton/index.js +5 -3
  53. package/dist/Switch/index.cjs +5 -5
  54. package/dist/Switch/index.js +4 -4
  55. package/dist/TextArea/index.cjs +5 -5
  56. package/dist/TextArea/index.d.cts +4 -2
  57. package/dist/TextArea/index.d.ts +4 -2
  58. package/dist/TextArea/index.js +4 -4
  59. package/dist/TextArea-DhxNWYNg.d.cts +86 -0
  60. package/dist/TextArea-DhxNWYNg.d.ts +86 -0
  61. package/dist/chunk-2DHTL4PW.cjs +117 -0
  62. package/dist/chunk-2DHTL4PW.cjs.map +1 -0
  63. package/dist/{chunk-FOVP54XP.cjs → chunk-3NH4MEMM.cjs} +18 -27
  64. package/dist/chunk-3NH4MEMM.cjs.map +1 -0
  65. package/dist/{chunk-M2DNMSQZ.js → chunk-3Q3IUEGL.js} +52 -49
  66. package/dist/chunk-3Q3IUEGL.js.map +1 -0
  67. package/dist/{chunk-JSQ77E6L.js → chunk-4WRUHOGY.js} +49 -47
  68. package/dist/chunk-4WRUHOGY.js.map +1 -0
  69. package/dist/{chunk-KG4XCEPW.js → chunk-53XSXUNE.js} +42 -40
  70. package/dist/chunk-53XSXUNE.js.map +1 -0
  71. package/dist/{chunk-77C6VN4L.cjs → chunk-5LWD6VRV.cjs} +50 -47
  72. package/dist/chunk-5LWD6VRV.cjs.map +1 -0
  73. package/dist/{chunk-C64RKQEW.cjs → chunk-62AYJT2H.cjs} +3 -3
  74. package/dist/{chunk-C64RKQEW.cjs.map → chunk-62AYJT2H.cjs.map} +1 -1
  75. package/dist/chunk-76KOVUDN.js +138 -0
  76. package/dist/chunk-76KOVUDN.js.map +1 -0
  77. package/dist/{chunk-FHRMVL6B.js → chunk-AYWMAPAX.js} +134 -89
  78. package/dist/chunk-AYWMAPAX.js.map +1 -0
  79. package/dist/chunk-BWPTCHL7.cjs +103 -0
  80. package/dist/chunk-BWPTCHL7.cjs.map +1 -0
  81. package/dist/{chunk-2GYFDVXX.cjs → chunk-C5GIWGQR.cjs} +173 -33
  82. package/dist/chunk-C5GIWGQR.cjs.map +1 -0
  83. package/dist/{chunk-IYDCKENI.js → chunk-CJD3DW4J.js} +166 -26
  84. package/dist/chunk-CJD3DW4J.js.map +1 -0
  85. package/dist/{chunk-N2EEOWEP.cjs → chunk-CW4VK77Z.cjs} +59 -64
  86. package/dist/chunk-CW4VK77Z.cjs.map +1 -0
  87. package/dist/{chunk-LJQ35BUK.js → chunk-D2HI4KE4.js} +2 -2
  88. package/dist/chunk-DYTE5N3B.cjs +684 -0
  89. package/dist/chunk-DYTE5N3B.cjs.map +1 -0
  90. package/dist/chunk-ELYGQTXB.js +47 -0
  91. package/dist/chunk-ELYGQTXB.js.map +1 -0
  92. package/dist/chunk-GST3AQOR.js +684 -0
  93. package/dist/chunk-GST3AQOR.js.map +1 -0
  94. package/dist/{chunk-AYNTZPKL.cjs → chunk-HQNZYWJX.cjs} +132 -87
  95. package/dist/chunk-HQNZYWJX.cjs.map +1 -0
  96. package/dist/chunk-LLQLEDOO.js +103 -0
  97. package/dist/chunk-LLQLEDOO.js.map +1 -0
  98. package/dist/chunk-NHEZXA4H.cjs +47 -0
  99. package/dist/chunk-NHEZXA4H.cjs.map +1 -0
  100. package/dist/{chunk-M7VM7XBE.js → chunk-OCYJFIPV.js} +8 -8
  101. package/dist/chunk-OCYJFIPV.js.map +1 -0
  102. package/dist/{chunk-ORQO6JXK.cjs → chunk-S36CKKDV.cjs} +45 -43
  103. package/dist/chunk-S36CKKDV.cjs.map +1 -0
  104. package/dist/chunk-S7K35LVS.js +117 -0
  105. package/dist/chunk-S7K35LVS.js.map +1 -0
  106. package/dist/{chunk-Y3GELCDP.js → chunk-VLEYEBRE.js} +62 -67
  107. package/dist/chunk-VLEYEBRE.js.map +1 -0
  108. package/dist/{chunk-UGCZORU3.cjs → chunk-YIBISSMT.cjs} +9 -9
  109. package/dist/chunk-YIBISSMT.cjs.map +1 -0
  110. package/dist/chunk-Z353BLWI.cjs +138 -0
  111. package/dist/chunk-Z353BLWI.cjs.map +1 -0
  112. package/dist/{chunk-ULR4573W.cjs → chunk-ZLQCMOVU.cjs} +40 -38
  113. package/dist/chunk-ZLQCMOVU.cjs.map +1 -0
  114. package/dist/{chunk-2B6CDMOZ.js → chunk-ZN3ESUQR.js} +16 -25
  115. package/dist/chunk-ZN3ESUQR.js.map +1 -0
  116. package/dist/helpers/index.cjs +4 -2
  117. package/dist/helpers/index.cjs.map +1 -1
  118. package/dist/helpers/index.d.cts +54 -10
  119. package/dist/helpers/index.d.ts +54 -10
  120. package/dist/helpers/index.js +3 -1
  121. package/dist/hooks/index.cjs +7 -3
  122. package/dist/hooks/index.cjs.map +1 -1
  123. package/dist/hooks/index.d.cts +86 -4
  124. package/dist/hooks/index.d.ts +86 -4
  125. package/dist/hooks/index.js +8 -4
  126. package/dist/index.cjs +20 -16
  127. package/dist/index.cjs.map +1 -1
  128. package/dist/index.d.cts +11 -11
  129. package/dist/index.d.ts +11 -11
  130. package/dist/index.js +30 -26
  131. package/dist/partials/FieldValidationError/index.cjs +2 -2
  132. package/dist/partials/FieldValidationError/index.d.cts +2 -2
  133. package/dist/partials/FieldValidationError/index.d.ts +2 -2
  134. package/dist/partials/FieldValidationError/index.js +1 -1
  135. package/package.json +13 -12
  136. package/dist/CheckboxGroup/index.cjs +0 -16
  137. package/dist/CheckboxGroup/index.cjs.map +0 -1
  138. package/dist/CheckboxGroup/index.d.cts +0 -10
  139. package/dist/CheckboxGroup/index.d.ts +0 -10
  140. package/dist/CheckboxGroup/index.js +0 -16
  141. package/dist/FieldArray-DVQka7Bh.d.cts +0 -130
  142. package/dist/FieldArray-DVQka7Bh.d.ts +0 -130
  143. package/dist/RadioGroup/index.cjs +0 -16
  144. package/dist/RadioGroup/index.d.cts +0 -9
  145. package/dist/RadioGroup/index.d.ts +0 -9
  146. package/dist/RadioGroup/index.js +0 -16
  147. package/dist/TextArea-DnFGyl4a.d.cts +0 -27
  148. package/dist/TextArea-DnFGyl4a.d.ts +0 -27
  149. package/dist/chunk-2B6CDMOZ.js.map +0 -1
  150. package/dist/chunk-2GYFDVXX.cjs.map +0 -1
  151. package/dist/chunk-77C6VN4L.cjs.map +0 -1
  152. package/dist/chunk-AYNTZPKL.cjs.map +0 -1
  153. package/dist/chunk-CQWA2DFV.js +0 -37
  154. package/dist/chunk-CQWA2DFV.js.map +0 -1
  155. package/dist/chunk-EEBHFSBY.cjs +0 -112
  156. package/dist/chunk-EEBHFSBY.cjs.map +0 -1
  157. package/dist/chunk-FHRMVL6B.js.map +0 -1
  158. package/dist/chunk-FOVP54XP.cjs.map +0 -1
  159. package/dist/chunk-IYDCKENI.js.map +0 -1
  160. package/dist/chunk-JSQ77E6L.js.map +0 -1
  161. package/dist/chunk-JZF4HUYO.cjs +0 -409
  162. package/dist/chunk-JZF4HUYO.cjs.map +0 -1
  163. package/dist/chunk-KG4XCEPW.js.map +0 -1
  164. package/dist/chunk-KQN55PEW.js +0 -76
  165. package/dist/chunk-KQN55PEW.js.map +0 -1
  166. package/dist/chunk-M2DNMSQZ.js.map +0 -1
  167. package/dist/chunk-M7VM7XBE.js.map +0 -1
  168. package/dist/chunk-N2EEOWEP.cjs.map +0 -1
  169. package/dist/chunk-NAZIH6HV.js +0 -409
  170. package/dist/chunk-NAZIH6HV.js.map +0 -1
  171. package/dist/chunk-ORQO6JXK.cjs.map +0 -1
  172. package/dist/chunk-RDBCJJI7.cjs +0 -88
  173. package/dist/chunk-RDBCJJI7.cjs.map +0 -1
  174. package/dist/chunk-RF7KNUCI.js +0 -88
  175. package/dist/chunk-RF7KNUCI.js.map +0 -1
  176. package/dist/chunk-UGCZORU3.cjs.map +0 -1
  177. package/dist/chunk-ULR4573W.cjs.map +0 -1
  178. package/dist/chunk-XKMLCM5K.js +0 -112
  179. package/dist/chunk-XKMLCM5K.js.map +0 -1
  180. package/dist/chunk-Y3AB4GV6.cjs +0 -37
  181. package/dist/chunk-Y3AB4GV6.cjs.map +0 -1
  182. package/dist/chunk-Y3GELCDP.js.map +0 -1
  183. package/dist/chunk-YGNY6CKU.cjs +0 -76
  184. package/dist/chunk-YGNY6CKU.cjs.map +0 -1
  185. /package/dist/{CheckboxGroup → Checkboxes}/index.js.map +0 -0
  186. /package/dist/{RadioGroup → Radios}/index.js.map +0 -0
  187. /package/dist/{chunk-LJQ35BUK.js.map → chunk-D2HI4KE4.js.map} +0 -0
@@ -1,3 +1,5 @@
1
+ /** Key used to wrap flat array elements when converting to form format */
2
+ declare const flatArrayKey = "__FLAT__";
1
3
  /**
2
4
  * Converts marker strings back to their original values when processing arrays
3
5
  */
@@ -8,17 +10,25 @@ declare const fromNullishString: (value: unknown) => unknown;
8
10
  declare const toNullishString: (value: unknown) => unknown;
9
11
  /**
10
12
  * Converts field values to a format suitable for forms by:
11
- * - Converting array values to their string markers to preserve null/falsy values
13
+ * - Wrapping arrays of primitives as objects using the flatArrayKey `__FLAT__`
14
+ * to satisfy RHF's requirement that array fields contain objects
12
15
  * - Removing empty strings and null values from objects
13
16
  *
14
17
  * This conversion is required because React Hook Form does not support arrays with
15
18
  * flat values (string, number, boolean, null). Array fields must contain objects.
16
- * We work around this by converting array values to string markers.
19
+ * We work around this by wrapping primitive entries: `{ __FLAT__: <value> }`.
17
20
  *
18
21
  * @example
19
22
  * const fields = {
20
23
  * name: 'John',
21
24
  * scores: [0, null, 75, false],
25
+ * scoresDetailed: [
26
+ * { score: 1 },
27
+ * { score: null },
28
+ * { score: 0 },
29
+ * { score: false },
30
+ * { score: '' },
31
+ * ],
22
32
  * contact: {
23
33
  * email: '',
24
34
  * phone: null,
@@ -29,7 +39,20 @@ declare const toNullishString: (value: unknown) => unknown;
29
39
  * // Result:
30
40
  * {
31
41
  * name: 'John',
32
- * scores: ['__ZERO__', '__NULL__', 75, '__FALSE__'],
42
+ * scores: [
43
+ * { __FLAT__: 0 },
44
+ * { __FLAT__: null },
45
+ * { __FLAT__: 75 },
46
+ * { __FLAT__: false }
47
+ * ],
48
+ * // Arrays of objects are left as objects; empty/null properties are removed
49
+ * scoresDetailed: [
50
+ * { score: 1 },
51
+ * {}, // null score removed
52
+ * { score: 0 },
53
+ * { score: false },
54
+ * {}, // empty string removed
55
+ * ],
33
56
  * contact: {
34
57
  * address: '123 Main St'
35
58
  * }
@@ -38,16 +61,28 @@ declare const toNullishString: (value: unknown) => unknown;
38
61
  declare const toFormFormat: (fields: Record<string, unknown>) => Record<string, unknown>;
39
62
  /**
40
63
  * Converts form state to a format suitable for validation by:
41
- * - Converting array string markers (__NULL__, __FALSE__, __ZERO__) back to their original values
42
- * - Converting _NULL__ to null
43
- * - Removing fields that contain empty strings, null, or any string markers representing null/empty values
64
+ * - Unwrapping flat array wrappers `{ __FLAT__: <value> }` back to primitives
65
+ * - Converting legacy string markers (__NULL__, __FALSE__, __ZERO__) back to their original values
66
+ * - Removing fields whose converted value is empty string or null
67
+ * - Removing empty arrays
44
68
  *
45
69
  * @example
46
70
  * const formState = {
47
71
  * name: 'John',
48
- * scores: [75, '__ZERO__', '_NULL__', '__FALSE__'],
49
- * email: null,
50
- * phone: '__NULL__',
72
+ * scores: [
73
+ * { __FLAT__: 75 },
74
+ * { __FLAT__: 0 },
75
+ * { __FLAT__: null },
76
+ * { __FLAT__: false }
77
+ * ],
78
+ * emptyArray: [],
79
+ * scoresDetailed: [
80
+ * { score: 1 },
81
+ * {},
82
+ * { score: 0 },
83
+ * { score: false },
84
+ * {},
85
+ * ],
51
86
  * contact: {
52
87
  * address: '123 Main St',
53
88
  * fax: null
@@ -58,6 +93,15 @@ declare const toFormFormat: (fields: Record<string, unknown>) => Record<string,
58
93
  * {
59
94
  * name: 'John',
60
95
  * scores: [75, 0, null, false],
96
+ * // emptyArray is removed
97
+ * // Objects inside arrays remain objects; empty entries remain empty objects
98
+ * scoresDetailed: [
99
+ * { score: 1 },
100
+ * {},
101
+ * { score: 0 },
102
+ * { score: false },
103
+ * {},
104
+ * ],
61
105
  * contact: {
62
106
  * address: '123 Main St'
63
107
  * }
@@ -65,4 +109,4 @@ declare const toFormFormat: (fields: Record<string, unknown>) => Record<string,
65
109
  */
66
110
  declare const toValidationFormat: (formState: Record<string, unknown> | null | undefined) => Record<string, unknown> | null | undefined;
67
111
 
68
- export { fromNullishString, toFormFormat, toNullishString, toValidationFormat };
112
+ export { flatArrayKey, fromNullishString, toFormFormat, toNullishString, toValidationFormat };
@@ -1,11 +1,13 @@
1
1
  import {
2
+ flatArrayKey,
2
3
  fromNullishString,
3
4
  toFormFormat,
4
5
  toNullishString,
5
6
  toValidationFormat
6
- } from "../chunk-KQN55PEW.js";
7
+ } from "../chunk-76KOVUDN.js";
7
8
  import "../chunk-K2V4ULA2.js";
8
9
  export {
10
+ flatArrayKey,
9
11
  fromNullishString,
10
12
  toFormFormat,
11
13
  toNullishString,
@@ -5,8 +5,11 @@
5
5
 
6
6
 
7
7
 
8
- var _chunk2GYFDVXXcjs = require('../chunk-2GYFDVXX.cjs');
9
- require('../chunk-YGNY6CKU.cjs');
8
+
9
+ var _chunkC5GIWGQRcjs = require('../chunk-C5GIWGQR.cjs');
10
+ require('../chunk-OE5BOGGX.cjs');
11
+ require('../chunk-NHEZXA4H.cjs');
12
+ require('../chunk-Z353BLWI.cjs');
10
13
 
11
14
 
12
15
  var _chunkFLK6OPFYcjs = require('../chunk-FLK6OPFY.cjs');
@@ -23,5 +26,6 @@ require('../chunk-555JRYCS.cjs');
23
26
 
24
27
 
25
28
 
26
- exports.checkFieldIsRequired = _chunk2GYFDVXXcjs.checkFieldIsRequired; exports.useClientValidation = _chunk2GYFDVXXcjs.useClientValidation; exports.useController = _chunk2GYFDVXXcjs.useController; exports.useFieldArray = _chunk2GYFDVXXcjs.useFieldArray; exports.useFormContext = _chunk2GYFDVXXcjs.useFormContext; exports.useInput = _chunk2GYFDVXXcjs.useInput; exports.useInputValueDebounce = _chunkFLK6OPFYcjs.useInputValueDebounce; exports.useInputValueTransform = _chunkP6HJOG7Dcjs.useInputValueTransform;
29
+
30
+ exports.checkFieldIsRequired = _chunkC5GIWGQRcjs.checkFieldIsRequired; exports.useClientValidation = _chunkC5GIWGQRcjs.useClientValidation; exports.useController = _chunkC5GIWGQRcjs.useController; exports.useFieldArray = _chunkC5GIWGQRcjs.useFieldArray; exports.useFormContext = _chunkC5GIWGQRcjs.useFormContext; exports.useInput = _chunkC5GIWGQRcjs.useInput; exports.useInputValueDebounce = _chunkFLK6OPFYcjs.useInputValueDebounce; exports.useInputValueTransform = _chunkP6HJOG7Dcjs.useInputValueTransform; exports.useUniformField = _chunkC5GIWGQRcjs.useUniformField;
27
31
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/uniform/dist/hooks/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACF,yDAA8B;AAC9B;AACE;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,2fAAC","file":"/home/runner/work/pixels/pixels/packages/uniform/dist/hooks/index.cjs"}
1
+ {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/uniform/dist/hooks/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACF,yDAA8B;AAC9B;AACE;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wjBAAC","file":"/home/runner/work/pixels/pixels/packages/uniform/dist/hooks/index.cjs"}
@@ -1,10 +1,12 @@
1
1
  import * as _fuf_stack_veto from '@fuf-stack/veto';
2
- import { VetoTypeAny, VetoInstance } from '@fuf-stack/veto';
2
+ import { VetoTypeAny, VetoInstance, VetoFormattedError } from '@fuf-stack/veto';
3
3
  import * as react_hook_form from 'react-hook-form';
4
4
  import { UseControllerProps as UseControllerProps$1, ControllerRenderProps, UseFormStateReturn, ControllerFieldState, FieldValues, Path, FieldError } from 'react-hook-form';
5
5
  export { useFieldArray } from 'react-hook-form';
6
6
  import * as React from 'react';
7
+ import { ReactNode } from 'react';
7
8
  import { D as DebugModeSettings } from '../FormContext-LRho0tno.cjs';
9
+ import { useInput } from '@heroui/input';
8
10
  export { useInput } from '@heroui/input';
9
11
  export { UseInputValueDebounceOptions, UseInputValueDebounceReturn, useInputValueDebounce } from './useInputValueDebounce/index.cjs';
10
12
  export { InputValueTransform, UseInputValueTransformOptions, UseInputValueTransformReturn, useInputValueTransform } from './useInputValueTransform/index.cjs';
@@ -71,9 +73,9 @@ declare const useFormContext: <TFieldValues extends FieldValues = FieldValues, T
71
73
  formState: react_hook_form.FormState<TFieldValues>;
72
74
  getFieldState: (name: Path<TFieldValues>, testId?: string) => {
73
75
  error: FieldError[] | undefined;
76
+ invalid: boolean;
74
77
  required: boolean;
75
78
  testId: string;
76
- invalid: boolean;
77
79
  isDirty: boolean;
78
80
  isTouched: boolean;
79
81
  isValidating: boolean;
@@ -88,7 +90,7 @@ declare const useFormContext: <TFieldValues extends FieldValues = FieldValues, T
88
90
  triggerSubmit: (e?: React.BaseSyntheticEvent) => Promise<void> | void;
89
91
  validation: {
90
92
  instance?: VetoInstance;
91
- errors?: _fuf_stack_veto.VetoFormattedError;
93
+ errors?: VetoFormattedError;
92
94
  setClientValidationSchema: (key: string, schema: _fuf_stack_veto.VetoTypeAny | null) => void;
93
95
  };
94
96
  setError: react_hook_form.UseFormSetError<TFieldValues>;
@@ -104,4 +106,84 @@ declare const useFormContext: <TFieldValues extends FieldValues = FieldValues, T
104
106
  setFocus: react_hook_form.UseFormSetFocus<TFieldValues>;
105
107
  };
106
108
 
107
- export { type UseControllerProps, type UseControllerReturn, checkFieldIsRequired, useClientValidation, useController, useFormContext };
109
+ interface UseUniformFieldParams<TFieldValues extends FieldValues = FieldValues> {
110
+ /** Form field name */
111
+ name: Path<TFieldValues> & string;
112
+ /** Disable the field */
113
+ disabled?: boolean;
114
+ /** Optional explicit test id used to build stable test ids */
115
+ testId?: string;
116
+ /** Optional label content; pass false to suppress label entirely */
117
+ label?: ReactNode | false;
118
+ /**
119
+ * When to show the invalid state to users.
120
+ * - 'touched': Only show errors after field is touched or form is submitted (default, good for text inputs)
121
+ * - 'immediate': Show errors as soon as they occur (good for checkboxes, radios, arrays)
122
+ */
123
+ showInvalidWhen?: 'touched' | 'immediate';
124
+ }
125
+ interface UseUniformFieldReturn<TFieldValues extends FieldValues = FieldValues> {
126
+ /** react-hook-form control instance for advanced integrations */
127
+ control: ReturnType<typeof useFormContext<TFieldValues>>['control'];
128
+ /** Debug mode from Uniform provider */
129
+ debugMode: ReturnType<typeof useFormContext<TFieldValues>>['debugMode'];
130
+ /** Current value used to initialize uncontrolled components */
131
+ defaultValue: unknown;
132
+ /** Whether the field is currently disabled (from RHF) */
133
+ disabled: boolean | undefined;
134
+ /** Validation error(s) for the field */
135
+ error: FieldError[] | undefined;
136
+ /** Pre-built errorMessage node to plug into components */
137
+ errorMessage: ReactNode | null;
138
+ /** RHF controller field with nullish conversions applied */
139
+ field: ReturnType<typeof useController<TFieldValues>>['field'];
140
+ /** Helper to spread standardized error message props to underlying components */
141
+ getErrorMessageProps: ReturnType<typeof useInput>['getErrorMessageProps'];
142
+ /** Helper to spread standardized helper wrapper props (for spacing/animation) */
143
+ getHelperWrapperProps: ReturnType<typeof useInput>['getHelperWrapperProps'];
144
+ /** Helper to spread standardized label props to underlying components */
145
+ getLabelProps: ReturnType<typeof useInput>['getLabelProps'];
146
+ /** Access current form values (converted to validation-friendly format) */
147
+ getValues: ReturnType<typeof useFormContext<TFieldValues>>['getValues'];
148
+ /** Whether the field is invalid (debounced for smoother exit animations) */
149
+ invalid: boolean;
150
+ /** Computed label node including optional test id copy button */
151
+ label: ReactNode | null;
152
+ /** onBlur handler from controller */
153
+ onBlur: ReturnType<typeof useController<TFieldValues>>['field']['onBlur'];
154
+ /** onChange handler from controller (with nullish handling) */
155
+ onChange: ReturnType<typeof useController<TFieldValues>>['field']['onChange'];
156
+ /** Ref to forward to underlying control */
157
+ ref: ReturnType<typeof useController<TFieldValues>>['field']['ref'];
158
+ /** Whether the field is required according to validation schema */
159
+ required: boolean;
160
+ /** Reset a specific field in the form */
161
+ resetField: ReturnType<typeof useFormContext<TFieldValues>>['resetField'];
162
+ /** Generated HTML data-testid for the field */
163
+ testId: string;
164
+ }
165
+ /**
166
+ * Combines frequently used form field logic into a single hook.
167
+ *
168
+ * Provides:
169
+ * - Enhanced form context (validation-aware state, `testId`, value transforms)
170
+ * - Controller field with nullish conversion handling
171
+ * - Debounced `invalid` state with smart timing:
172
+ * • `true` (field becomes invalid): applies immediately so errors show right away
173
+ * • `false` (field becomes valid): delayed 200ms to allow smooth exit animations
174
+ * • Respects `prefers-reduced-motion` by skipping delays when user prefers reduced motion
175
+ * - Smart `invalid` visibility (via `showInvalid`), configurable via `showInvalidWhen`:
176
+ * • 'touched' (default): Shows errors only after field touched OR form submitted
177
+ * • 'immediate': Shows errors as soon as validation fails (for checkboxes/radios/arrays)
178
+ * • Prevents showing errors on pristine fields for better UX
179
+ * - Prebuilt `errorMessage` React node using `FieldValidationError`
180
+ * - Computed `label` node which appends a `FieldCopyTestIdButton` in
181
+ * `debug-testids` mode
182
+ * - `defaultValue` for uncontrolled defaults and all usual field handlers
183
+ * - Access to form utilities: `control`, `getValues`, `resetField`
184
+ * - Presentation helpers: `getLabelProps`, `getErrorMessageProps`,
185
+ * `getHelperWrapperProps` for consistent wiring to underlying UI components
186
+ */
187
+ declare function useUniformField<TFieldValues extends FieldValues = FieldValues>(params: UseUniformFieldParams<TFieldValues>): UseUniformFieldReturn<TFieldValues>;
188
+
189
+ export { type UseControllerProps, type UseControllerReturn, type UseUniformFieldParams, type UseUniformFieldReturn, checkFieldIsRequired, useClientValidation, useController, useFormContext, useUniformField };
@@ -1,10 +1,12 @@
1
1
  import * as _fuf_stack_veto from '@fuf-stack/veto';
2
- import { VetoTypeAny, VetoInstance } from '@fuf-stack/veto';
2
+ import { VetoTypeAny, VetoInstance, VetoFormattedError } from '@fuf-stack/veto';
3
3
  import * as react_hook_form from 'react-hook-form';
4
4
  import { UseControllerProps as UseControllerProps$1, ControllerRenderProps, UseFormStateReturn, ControllerFieldState, FieldValues, Path, FieldError } from 'react-hook-form';
5
5
  export { useFieldArray } from 'react-hook-form';
6
6
  import * as React from 'react';
7
+ import { ReactNode } from 'react';
7
8
  import { D as DebugModeSettings } from '../FormContext-LRho0tno.js';
9
+ import { useInput } from '@heroui/input';
8
10
  export { useInput } from '@heroui/input';
9
11
  export { UseInputValueDebounceOptions, UseInputValueDebounceReturn, useInputValueDebounce } from './useInputValueDebounce/index.js';
10
12
  export { InputValueTransform, UseInputValueTransformOptions, UseInputValueTransformReturn, useInputValueTransform } from './useInputValueTransform/index.js';
@@ -71,9 +73,9 @@ declare const useFormContext: <TFieldValues extends FieldValues = FieldValues, T
71
73
  formState: react_hook_form.FormState<TFieldValues>;
72
74
  getFieldState: (name: Path<TFieldValues>, testId?: string) => {
73
75
  error: FieldError[] | undefined;
76
+ invalid: boolean;
74
77
  required: boolean;
75
78
  testId: string;
76
- invalid: boolean;
77
79
  isDirty: boolean;
78
80
  isTouched: boolean;
79
81
  isValidating: boolean;
@@ -88,7 +90,7 @@ declare const useFormContext: <TFieldValues extends FieldValues = FieldValues, T
88
90
  triggerSubmit: (e?: React.BaseSyntheticEvent) => Promise<void> | void;
89
91
  validation: {
90
92
  instance?: VetoInstance;
91
- errors?: _fuf_stack_veto.VetoFormattedError;
93
+ errors?: VetoFormattedError;
92
94
  setClientValidationSchema: (key: string, schema: _fuf_stack_veto.VetoTypeAny | null) => void;
93
95
  };
94
96
  setError: react_hook_form.UseFormSetError<TFieldValues>;
@@ -104,4 +106,84 @@ declare const useFormContext: <TFieldValues extends FieldValues = FieldValues, T
104
106
  setFocus: react_hook_form.UseFormSetFocus<TFieldValues>;
105
107
  };
106
108
 
107
- export { type UseControllerProps, type UseControllerReturn, checkFieldIsRequired, useClientValidation, useController, useFormContext };
109
+ interface UseUniformFieldParams<TFieldValues extends FieldValues = FieldValues> {
110
+ /** Form field name */
111
+ name: Path<TFieldValues> & string;
112
+ /** Disable the field */
113
+ disabled?: boolean;
114
+ /** Optional explicit test id used to build stable test ids */
115
+ testId?: string;
116
+ /** Optional label content; pass false to suppress label entirely */
117
+ label?: ReactNode | false;
118
+ /**
119
+ * When to show the invalid state to users.
120
+ * - 'touched': Only show errors after field is touched or form is submitted (default, good for text inputs)
121
+ * - 'immediate': Show errors as soon as they occur (good for checkboxes, radios, arrays)
122
+ */
123
+ showInvalidWhen?: 'touched' | 'immediate';
124
+ }
125
+ interface UseUniformFieldReturn<TFieldValues extends FieldValues = FieldValues> {
126
+ /** react-hook-form control instance for advanced integrations */
127
+ control: ReturnType<typeof useFormContext<TFieldValues>>['control'];
128
+ /** Debug mode from Uniform provider */
129
+ debugMode: ReturnType<typeof useFormContext<TFieldValues>>['debugMode'];
130
+ /** Current value used to initialize uncontrolled components */
131
+ defaultValue: unknown;
132
+ /** Whether the field is currently disabled (from RHF) */
133
+ disabled: boolean | undefined;
134
+ /** Validation error(s) for the field */
135
+ error: FieldError[] | undefined;
136
+ /** Pre-built errorMessage node to plug into components */
137
+ errorMessage: ReactNode | null;
138
+ /** RHF controller field with nullish conversions applied */
139
+ field: ReturnType<typeof useController<TFieldValues>>['field'];
140
+ /** Helper to spread standardized error message props to underlying components */
141
+ getErrorMessageProps: ReturnType<typeof useInput>['getErrorMessageProps'];
142
+ /** Helper to spread standardized helper wrapper props (for spacing/animation) */
143
+ getHelperWrapperProps: ReturnType<typeof useInput>['getHelperWrapperProps'];
144
+ /** Helper to spread standardized label props to underlying components */
145
+ getLabelProps: ReturnType<typeof useInput>['getLabelProps'];
146
+ /** Access current form values (converted to validation-friendly format) */
147
+ getValues: ReturnType<typeof useFormContext<TFieldValues>>['getValues'];
148
+ /** Whether the field is invalid (debounced for smoother exit animations) */
149
+ invalid: boolean;
150
+ /** Computed label node including optional test id copy button */
151
+ label: ReactNode | null;
152
+ /** onBlur handler from controller */
153
+ onBlur: ReturnType<typeof useController<TFieldValues>>['field']['onBlur'];
154
+ /** onChange handler from controller (with nullish handling) */
155
+ onChange: ReturnType<typeof useController<TFieldValues>>['field']['onChange'];
156
+ /** Ref to forward to underlying control */
157
+ ref: ReturnType<typeof useController<TFieldValues>>['field']['ref'];
158
+ /** Whether the field is required according to validation schema */
159
+ required: boolean;
160
+ /** Reset a specific field in the form */
161
+ resetField: ReturnType<typeof useFormContext<TFieldValues>>['resetField'];
162
+ /** Generated HTML data-testid for the field */
163
+ testId: string;
164
+ }
165
+ /**
166
+ * Combines frequently used form field logic into a single hook.
167
+ *
168
+ * Provides:
169
+ * - Enhanced form context (validation-aware state, `testId`, value transforms)
170
+ * - Controller field with nullish conversion handling
171
+ * - Debounced `invalid` state with smart timing:
172
+ * • `true` (field becomes invalid): applies immediately so errors show right away
173
+ * • `false` (field becomes valid): delayed 200ms to allow smooth exit animations
174
+ * • Respects `prefers-reduced-motion` by skipping delays when user prefers reduced motion
175
+ * - Smart `invalid` visibility (via `showInvalid`), configurable via `showInvalidWhen`:
176
+ * • 'touched' (default): Shows errors only after field touched OR form submitted
177
+ * • 'immediate': Shows errors as soon as validation fails (for checkboxes/radios/arrays)
178
+ * • Prevents showing errors on pristine fields for better UX
179
+ * - Prebuilt `errorMessage` React node using `FieldValidationError`
180
+ * - Computed `label` node which appends a `FieldCopyTestIdButton` in
181
+ * `debug-testids` mode
182
+ * - `defaultValue` for uncontrolled defaults and all usual field handlers
183
+ * - Access to form utilities: `control`, `getValues`, `resetField`
184
+ * - Presentation helpers: `getLabelProps`, `getErrorMessageProps`,
185
+ * `getHelperWrapperProps` for consistent wiring to underlying UI components
186
+ */
187
+ declare function useUniformField<TFieldValues extends FieldValues = FieldValues>(params: UseUniformFieldParams<TFieldValues>): UseUniformFieldReturn<TFieldValues>;
188
+
189
+ export { type UseControllerProps, type UseControllerReturn, type UseUniformFieldParams, type UseUniformFieldReturn, checkFieldIsRequired, useClientValidation, useController, useFormContext, useUniformField };
@@ -4,9 +4,12 @@ import {
4
4
  useController,
5
5
  useFieldArray,
6
6
  useFormContext,
7
- useInput
8
- } from "../chunk-IYDCKENI.js";
9
- import "../chunk-KQN55PEW.js";
7
+ useInput,
8
+ useUniformField
9
+ } from "../chunk-CJD3DW4J.js";
10
+ import "../chunk-NTDKZW4E.js";
11
+ import "../chunk-ELYGQTXB.js";
12
+ import "../chunk-76KOVUDN.js";
10
13
  import {
11
14
  useInputValueDebounce
12
15
  } from "../chunk-6IU7IYYB.js";
@@ -22,6 +25,7 @@ export {
22
25
  useFormContext,
23
26
  useInput,
24
27
  useInputValueDebounce,
25
- useInputValueTransform
28
+ useInputValueTransform,
29
+ useUniformField
26
30
  };
27
31
  //# sourceMappingURL=index.js.map
package/dist/index.cjs CHANGED
@@ -1,59 +1,61 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkORQO6JXKcjs = require('./chunk-ORQO6JXK.cjs');
3
+ var _chunk2DHTL4PWcjs = require('./chunk-2DHTL4PW.cjs');
4
4
 
5
5
 
6
- var _chunkAYNTZPKLcjs = require('./chunk-AYNTZPKL.cjs');
6
+ var _chunkHQNZYWJXcjs = require('./chunk-HQNZYWJX.cjs');
7
7
 
8
8
 
9
- var _chunkC64RKQEWcjs = require('./chunk-C64RKQEW.cjs');
9
+ var _chunk62AYJT2Hcjs = require('./chunk-62AYJT2H.cjs');
10
10
 
11
11
 
12
- var _chunkUGCZORU3cjs = require('./chunk-UGCZORU3.cjs');
12
+ var _chunkYIBISSMTcjs = require('./chunk-YIBISSMT.cjs');
13
13
 
14
14
 
15
- var _chunkRDBCJJI7cjs = require('./chunk-RDBCJJI7.cjs');
15
+ var _chunkBWPTCHL7cjs = require('./chunk-BWPTCHL7.cjs');
16
16
 
17
17
 
18
- var _chunkN2EEOWEPcjs = require('./chunk-N2EEOWEP.cjs');
18
+ var _chunkCW4VK77Zcjs = require('./chunk-CW4VK77Z.cjs');
19
19
 
20
20
 
21
- var _chunkJZF4HUYOcjs = require('./chunk-JZF4HUYO.cjs');
21
+ var _chunkDYTE5N3Bcjs = require('./chunk-DYTE5N3B.cjs');
22
22
 
23
23
 
24
- var _chunkFOVP54XPcjs = require('./chunk-FOVP54XP.cjs');
24
+ var _chunk3NH4MEMMcjs = require('./chunk-3NH4MEMM.cjs');
25
25
 
26
26
 
27
27
  var _chunkTTD3KL6Ecjs = require('./chunk-TTD3KL6E.cjs');
28
28
 
29
29
 
30
- var _chunk77C6VN4Lcjs = require('./chunk-77C6VN4L.cjs');
30
+ var _chunk5LWD6VRVcjs = require('./chunk-5LWD6VRV.cjs');
31
31
 
32
32
 
33
- var _chunkULR4573Wcjs = require('./chunk-ULR4573W.cjs');
33
+ var _chunkZLQCMOVUcjs = require('./chunk-ZLQCMOVU.cjs');
34
+
35
+
36
+ var _chunkS36CKKDVcjs = require('./chunk-S36CKKDV.cjs');
34
37
 
35
38
 
36
- var _chunkEEBHFSBYcjs = require('./chunk-EEBHFSBY.cjs');
37
39
 
38
40
 
39
- var _chunkOE5BOGGXcjs = require('./chunk-OE5BOGGX.cjs');
40
41
 
41
42
 
42
- var _chunkY3AB4GV6cjs = require('./chunk-Y3AB4GV6.cjs');
43
43
 
44
44
 
45
+ var _chunkC5GIWGQRcjs = require('./chunk-C5GIWGQR.cjs');
45
46
 
46
47
 
48
+ var _chunkOE5BOGGXcjs = require('./chunk-OE5BOGGX.cjs');
47
49
 
48
50
 
51
+ var _chunkNHEZXA4Hcjs = require('./chunk-NHEZXA4H.cjs');
49
52
 
50
- var _chunk2GYFDVXXcjs = require('./chunk-2GYFDVXX.cjs');
51
53
 
52
54
 
53
55
 
54
56
 
55
57
 
56
- var _chunkYGNY6CKUcjs = require('./chunk-YGNY6CKU.cjs');
58
+ var _chunkZ353BLWIcjs = require('./chunk-Z353BLWI.cjs');
57
59
 
58
60
 
59
61
  var _chunkFLK6OPFYcjs = require('./chunk-FLK6OPFY.cjs');
@@ -88,5 +90,7 @@ require('./chunk-555JRYCS.cjs');
88
90
 
89
91
 
90
92
 
91
- exports.CheckboxGroup = _chunkN2EEOWEPcjs.CheckboxGroup_default; exports.FieldArray = _chunkJZF4HUYOcjs.FieldArray_default; exports.FieldCopyTestIdButton = _chunkOE5BOGGXcjs.FieldCopyTestIdButton_default; exports.FieldValidationError = _chunkY3AB4GV6cjs.FieldValidationError_default; exports.Form = _chunkFOVP54XPcjs.Form_default; exports.Grid = _chunkTTD3KL6Ecjs.Grid_default; exports.Input = _chunk77C6VN4Lcjs.Input_default; exports.RadioBoxes = _chunkULR4573Wcjs.RadioBoxes_default; exports.RadioGroup = _chunkEEBHFSBYcjs.RadioGroup_default; exports.RadioTabs = _chunkORQO6JXKcjs.RadioTabs_default; exports.Select = _chunkAYNTZPKLcjs.Select_default; exports.SubmitButton = _chunkC64RKQEWcjs.SubmitButton_default; exports.Switch = _chunkUGCZORU3cjs.Switch_default; exports.TextArea = _chunkRDBCJJI7cjs.TextArea_default; exports.checkFieldIsRequired = _chunk2GYFDVXXcjs.checkFieldIsRequired; exports.fromNullishString = _chunkYGNY6CKUcjs.fromNullishString; exports.toFormFormat = _chunkYGNY6CKUcjs.toFormFormat; exports.toNullishString = _chunkYGNY6CKUcjs.toNullishString; exports.toValidationFormat = _chunkYGNY6CKUcjs.toValidationFormat; exports.useClientValidation = _chunk2GYFDVXXcjs.useClientValidation; exports.useController = _chunk2GYFDVXXcjs.useController; exports.useFieldArray = _chunk2GYFDVXXcjs.useFieldArray; exports.useFormContext = _chunk2GYFDVXXcjs.useFormContext; exports.useInput = _chunk2GYFDVXXcjs.useInput; exports.useInputValueDebounce = _chunkFLK6OPFYcjs.useInputValueDebounce; exports.useInputValueTransform = _chunkP6HJOG7Dcjs.useInputValueTransform;
93
+
94
+
95
+ exports.Checkboxes = _chunkCW4VK77Zcjs.Checkboxes_default; exports.FieldArray = _chunkDYTE5N3Bcjs.FieldArray_default; exports.FieldCopyTestIdButton = _chunkOE5BOGGXcjs.FieldCopyTestIdButton_default; exports.FieldValidationError = _chunkNHEZXA4Hcjs.FieldValidationError_default; exports.Form = _chunk3NH4MEMMcjs.Form_default; exports.Grid = _chunkTTD3KL6Ecjs.Grid_default; exports.Input = _chunk5LWD6VRVcjs.Input_default; exports.RadioBoxes = _chunkZLQCMOVUcjs.RadioBoxes_default; exports.RadioTabs = _chunkS36CKKDVcjs.RadioTabs_default; exports.Radios = _chunk2DHTL4PWcjs.Radios_default; exports.Select = _chunkHQNZYWJXcjs.Select_default; exports.SubmitButton = _chunk62AYJT2Hcjs.SubmitButton_default; exports.Switch = _chunkYIBISSMTcjs.Switch_default; exports.TextArea = _chunkBWPTCHL7cjs.TextArea_default; exports.checkFieldIsRequired = _chunkC5GIWGQRcjs.checkFieldIsRequired; exports.flatArrayKey = _chunkZ353BLWIcjs.flatArrayKey; exports.fromNullishString = _chunkZ353BLWIcjs.fromNullishString; exports.toFormFormat = _chunkZ353BLWIcjs.toFormFormat; exports.toNullishString = _chunkZ353BLWIcjs.toNullishString; exports.toValidationFormat = _chunkZ353BLWIcjs.toValidationFormat; exports.useClientValidation = _chunkC5GIWGQRcjs.useClientValidation; exports.useController = _chunkC5GIWGQRcjs.useController; exports.useFieldArray = _chunkC5GIWGQRcjs.useFieldArray; exports.useFormContext = _chunkC5GIWGQRcjs.useFormContext; exports.useInput = _chunkC5GIWGQRcjs.useInput; exports.useInputValueDebounce = _chunkFLK6OPFYcjs.useInputValueDebounce; exports.useInputValueTransform = _chunkP6HJOG7Dcjs.useInputValueTransform; exports.useUniformField = _chunkC5GIWGQRcjs.useUniformField;
92
96
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/uniform/dist/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yiDAAC","file":"/home/runner/work/pixels/pixels/packages/uniform/dist/index.cjs"}
1
+ {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/uniform/dist/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,+oDAAC","file":"/home/runner/work/pixels/pixels/packages/uniform/dist/index.cjs"}
package/dist/index.d.cts CHANGED
@@ -1,23 +1,23 @@
1
- export { C as CheckboxGroup, b as CheckboxGroupOption, a as CheckboxGroupProps } from './CheckboxGroup-B1g42iP0.cjs';
2
- export { F as FieldArray, a as FieldArrayChildrenRenderFn, b as FieldArrayFeatures, c as FieldArrayProps } from './FieldArray-DVQka7Bh.cjs';
1
+ export { b as CheckboxOption, C as Checkboxes, a as CheckboxesProps } from './Checkboxes-CR0Uu2g9.cjs';
2
+ export { F as FieldArray, a as FieldArrayChildrenRenderFn, b as FieldArrayFeatures, c as FieldArrayProps } from './FieldArray-EP4otr2x.cjs';
3
3
  export { F as Form, a as FormProps } from './Form-Cu0lWRDN.cjs';
4
4
  export { G as Grid, a as GridProps } from './Grid-DF3L9NF3.cjs';
5
- export { fromNullishString, toFormFormat, toNullishString, toValidationFormat } from './helpers/index.cjs';
6
- export { UseControllerProps, UseControllerReturn, checkFieldIsRequired, useClientValidation, useController, useFormContext } from './hooks/index.cjs';
5
+ export { flatArrayKey, fromNullishString, toFormFormat, toNullishString, toValidationFormat } from './helpers/index.cjs';
6
+ export { UseControllerProps, UseControllerReturn, UseUniformFieldParams, UseUniformFieldReturn, checkFieldIsRequired, useClientValidation, useController, useFormContext, useUniformField } from './hooks/index.cjs';
7
7
  export { useFieldArray } from 'react-hook-form';
8
8
  export { useInput } from '@heroui/input';
9
9
  export { UseInputValueDebounceOptions, UseInputValueDebounceReturn, useInputValueDebounce } from './hooks/useInputValueDebounce/index.cjs';
10
10
  export { InputValueTransform, UseInputValueTransformOptions, UseInputValueTransformReturn, useInputValueTransform } from './hooks/useInputValueTransform/index.cjs';
11
- export { I as Input, a as InputProps } from './Input-BQkZtJx8.cjs';
11
+ export { I as Input, a as InputProps } from './Input-D7HT_8jf.cjs';
12
12
  export { F as FieldCopyTestIdButton, a as FieldCopyTestIdButtonProps } from './FieldCopyTestIdButton-_TDlmw0L.cjs';
13
- export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-CU_xw0BL.cjs';
14
- export { R as RadioBoxes, a as RadioBoxesProps } from './RadioBoxes-CE3mYoFk.cjs';
15
- export { R as RadioGroup, a as RadioGroupProps } from './RadioGroup-CAOX80Xx.cjs';
16
- export { R as RadioTabs, a as RadioTabsProps } from './RadioTabs-BCWW3tru.cjs';
17
- export { S as Select, a as SelectProps } from './Select-CTRWinmO.cjs';
13
+ export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-DwtLkGMo.cjs';
14
+ export { R as RadioBoxes, a as RadioBoxesProps } from './RadioBoxes-DpkI28l0.cjs';
15
+ export { R as Radios, a as RadiosProps } from './Radios-DprlJhoq.cjs';
16
+ export { R as RadioTabs, a as RadioTabsProps } from './RadioTabs-DTDcAZoH.cjs';
17
+ export { S as Select, a as SelectProps } from './Select-CDkZmZp2.cjs';
18
18
  export { S as SubmitButton, a as SubmitButtonProps } from './SubmitButton-DqaxyVpp.cjs';
19
19
  export { S as Switch, a as SwitchProps } from './Switch-Hr6PnK98.cjs';
20
- export { T as TextArea, a as TextAreaProps } from './TextArea-DnFGyl4a.cjs';
20
+ export { T as TextArea, a as TextAreaProps } from './TextArea-DhxNWYNg.cjs';
21
21
  import 'react/jsx-runtime';
22
22
  import 'tailwind-variants';
23
23
  import '@fuf-stack/pixel-utils';
package/dist/index.d.ts CHANGED
@@ -1,23 +1,23 @@
1
- export { C as CheckboxGroup, b as CheckboxGroupOption, a as CheckboxGroupProps } from './CheckboxGroup-B1g42iP0.js';
2
- export { F as FieldArray, a as FieldArrayChildrenRenderFn, b as FieldArrayFeatures, c as FieldArrayProps } from './FieldArray-DVQka7Bh.js';
1
+ export { b as CheckboxOption, C as Checkboxes, a as CheckboxesProps } from './Checkboxes-CR0Uu2g9.js';
2
+ export { F as FieldArray, a as FieldArrayChildrenRenderFn, b as FieldArrayFeatures, c as FieldArrayProps } from './FieldArray-EP4otr2x.js';
3
3
  export { F as Form, a as FormProps } from './Form-C_11i6PA.js';
4
4
  export { G as Grid, a as GridProps } from './Grid-DF3L9NF3.js';
5
- export { fromNullishString, toFormFormat, toNullishString, toValidationFormat } from './helpers/index.js';
6
- export { UseControllerProps, UseControllerReturn, checkFieldIsRequired, useClientValidation, useController, useFormContext } from './hooks/index.js';
5
+ export { flatArrayKey, fromNullishString, toFormFormat, toNullishString, toValidationFormat } from './helpers/index.js';
6
+ export { UseControllerProps, UseControllerReturn, UseUniformFieldParams, UseUniformFieldReturn, checkFieldIsRequired, useClientValidation, useController, useFormContext, useUniformField } from './hooks/index.js';
7
7
  export { useFieldArray } from 'react-hook-form';
8
8
  export { useInput } from '@heroui/input';
9
9
  export { UseInputValueDebounceOptions, UseInputValueDebounceReturn, useInputValueDebounce } from './hooks/useInputValueDebounce/index.js';
10
10
  export { InputValueTransform, UseInputValueTransformOptions, UseInputValueTransformReturn, useInputValueTransform } from './hooks/useInputValueTransform/index.js';
11
- export { I as Input, a as InputProps } from './Input-C6ujfEkn.js';
11
+ export { I as Input, a as InputProps } from './Input-CCIEnvIp.js';
12
12
  export { F as FieldCopyTestIdButton, a as FieldCopyTestIdButtonProps } from './FieldCopyTestIdButton-_TDlmw0L.js';
13
- export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-CU_xw0BL.js';
14
- export { R as RadioBoxes, a as RadioBoxesProps } from './RadioBoxes-CE3mYoFk.js';
15
- export { R as RadioGroup, a as RadioGroupProps } from './RadioGroup-CAOX80Xx.js';
16
- export { R as RadioTabs, a as RadioTabsProps } from './RadioTabs-BCWW3tru.js';
17
- export { S as Select, a as SelectProps } from './Select-CTRWinmO.js';
13
+ export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-DwtLkGMo.js';
14
+ export { R as RadioBoxes, a as RadioBoxesProps } from './RadioBoxes-DpkI28l0.js';
15
+ export { R as Radios, a as RadiosProps } from './Radios-DprlJhoq.js';
16
+ export { R as RadioTabs, a as RadioTabsProps } from './RadioTabs-DTDcAZoH.js';
17
+ export { S as Select, a as SelectProps } from './Select-CDkZmZp2.js';
18
18
  export { S as SubmitButton, a as SubmitButtonProps } from './SubmitButton-DqaxyVpp.js';
19
19
  export { S as Switch, a as SwitchProps } from './Switch-Hr6PnK98.js';
20
- export { T as TextArea, a as TextAreaProps } from './TextArea-DnFGyl4a.js';
20
+ export { T as TextArea, a as TextAreaProps } from './TextArea-DhxNWYNg.js';
21
21
  import 'react/jsx-runtime';
22
22
  import 'tailwind-variants';
23
23
  import '@fuf-stack/pixel-utils';