@fuf-stack/uniform 0.18.5 → 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.
- package/dist/CheckboxGroup/index.cjs +5 -6
- package/dist/CheckboxGroup/index.cjs.map +1 -1
- package/dist/CheckboxGroup/index.d.cts +2 -2
- package/dist/CheckboxGroup/index.d.ts +2 -2
- package/dist/CheckboxGroup/index.js +4 -5
- package/dist/FieldArray/index.cjs +5 -5
- package/dist/FieldArray/index.js +4 -4
- package/dist/Form/index.cjs +4 -4
- package/dist/Form/index.js +3 -3
- package/dist/Grid/index.cjs +1 -1
- package/dist/Grid/index.js +1 -1
- package/dist/Input/index.cjs +5 -6
- package/dist/Input/index.cjs.map +1 -1
- package/dist/Input/index.js +4 -5
- package/dist/RadioBoxes/index.cjs +5 -6
- package/dist/RadioBoxes/index.cjs.map +1 -1
- package/dist/RadioBoxes/index.d.cts +2 -2
- package/dist/RadioBoxes/index.d.ts +2 -2
- package/dist/RadioBoxes/index.js +4 -5
- package/dist/RadioGroup/index.cjs +5 -6
- package/dist/RadioGroup/index.cjs.map +1 -1
- package/dist/RadioGroup/index.d.cts +2 -2
- package/dist/RadioGroup/index.d.ts +2 -2
- package/dist/RadioGroup/index.js +4 -5
- package/dist/RadioTabs/index.cjs +5 -6
- package/dist/RadioTabs/index.cjs.map +1 -1
- package/dist/RadioTabs/index.d.cts +2 -2
- package/dist/RadioTabs/index.d.ts +2 -2
- package/dist/RadioTabs/index.js +4 -5
- package/dist/Select/index.cjs +5 -6
- package/dist/Select/index.cjs.map +1 -1
- package/dist/Select/index.d.cts +2 -2
- package/dist/Select/index.d.ts +2 -2
- package/dist/Select/index.js +4 -5
- package/dist/SubmitButton/index.cjs +4 -4
- package/dist/SubmitButton/index.js +3 -3
- package/dist/Switch/index.cjs +5 -6
- package/dist/Switch/index.cjs.map +1 -1
- package/dist/Switch/index.d.cts +2 -2
- package/dist/Switch/index.d.ts +2 -2
- package/dist/Switch/index.js +4 -5
- package/dist/TextArea/index.cjs +5 -6
- package/dist/TextArea/index.cjs.map +1 -1
- package/dist/TextArea/index.js +4 -5
- package/dist/chunk-25Y2Q5CX.cjs +110 -0
- package/dist/chunk-25Y2Q5CX.cjs.map +1 -0
- package/dist/{chunk-IOIYK6UC.js → chunk-35I663WR.js} +29 -29
- package/dist/chunk-35I663WR.js.map +1 -0
- package/dist/{chunk-HHENF3BD.js → chunk-3JRZ5YNE.js} +6 -6
- package/dist/chunk-4DVYBP2O.cjs +236 -0
- package/dist/chunk-4DVYBP2O.cjs.map +1 -0
- package/dist/chunk-4IQKCUZC.cjs +145 -0
- package/dist/chunk-4IQKCUZC.cjs.map +1 -0
- package/dist/{chunk-4DAZAO6Y.cjs → chunk-555JRYCS.cjs} +4 -2
- package/dist/chunk-555JRYCS.cjs.map +1 -0
- package/dist/{chunk-R4GZXQFD.cjs → chunk-5NKR4C73.cjs} +14 -14
- package/dist/{chunk-R4GZXQFD.cjs.map → chunk-5NKR4C73.cjs.map} +1 -1
- package/dist/chunk-5W2IWHSE.js +89 -0
- package/dist/chunk-5W2IWHSE.js.map +1 -0
- package/dist/{chunk-WD4ES4JK.cjs → chunk-6GCMM22R.cjs} +35 -47
- package/dist/chunk-6GCMM22R.cjs.map +1 -0
- package/dist/chunk-7BLVIVDU.cjs +281 -0
- package/dist/chunk-7BLVIVDU.cjs.map +1 -0
- package/dist/{chunk-3DWGHDVE.js → chunk-7NZKBUL6.js} +36 -48
- package/dist/chunk-7NZKBUL6.js.map +1 -0
- package/dist/{chunk-EAEW6SOJ.js → chunk-7R2P54VS.js} +37 -49
- package/dist/chunk-7R2P54VS.js.map +1 -0
- package/dist/{chunk-P332MPVH.js → chunk-BXQ3MVNH.js} +5 -5
- package/dist/chunk-BXQ3MVNH.js.map +1 -0
- package/dist/chunk-CN5XEGV4.js +281 -0
- package/dist/chunk-CN5XEGV4.js.map +1 -0
- package/dist/chunk-DBKDDOS2.cjs +89 -0
- package/dist/chunk-DBKDDOS2.cjs.map +1 -0
- package/dist/chunk-E62JDTFS.js +110 -0
- package/dist/chunk-E62JDTFS.js.map +1 -0
- package/dist/chunk-F2LWLSBT.cjs +98 -0
- package/dist/chunk-F2LWLSBT.cjs.map +1 -0
- package/dist/{chunk-4RDTC7R6.cjs → chunk-HECO3HXR.cjs} +31 -31
- package/dist/chunk-HECO3HXR.cjs.map +1 -0
- package/dist/{chunk-CRTRMMJ7.js → chunk-K2V4ULA2.js} +3 -1
- package/dist/{chunk-AEUUTAJB.cjs → chunk-LYI2IDCW.cjs} +6 -6
- package/dist/chunk-LYI2IDCW.cjs.map +1 -0
- package/dist/{chunk-737UQZOW.js → chunk-N2MRIHRX.js} +109 -122
- package/dist/chunk-N2MRIHRX.js.map +1 -0
- package/dist/{chunk-ZPNMTMGE.cjs → chunk-NEHRI4EM.cjs} +60 -70
- package/dist/chunk-NEHRI4EM.cjs.map +1 -0
- package/dist/chunk-UU7SXXNI.cjs +70 -0
- package/dist/chunk-UU7SXXNI.cjs.map +1 -0
- package/dist/chunk-W2K5WX3O.js +145 -0
- package/dist/chunk-W2K5WX3O.js.map +1 -0
- package/dist/chunk-Y4YQH2QB.js +70 -0
- package/dist/chunk-Y4YQH2QB.js.map +1 -0
- package/dist/{chunk-BXZ2SBRA.js → chunk-YK2XHKK2.js} +55 -65
- package/dist/chunk-YK2XHKK2.js.map +1 -0
- package/dist/helpers/index.cjs +1 -1
- package/dist/helpers/index.js +1 -1
- package/dist/hooks/index.cjs +7 -3
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.cts +47 -6
- package/dist/hooks/index.d.ts +47 -6
- package/dist/hooks/index.js +6 -2
- package/dist/index.cjs +17 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -8
- package/dist/index.d.ts +7 -8
- package/dist/index.js +23 -23
- package/dist/partials/FieldCopyTestIdButton/index.cjs +1 -1
- package/dist/partials/FieldCopyTestIdButton/index.js +1 -1
- package/dist/partials/FieldValidationError/index.cjs +1 -1
- package/dist/partials/FieldValidationError/index.js +1 -1
- package/package.json +3 -8
- package/dist/Controller/index.cjs +0 -11
- package/dist/Controller/index.cjs.map +0 -1
- package/dist/Controller/index.d.cts +0 -8
- package/dist/Controller/index.d.ts +0 -8
- package/dist/Controller/index.js +0 -11
- package/dist/Controller-8Nqugui5.d.cts +0 -37
- package/dist/Controller-8Nqugui5.d.ts +0 -37
- package/dist/chunk-3DWGHDVE.js.map +0 -1
- package/dist/chunk-3MPB726A.cjs +0 -82
- package/dist/chunk-3MPB726A.cjs.map +0 -1
- package/dist/chunk-3WZNMG5K.js +0 -155
- package/dist/chunk-3WZNMG5K.js.map +0 -1
- package/dist/chunk-4DAZAO6Y.cjs.map +0 -1
- package/dist/chunk-4HGNEE2R.js +0 -97
- package/dist/chunk-4HGNEE2R.js.map +0 -1
- package/dist/chunk-4RDTC7R6.cjs.map +0 -1
- package/dist/chunk-737UQZOW.js.map +0 -1
- package/dist/chunk-AEUUTAJB.cjs.map +0 -1
- package/dist/chunk-AT2VVPRD.js +0 -52
- package/dist/chunk-AT2VVPRD.js.map +0 -1
- package/dist/chunk-BXZ2SBRA.js.map +0 -1
- package/dist/chunk-CRTRMMJ7.js.map +0 -1
- package/dist/chunk-DXMJHNP3.cjs +0 -249
- package/dist/chunk-DXMJHNP3.cjs.map +0 -1
- package/dist/chunk-EAEW6SOJ.js.map +0 -1
- package/dist/chunk-EPYFZXEI.cjs +0 -52
- package/dist/chunk-EPYFZXEI.cjs.map +0 -1
- package/dist/chunk-IOIYK6UC.js.map +0 -1
- package/dist/chunk-JH4CPQHA.cjs +0 -120
- package/dist/chunk-JH4CPQHA.cjs.map +0 -1
- package/dist/chunk-JHVW42BW.cjs +0 -97
- package/dist/chunk-JHVW42BW.cjs.map +0 -1
- package/dist/chunk-JS2D6XPO.js +0 -120
- package/dist/chunk-JS2D6XPO.js.map +0 -1
- package/dist/chunk-NBAVP4ER.js +0 -135
- package/dist/chunk-NBAVP4ER.js.map +0 -1
- package/dist/chunk-P332MPVH.js.map +0 -1
- package/dist/chunk-QQW2FHSC.cjs +0 -135
- package/dist/chunk-QQW2FHSC.cjs.map +0 -1
- package/dist/chunk-QX652SHY.cjs +0 -110
- package/dist/chunk-QX652SHY.cjs.map +0 -1
- package/dist/chunk-SCTQXWRU.cjs +0 -155
- package/dist/chunk-SCTQXWRU.cjs.map +0 -1
- package/dist/chunk-WD4ES4JK.cjs.map +0 -1
- package/dist/chunk-YLLUYAY3.js +0 -82
- package/dist/chunk-YLLUYAY3.js.map +0 -1
- package/dist/chunk-ZPNMTMGE.cjs.map +0 -1
- package/dist/{CheckboxGroup-Dq4voRWR.d.cts → CheckboxGroup-Dh0YW4KV.d.cts} +5 -5
- package/dist/{CheckboxGroup-Dq4voRWR.d.ts → CheckboxGroup-Dh0YW4KV.d.ts} +5 -5
- package/dist/{RadioBoxes-DJ49DctW.d.cts → RadioBoxes-C61IRDCU.d.cts} +5 -5
- package/dist/{RadioBoxes-DJ49DctW.d.ts → RadioBoxes-C61IRDCU.d.ts} +5 -5
- package/dist/{RadioGroup-BYfxswoe.d.cts → RadioGroup-C7I27oav.d.cts} +5 -5
- package/dist/{RadioGroup-BYfxswoe.d.ts → RadioGroup-C7I27oav.d.ts} +5 -5
- package/dist/{RadioTabs-BYvYukGt.d.cts → RadioTabs-CT8PT7ky.d.cts} +5 -5
- package/dist/{RadioTabs-BYvYukGt.d.ts → RadioTabs-CT8PT7ky.d.ts} +5 -5
- package/dist/{Select-D2Tn4xBh.d.cts → Select-JRwrSDew.d.cts} +15 -15
- package/dist/{Select-D2Tn4xBh.d.ts → Select-JRwrSDew.d.ts} +15 -15
- package/dist/{Switch-C1H8Kyu7.d.cts → Switch-CLs964dL.d.cts} +5 -5
- package/dist/{Switch-C1H8Kyu7.d.ts → Switch-CLs964dL.d.ts} +5 -5
- /package/dist/{chunk-HHENF3BD.js.map → chunk-3JRZ5YNE.js.map} +0 -0
- /package/dist/{Controller/index.js.map → chunk-K2V4ULA2.js.map} +0 -0
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
FieldValidationError_default
|
|
3
|
+
} from "./chunk-UTFZRBBS.js";
|
|
4
4
|
import {
|
|
5
5
|
FieldCopyTestIdButton_default
|
|
6
6
|
} from "./chunk-BQGN3JTU.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
} from "./chunk-UTFZRBBS.js";
|
|
10
|
-
import {
|
|
8
|
+
useController,
|
|
11
9
|
useFormContext
|
|
12
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CN5XEGV4.js";
|
|
13
11
|
import {
|
|
14
12
|
__objRest,
|
|
15
13
|
__spreadProps,
|
|
16
14
|
__spreadValues
|
|
17
|
-
} from "./chunk-
|
|
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
|
-
|
|
114
|
+
HeroRadioGroup,
|
|
107
115
|
{
|
|
108
|
-
|
|
109
|
-
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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-
|
|
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"]}
|
package/dist/helpers/index.cjs
CHANGED
package/dist/helpers/index.js
CHANGED
package/dist/hooks/index.cjs
CHANGED
|
@@ -3,13 +3,17 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
var _chunk7BLVIVDUcjs = require('../chunk-7BLVIVDU.cjs');
|
|
7
9
|
require('../chunk-CESGUF6F.cjs');
|
|
8
|
-
require('../chunk-
|
|
10
|
+
require('../chunk-555JRYCS.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
9
13
|
|
|
10
14
|
|
|
11
15
|
|
|
12
16
|
|
|
13
17
|
|
|
14
|
-
exports.checkFieldIsRequired =
|
|
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
|
package/dist/hooks/index.cjs.map
CHANGED
|
@@ -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,
|
|
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"}
|
package/dist/hooks/index.d.cts
CHANGED
|
@@ -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: "
|
|
62
|
+
debugMode: "debug" | "debug-testids" | "off" | "disabled";
|
|
26
63
|
debugModeSettings?: DebugModeSettings;
|
|
27
64
|
preventSubmit: (prevent: boolean) => void;
|
|
28
|
-
setDebugMode: (debugMode: "
|
|
65
|
+
setDebugMode: (debugMode: "debug" | "debug-testids" | "off" | "disabled") => void;
|
|
29
66
|
triggerSubmit: (e?: React.BaseSyntheticEvent) => Promise<void> | void;
|
|
30
|
-
validation
|
|
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 };
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -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: "
|
|
62
|
+
debugMode: "debug" | "debug-testids" | "off" | "disabled";
|
|
26
63
|
debugModeSettings?: DebugModeSettings;
|
|
27
64
|
preventSubmit: (prevent: boolean) => void;
|
|
28
|
-
setDebugMode: (debugMode: "
|
|
65
|
+
setDebugMode: (debugMode: "debug" | "debug-testids" | "off" | "disabled") => void;
|
|
29
66
|
triggerSubmit: (e?: React.BaseSyntheticEvent) => Promise<void> | void;
|
|
30
|
-
validation
|
|
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 };
|
package/dist/hooks/index.js
CHANGED
|
@@ -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-
|
|
8
|
+
} from "../chunk-CN5XEGV4.js";
|
|
7
9
|
import "../chunk-UAV6PVB4.js";
|
|
8
|
-
import "../chunk-
|
|
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
|
|
3
|
+
var _chunk6GCMM22Rcjs = require('./chunk-6GCMM22R.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk4DVYBP2Ocjs = require('./chunk-4DVYBP2O.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkLYI2IDCWcjs = require('./chunk-LYI2IDCW.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkF2LWLSBTcjs = require('./chunk-F2LWLSBT.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkUU7SXXNIcjs = require('./chunk-UU7SXXNI.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunk4IQKCUZCcjs = require('./chunk-4IQKCUZC.cjs');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunk5NKR4C73cjs = require('./chunk-5NKR4C73.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunk6GN255GPcjs = require('./chunk-6GN255GP.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkHECO3HXRcjs = require('./chunk-HECO3HXR.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkDBKDDOS2cjs = require('./chunk-DBKDDOS2.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkNEHRI4EMcjs = require('./chunk-NEHRI4EM.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunk25Y2Q5CXcjs = require('./chunk-25Y2Q5CX.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _chunkGNYQC5IJcjs = require('./chunk-GNYQC5IJ.cjs');
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
var _chunkPA2DQCBYcjs = require('./chunk-PA2DQCBY.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
var _chunkGNYQC5IJcjs = require('./chunk-GNYQC5IJ.cjs');
|
|
46
45
|
|
|
47
46
|
|
|
48
47
|
|
|
49
48
|
|
|
50
49
|
|
|
51
|
-
var
|
|
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-
|
|
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 =
|
|
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
|
package/dist/index.cjs.map
CHANGED
|
@@ -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;
|
|
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,21 +1,20 @@
|
|
|
1
|
-
export { C as
|
|
2
|
-
export { C as CheckboxGroup, b as CheckboxGroupOption, a as CheckboxGroupProps } from './CheckboxGroup-Dq4voRWR.cjs';
|
|
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
10
|
export { F as FieldCopyTestIdButton, a as FieldCopyTestIdButtonProps } from './FieldCopyTestIdButton-_TDlmw0L.cjs';
|
|
12
11
|
export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-CU_xw0BL.cjs';
|
|
13
|
-
export { R as RadioBoxes, a as RadioBoxesProps } from './RadioBoxes-
|
|
14
|
-
export { R as RadioGroup, a as RadioGroupProps } from './RadioGroup-
|
|
15
|
-
export { R as RadioTabs, a as RadioTabsProps } from './RadioTabs-
|
|
16
|
-
export { S as Select, a as SelectProps } from './Select-
|
|
12
|
+
export { R as RadioBoxes, a as RadioBoxesProps } from './RadioBoxes-C61IRDCU.cjs';
|
|
13
|
+
export { R as RadioGroup, a as RadioGroupProps } from './RadioGroup-C7I27oav.cjs';
|
|
14
|
+
export { R as RadioTabs, a as RadioTabsProps } from './RadioTabs-CT8PT7ky.cjs';
|
|
15
|
+
export { S as Select, a as SelectProps } from './Select-JRwrSDew.cjs';
|
|
17
16
|
export { S as SubmitButton, a as SubmitButtonProps } from './SubmitButton-C81VCkmx.cjs';
|
|
18
|
-
export { S as Switch, a as SwitchProps } from './Switch-
|
|
17
|
+
export { S as Switch, a as SwitchProps } from './Switch-CLs964dL.cjs';
|
|
19
18
|
export { T as TextArea, a as TextAreaProps } from './TextArea-DNpInDsW.cjs';
|
|
20
19
|
import 'react/jsx-runtime';
|
|
21
20
|
import 'tailwind-variants/dist/config.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
export { C as
|
|
2
|
-
export { C as CheckboxGroup, b as CheckboxGroupOption, a as CheckboxGroupProps } from './CheckboxGroup-Dq4voRWR.js';
|
|
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
10
|
export { F as FieldCopyTestIdButton, a as FieldCopyTestIdButtonProps } from './FieldCopyTestIdButton-_TDlmw0L.js';
|
|
12
11
|
export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-CU_xw0BL.js';
|
|
13
|
-
export { R as RadioBoxes, a as RadioBoxesProps } from './RadioBoxes-
|
|
14
|
-
export { R as RadioGroup, a as RadioGroupProps } from './RadioGroup-
|
|
15
|
-
export { R as RadioTabs, a as RadioTabsProps } from './RadioTabs-
|
|
16
|
-
export { S as Select, a as SelectProps } from './Select-
|
|
12
|
+
export { R as RadioBoxes, a as RadioBoxesProps } from './RadioBoxes-C61IRDCU.js';
|
|
13
|
+
export { R as RadioGroup, a as RadioGroupProps } from './RadioGroup-C7I27oav.js';
|
|
14
|
+
export { R as RadioTabs, a as RadioTabsProps } from './RadioTabs-CT8PT7ky.js';
|
|
15
|
+
export { S as Select, a as SelectProps } from './Select-JRwrSDew.js';
|
|
17
16
|
export { S as SubmitButton, a as SubmitButtonProps } from './SubmitButton-C81VCkmx.js';
|
|
18
|
-
export { S as Switch, a as SwitchProps } from './Switch-
|
|
17
|
+
export { S as Switch, a as SwitchProps } from './Switch-CLs964dL.js';
|
|
19
18
|
export { T as TextArea, a as TextAreaProps } from './TextArea-DNpInDsW.js';
|
|
20
19
|
import 'react/jsx-runtime';
|
|
21
20
|
import 'tailwind-variants/dist/config.js';
|