@fuf-stack/uniform 0.18.4 → 0.19.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 (171) hide show
  1. package/dist/CheckboxGroup/index.cjs +6 -7
  2. package/dist/CheckboxGroup/index.cjs.map +1 -1
  3. package/dist/CheckboxGroup/index.js +5 -6
  4. package/dist/FieldArray/index.cjs +6 -6
  5. package/dist/FieldArray/index.js +5 -5
  6. package/dist/{FieldCopyTestIdButton-DnbovhMk.d.ts → FieldCopyTestIdButton-_TDlmw0L.d.cts} +2 -0
  7. package/dist/{FieldCopyTestIdButton-DnbovhMk.d.cts → FieldCopyTestIdButton-_TDlmw0L.d.ts} +2 -0
  8. package/dist/{FieldValidationError-DAT12Ess.d.ts → FieldValidationError-CU_xw0BL.d.cts} +5 -2
  9. package/dist/{FieldValidationError-DAT12Ess.d.cts → FieldValidationError-CU_xw0BL.d.ts} +5 -2
  10. package/dist/Form/index.cjs +4 -4
  11. package/dist/Form/index.js +3 -3
  12. package/dist/Grid/index.cjs +1 -1
  13. package/dist/Grid/index.js +1 -1
  14. package/dist/Input/index.cjs +6 -7
  15. package/dist/Input/index.cjs.map +1 -1
  16. package/dist/Input/index.js +5 -6
  17. package/dist/RadioBoxes/index.cjs +6 -7
  18. package/dist/RadioBoxes/index.cjs.map +1 -1
  19. package/dist/RadioBoxes/index.js +5 -6
  20. package/dist/RadioGroup/index.cjs +6 -7
  21. package/dist/RadioGroup/index.cjs.map +1 -1
  22. package/dist/RadioGroup/index.js +5 -6
  23. package/dist/RadioTabs/index.cjs +6 -7
  24. package/dist/RadioTabs/index.cjs.map +1 -1
  25. package/dist/RadioTabs/index.js +5 -6
  26. package/dist/Select/index.cjs +6 -7
  27. package/dist/Select/index.cjs.map +1 -1
  28. package/dist/Select/index.js +5 -6
  29. package/dist/SubmitButton/index.cjs +4 -4
  30. package/dist/SubmitButton/index.js +3 -3
  31. package/dist/Switch/index.cjs +6 -7
  32. package/dist/Switch/index.cjs.map +1 -1
  33. package/dist/Switch/index.js +5 -6
  34. package/dist/TextArea/index.cjs +6 -7
  35. package/dist/TextArea/index.cjs.map +1 -1
  36. package/dist/TextArea/index.js +5 -6
  37. package/dist/chunk-25Y2Q5CX.cjs +110 -0
  38. package/dist/chunk-25Y2Q5CX.cjs.map +1 -0
  39. package/dist/{chunk-IOIYK6UC.js → chunk-35I663WR.js} +29 -29
  40. package/dist/chunk-35I663WR.js.map +1 -0
  41. package/dist/{chunk-FNY55CAR.js → chunk-3JRZ5YNE.js} +10 -9
  42. package/dist/chunk-3JRZ5YNE.js.map +1 -0
  43. package/dist/chunk-4DVYBP2O.cjs +236 -0
  44. package/dist/chunk-4DVYBP2O.cjs.map +1 -0
  45. package/dist/chunk-4IQKCUZC.cjs +145 -0
  46. package/dist/chunk-4IQKCUZC.cjs.map +1 -0
  47. package/dist/{chunk-4DAZAO6Y.cjs → chunk-555JRYCS.cjs} +4 -2
  48. package/dist/chunk-555JRYCS.cjs.map +1 -0
  49. package/dist/{chunk-WI6FEFKD.cjs → chunk-5NKR4C73.cjs} +18 -17
  50. package/dist/chunk-5NKR4C73.cjs.map +1 -0
  51. package/dist/chunk-5W2IWHSE.js +89 -0
  52. package/dist/chunk-5W2IWHSE.js.map +1 -0
  53. package/dist/{chunk-TONXQKTY.cjs → chunk-6GCMM22R.cjs} +36 -48
  54. package/dist/chunk-6GCMM22R.cjs.map +1 -0
  55. package/dist/chunk-7BLVIVDU.cjs +281 -0
  56. package/dist/chunk-7BLVIVDU.cjs.map +1 -0
  57. package/dist/{chunk-BLAMCAGB.js → chunk-7NZKBUL6.js} +37 -49
  58. package/dist/chunk-7NZKBUL6.js.map +1 -0
  59. package/dist/{chunk-5NRHHIFP.js → chunk-7R2P54VS.js} +38 -50
  60. package/dist/chunk-7R2P54VS.js.map +1 -0
  61. package/dist/{chunk-2CRY7VDQ.js → chunk-BQGN3JTU.js} +1 -1
  62. package/dist/chunk-BQGN3JTU.js.map +1 -0
  63. package/dist/{chunk-P332MPVH.js → chunk-BXQ3MVNH.js} +5 -5
  64. package/dist/chunk-BXQ3MVNH.js.map +1 -0
  65. package/dist/chunk-CN5XEGV4.js +281 -0
  66. package/dist/chunk-CN5XEGV4.js.map +1 -0
  67. package/dist/chunk-DBKDDOS2.cjs +89 -0
  68. package/dist/chunk-DBKDDOS2.cjs.map +1 -0
  69. package/dist/chunk-E62JDTFS.js +110 -0
  70. package/dist/chunk-E62JDTFS.js.map +1 -0
  71. package/dist/chunk-F2LWLSBT.cjs +98 -0
  72. package/dist/chunk-F2LWLSBT.cjs.map +1 -0
  73. package/dist/{chunk-OE5IW4ZG.cjs → chunk-GNYQC5IJ.cjs} +8 -17
  74. package/dist/chunk-GNYQC5IJ.cjs.map +1 -0
  75. package/dist/{chunk-4RDTC7R6.cjs → chunk-HECO3HXR.cjs} +31 -31
  76. package/dist/chunk-HECO3HXR.cjs.map +1 -0
  77. package/dist/{chunk-CRTRMMJ7.js → chunk-K2V4ULA2.js} +3 -1
  78. package/dist/{chunk-AEUUTAJB.cjs → chunk-LYI2IDCW.cjs} +6 -6
  79. package/dist/chunk-LYI2IDCW.cjs.map +1 -0
  80. package/dist/chunk-N2MRIHRX.js +236 -0
  81. package/dist/chunk-N2MRIHRX.js.map +1 -0
  82. package/dist/{chunk-2DJMYFRZ.cjs → chunk-NEHRI4EM.cjs} +61 -71
  83. package/dist/chunk-NEHRI4EM.cjs.map +1 -0
  84. package/dist/{chunk-JU5RT22Y.cjs → chunk-PA2DQCBY.cjs} +1 -1
  85. package/dist/chunk-PA2DQCBY.cjs.map +1 -0
  86. package/dist/{chunk-ASPOGQPS.js → chunk-UTFZRBBS.js} +8 -17
  87. package/dist/chunk-UTFZRBBS.js.map +1 -0
  88. package/dist/chunk-UU7SXXNI.cjs +70 -0
  89. package/dist/chunk-UU7SXXNI.cjs.map +1 -0
  90. package/dist/chunk-W2K5WX3O.js +145 -0
  91. package/dist/chunk-W2K5WX3O.js.map +1 -0
  92. package/dist/chunk-Y4YQH2QB.js +70 -0
  93. package/dist/chunk-Y4YQH2QB.js.map +1 -0
  94. package/dist/{chunk-5RFFXDXC.js → chunk-YK2XHKK2.js} +56 -66
  95. package/dist/chunk-YK2XHKK2.js.map +1 -0
  96. package/dist/helpers/index.cjs +1 -1
  97. package/dist/helpers/index.js +1 -1
  98. package/dist/hooks/index.cjs +7 -3
  99. package/dist/hooks/index.cjs.map +1 -1
  100. package/dist/hooks/index.d.cts +47 -6
  101. package/dist/hooks/index.d.ts +47 -6
  102. package/dist/hooks/index.js +6 -2
  103. package/dist/index.cjs +18 -18
  104. package/dist/index.cjs.map +1 -1
  105. package/dist/index.d.cts +3 -4
  106. package/dist/index.d.ts +3 -4
  107. package/dist/index.js +24 -24
  108. package/dist/partials/FieldCopyTestIdButton/index.cjs +3 -3
  109. package/dist/partials/FieldCopyTestIdButton/index.d.cts +2 -2
  110. package/dist/partials/FieldCopyTestIdButton/index.d.ts +2 -2
  111. package/dist/partials/FieldCopyTestIdButton/index.js +2 -2
  112. package/dist/partials/FieldValidationError/index.cjs +3 -3
  113. package/dist/partials/FieldValidationError/index.d.cts +2 -2
  114. package/dist/partials/FieldValidationError/index.d.ts +2 -2
  115. package/dist/partials/FieldValidationError/index.js +2 -2
  116. package/package.json +6 -11
  117. package/dist/Controller/index.cjs +0 -11
  118. package/dist/Controller/index.cjs.map +0 -1
  119. package/dist/Controller/index.d.cts +0 -8
  120. package/dist/Controller/index.d.ts +0 -8
  121. package/dist/Controller/index.js +0 -11
  122. package/dist/Controller-8Nqugui5.d.cts +0 -37
  123. package/dist/Controller-8Nqugui5.d.ts +0 -37
  124. package/dist/chunk-2CRY7VDQ.js.map +0 -1
  125. package/dist/chunk-2DJMYFRZ.cjs.map +0 -1
  126. package/dist/chunk-3ULE3TIW.js +0 -249
  127. package/dist/chunk-3ULE3TIW.js.map +0 -1
  128. package/dist/chunk-4DAZAO6Y.cjs.map +0 -1
  129. package/dist/chunk-4RDTC7R6.cjs.map +0 -1
  130. package/dist/chunk-5NRHHIFP.js.map +0 -1
  131. package/dist/chunk-5RFFXDXC.js.map +0 -1
  132. package/dist/chunk-AEUUTAJB.cjs.map +0 -1
  133. package/dist/chunk-ASPOGQPS.js.map +0 -1
  134. package/dist/chunk-AT2VVPRD.js +0 -52
  135. package/dist/chunk-AT2VVPRD.js.map +0 -1
  136. package/dist/chunk-BLAMCAGB.js.map +0 -1
  137. package/dist/chunk-C5ZRTXUD.cjs +0 -249
  138. package/dist/chunk-C5ZRTXUD.cjs.map +0 -1
  139. package/dist/chunk-CRTRMMJ7.js.map +0 -1
  140. package/dist/chunk-EPYFZXEI.cjs +0 -52
  141. package/dist/chunk-EPYFZXEI.cjs.map +0 -1
  142. package/dist/chunk-FAXFHN7Z.cjs +0 -145
  143. package/dist/chunk-FAXFHN7Z.cjs.map +0 -1
  144. package/dist/chunk-FNY55CAR.js.map +0 -1
  145. package/dist/chunk-IOIYK6UC.js.map +0 -1
  146. package/dist/chunk-JU5RT22Y.cjs.map +0 -1
  147. package/dist/chunk-MKFKX5QX.cjs +0 -97
  148. package/dist/chunk-MKFKX5QX.cjs.map +0 -1
  149. package/dist/chunk-NBAVP4ER.js +0 -135
  150. package/dist/chunk-NBAVP4ER.js.map +0 -1
  151. package/dist/chunk-O3TBUVDW.js +0 -97
  152. package/dist/chunk-O3TBUVDW.js.map +0 -1
  153. package/dist/chunk-OE5IW4ZG.cjs.map +0 -1
  154. package/dist/chunk-P332MPVH.js.map +0 -1
  155. package/dist/chunk-Q6DCHTBA.js +0 -145
  156. package/dist/chunk-Q6DCHTBA.js.map +0 -1
  157. package/dist/chunk-QQW2FHSC.cjs +0 -135
  158. package/dist/chunk-QQW2FHSC.cjs.map +0 -1
  159. package/dist/chunk-QXD6XP3Y.js +0 -120
  160. package/dist/chunk-QXD6XP3Y.js.map +0 -1
  161. package/dist/chunk-TONXQKTY.cjs.map +0 -1
  162. package/dist/chunk-UOK3TF4G.cjs +0 -82
  163. package/dist/chunk-UOK3TF4G.cjs.map +0 -1
  164. package/dist/chunk-VZC5LLW4.cjs +0 -120
  165. package/dist/chunk-VZC5LLW4.cjs.map +0 -1
  166. package/dist/chunk-WI6FEFKD.cjs.map +0 -1
  167. package/dist/chunk-XL3FJ3VX.js +0 -82
  168. package/dist/chunk-XL3FJ3VX.js.map +0 -1
  169. package/dist/chunk-ZFJ5NEHU.cjs +0 -110
  170. package/dist/chunk-ZFJ5NEHU.cjs.map +0 -1
  171. /package/dist/{Controller/index.js.map → chunk-K2V4ULA2.js.map} +0 -0
@@ -1,20 +1,18 @@
1
1
  import {
2
- Controller_default
3
- } from "./chunk-AT2VVPRD.js";
2
+ FieldValidationError_default
3
+ } from "./chunk-UTFZRBBS.js";
4
4
  import {
5
5
  FieldCopyTestIdButton_default
6
- } from "./chunk-2CRY7VDQ.js";
7
- import {
8
- FieldValidationError_default
9
- } from "./chunk-ASPOGQPS.js";
6
+ } from "./chunk-BQGN3JTU.js";
10
7
  import {
8
+ useController,
11
9
  useFormContext
12
- } from "./chunk-NBAVP4ER.js";
10
+ } from "./chunk-CN5XEGV4.js";
13
11
  import {
14
12
  __objRest,
15
13
  __spreadProps,
16
14
  __spreadValues
17
- } from "./chunk-CRTRMMJ7.js";
15
+ } from "./chunk-K2V4ULA2.js";
18
16
 
19
17
  // src/RadioBoxes/RadioBoxes.tsx
20
18
  import { RadioGroup as HeroRadioGroup } from "@heroui/radio";
@@ -98,70 +96,62 @@ var RadioBoxes = ({
98
96
  }) => {
99
97
  const { control, debugMode, getFieldState, getValues } = useFormContext();
100
98
  const { error, invalid, required, testId } = getFieldState(name, _testId);
99
+ const { field } = useController({ control, disabled, name });
100
+ const { onChange, disabled: isDisabled, onBlur, ref } = field;
101
101
  const showTestIdCopyButton = debugMode === "debug-testids";
102
102
  const showLabel = label || showTestIdCopyButton;
103
103
  const variants = radioBoxesVariants();
104
104
  const classNames = variantsToClassNames(variants, className, "base");
105
+ const itemClassNames = {
106
+ base: classNames.itemBase,
107
+ control: classNames.itemControl,
108
+ description: classNames.itemDescription,
109
+ label: classNames.itemLabel,
110
+ labelWrapper: classNames.itemLabelWrapper,
111
+ wrapper: classNames.itemWrapper
112
+ };
105
113
  return /* @__PURE__ */ jsx2(
106
- Controller_default,
114
+ HeroRadioGroup,
107
115
  {
108
- control,
109
- disabled,
116
+ classNames,
117
+ "data-invalid": invalid,
118
+ "data-required": required,
119
+ "data-testid": testId,
120
+ defaultValue: getValues()[name],
121
+ errorMessage: error && /* @__PURE__ */ jsx2(FieldValidationError_default, { error, testId }),
122
+ isDisabled,
123
+ isInvalid: invalid,
124
+ isRequired: required,
125
+ label: showLabel && // eslint-disable-next-line jsx-a11y/label-has-associated-control
126
+ /* @__PURE__ */ jsxs2("label", { children: [
127
+ label,
128
+ showTestIdCopyButton && /* @__PURE__ */ jsx2(FieldCopyTestIdButton_default, { testId })
129
+ ] }),
110
130
  name,
111
- render: ({ field: { onChange, disabled: isDisabled, onBlur, ref } }) => {
112
- const itemClassNames = {
113
- base: classNames.itemBase,
114
- control: classNames.itemControl,
115
- description: classNames.itemDescription,
116
- label: classNames.itemLabel,
117
- labelWrapper: classNames.itemLabelWrapper,
118
- wrapper: classNames.itemWrapper
119
- };
120
- return /* @__PURE__ */ jsx2(
121
- HeroRadioGroup,
122
- {
123
- classNames,
124
- "data-invalid": invalid,
125
- "data-required": required,
126
- "data-testid": testId,
127
- defaultValue: getValues()[name],
128
- errorMessage: error && /* @__PURE__ */ jsx2(FieldValidationError_default, { error }),
129
- isDisabled,
130
- isInvalid: invalid,
131
- isRequired: required,
132
- label: showLabel && // eslint-disable-next-line jsx-a11y/label-has-associated-control
133
- /* @__PURE__ */ jsxs2("label", { children: [
134
- label,
135
- showTestIdCopyButton && /* @__PURE__ */ jsx2(FieldCopyTestIdButton_default, { testId })
136
- ] }),
137
- name,
138
- orientation: inline ? "horizontal" : "vertical",
139
- onBlur,
140
- ref,
141
- children: options.map((option) => {
142
- if ("value" in option) {
143
- return /* @__PURE__ */ jsx2(
144
- RadioBox,
145
- {
146
- classNames: itemClassNames,
147
- "data-testid": slugify(
148
- `${testId}_option_${option.testId || option.value}`
149
- ),
150
- description: option.description,
151
- icon: option.icon,
152
- isDisabled: isDisabled || option.disabled,
153
- onChange,
154
- value: option.value,
155
- children: option.label ? option.label : option.value
156
- },
157
- option.value
158
- );
159
- }
160
- return null;
161
- })
162
- }
163
- );
164
- }
131
+ orientation: inline ? "horizontal" : "vertical",
132
+ onBlur,
133
+ ref,
134
+ children: options.map((option) => {
135
+ if ("value" in option) {
136
+ return /* @__PURE__ */ jsx2(
137
+ RadioBox,
138
+ {
139
+ classNames: itemClassNames,
140
+ "data-testid": slugify(
141
+ `${testId}_option_${option.testId || option.value}`
142
+ ),
143
+ description: option.description,
144
+ icon: option.icon,
145
+ isDisabled: isDisabled || option.disabled,
146
+ onChange,
147
+ value: option.value,
148
+ children: option.label ? option.label : option.value
149
+ },
150
+ option.value
151
+ );
152
+ }
153
+ return null;
154
+ })
165
155
  }
166
156
  );
167
157
  };
@@ -174,4 +164,4 @@ export {
174
164
  RadioBoxes_default,
175
165
  RadioBoxes_default2
176
166
  };
177
- //# sourceMappingURL=chunk-5RFFXDXC.js.map
167
+ //# sourceMappingURL=chunk-YK2XHKK2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/RadioBoxes/RadioBoxes.tsx","../src/RadioBoxes/RadioBox.tsx","../src/RadioBoxes/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactElement, ReactNode } from 'react';\n\nimport { RadioGroup as HeroRadioGroup } from '@heroui/radio';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useController, useFormContext } from '../hooks';\nimport { FieldCopyTestIdButton } from '../partials/FieldCopyTestIdButton';\nimport { FieldValidationError } from '../partials/FieldValidationError';\nimport { RadioBox } from './RadioBox';\n\nexport const radioBoxesVariants = tv({\n slots: {\n base: 'group', // Needs group for group-data condition\n itemBase: '',\n itemControl: 'bg-focus group-data-[invalid=true]:bg-danger',\n itemDescription: '',\n itemLabel: 'text-sm',\n itemLabelWrapper: '',\n itemWrapper:\n 'group-data-[invalid=true]:!border-danger [&:not(group-data-[invalid=\"true\"]):not(group-data-[selected=\"false\"])]:border-focus', // TODO: get rid of !.\n // see HeroUI styles for group-data condition,\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/core/theme/src/components/select.ts\n label:\n 'text-sm text-foreground subpixel-antialiased group-data-[invalid=true]:text-danger',\n wrapper: '',\n },\n});\n\ntype VariantProps = TVProps<typeof radioBoxesVariants>;\ntype ClassName = TVClassName<typeof radioBoxesVariants>;\n\nexport interface RadioBoxesOption {\n /** Description of the value. Works with variant radioBox. */\n description?: ReactNode;\n /** disables the option */\n disabled?: boolean;\n /** option label */\n label?: ReactNode;\n /** option icon */\n icon?: ReactNode;\n /** HTML data-testid attribute of the option */\n testId?: string;\n /** option value */\n value: string;\n}\n\nexport interface RadioBoxesProps extends VariantProps {\n /** CSS class name */\n className?: ClassName;\n /** Determines if the Buttons are disabled or not. */\n disabled?: boolean;\n /** determines orientation of the Buttons. */\n inline?: boolean;\n /** Label displayed next to the RadioButton. */\n label?: ReactNode;\n /** Name the RadioButtons are registered at in HTML forms (react-hook-form). */\n name: string;\n /** Radio button configuration. */\n options: RadioBoxesOption[];\n /** Id to grab element in internal tests. */\n testId?: string;\n}\n\n/**\n * RadioBoxes component based on [HeroUI RadioGroup](https://www.heroui.com//docs/components/radio-group)\n */\nconst RadioBoxes = ({\n className = undefined,\n disabled = false,\n inline = false,\n label = undefined,\n name,\n options,\n testId: _testId = undefined,\n}: RadioBoxesProps): ReactElement => {\n const { control, debugMode, getFieldState, getValues } = useFormContext();\n\n const { error, invalid, required, testId } = getFieldState(name, _testId);\n\n const { field } = useController({ control, disabled, name });\n const { onChange, disabled: isDisabled, onBlur, ref } = field;\n\n const showTestIdCopyButton = debugMode === 'debug-testids';\n const showLabel = label || showTestIdCopyButton;\n\n const variants = radioBoxesVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n\n const itemClassNames = {\n base: classNames.itemBase,\n control: classNames.itemControl,\n description: classNames.itemDescription,\n label: classNames.itemLabel,\n labelWrapper: classNames.itemLabelWrapper,\n wrapper: classNames.itemWrapper,\n };\n\n return (\n <HeroRadioGroup\n classNames={classNames}\n // see HeroUI styles for group-data condition (data-invalid),\n // e.g.: https://github.com/heroui-inc/heroui/blob/main/packages/components/select/src/use-select.ts\n data-invalid={invalid}\n data-required={required}\n data-testid={testId}\n defaultValue={getValues()[name]}\n errorMessage={\n error && <FieldValidationError error={error} testId={testId} />\n }\n isDisabled={isDisabled}\n isInvalid={invalid}\n isRequired={required}\n label={\n showLabel && (\n // eslint-disable-next-line jsx-a11y/label-has-associated-control\n <label>\n {label}\n {showTestIdCopyButton && <FieldCopyTestIdButton testId={testId} />}\n </label>\n )\n }\n name={name}\n orientation={inline ? 'horizontal' : 'vertical'}\n onBlur={onBlur}\n ref={ref}\n >\n {options.map((option) => {\n if ('value' in option) {\n return (\n <RadioBox\n classNames={itemClassNames}\n data-testid={slugify(\n `${testId}_option_${option.testId || option.value}`,\n )}\n description={option.description}\n icon={option.icon}\n isDisabled={isDisabled || option.disabled}\n key={option.value}\n onChange={onChange}\n value={option.value}\n >\n {option.label ? option.label : option.value}\n </RadioBox>\n );\n }\n return null;\n })}\n </HeroRadioGroup>\n );\n};\n\nexport default RadioBoxes;\n","import type { RadioProps as HeroRadioProps } from '@heroui/radio';\nimport type { ReactNode } from 'react';\n\nimport { useRadio } from '@heroui/radio';\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\n\nimport { cn } from '@fuf-stack/pixel-utils';\n\ninterface RadioProps extends HeroRadioProps {\n /** icon for the option */\n icon?: ReactNode;\n}\n\nexport const RadioBox = ({ icon = undefined, ...props }: RadioProps) => {\n const {\n children,\n Component,\n description,\n getBaseProps,\n getControlProps,\n getInputProps,\n getLabelProps,\n getLabelWrapperProps,\n getWrapperProps,\n isDisabled,\n } = useRadio(props);\n\n return (\n <Component\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...getBaseProps()}\n className={cn(\n 'group inline-flex flex-auto cursor-pointer items-center justify-between gap-4 rounded-lg border-2 border-default p-4 hover:bg-content2 data-[selected=true]:border-focus',\n {\n // disabled styles\n 'pointer-events-none opacity-disabled': isDisabled,\n },\n )}\n >\n <VisuallyHidden>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <input {...getInputProps()} />\n </VisuallyHidden>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <span {...getWrapperProps()}>\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n <span {...getControlProps()} />\n </span>\n {icon}\n <div\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...getLabelWrapperProps()}\n className={cn(getLabelWrapperProps().className, 'grow')}\n >\n {/* eslint-disable-next-line react/jsx-props-no-spreading */}\n {children && <span {...getLabelProps()}>{children}</span>}\n {description && (\n <span className=\"text-small text-foreground opacity-70\">\n {description}\n </span>\n )}\n </div>\n </Component>\n );\n};\n\nexport default RadioBox;\n","import RadioBoxes from './RadioBoxes';\n\nexport type { RadioBoxesProps } from './RadioBoxes';\n\nexport { RadioBoxes };\n\nexport default RadioBoxes;\n"],"mappings":"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","names":["jsx","jsxs","RadioBoxes_default"]}
@@ -4,7 +4,7 @@
4
4
 
5
5
 
6
6
  var _chunkCESGUF6Fcjs = require('../chunk-CESGUF6F.cjs');
7
- require('../chunk-4DAZAO6Y.cjs');
7
+ require('../chunk-555JRYCS.cjs');
8
8
 
9
9
 
10
10
 
@@ -4,7 +4,7 @@ import {
4
4
  toNullishString,
5
5
  toValidationFormat
6
6
  } from "../chunk-UAV6PVB4.js";
7
- import "../chunk-CRTRMMJ7.js";
7
+ import "../chunk-K2V4ULA2.js";
8
8
  export {
9
9
  fromNullishString,
10
10
  toFormFormat,
@@ -3,13 +3,17 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkQQW2FHSCcjs = require('../chunk-QQW2FHSC.cjs');
6
+
7
+
8
+ var _chunk7BLVIVDUcjs = require('../chunk-7BLVIVDU.cjs');
7
9
  require('../chunk-CESGUF6F.cjs');
8
- require('../chunk-4DAZAO6Y.cjs');
10
+ require('../chunk-555JRYCS.cjs');
11
+
12
+
9
13
 
10
14
 
11
15
 
12
16
 
13
17
 
14
- exports.checkFieldIsRequired = _chunkQQW2FHSCcjs.checkFieldIsRequired; exports.useFieldArray = _chunkQQW2FHSCcjs.useFieldArray; exports.useFormContext = _chunkQQW2FHSCcjs.useFormContext; exports.useInput = _chunkQQW2FHSCcjs.useInput;
18
+ exports.checkFieldIsRequired = _chunk7BLVIVDUcjs.checkFieldIsRequired; exports.useClientValidation = _chunk7BLVIVDUcjs.useClientValidation; exports.useController = _chunk7BLVIVDUcjs.useController; exports.useFieldArray = _chunk7BLVIVDUcjs.useFieldArray; exports.useFormContext = _chunk7BLVIVDUcjs.useFormContext; exports.useInput = _chunk7BLVIVDUcjs.useInput;
15
19
  //# 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;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACF,yOAAC","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;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,uWAAC","file":"/home/runner/work/pixels/pixels/packages/uniform/dist/hooks/index.cjs"}
@@ -1,11 +1,48 @@
1
+ import * as _fuf_stack_veto from '@fuf-stack/veto';
2
+ import { VetoTypeAny, VetoInstance } from '@fuf-stack/veto';
1
3
  import * as react_hook_form from 'react-hook-form';
2
- import { FieldError } from 'react-hook-form';
4
+ import { UseControllerProps as UseControllerProps$1, ControllerRenderProps, UseFormStateReturn, ControllerFieldState, FieldError } from 'react-hook-form';
3
5
  export { useFieldArray } from 'react-hook-form';
4
6
  import * as React from 'react';
5
7
  import { D as DebugModeSettings } from '../FormContext-ldCpxKnY.cjs';
6
- import { VetoInstance } from '@fuf-stack/veto';
7
8
  export { useInput } from '@heroui/input';
8
9
 
10
+ /**
11
+ * Hook for adding dynamic client-side validation to forms.
12
+ *
13
+ * Automatically manages validation schema lifecycle: sets schema when data is provided,
14
+ * clears schema when data is null/undefined, and cleans up on unmount.
15
+ *
16
+ * @param data - Data to create validation schema from (or null/undefined to clear validation)
17
+ * @param schemaFactory - Function that creates a validation schema from the data.
18
+ */
19
+ declare const useClientValidation: <TData = unknown>(data: TData | null | undefined, schemaFactory: (data: TData) => VetoTypeAny) => void;
20
+
21
+ type UseControllerProps<TFieldValues extends object = object> = UseControllerProps$1<TFieldValues>;
22
+ type UseControllerReturn<TFieldValues extends object = object> = {
23
+ field: Omit<ControllerRenderProps<TFieldValues>, 'onChange' | 'value'> & {
24
+ onChange: (...event: any[]) => void;
25
+ value: string;
26
+ };
27
+ formState: UseFormStateReturn<TFieldValues>;
28
+ fieldState: ControllerFieldState;
29
+ };
30
+ /**
31
+ * A wrapper around react-hook-form's useController that transparently handles nullish string conversions.
32
+ *
33
+ * Key features:
34
+ * 1. Empty strings ('') in the UI are stored as null in form state
35
+ * 2. Null/undefined values in form state are displayed as empty strings in the UI
36
+ * 3. Handles both direct value changes and React synthetic events
37
+ * 4. Maintains the same API as react-hook-form's useController
38
+ *
39
+ * This enables consistent handling of empty/null values while keeping a clean API
40
+ * for form inputs that expect string values.
41
+ *
42
+ * @see https://react-hook-form.com/docs/usecontroller
43
+ */
44
+ declare const useController: <TFieldValues extends object = object>(props: UseControllerProps<TFieldValues>) => UseControllerReturn<TFieldValues>;
45
+
9
46
  /** Schema check whether a field is required or optional */
10
47
  declare const checkFieldIsRequired: (validation: VetoInstance, path: string[]) => boolean;
11
48
  /**
@@ -22,12 +59,16 @@ declare const useFormContext: () => {
22
59
  isValidating: boolean;
23
60
  };
24
61
  formState: react_hook_form.FormState<react_hook_form.FieldValues>;
25
- debugMode: "disabled" | "debug" | "debug-testids" | "off";
62
+ debugMode: "debug" | "debug-testids" | "off" | "disabled";
26
63
  debugModeSettings?: DebugModeSettings;
27
64
  preventSubmit: (prevent: boolean) => void;
28
- setDebugMode: (debugMode: "disabled" | "debug" | "debug-testids" | "off") => void;
65
+ setDebugMode: (debugMode: "debug" | "debug-testids" | "off" | "disabled") => void;
29
66
  triggerSubmit: (e?: React.BaseSyntheticEvent) => Promise<void> | void;
30
- validation?: VetoInstance;
67
+ validation: {
68
+ instance?: VetoInstance;
69
+ errors?: _fuf_stack_veto.VetoFormattedError;
70
+ setClientValidationSchema: (key: string, schema: _fuf_stack_veto.VetoTypeAny | null) => void;
71
+ };
31
72
  watch: react_hook_form.UseFormWatch<react_hook_form.FieldValues>;
32
73
  getValues: react_hook_form.UseFormGetValues<react_hook_form.FieldValues>;
33
74
  setError: react_hook_form.UseFormSetError<react_hook_form.FieldValues>;
@@ -44,4 +85,4 @@ declare const useFormContext: () => {
44
85
  subscribe: react_hook_form.UseFromSubscribe<react_hook_form.FieldValues>;
45
86
  };
46
87
 
47
- export { checkFieldIsRequired, useFormContext };
88
+ export { type UseControllerProps, type UseControllerReturn, checkFieldIsRequired, useClientValidation, useController, useFormContext };
@@ -1,11 +1,48 @@
1
+ import * as _fuf_stack_veto from '@fuf-stack/veto';
2
+ import { VetoTypeAny, VetoInstance } from '@fuf-stack/veto';
1
3
  import * as react_hook_form from 'react-hook-form';
2
- import { FieldError } from 'react-hook-form';
4
+ import { UseControllerProps as UseControllerProps$1, ControllerRenderProps, UseFormStateReturn, ControllerFieldState, FieldError } from 'react-hook-form';
3
5
  export { useFieldArray } from 'react-hook-form';
4
6
  import * as React from 'react';
5
7
  import { D as DebugModeSettings } from '../FormContext-ldCpxKnY.js';
6
- import { VetoInstance } from '@fuf-stack/veto';
7
8
  export { useInput } from '@heroui/input';
8
9
 
10
+ /**
11
+ * Hook for adding dynamic client-side validation to forms.
12
+ *
13
+ * Automatically manages validation schema lifecycle: sets schema when data is provided,
14
+ * clears schema when data is null/undefined, and cleans up on unmount.
15
+ *
16
+ * @param data - Data to create validation schema from (or null/undefined to clear validation)
17
+ * @param schemaFactory - Function that creates a validation schema from the data.
18
+ */
19
+ declare const useClientValidation: <TData = unknown>(data: TData | null | undefined, schemaFactory: (data: TData) => VetoTypeAny) => void;
20
+
21
+ type UseControllerProps<TFieldValues extends object = object> = UseControllerProps$1<TFieldValues>;
22
+ type UseControllerReturn<TFieldValues extends object = object> = {
23
+ field: Omit<ControllerRenderProps<TFieldValues>, 'onChange' | 'value'> & {
24
+ onChange: (...event: any[]) => void;
25
+ value: string;
26
+ };
27
+ formState: UseFormStateReturn<TFieldValues>;
28
+ fieldState: ControllerFieldState;
29
+ };
30
+ /**
31
+ * A wrapper around react-hook-form's useController that transparently handles nullish string conversions.
32
+ *
33
+ * Key features:
34
+ * 1. Empty strings ('') in the UI are stored as null in form state
35
+ * 2. Null/undefined values in form state are displayed as empty strings in the UI
36
+ * 3. Handles both direct value changes and React synthetic events
37
+ * 4. Maintains the same API as react-hook-form's useController
38
+ *
39
+ * This enables consistent handling of empty/null values while keeping a clean API
40
+ * for form inputs that expect string values.
41
+ *
42
+ * @see https://react-hook-form.com/docs/usecontroller
43
+ */
44
+ declare const useController: <TFieldValues extends object = object>(props: UseControllerProps<TFieldValues>) => UseControllerReturn<TFieldValues>;
45
+
9
46
  /** Schema check whether a field is required or optional */
10
47
  declare const checkFieldIsRequired: (validation: VetoInstance, path: string[]) => boolean;
11
48
  /**
@@ -22,12 +59,16 @@ declare const useFormContext: () => {
22
59
  isValidating: boolean;
23
60
  };
24
61
  formState: react_hook_form.FormState<react_hook_form.FieldValues>;
25
- debugMode: "disabled" | "debug" | "debug-testids" | "off";
62
+ debugMode: "debug" | "debug-testids" | "off" | "disabled";
26
63
  debugModeSettings?: DebugModeSettings;
27
64
  preventSubmit: (prevent: boolean) => void;
28
- setDebugMode: (debugMode: "disabled" | "debug" | "debug-testids" | "off") => void;
65
+ setDebugMode: (debugMode: "debug" | "debug-testids" | "off" | "disabled") => void;
29
66
  triggerSubmit: (e?: React.BaseSyntheticEvent) => Promise<void> | void;
30
- validation?: VetoInstance;
67
+ validation: {
68
+ instance?: VetoInstance;
69
+ errors?: _fuf_stack_veto.VetoFormattedError;
70
+ setClientValidationSchema: (key: string, schema: _fuf_stack_veto.VetoTypeAny | null) => void;
71
+ };
31
72
  watch: react_hook_form.UseFormWatch<react_hook_form.FieldValues>;
32
73
  getValues: react_hook_form.UseFormGetValues<react_hook_form.FieldValues>;
33
74
  setError: react_hook_form.UseFormSetError<react_hook_form.FieldValues>;
@@ -44,4 +85,4 @@ declare const useFormContext: () => {
44
85
  subscribe: react_hook_form.UseFromSubscribe<react_hook_form.FieldValues>;
45
86
  };
46
87
 
47
- export { checkFieldIsRequired, useFormContext };
88
+ export { type UseControllerProps, type UseControllerReturn, checkFieldIsRequired, useClientValidation, useController, useFormContext };
@@ -1,13 +1,17 @@
1
1
  import {
2
2
  checkFieldIsRequired,
3
+ useClientValidation,
4
+ useController,
3
5
  useFieldArray,
4
6
  useFormContext,
5
7
  useInput
6
- } from "../chunk-NBAVP4ER.js";
8
+ } from "../chunk-CN5XEGV4.js";
7
9
  import "../chunk-UAV6PVB4.js";
8
- import "../chunk-CRTRMMJ7.js";
10
+ import "../chunk-K2V4ULA2.js";
9
11
  export {
10
12
  checkFieldIsRequired,
13
+ useClientValidation,
14
+ useController,
11
15
  useFieldArray,
12
16
  useFormContext,
13
17
  useInput
package/dist/index.cjs CHANGED
@@ -1,61 +1,61 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkVZC5LLW4cjs = require('./chunk-VZC5LLW4.cjs');
3
+ var _chunk6GCMM22Rcjs = require('./chunk-6GCMM22R.cjs');
4
4
 
5
5
 
6
- var _chunkTONXQKTYcjs = require('./chunk-TONXQKTY.cjs');
6
+ var _chunk4DVYBP2Ocjs = require('./chunk-4DVYBP2O.cjs');
7
7
 
8
8
 
9
- var _chunkC5ZRTXUDcjs = require('./chunk-C5ZRTXUD.cjs');
9
+ var _chunkLYI2IDCWcjs = require('./chunk-LYI2IDCW.cjs');
10
10
 
11
11
 
12
- var _chunkAEUUTAJBcjs = require('./chunk-AEUUTAJB.cjs');
12
+ var _chunkF2LWLSBTcjs = require('./chunk-F2LWLSBT.cjs');
13
13
 
14
14
 
15
- var _chunkZFJ5NEHUcjs = require('./chunk-ZFJ5NEHU.cjs');
15
+ var _chunkUU7SXXNIcjs = require('./chunk-UU7SXXNI.cjs');
16
16
 
17
17
 
18
- var _chunkUOK3TF4Gcjs = require('./chunk-UOK3TF4G.cjs');
18
+ var _chunk4IQKCUZCcjs = require('./chunk-4IQKCUZC.cjs');
19
19
 
20
20
 
21
- var _chunkFAXFHN7Zcjs = require('./chunk-FAXFHN7Z.cjs');
21
+ var _chunk5NKR4C73cjs = require('./chunk-5NKR4C73.cjs');
22
22
 
23
23
 
24
- var _chunkWI6FEFKDcjs = require('./chunk-WI6FEFKD.cjs');
24
+ var _chunk6GN255GPcjs = require('./chunk-6GN255GP.cjs');
25
25
 
26
26
 
27
- var _chunk4RDTC7R6cjs = require('./chunk-4RDTC7R6.cjs');
27
+ var _chunkHECO3HXRcjs = require('./chunk-HECO3HXR.cjs');
28
28
 
29
29
 
30
- var _chunk6GN255GPcjs = require('./chunk-6GN255GP.cjs');
30
+ var _chunkDBKDDOS2cjs = require('./chunk-DBKDDOS2.cjs');
31
31
 
32
32
 
33
- var _chunk2DJMYFRZcjs = require('./chunk-2DJMYFRZ.cjs');
33
+ var _chunkNEHRI4EMcjs = require('./chunk-NEHRI4EM.cjs');
34
34
 
35
35
 
36
- var _chunkMKFKX5QXcjs = require('./chunk-MKFKX5QX.cjs');
36
+ var _chunk25Y2Q5CXcjs = require('./chunk-25Y2Q5CX.cjs');
37
37
 
38
38
 
39
- var _chunkEPYFZXEIcjs = require('./chunk-EPYFZXEI.cjs');
39
+ var _chunkGNYQC5IJcjs = require('./chunk-GNYQC5IJ.cjs');
40
40
 
41
41
 
42
- var _chunkJU5RT22Ycjs = require('./chunk-JU5RT22Y.cjs');
42
+ var _chunkPA2DQCBYcjs = require('./chunk-PA2DQCBY.cjs');
43
43
 
44
44
 
45
- var _chunkOE5IW4ZGcjs = require('./chunk-OE5IW4ZG.cjs');
46
45
 
47
46
 
48
47
 
49
48
 
50
49
 
51
- var _chunkQQW2FHSCcjs = require('./chunk-QQW2FHSC.cjs');
50
+ var _chunk7BLVIVDUcjs = require('./chunk-7BLVIVDU.cjs');
52
51
 
53
52
 
54
53
 
55
54
 
56
55
 
57
56
  var _chunkCESGUF6Fcjs = require('./chunk-CESGUF6F.cjs');
58
- require('./chunk-4DAZAO6Y.cjs');
57
+ require('./chunk-555JRYCS.cjs');
58
+
59
59
 
60
60
 
61
61
 
@@ -80,5 +80,5 @@ require('./chunk-4DAZAO6Y.cjs');
80
80
 
81
81
 
82
82
 
83
- exports.CheckboxGroup = _chunkFAXFHN7Zcjs.CheckboxGroup_default; exports.Controller = _chunkEPYFZXEIcjs.Controller_default; exports.FieldArray = _chunkWI6FEFKDcjs.FieldArray_default; exports.FieldCopyTestIdButton = _chunkJU5RT22Ycjs.FieldCopyTestIdButton_default; exports.FieldValidationError = _chunkOE5IW4ZGcjs.FieldValidationError_default; exports.Form = _chunk4RDTC7R6cjs.Form_default; exports.Grid = _chunk6GN255GPcjs.Grid_default; exports.Input = _chunkMKFKX5QXcjs.Input_default; exports.RadioBoxes = _chunk2DJMYFRZcjs.RadioBoxes_default; exports.RadioGroup = _chunkVZC5LLW4cjs.RadioGroup_default; exports.RadioTabs = _chunkTONXQKTYcjs.RadioTabs_default; exports.Select = _chunkC5ZRTXUDcjs.Select_default; exports.SubmitButton = _chunkAEUUTAJBcjs.SubmitButton_default; exports.Switch = _chunkZFJ5NEHUcjs.Switch_default; exports.TextArea = _chunkUOK3TF4Gcjs.TextArea_default; exports.checkFieldIsRequired = _chunkQQW2FHSCcjs.checkFieldIsRequired; exports.fromNullishString = _chunkCESGUF6Fcjs.fromNullishString; exports.toFormFormat = _chunkCESGUF6Fcjs.toFormFormat; exports.toNullishString = _chunkCESGUF6Fcjs.toNullishString; exports.toValidationFormat = _chunkCESGUF6Fcjs.toValidationFormat; exports.useFieldArray = _chunkQQW2FHSCcjs.useFieldArray; exports.useFormContext = _chunkQQW2FHSCcjs.useFormContext; exports.useInput = _chunkQQW2FHSCcjs.useInput;
83
+ exports.CheckboxGroup = _chunk4IQKCUZCcjs.CheckboxGroup_default; exports.FieldArray = _chunk5NKR4C73cjs.FieldArray_default; exports.FieldCopyTestIdButton = _chunkPA2DQCBYcjs.FieldCopyTestIdButton_default; exports.FieldValidationError = _chunkGNYQC5IJcjs.FieldValidationError_default; exports.Form = _chunkHECO3HXRcjs.Form_default; exports.Grid = _chunk6GN255GPcjs.Grid_default; exports.Input = _chunkDBKDDOS2cjs.Input_default; exports.RadioBoxes = _chunkNEHRI4EMcjs.RadioBoxes_default; exports.RadioGroup = _chunk25Y2Q5CXcjs.RadioGroup_default; exports.RadioTabs = _chunk6GCMM22Rcjs.RadioTabs_default; exports.Select = _chunk4DVYBP2Ocjs.Select_default; exports.SubmitButton = _chunkLYI2IDCWcjs.SubmitButton_default; exports.Switch = _chunkF2LWLSBTcjs.Switch_default; exports.TextArea = _chunkUU7SXXNIcjs.TextArea_default; exports.checkFieldIsRequired = _chunk7BLVIVDUcjs.checkFieldIsRequired; exports.fromNullishString = _chunkCESGUF6Fcjs.fromNullishString; exports.toFormFormat = _chunkCESGUF6Fcjs.toFormFormat; exports.toNullishString = _chunkCESGUF6Fcjs.toNullishString; exports.toValidationFormat = _chunkCESGUF6Fcjs.toValidationFormat; exports.useClientValidation = _chunk7BLVIVDUcjs.useClientValidation; exports.useController = _chunk7BLVIVDUcjs.useController; exports.useFieldArray = _chunk7BLVIVDUcjs.useFieldArray; exports.useFormContext = _chunk7BLVIVDUcjs.useFormContext; exports.useInput = _chunk7BLVIVDUcjs.useInput;
84
84
  //# 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;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;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;AACF,k1CAAC","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;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;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;AACF,q5CAAC","file":"/home/runner/work/pixels/pixels/packages/uniform/dist/index.cjs"}
package/dist/index.d.cts CHANGED
@@ -1,15 +1,14 @@
1
- export { C as Controller, a as ControllerProps } from './Controller-8Nqugui5.cjs';
2
1
  export { C as CheckboxGroup, b as CheckboxGroupOption, a as CheckboxGroupProps } from './CheckboxGroup-Dh0YW4KV.cjs';
3
2
  export { F as FieldArray, a as FieldArrayChildrenRenderFn, b as FieldArrayFeatures, c as FieldArrayProps } from './FieldArray-hqxjr18x.cjs';
4
3
  export { F as Form, a as FormProps } from './Form-D0grgL6G.cjs';
5
4
  export { G as Grid, a as GridProps } from './Grid-DF3L9NF3.cjs';
6
5
  export { fromNullishString, toFormFormat, toNullishString, toValidationFormat } from './helpers/index.cjs';
6
+ export { UseControllerProps, UseControllerReturn, checkFieldIsRequired, useClientValidation, useController, useFormContext } from './hooks/index.cjs';
7
7
  export { useFieldArray } from 'react-hook-form';
8
- export { checkFieldIsRequired, useFormContext } from './hooks/index.cjs';
9
8
  export { useInput } from '@heroui/input';
10
9
  export { I as Input, a as InputProps } from './Input-B_wjhY9e.cjs';
11
- export { F as FieldCopyTestIdButton, a as FieldCopyTestIdButtonProps } from './FieldCopyTestIdButton-DnbovhMk.cjs';
12
- export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-DAT12Ess.cjs';
10
+ export { F as FieldCopyTestIdButton, a as FieldCopyTestIdButtonProps } from './FieldCopyTestIdButton-_TDlmw0L.cjs';
11
+ export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-CU_xw0BL.cjs';
13
12
  export { R as RadioBoxes, a as RadioBoxesProps } from './RadioBoxes-C61IRDCU.cjs';
14
13
  export { R as RadioGroup, a as RadioGroupProps } from './RadioGroup-C7I27oav.cjs';
15
14
  export { R as RadioTabs, a as RadioTabsProps } from './RadioTabs-CT8PT7ky.cjs';
package/dist/index.d.ts CHANGED
@@ -1,15 +1,14 @@
1
- export { C as Controller, a as ControllerProps } from './Controller-8Nqugui5.js';
2
1
  export { C as CheckboxGroup, b as CheckboxGroupOption, a as CheckboxGroupProps } from './CheckboxGroup-Dh0YW4KV.js';
3
2
  export { F as FieldArray, a as FieldArrayChildrenRenderFn, b as FieldArrayFeatures, c as FieldArrayProps } from './FieldArray-hqxjr18x.js';
4
3
  export { F as Form, a as FormProps } from './Form-DX5NTR-H.js';
5
4
  export { G as Grid, a as GridProps } from './Grid-DF3L9NF3.js';
6
5
  export { fromNullishString, toFormFormat, toNullishString, toValidationFormat } from './helpers/index.js';
6
+ export { UseControllerProps, UseControllerReturn, checkFieldIsRequired, useClientValidation, useController, useFormContext } from './hooks/index.js';
7
7
  export { useFieldArray } from 'react-hook-form';
8
- export { checkFieldIsRequired, useFormContext } from './hooks/index.js';
9
8
  export { useInput } from '@heroui/input';
10
9
  export { I as Input, a as InputProps } from './Input-B_wjhY9e.js';
11
- export { F as FieldCopyTestIdButton, a as FieldCopyTestIdButtonProps } from './FieldCopyTestIdButton-DnbovhMk.js';
12
- export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-DAT12Ess.js';
10
+ export { F as FieldCopyTestIdButton, a as FieldCopyTestIdButtonProps } from './FieldCopyTestIdButton-_TDlmw0L.js';
11
+ export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-CU_xw0BL.js';
13
12
  export { R as RadioBoxes, a as RadioBoxesProps } from './RadioBoxes-C61IRDCU.js';
14
13
  export { R as RadioGroup, a as RadioGroupProps } from './RadioGroup-C7I27oav.js';
15
14
  export { R as RadioTabs, a as RadioTabsProps } from './RadioTabs-CT8PT7ky.js';
package/dist/index.js CHANGED
@@ -1,64 +1,62 @@
1
- import {
2
- RadioGroup_default
3
- } from "./chunk-QXD6XP3Y.js";
4
1
  import {
5
2
  RadioTabs_default
6
- } from "./chunk-BLAMCAGB.js";
3
+ } from "./chunk-7NZKBUL6.js";
7
4
  import {
8
5
  Select_default
9
- } from "./chunk-3ULE3TIW.js";
6
+ } from "./chunk-N2MRIHRX.js";
10
7
  import {
11
8
  SubmitButton_default
12
- } from "./chunk-P332MPVH.js";
9
+ } from "./chunk-BXQ3MVNH.js";
13
10
  import {
14
11
  Switch_default
15
- } from "./chunk-5NRHHIFP.js";
12
+ } from "./chunk-7R2P54VS.js";
16
13
  import {
17
14
  TextArea_default
18
- } from "./chunk-XL3FJ3VX.js";
15
+ } from "./chunk-Y4YQH2QB.js";
19
16
  import {
20
17
  CheckboxGroup_default
21
- } from "./chunk-Q6DCHTBA.js";
18
+ } from "./chunk-W2K5WX3O.js";
22
19
  import {
23
20
  FieldArray_default
24
- } from "./chunk-FNY55CAR.js";
25
- import {
26
- Form_default
27
- } from "./chunk-IOIYK6UC.js";
21
+ } from "./chunk-3JRZ5YNE.js";
28
22
  import {
29
23
  Grid_default
30
24
  } from "./chunk-PDCEKC3G.js";
31
25
  import {
32
- RadioBoxes_default
33
- } from "./chunk-5RFFXDXC.js";
26
+ Form_default
27
+ } from "./chunk-35I663WR.js";
34
28
  import {
35
29
  Input_default
36
- } from "./chunk-O3TBUVDW.js";
30
+ } from "./chunk-5W2IWHSE.js";
37
31
  import {
38
- Controller_default
39
- } from "./chunk-AT2VVPRD.js";
32
+ RadioBoxes_default
33
+ } from "./chunk-YK2XHKK2.js";
40
34
  import {
41
- FieldCopyTestIdButton_default
42
- } from "./chunk-2CRY7VDQ.js";
35
+ RadioGroup_default
36
+ } from "./chunk-E62JDTFS.js";
43
37
  import {
44
38
  FieldValidationError_default
45
- } from "./chunk-ASPOGQPS.js";
39
+ } from "./chunk-UTFZRBBS.js";
40
+ import {
41
+ FieldCopyTestIdButton_default
42
+ } from "./chunk-BQGN3JTU.js";
46
43
  import {
47
44
  checkFieldIsRequired,
45
+ useClientValidation,
46
+ useController,
48
47
  useFieldArray,
49
48
  useFormContext,
50
49
  useInput
51
- } from "./chunk-NBAVP4ER.js";
50
+ } from "./chunk-CN5XEGV4.js";
52
51
  import {
53
52
  fromNullishString,
54
53
  toFormFormat,
55
54
  toNullishString,
56
55
  toValidationFormat
57
56
  } from "./chunk-UAV6PVB4.js";
58
- import "./chunk-CRTRMMJ7.js";
57
+ import "./chunk-K2V4ULA2.js";
59
58
  export {
60
59
  CheckboxGroup_default as CheckboxGroup,
61
- Controller_default as Controller,
62
60
  FieldArray_default as FieldArray,
63
61
  FieldCopyTestIdButton_default as FieldCopyTestIdButton,
64
62
  FieldValidationError_default as FieldValidationError,
@@ -77,6 +75,8 @@ export {
77
75
  toFormFormat,
78
76
  toNullishString,
79
77
  toValidationFormat,
78
+ useClientValidation,
79
+ useController,
80
80
  useFieldArray,
81
81
  useFormContext,
82
82
  useInput