@fuf-stack/uniform 0.9.5 → 0.9.6
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 +3 -3
- package/dist/CheckboxGroup/index.d.cts +5 -2
- package/dist/CheckboxGroup/index.d.ts +5 -2
- package/dist/CheckboxGroup/index.js +2 -2
- package/dist/CheckboxGroup-o-qWkWe1.d.cts +130 -0
- package/dist/CheckboxGroup-o-qWkWe1.d.ts +130 -0
- package/dist/FieldArray/index.cjs +3 -3
- package/dist/FieldArray/index.js +2 -2
- package/dist/{FieldValidationError-BSXedjCA.d.cts → FieldValidationError-DAT12Ess.d.cts} +2 -1
- package/dist/{FieldValidationError-BSXedjCA.d.ts → FieldValidationError-DAT12Ess.d.ts} +2 -1
- package/dist/Input/index.cjs +3 -3
- package/dist/Input/index.js +2 -2
- package/dist/RadioGroup/index.cjs +3 -3
- package/dist/RadioGroup/index.d.cts +5 -2
- package/dist/RadioGroup/index.d.ts +5 -2
- package/dist/RadioGroup/index.js +2 -2
- package/dist/RadioGroup-D_kiBt0M.d.cts +162 -0
- package/dist/RadioGroup-D_kiBt0M.d.ts +162 -0
- package/dist/Select/index.cjs +3 -3
- package/dist/Select/index.d.cts +3 -3
- package/dist/Select/index.d.ts +3 -3
- package/dist/Select/index.js +2 -2
- package/dist/Select-BhS4z0Pj.d.cts +317 -0
- package/dist/Select-BhS4z0Pj.d.ts +317 -0
- package/dist/Switch/index.cjs +3 -3
- package/dist/Switch/index.d.cts +5 -2
- package/dist/Switch/index.d.ts +5 -2
- package/dist/Switch/index.js +2 -2
- package/dist/Switch-Fdldj8LV.d.cts +126 -0
- package/dist/Switch-Fdldj8LV.d.ts +126 -0
- package/dist/TextArea/index.cjs +3 -3
- package/dist/TextArea/index.js +2 -2
- package/dist/{chunk-OCR2UWG2.cjs → chunk-4RTJ5XR2.cjs} +3 -3
- package/dist/{chunk-OCR2UWG2.cjs.map → chunk-4RTJ5XR2.cjs.map} +1 -1
- package/dist/{chunk-YUAJN6HW.cjs → chunk-6HMMXOSV.cjs} +48 -15
- package/dist/chunk-6HMMXOSV.cjs.map +1 -0
- package/dist/{chunk-FMQNL3RT.js → chunk-F7GG67YU.js} +2 -2
- package/dist/{chunk-W24WP5YE.cjs → chunk-HFMFDBEV.cjs} +46 -14
- package/dist/chunk-HFMFDBEV.cjs.map +1 -0
- package/dist/{chunk-NHPQEYYN.js → chunk-HOCRJOEU.js} +2 -2
- package/dist/{chunk-TNELIBCV.cjs → chunk-JDRMKZ35.cjs} +4 -4
- package/dist/{chunk-TNELIBCV.cjs.map → chunk-JDRMKZ35.cjs.map} +1 -1
- package/dist/{chunk-4AHVJWTB.js → chunk-JG5VQZ4V.js} +46 -14
- package/dist/chunk-JG5VQZ4V.js.map +1 -0
- package/dist/{chunk-5UHHZ7KY.cjs → chunk-JRFKYVXY.cjs} +3 -3
- package/dist/{chunk-5UHHZ7KY.cjs.map → chunk-JRFKYVXY.cjs.map} +1 -1
- package/dist/chunk-LDW7K7LW.js +231 -0
- package/dist/chunk-LDW7K7LW.js.map +1 -0
- package/dist/{chunk-INTLZONV.cjs → chunk-NQ4JZ7AK.cjs} +37 -15
- package/dist/chunk-NQ4JZ7AK.cjs.map +1 -0
- package/dist/{chunk-QVBZ5RLN.cjs → chunk-NXTXKBTP.cjs} +104 -113
- package/dist/chunk-NXTXKBTP.cjs.map +1 -0
- package/dist/{chunk-QTL5FREE.cjs → chunk-OHJYXA6R.cjs} +7 -5
- package/dist/chunk-OHJYXA6R.cjs.map +1 -0
- package/dist/{chunk-AVKEYJH7.js → chunk-PFX4YRWI.js} +38 -16
- package/dist/chunk-PFX4YRWI.js.map +1 -0
- package/dist/{chunk-DTSX7YON.js → chunk-SCTH3FAO.js} +2 -2
- package/dist/{chunk-DBLODROX.js → chunk-WKM2D7LF.js} +7 -5
- package/dist/chunk-WKM2D7LF.js.map +1 -0
- package/dist/{chunk-ARUVDZFG.js → chunk-YSZW33OV.js} +48 -15
- package/dist/chunk-YSZW33OV.js.map +1 -0
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +10 -10
- package/dist/partials/FieldValidationError/index.cjs +2 -2
- package/dist/partials/FieldValidationError/index.d.cts +2 -2
- package/dist/partials/FieldValidationError/index.d.ts +2 -2
- package/dist/partials/FieldValidationError/index.js +1 -1
- package/package.json +4 -4
- package/dist/CheckboxGroup-BYsQ0A0q.d.cts +0 -32
- package/dist/CheckboxGroup-BYsQ0A0q.d.ts +0 -32
- package/dist/RadioGroup-BU4K9cnS.d.cts +0 -40
- package/dist/RadioGroup-BU4K9cnS.d.ts +0 -40
- package/dist/Select-C08Oftdr.d.cts +0 -184
- package/dist/Select-C08Oftdr.d.ts +0 -184
- package/dist/Switch-OkO3GdPy.d.cts +0 -20
- package/dist/Switch-OkO3GdPy.d.ts +0 -20
- package/dist/chunk-4AHVJWTB.js.map +0 -1
- package/dist/chunk-ARUVDZFG.js.map +0 -1
- package/dist/chunk-AVKEYJH7.js.map +0 -1
- package/dist/chunk-DBLODROX.js.map +0 -1
- package/dist/chunk-I5M2A3MN.js +0 -240
- package/dist/chunk-I5M2A3MN.js.map +0 -1
- package/dist/chunk-INTLZONV.cjs.map +0 -1
- package/dist/chunk-QTL5FREE.cjs.map +0 -1
- package/dist/chunk-QVBZ5RLN.cjs.map +0 -1
- package/dist/chunk-W24WP5YE.cjs.map +0 -1
- package/dist/chunk-YUAJN6HW.cjs.map +0 -1
- /package/dist/{chunk-FMQNL3RT.js.map → chunk-F7GG67YU.js.map} +0 -0
- /package/dist/{chunk-NHPQEYYN.js.map → chunk-HOCRJOEU.js.map} +0 -0
- /package/dist/{chunk-DTSX7YON.js.map → chunk-SCTH3FAO.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-T3CCNJHK.js";
|
|
4
4
|
import {
|
|
5
5
|
FieldValidationError_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WKM2D7LF.js";
|
|
7
7
|
import {
|
|
8
8
|
useFormContext
|
|
9
9
|
} from "./chunk-HWDQZO7X.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import { Controller } from "react-hook-form";
|
|
16
16
|
import { ButtonGroup as NextButtonGroup } from "@nextui-org/button";
|
|
17
17
|
import { RadioGroup as NextRadioGroup, Radio } from "@nextui-org/radio";
|
|
18
|
-
import { cn as cn3 } from "@fuf-stack/pixel-utils";
|
|
18
|
+
import { cn as cn3, tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
|
|
19
19
|
|
|
20
20
|
// src/RadioGroup/Variants/RadioBox.tsx
|
|
21
21
|
import { useRadio } from "@nextui-org/radio";
|
|
@@ -93,6 +93,25 @@ var RadioButton = ({
|
|
|
93
93
|
|
|
94
94
|
// src/RadioGroup/RadioGroup.tsx
|
|
95
95
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
96
|
+
var radioGroupVariants = tv({
|
|
97
|
+
slots: {
|
|
98
|
+
base: "group",
|
|
99
|
+
// Needs group for group-data condition
|
|
100
|
+
buttonGroup: "rounded-xl group-data-[invalid=true]:border group-data-[invalid=true]:border-danger",
|
|
101
|
+
// optional if a button group is used
|
|
102
|
+
itemBase: "",
|
|
103
|
+
itemBaseActive: "bg-opacity-50",
|
|
104
|
+
// optional if a button group is used
|
|
105
|
+
itemControl: "",
|
|
106
|
+
itemDescription: "",
|
|
107
|
+
itemLabel: "text-sm",
|
|
108
|
+
itemLabelWrapper: "",
|
|
109
|
+
itemWrapper: "",
|
|
110
|
+
// See NextUI styles for group-data condition, e.g.: https://github.com/nextui-org/nextui/blob/main/packages/core/theme/src/components/select.ts
|
|
111
|
+
label: "text-sm text-foreground subpixel-antialiased group-data-[invalid=true]:!text-danger",
|
|
112
|
+
wrapper: ""
|
|
113
|
+
}
|
|
114
|
+
});
|
|
96
115
|
var RadioGroup = ({
|
|
97
116
|
className = void 0,
|
|
98
117
|
disabled = false,
|
|
@@ -105,6 +124,8 @@ var RadioGroup = ({
|
|
|
105
124
|
}) => {
|
|
106
125
|
const { control, getFieldState, getValues } = useFormContext();
|
|
107
126
|
const { error, invalid, required, testId } = getFieldState(name, _testId);
|
|
127
|
+
const variants = radioGroupVariants();
|
|
128
|
+
const classNames = variantsToClassNames(variants, className, "base");
|
|
108
129
|
return /* @__PURE__ */ jsx3(
|
|
109
130
|
Controller,
|
|
110
131
|
{
|
|
@@ -113,19 +134,28 @@ var RadioGroup = ({
|
|
|
113
134
|
name,
|
|
114
135
|
render: ({ field: { onChange, disabled: isDisabled, onBlur, ref } }) => {
|
|
115
136
|
let RadioComponents;
|
|
137
|
+
const itemClassNames = {
|
|
138
|
+
base: classNames.itemBase,
|
|
139
|
+
control: classNames.itemControl,
|
|
140
|
+
description: classNames.itemDescription,
|
|
141
|
+
label: classNames.itemLabel,
|
|
142
|
+
labelWrapper: classNames.itemLabelWrapper,
|
|
143
|
+
wrapper: classNames.itemWrapper
|
|
144
|
+
};
|
|
116
145
|
switch (variant) {
|
|
117
146
|
case "radioBox":
|
|
118
147
|
RadioComponents = options.map((option) => /* @__PURE__ */ jsx3(
|
|
119
148
|
RadioBox,
|
|
120
149
|
{
|
|
150
|
+
classNames: itemClassNames,
|
|
121
151
|
"data-testid": slugify(
|
|
122
152
|
`${testId}_option_${option.testId || option.value}`
|
|
123
153
|
),
|
|
124
|
-
isDisabled: isDisabled || option.disabled,
|
|
125
|
-
value: option.value,
|
|
126
|
-
onChange,
|
|
127
154
|
description: option.description,
|
|
128
155
|
icon: option.icon,
|
|
156
|
+
isDisabled: isDisabled || option.disabled,
|
|
157
|
+
onChange,
|
|
158
|
+
value: option.value,
|
|
129
159
|
children: option.label ? option.label : option.value
|
|
130
160
|
},
|
|
131
161
|
option.value
|
|
@@ -135,15 +165,15 @@ var RadioGroup = ({
|
|
|
135
165
|
RadioComponents = options.map((option) => /* @__PURE__ */ jsx3(
|
|
136
166
|
RadioButton,
|
|
137
167
|
{
|
|
168
|
+
className: cn3(classNames.itemBase, {
|
|
169
|
+
[classNames.itemBaseActive]: getValues()[name] !== option.value
|
|
170
|
+
}),
|
|
138
171
|
"data-testid": slugify(
|
|
139
172
|
`${testId}_option_${option.testId || option.value}`
|
|
140
173
|
),
|
|
141
174
|
isDisabled: isDisabled || option.disabled,
|
|
142
|
-
value: option.value,
|
|
143
175
|
onChange,
|
|
144
|
-
|
|
145
|
-
`${getValues()[name] !== option.value ? "bg-opacity-50" : ""}`
|
|
146
|
-
),
|
|
176
|
+
value: option.value,
|
|
147
177
|
children: option.label ? option.label : option.value
|
|
148
178
|
},
|
|
149
179
|
option.value
|
|
@@ -153,12 +183,13 @@ var RadioGroup = ({
|
|
|
153
183
|
RadioComponents = options.map((option) => /* @__PURE__ */ jsx3(
|
|
154
184
|
Radio,
|
|
155
185
|
{
|
|
186
|
+
classNames: itemClassNames,
|
|
156
187
|
"data-testid": slugify(
|
|
157
188
|
`${testId}_option_${option.testId || option.value}`
|
|
158
189
|
),
|
|
159
190
|
isDisabled: isDisabled || option.disabled,
|
|
160
|
-
value: option.value,
|
|
161
191
|
onChange,
|
|
192
|
+
value: option.value,
|
|
162
193
|
children: option.label ? option.label : option.value
|
|
163
194
|
},
|
|
164
195
|
option.value
|
|
@@ -167,25 +198,27 @@ var RadioGroup = ({
|
|
|
167
198
|
return /* @__PURE__ */ jsx3(
|
|
168
199
|
NextRadioGroup,
|
|
169
200
|
{
|
|
170
|
-
|
|
201
|
+
classNames,
|
|
202
|
+
"data-invalid": invalid,
|
|
203
|
+
"data-required": required,
|
|
171
204
|
"data-testid": testId,
|
|
172
205
|
errorMessage: error && /* @__PURE__ */ jsx3(FieldValidationError_default, { error }),
|
|
173
206
|
isDisabled,
|
|
174
207
|
isInvalid: invalid,
|
|
175
208
|
isRequired: required,
|
|
176
209
|
label: label && // eslint-disable-next-line jsx-a11y/label-has-associated-control
|
|
177
|
-
/* @__PURE__ */ jsxs2("label", {
|
|
210
|
+
/* @__PURE__ */ jsxs2("label", { children: [
|
|
178
211
|
label,
|
|
179
212
|
/* @__PURE__ */ jsx3(FieldCopyTestIdButton_default, { testId })
|
|
180
213
|
] }),
|
|
214
|
+
name,
|
|
181
215
|
orientation: inline ? "horizontal" : "vertical",
|
|
182
216
|
onBlur,
|
|
183
217
|
onChange,
|
|
184
|
-
name,
|
|
185
218
|
ref,
|
|
186
219
|
children: variant === "radioButton" ? (
|
|
187
220
|
// TODO: NextButtonGroup uses ref to modify Button style, but we wrap it, so it does not work at the moment.
|
|
188
|
-
/* @__PURE__ */ jsx3(NextButtonGroup, { children: RadioComponents })
|
|
221
|
+
/* @__PURE__ */ jsx3(NextButtonGroup, { className: classNames.buttonGroup, children: RadioComponents })
|
|
189
222
|
) : RadioComponents
|
|
190
223
|
}
|
|
191
224
|
);
|
|
@@ -202,4 +235,4 @@ export {
|
|
|
202
235
|
RadioGroup_default,
|
|
203
236
|
RadioGroup_default2
|
|
204
237
|
};
|
|
205
|
-
//# sourceMappingURL=chunk-
|
|
238
|
+
//# sourceMappingURL=chunk-YSZW33OV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/RadioGroup/RadioGroup.tsx","../src/RadioGroup/Variants/RadioBox.tsx","../src/RadioGroup/Variants/RadioButton.tsx","../src/RadioGroup/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactElement, ReactNode } from 'react';\n\nimport { Controller } from 'react-hook-form';\n\nimport { ButtonGroup as NextButtonGroup } from '@nextui-org/button';\nimport { RadioGroup as NextRadioGroup, Radio } from '@nextui-org/radio';\n\nimport { cn, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { slugify } from '../helpers';\nimport { useFormContext } from '../hooks';\nimport { FieldCopyTestIdButton } from '../partials/FieldCopyTestIdButton';\nimport { FieldValidationError } from '../partials/FieldValidationError';\nimport { RadioBox } from './Variants/RadioBox';\nimport { RadioButton } from './Variants/RadioButton';\n\nexport const radioGroupVariants = tv({\n slots: {\n base: 'group', // Needs group for group-data condition\n buttonGroup:\n 'rounded-xl group-data-[invalid=true]:border group-data-[invalid=true]:border-danger', // optional if a button group is used\n itemBase: '',\n itemBaseActive: 'bg-opacity-50', // optional if a button group is used\n itemControl: '',\n itemDescription: '',\n itemLabel: 'text-sm',\n itemLabelWrapper: '',\n itemWrapper: '',\n // See NextUI styles for group-data condition, e.g.: https://github.com/nextui-org/nextui/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 radioGroupVariants>;\ntype ClassName = TVClassName<typeof radioGroupVariants>;\n\nexport interface RadioGroupOption {\n /** Description of the value. Works with variant radioBox. */\n description?: React.ReactNode;\n /** disables the option */\n disabled?: boolean;\n /** option label */\n label?: React.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 RadioGroupProps 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: RadioGroupOption[];\n /** Id to grab element in internal tests. */\n testId?: string;\n /** How the RadioGroup should look like. */\n variant?: 'default' | 'radioBox' | 'radioButton';\n}\n\n/**\n * RadioGroup component based on [NextUI RadioGroup](https://nextui.org/docs/components/radio-group)\n */\nconst RadioGroup = ({\n className = undefined,\n disabled = false,\n inline = false,\n label = undefined,\n name,\n options,\n testId: _testId = undefined,\n variant = 'default',\n}: RadioGroupProps): ReactElement => {\n const { control, getFieldState, getValues } = useFormContext();\n\n const { error, invalid, required, testId } = getFieldState(name, _testId);\n\n const variants = radioGroupVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n\n return (\n <Controller\n control={control}\n disabled={disabled}\n name={name}\n render={({ field: { onChange, disabled: isDisabled, onBlur, ref } }) => {\n let RadioComponents: ReactNode;\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 switch (variant) {\n case 'radioBox':\n RadioComponents = options.map((option) => (\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 break;\n case 'radioButton':\n RadioComponents = options.map((option) => (\n <RadioButton\n className={cn(classNames.itemBase, {\n [classNames.itemBaseActive]:\n getValues()[name] !== option.value,\n })}\n data-testid={slugify(\n `${testId}_option_${option.testId || option.value}`,\n )}\n isDisabled={isDisabled || option.disabled}\n key={option.value}\n onChange={onChange}\n value={option.value}\n // TODO: how to do the classNames properly (make selected option darker with same color)\n >\n {option.label ? option.label : option.value}\n </RadioButton>\n ));\n break;\n default:\n RadioComponents = options.map((option) => (\n <Radio\n classNames={itemClassNames}\n data-testid={slugify(\n `${testId}_option_${option.testId || option.value}`,\n )}\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 </Radio>\n ));\n }\n\n return (\n <NextRadioGroup\n // className={className}\n classNames={classNames}\n // See NextUI styles for group-data condition (data-invalid), e.g.: https://github.com/nextui-org/nextui/blob/main/packages/components/select/src/use-select.ts\n data-invalid={invalid}\n data-required={required}\n data-testid={testId}\n errorMessage={error && <FieldValidationError error={error} />}\n isDisabled={isDisabled}\n isInvalid={invalid}\n isRequired={required}\n label={\n label && (\n // eslint-disable-next-line jsx-a11y/label-has-associated-control\n <label>\n {label}\n <FieldCopyTestIdButton testId={testId} />\n </label>\n )\n }\n name={name}\n orientation={inline ? 'horizontal' : 'vertical'}\n onBlur={onBlur}\n onChange={onChange}\n ref={ref}\n >\n {variant === 'radioButton' ? (\n // TODO: NextButtonGroup uses ref to modify Button style, but we wrap it, so it does not work at the moment.\n <NextButtonGroup className={classNames.buttonGroup}>\n {RadioComponents}\n </NextButtonGroup>\n ) : (\n RadioComponents\n )}\n </NextRadioGroup>\n );\n }}\n />\n );\n};\n\nexport default RadioGroup;\n","import type { RadioProps as NextRadioProps } from '@nextui-org/radio';\nimport type { ReactNode } from 'react';\n\nimport { useRadio } from '@nextui-org/radio';\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\n\nimport { cn } from '@fuf-stack/pixel-utils';\n\ninterface RadioProps extends NextRadioProps {\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-primary',\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 { cn } from '@fuf-stack/pixel-utils';\nimport { Button } from '@fuf-stack/pixels';\n\ninterface RadioButtonProps {\n /** label of the value. */\n children: React.ReactNode;\n /** CSS class name */\n className?: string;\n /** disables the option */\n isDisabled?: boolean;\n /** Callback function. Executed if the option is clicked. */\n onChange: (...event: unknown[]) => void;\n /** value of the option. */\n value: string;\n}\n\nexport const RadioButton = ({\n className = undefined,\n value,\n isDisabled = false,\n onChange,\n children,\n}: RadioButtonProps) => {\n return (\n <Button\n key={`index_${value}`}\n className={cn(className)}\n disabled={isDisabled}\n onClick={() => {\n return onChange(value);\n }}\n >\n {children}\n </Button>\n );\n};\n\nexport default RadioButton;\n","import RadioGroup from './RadioGroup';\n\nexport type { RadioGroupProps } from './RadioGroup';\n\nexport { RadioGroup };\n\nexport default RadioGroup;\n"],"mappings":";;;;;;;;;;;;;;AAGA,SAAS,kBAAkB;AAE3B,SAAS,eAAe,uBAAuB;AAC/C,SAAS,cAAc,gBAAgB,aAAa;AAEpD,SAAS,MAAAA,KAAI,IAAI,4BAA4B;;;ACL7C,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAE/B,SAAS,UAAU;AAmCX,cAQF,YARE;AA5BD,IAAM,WAAW,CAAC,EAAE,OAAO,QAAW,GAAG,MAAM,MAAkB;AACtE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,SAAS,KAAK;AAElB,SACE;AAAA,IAAC;AAAA;AAAA,MAEE,GAAG,aAAa;AAAA,MACjB,WAAW;AAAA,QACT;AAAA,QACA;AAAA;AAAA,UAEE,wCAAwC;AAAA,QAC1C;AAAA,M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n","RadioGroup_default"]}
|
package/dist/index.cjs
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
var _chunkMKM7ZYRNcjs = require('./chunk-MKM7ZYRN.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkNQ4JZ7AKcjs = require('./chunk-NQ4JZ7AK.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk4RTJ5XR2cjs = require('./chunk-4RTJ5XR2.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkHFMFDBEVcjs = require('./chunk-HFMFDBEV.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkJDRMKZ35cjs = require('./chunk-JDRMKZ35.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
var _chunkQYZV7ZUYcjs = require('./chunk-QYZV7ZUY.cjs');
|
|
@@ -21,19 +21,19 @@ var _chunkQYZV7ZUYcjs = require('./chunk-QYZV7ZUY.cjs');
|
|
|
21
21
|
var _chunk6GN255GPcjs = require('./chunk-6GN255GP.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
var
|
|
24
|
+
var _chunkJRFKYVXYcjs = require('./chunk-JRFKYVXY.cjs');
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunk6HMMXOSVcjs = require('./chunk-6HMMXOSV.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkNXTXKBTPcjs = require('./chunk-NXTXKBTP.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
var _chunkKMMS4G7Acjs = require('./chunk-KMMS4G7A.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunkOHJYXA6Rcjs = require('./chunk-OHJYXA6R.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
@@ -57,5 +57,5 @@ var _chunkBBB4FEY6cjs = require('./chunk-BBB4FEY6.cjs');
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
|
|
60
|
-
exports.CheckboxGroup =
|
|
60
|
+
exports.CheckboxGroup = _chunkHFMFDBEVcjs.CheckboxGroup_default; exports.FieldArray = _chunkJDRMKZ35cjs.FieldArray_default; exports.FieldCopyTestIdButton = _chunkKMMS4G7Acjs.FieldCopyTestIdButton_default; exports.FieldValidationError = _chunkOHJYXA6Rcjs.FieldValidationError_default; exports.Form = _chunkQYZV7ZUYcjs.Form_default; exports.Grid = _chunk6GN255GPcjs.Grid_default; exports.Input = _chunkJRFKYVXYcjs.Input_default; exports.RadioGroup = _chunk6HMMXOSVcjs.RadioGroup_default; exports.Select = _chunkNXTXKBTPcjs.Select_default; exports.SubmitButton = _chunkMKM7ZYRNcjs.SubmitButton_default; exports.Switch = _chunkNQ4JZ7AKcjs.Switch_default; exports.TextArea = _chunk4RTJ5XR2cjs.TextArea_default; exports.recursiveFieldKeySearch = _chunkLDCRR7FPcjs.recursiveFieldKeySearch; exports.slugify = _chunkBBB4FEY6cjs.slugify; exports.useFormContext = _chunkLDCRR7FPcjs.useFormContext;
|
|
61
61
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CheckboxGroup, b as CheckboxGroupOption, a as CheckboxGroupProps } from './CheckboxGroup-
|
|
1
|
+
export { C as CheckboxGroup, b as CheckboxGroupOption, a as CheckboxGroupProps } from './CheckboxGroup-o-qWkWe1.cjs';
|
|
2
2
|
export { F as FieldArray, c as FieldArrayFieldChildren, b as FieldArrayHideOption, a as FieldArrayProps } from './FieldArray-DUvn98Fe.cjs';
|
|
3
3
|
export { F as Form, a as FormProps } from './Form-nJbG1hNH.cjs';
|
|
4
4
|
export { G as Grid, a as GridProps } from './Grid-DF3L9NF3.cjs';
|
|
@@ -6,19 +6,19 @@ export { slugify } from './helpers/index.cjs';
|
|
|
6
6
|
export { recursiveFieldKeySearch, useFormContext } from './hooks/index.cjs';
|
|
7
7
|
export { I as Input, a as InputProps } from './Input-B6dNQiiD.cjs';
|
|
8
8
|
export { F as FieldCopyTestIdButton, a as FieldCopyTestIdButtonProps } from './FieldCopyTestIdButton-D-z1usqE.cjs';
|
|
9
|
-
export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-
|
|
10
|
-
export { R as RadioGroup, a as RadioGroupProps } from './RadioGroup-
|
|
11
|
-
export { S as Select, a as SelectProps } from './Select-
|
|
9
|
+
export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-DAT12Ess.cjs';
|
|
10
|
+
export { R as RadioGroup, a as RadioGroupProps } from './RadioGroup-D_kiBt0M.cjs';
|
|
11
|
+
export { S as Select, a as SelectProps } from './Select-BhS4z0Pj.cjs';
|
|
12
12
|
export { S as SubmitButton, a as SubmitButtonProps } from './SubmitButton-BEp_zzwf.cjs';
|
|
13
|
-
export { S as Switch, a as SwitchProps } from './Switch-
|
|
13
|
+
export { S as Switch, a as SwitchProps } from './Switch-Fdldj8LV.cjs';
|
|
14
14
|
export { T as TextArea, a as TextAreaProps } from './TextArea-B-sKvTkd.cjs';
|
|
15
15
|
import 'react/jsx-runtime';
|
|
16
|
+
import 'tailwind-variants/dist/config.js';
|
|
17
|
+
import 'tailwind-variants';
|
|
18
|
+
import '@fuf-stack/pixel-utils';
|
|
16
19
|
import 'react-hook-form';
|
|
17
20
|
import '@fuf-stack/veto';
|
|
18
21
|
import 'react';
|
|
19
22
|
import 'slug';
|
|
20
|
-
import 'tailwind-variants';
|
|
21
|
-
import 'tailwind-variants/dist/config.js';
|
|
22
|
-
import '@fuf-stack/pixel-utils';
|
|
23
23
|
import 'react-select';
|
|
24
24
|
import '@fuf-stack/pixels';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CheckboxGroup, b as CheckboxGroupOption, a as CheckboxGroupProps } from './CheckboxGroup-
|
|
1
|
+
export { C as CheckboxGroup, b as CheckboxGroupOption, a as CheckboxGroupProps } from './CheckboxGroup-o-qWkWe1.js';
|
|
2
2
|
export { F as FieldArray, c as FieldArrayFieldChildren, b as FieldArrayHideOption, a as FieldArrayProps } from './FieldArray-DUvn98Fe.js';
|
|
3
3
|
export { F as Form, a as FormProps } from './Form-nJbG1hNH.js';
|
|
4
4
|
export { G as Grid, a as GridProps } from './Grid-DF3L9NF3.js';
|
|
@@ -6,19 +6,19 @@ export { slugify } from './helpers/index.js';
|
|
|
6
6
|
export { recursiveFieldKeySearch, useFormContext } from './hooks/index.js';
|
|
7
7
|
export { I as Input, a as InputProps } from './Input-B6dNQiiD.js';
|
|
8
8
|
export { F as FieldCopyTestIdButton, a as FieldCopyTestIdButtonProps } from './FieldCopyTestIdButton-D-z1usqE.js';
|
|
9
|
-
export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-
|
|
10
|
-
export { R as RadioGroup, a as RadioGroupProps } from './RadioGroup-
|
|
11
|
-
export { S as Select, a as SelectProps } from './Select-
|
|
9
|
+
export { F as FieldValidationError, a as FieldValidationErrorProps } from './FieldValidationError-DAT12Ess.js';
|
|
10
|
+
export { R as RadioGroup, a as RadioGroupProps } from './RadioGroup-D_kiBt0M.js';
|
|
11
|
+
export { S as Select, a as SelectProps } from './Select-BhS4z0Pj.js';
|
|
12
12
|
export { S as SubmitButton, a as SubmitButtonProps } from './SubmitButton-BEp_zzwf.js';
|
|
13
|
-
export { S as Switch, a as SwitchProps } from './Switch-
|
|
13
|
+
export { S as Switch, a as SwitchProps } from './Switch-Fdldj8LV.js';
|
|
14
14
|
export { T as TextArea, a as TextAreaProps } from './TextArea-B-sKvTkd.js';
|
|
15
15
|
import 'react/jsx-runtime';
|
|
16
|
+
import 'tailwind-variants/dist/config.js';
|
|
17
|
+
import 'tailwind-variants';
|
|
18
|
+
import '@fuf-stack/pixel-utils';
|
|
16
19
|
import 'react-hook-form';
|
|
17
20
|
import '@fuf-stack/veto';
|
|
18
21
|
import 'react';
|
|
19
22
|
import 'slug';
|
|
20
|
-
import 'tailwind-variants';
|
|
21
|
-
import 'tailwind-variants/dist/config.js';
|
|
22
|
-
import '@fuf-stack/pixel-utils';
|
|
23
23
|
import 'react-select';
|
|
24
24
|
import '@fuf-stack/pixels';
|
package/dist/index.js
CHANGED
|
@@ -3,37 +3,37 @@ import {
|
|
|
3
3
|
} from "./chunk-4GVPJYZW.js";
|
|
4
4
|
import {
|
|
5
5
|
Switch_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PFX4YRWI.js";
|
|
7
7
|
import {
|
|
8
8
|
TextArea_default
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-HOCRJOEU.js";
|
|
10
10
|
import {
|
|
11
11
|
CheckboxGroup_default
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JG5VQZ4V.js";
|
|
13
13
|
import {
|
|
14
14
|
FieldArray_default
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-F7GG67YU.js";
|
|
16
16
|
import {
|
|
17
17
|
Form_default
|
|
18
18
|
} from "./chunk-DF77NLWL.js";
|
|
19
19
|
import {
|
|
20
20
|
Grid_default
|
|
21
21
|
} from "./chunk-PDCEKC3G.js";
|
|
22
|
-
import {
|
|
23
|
-
RadioGroup_default
|
|
24
|
-
} from "./chunk-ARUVDZFG.js";
|
|
25
22
|
import {
|
|
26
23
|
Input_default
|
|
27
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-SCTH3FAO.js";
|
|
25
|
+
import {
|
|
26
|
+
RadioGroup_default
|
|
27
|
+
} from "./chunk-YSZW33OV.js";
|
|
28
28
|
import {
|
|
29
29
|
Select_default
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-LDW7K7LW.js";
|
|
31
31
|
import {
|
|
32
32
|
FieldCopyTestIdButton_default
|
|
33
33
|
} from "./chunk-T3CCNJHK.js";
|
|
34
34
|
import {
|
|
35
35
|
FieldValidationError_default
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-WKM2D7LF.js";
|
|
37
37
|
import {
|
|
38
38
|
recursiveFieldKeySearch,
|
|
39
39
|
useFormContext
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkOHJYXA6Rcjs = require('../../chunk-OHJYXA6R.cjs');
|
|
5
5
|
require('../../chunk-BBB4FEY6.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.FieldValidationError =
|
|
9
|
+
exports.FieldValidationError = _chunkOHJYXA6Rcjs.FieldValidationError_default; exports.default = _chunkOHJYXA6Rcjs.FieldValidationError_default2;
|
|
10
10
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FieldValidationError } from '../../FieldValidationError-
|
|
2
|
-
export { a as FieldValidationErrorProps } from '../../FieldValidationError-
|
|
1
|
+
import { F as FieldValidationError } from '../../FieldValidationError-DAT12Ess.cjs';
|
|
2
|
+
export { a as FieldValidationErrorProps } from '../../FieldValidationError-DAT12Ess.cjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-hook-form';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FieldValidationError } from '../../FieldValidationError-
|
|
2
|
-
export { a as FieldValidationErrorProps } from '../../FieldValidationError-
|
|
1
|
+
import { F as FieldValidationError } from '../../FieldValidationError-DAT12Ess.js';
|
|
2
|
+
export { a as FieldValidationErrorProps } from '../../FieldValidationError-DAT12Ess.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-hook-form';
|
|
5
5
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuf-stack/uniform",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"description": "fuf react form library",
|
|
5
5
|
"author": "Hannes Tiede",
|
|
6
6
|
"homepage": "https://github.com/fuf-stack/uniform#readme",
|
|
@@ -119,13 +119,13 @@
|
|
|
119
119
|
"@nextui-org/system": "2.2.6",
|
|
120
120
|
"@nextui-org/theme": "2.2.11",
|
|
121
121
|
"@react-aria/visually-hidden": "3.8.16",
|
|
122
|
-
"framer-motion": "11.11.
|
|
122
|
+
"framer-motion": "11.11.7",
|
|
123
123
|
"react-icons": "5.3.0",
|
|
124
124
|
"react-hook-form": "7.53.0",
|
|
125
125
|
"react-select": "5.8.1",
|
|
126
126
|
"slug": "9.1.0",
|
|
127
|
-
"@fuf-stack/pixels": "0.24.0",
|
|
128
127
|
"@fuf-stack/pixel-utils": "0.3.0",
|
|
128
|
+
"@fuf-stack/pixels": "0.24.0",
|
|
129
129
|
"@fuf-stack/veto": "0.5.0"
|
|
130
130
|
},
|
|
131
131
|
"devDependencies": {
|
|
@@ -136,8 +136,8 @@
|
|
|
136
136
|
"react": "18.3.1",
|
|
137
137
|
"react-dom": "18.3.1",
|
|
138
138
|
"@repo/storybook-config": "0.0.1",
|
|
139
|
-
"@repo/tailwind-config": "0.0.1",
|
|
140
139
|
"@repo/tsup-config": "0.0.1",
|
|
140
|
+
"@repo/tailwind-config": "0.0.1",
|
|
141
141
|
"@repo/vite-config": "0.0.1"
|
|
142
142
|
},
|
|
143
143
|
"scripts": {
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
type CheckboxGroupOption = {
|
|
4
|
-
/** option label */
|
|
5
|
-
label?: React.ReactNode;
|
|
6
|
-
/** option value */
|
|
7
|
-
value: string;
|
|
8
|
-
/** disables the option */
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
/** HTML data-testid attribute of the option */
|
|
11
|
-
testId?: string;
|
|
12
|
-
};
|
|
13
|
-
interface CheckboxGroupProps {
|
|
14
|
-
/** CSS class name. ClassName: string | { buttons?: string | { base?: string; active?: string }; base?: string;} */
|
|
15
|
-
className?: string;
|
|
16
|
-
/** label displayed above the Checkboxes */
|
|
17
|
-
label?: React.ReactNode;
|
|
18
|
-
/** Name the Field is registered on the form. */
|
|
19
|
-
name: string;
|
|
20
|
-
/** Checkboxes that should be displayed. */
|
|
21
|
-
options: CheckboxGroupOption[];
|
|
22
|
-
/** sets all buttons disabled */
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
/** id for internal testing. */
|
|
25
|
-
testId?: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* CheckboxGroup component based on [NextUI CheckboxGroup](https://nextui.org/docs/components/checkbox-group)
|
|
29
|
-
*/
|
|
30
|
-
declare const CheckboxGroup: ({ className, label, options, disabled, name, testId: _testId, }: CheckboxGroupProps) => react_jsx_runtime.JSX.Element;
|
|
31
|
-
|
|
32
|
-
export { CheckboxGroup as C, type CheckboxGroupProps as a, type CheckboxGroupOption as b };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
type CheckboxGroupOption = {
|
|
4
|
-
/** option label */
|
|
5
|
-
label?: React.ReactNode;
|
|
6
|
-
/** option value */
|
|
7
|
-
value: string;
|
|
8
|
-
/** disables the option */
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
/** HTML data-testid attribute of the option */
|
|
11
|
-
testId?: string;
|
|
12
|
-
};
|
|
13
|
-
interface CheckboxGroupProps {
|
|
14
|
-
/** CSS class name. ClassName: string | { buttons?: string | { base?: string; active?: string }; base?: string;} */
|
|
15
|
-
className?: string;
|
|
16
|
-
/** label displayed above the Checkboxes */
|
|
17
|
-
label?: React.ReactNode;
|
|
18
|
-
/** Name the Field is registered on the form. */
|
|
19
|
-
name: string;
|
|
20
|
-
/** Checkboxes that should be displayed. */
|
|
21
|
-
options: CheckboxGroupOption[];
|
|
22
|
-
/** sets all buttons disabled */
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
/** id for internal testing. */
|
|
25
|
-
testId?: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* CheckboxGroup component based on [NextUI CheckboxGroup](https://nextui.org/docs/components/checkbox-group)
|
|
29
|
-
*/
|
|
30
|
-
declare const CheckboxGroup: ({ className, label, options, disabled, name, testId: _testId, }: CheckboxGroupProps) => react_jsx_runtime.JSX.Element;
|
|
31
|
-
|
|
32
|
-
export { CheckboxGroup as C, type CheckboxGroupProps as a, type CheckboxGroupOption as b };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ReactNode, ReactElement } from 'react';
|
|
2
|
-
|
|
3
|
-
interface RadioGroupOption {
|
|
4
|
-
/** Description of the value. Works with variant radioBox. */
|
|
5
|
-
description?: React.ReactNode;
|
|
6
|
-
/** disables the option */
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
/** option label */
|
|
9
|
-
label?: React.ReactNode;
|
|
10
|
-
/** option icon */
|
|
11
|
-
icon?: ReactNode;
|
|
12
|
-
/** HTML data-testid attribute of the option */
|
|
13
|
-
testId?: string;
|
|
14
|
-
/** option value */
|
|
15
|
-
value: string;
|
|
16
|
-
}
|
|
17
|
-
interface RadioGroupProps {
|
|
18
|
-
/** CSS class name */
|
|
19
|
-
className?: string;
|
|
20
|
-
/** Determines if the Buttons are disabled or not. */
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
/** determines orientation of the Buttons. */
|
|
23
|
-
inline?: boolean;
|
|
24
|
-
/** Label displayed next to the RadioButton. */
|
|
25
|
-
label?: ReactNode;
|
|
26
|
-
/** Name the RadioButtons are registered at in HTML forms (react-hook-form). */
|
|
27
|
-
name: string;
|
|
28
|
-
/** Radio button configuration. */
|
|
29
|
-
options: RadioGroupOption[];
|
|
30
|
-
/** Id to grab element in internal tests. */
|
|
31
|
-
testId?: string;
|
|
32
|
-
/** How the RadioGroup should look like. */
|
|
33
|
-
variant?: 'default' | 'radioBox' | 'radioButton';
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* RadioGroup component based on [NextUI RadioGroup](https://nextui.org/docs/components/radio-group)
|
|
37
|
-
*/
|
|
38
|
-
declare const RadioGroup: ({ className, disabled, inline, label, name, options, testId: _testId, variant, }: RadioGroupProps) => ReactElement;
|
|
39
|
-
|
|
40
|
-
export { RadioGroup as R, type RadioGroupProps as a };
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ReactNode, ReactElement } from 'react';
|
|
2
|
-
|
|
3
|
-
interface RadioGroupOption {
|
|
4
|
-
/** Description of the value. Works with variant radioBox. */
|
|
5
|
-
description?: React.ReactNode;
|
|
6
|
-
/** disables the option */
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
/** option label */
|
|
9
|
-
label?: React.ReactNode;
|
|
10
|
-
/** option icon */
|
|
11
|
-
icon?: ReactNode;
|
|
12
|
-
/** HTML data-testid attribute of the option */
|
|
13
|
-
testId?: string;
|
|
14
|
-
/** option value */
|
|
15
|
-
value: string;
|
|
16
|
-
}
|
|
17
|
-
interface RadioGroupProps {
|
|
18
|
-
/** CSS class name */
|
|
19
|
-
className?: string;
|
|
20
|
-
/** Determines if the Buttons are disabled or not. */
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
/** determines orientation of the Buttons. */
|
|
23
|
-
inline?: boolean;
|
|
24
|
-
/** Label displayed next to the RadioButton. */
|
|
25
|
-
label?: ReactNode;
|
|
26
|
-
/** Name the RadioButtons are registered at in HTML forms (react-hook-form). */
|
|
27
|
-
name: string;
|
|
28
|
-
/** Radio button configuration. */
|
|
29
|
-
options: RadioGroupOption[];
|
|
30
|
-
/** Id to grab element in internal tests. */
|
|
31
|
-
testId?: string;
|
|
32
|
-
/** How the RadioGroup should look like. */
|
|
33
|
-
variant?: 'default' | 'radioBox' | 'radioButton';
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* RadioGroup component based on [NextUI RadioGroup](https://nextui.org/docs/components/radio-group)
|
|
37
|
-
*/
|
|
38
|
-
declare const RadioGroup: ({ className, disabled, inline, label, name, options, testId: _testId, variant, }: RadioGroupProps) => ReactElement;
|
|
39
|
-
|
|
40
|
-
export { RadioGroup as R, type RadioGroupProps as a };
|