@fuf-stack/uniform 1.28.1 → 1.30.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/README.md +6 -0
- package/dist/Checkboxes/index.d.mts +57 -10
- package/dist/Checkboxes/index.d.mts.map +1 -1
- package/dist/Checkboxes/index.mjs +8 -3
- package/dist/Checkboxes/index.mjs.map +1 -1
- package/dist/DatePicker/index.d.mts +129 -1120
- package/dist/DatePicker/index.d.mts.map +1 -1
- package/dist/DatePicker/index.mjs +38 -32
- package/dist/DatePicker/index.mjs.map +1 -1
- package/dist/FieldArray/index.mjs +2 -2
- package/dist/FieldCard/index.mjs +1 -1
- package/dist/FieldReset/index.d.mts +415 -0
- package/dist/FieldReset/index.d.mts.map +1 -0
- package/dist/FieldReset/index.mjs +241 -0
- package/dist/FieldReset/index.mjs.map +1 -0
- package/dist/Form/index.d.mts +2 -2
- package/dist/Form/index.mjs +2 -2
- package/dist/Form/index.mjs.map +1 -1
- package/dist/{FormContext-BnNJYZOo.d.mts → FormContext-Dvt3MiKq.d.mts} +3 -3
- package/dist/{FormContext-BnNJYZOo.d.mts.map → FormContext-Dvt3MiKq.d.mts.map} +1 -1
- package/dist/Input/index.d.mts +63 -452
- package/dist/Input/index.d.mts.map +1 -1
- package/dist/Input/index.mjs +20 -15
- package/dist/Input/index.mjs.map +1 -1
- package/dist/RadioBoxes/index.d.mts +163 -894
- package/dist/RadioBoxes/index.d.mts.map +1 -1
- package/dist/RadioBoxes/index.mjs +27 -20
- package/dist/RadioBoxes/index.mjs.map +1 -1
- package/dist/RadioTabs/index.d.mts +93 -43
- package/dist/RadioTabs/index.d.mts.map +1 -1
- package/dist/RadioTabs/index.mjs +8 -5
- package/dist/RadioTabs/index.mjs.map +1 -1
- package/dist/Radios/index.d.mts +122 -1027
- package/dist/Radios/index.d.mts.map +1 -1
- package/dist/Radios/index.mjs +22 -18
- package/dist/Radios/index.mjs.map +1 -1
- package/dist/Select/index.d.mts +440 -3028
- package/dist/Select/index.d.mts.map +1 -1
- package/dist/Select/index.mjs +79 -45
- package/dist/Select/index.mjs.map +1 -1
- package/dist/Slider/index.d.mts +162 -1325
- package/dist/Slider/index.d.mts.map +1 -1
- package/dist/Slider/index.mjs +41 -28
- package/dist/Slider/index.mjs.map +1 -1
- package/dist/Switch/index.d.mts +125 -944
- package/dist/Switch/index.d.mts.map +1 -1
- package/dist/Switch/index.mjs +18 -14
- package/dist/Switch/index.mjs.map +1 -1
- package/dist/SwitchBox/index.d.mts +140 -99
- package/dist/SwitchBox/index.d.mts.map +1 -1
- package/dist/SwitchBox/index.mjs +9 -6
- package/dist/SwitchBox/index.mjs.map +1 -1
- package/dist/TextArea/index.d.mts +63 -452
- package/dist/TextArea/index.d.mts.map +1 -1
- package/dist/TextArea/index.mjs +17 -13
- package/dist/TextArea/index.mjs.map +1 -1
- package/dist/Time/index.d.mts +82 -729
- package/dist/Time/index.d.mts.map +1 -1
- package/dist/Time/index.mjs +22 -18
- package/dist/Time/index.mjs.map +1 -1
- package/dist/hooks/useFormContext/index.d.mts +1 -1
- package/dist/hooks/useUniformField/index.d.mts +1 -1
- package/dist/hooks/useUniformField/index.mjs +5 -1
- package/dist/hooks/useUniformField/index.mjs.map +1 -1
- package/dist/hooks/useUniformFieldArray/index.d.mts +1 -1
- package/dist/{index-DaiTW5Bl.d.mts → index-DsB0_365.d.mts} +9 -2
- package/dist/index-DsB0_365.d.mts.map +1 -0
- package/dist/{useFormContext-BhPzFXwF.d.mts → useFormContext-BSSUZ0Md.d.mts} +2 -2
- package/dist/{useFormContext-BhPzFXwF.d.mts.map → useFormContext-BSSUZ0Md.d.mts.map} +1 -1
- package/package.json +5 -4
- package/dist/index-DaiTW5Bl.d.mts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/RadioBoxes/RadioBoxes.tsx","../../src/RadioBoxes/RadioBox.tsx"],"mappings":";;;cAaa,sBAAkB
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/RadioBoxes/RadioBoxes.tsx","../../src/RadioBoxes/RadioBox.tsx"],"mappings":";;;cAaa,sBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgC1B,eAAe,eAAe;KAC9B,YAAY,mBAAmB;UAEnB;;EAEf,cAAc;;EAEd;;EAEA,OAAO;;EAEP,QAAQ;;EAER;;EAEA;;UAGe,wBAAwB;;EAEvC;;EAEA,YAAY;;EAEZ;;EAEA;;EAEA,QAAQ;;EAER;;EAEA,SAAS;;EAET;;EAEA;;;;;cAMI,eAAc,WAAA,QAAA,MAAA,YAAA,qBAMjB,oCAAe,IAAA;qBCpFL,oBAAgB"}
|
|
@@ -15,15 +15,15 @@ const radioBoxVariants = tv({
|
|
|
15
15
|
labelWrapper: "grow"
|
|
16
16
|
},
|
|
17
17
|
variants: {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
disabled: { true: { base: "**:cursor-not-allowed cursor-not-allowed opacity-disabled hover:bg-transparent" } },
|
|
19
|
+
invalid: { true: { base: "!border-danger" } }
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
const RadioBox = ({ classNames: _classNames = void 0, icon = void 0, isInvalid = false, ...props }) => {
|
|
23
23
|
const { children, Component, description, getBaseProps, getControlProps, getInputProps, getLabelProps, getLabelWrapperProps, getWrapperProps, isDisabled } = useRadio(props);
|
|
24
24
|
const variants = radioBoxVariants({
|
|
25
|
-
isDisabled,
|
|
26
|
-
isInvalid
|
|
25
|
+
disabled: isDisabled,
|
|
26
|
+
invalid: isInvalid
|
|
27
27
|
});
|
|
28
28
|
const classNames = variantsToClassNames(variants, _classNames, "base");
|
|
29
29
|
return /* @__PURE__ */ jsxs(Component, {
|
|
@@ -65,30 +65,36 @@ const RadioBox = ({ classNames: _classNames = void 0, icon = void 0, isInvalid =
|
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
67
|
// src/RadioBoxes/RadioBoxes.tsx
|
|
68
|
-
const radioBoxesVariants = tv({
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
68
|
+
const radioBoxesVariants = tv({
|
|
69
|
+
slots: {
|
|
70
|
+
base: [
|
|
71
|
+
"group",
|
|
72
|
+
"flex w-full flex-col",
|
|
73
|
+
"gap-y-1.5"
|
|
74
|
+
],
|
|
75
|
+
boxBase: "",
|
|
76
|
+
boxControl: "",
|
|
77
|
+
boxDescription: "",
|
|
78
|
+
boxLabel: "",
|
|
79
|
+
boxLabelWrapper: "",
|
|
80
|
+
label: "mb-2 inline-flex cursor-default text-sm text-foreground subpixel-antialiased group-data-[invalid=true]:text-danger",
|
|
81
|
+
wrapper: ""
|
|
82
|
+
},
|
|
83
|
+
variants: { readOnly: { true: {
|
|
84
|
+
base: "**:cursor-not-allowed cursor-not-allowed opacity-disabled",
|
|
85
|
+
boxBase: "hover:bg-transparent"
|
|
86
|
+
} } }
|
|
87
|
+
});
|
|
82
88
|
/**
|
|
83
89
|
* RadioBoxes component based on [HeroUI RadioGroup](https://www.heroui.com//docs/components/radio-group)
|
|
84
90
|
*/
|
|
85
91
|
const RadioBoxes = ({ className = void 0, inline = false, name, options, ...uniformFieldProps }) => {
|
|
86
|
-
const { ariaLabel, errorMessage, invalid, disabled, label, field: { onBlur, onChange, ref, value }, required, testId } = useUniformField({
|
|
92
|
+
const { ariaLabel, errorMessage, invalid, disabled, label, field: { onBlur, onChange, ref, value }, readOnly, required, testId } = useUniformField({
|
|
87
93
|
name,
|
|
88
94
|
...uniformFieldProps
|
|
89
95
|
});
|
|
90
96
|
const { convertToOriginalType } = createOptionValueConverter(options);
|
|
91
|
-
const variants = radioBoxesVariants();
|
|
97
|
+
const variants = radioBoxesVariants({ readOnly });
|
|
92
98
|
const classNames = variantsToClassNames(variants, className, "base");
|
|
93
99
|
const boxClassNames = {
|
|
94
100
|
base: classNames.boxBase,
|
|
@@ -107,6 +113,7 @@ const RadioBoxes = ({ className = void 0, inline = false, name, options, ...unif
|
|
|
107
113
|
errorMessage,
|
|
108
114
|
isDisabled: disabled,
|
|
109
115
|
isInvalid: invalid,
|
|
116
|
+
isReadOnly: readOnly,
|
|
110
117
|
isRequired: required,
|
|
111
118
|
label: label ? /* @__PURE__ */ jsx("legend", { children: label }) : null,
|
|
112
119
|
name,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["HeroRadioGroup"],"sources":["../../src/RadioBoxes/RadioBox.tsx","../../src/RadioBoxes/RadioBoxes.tsx","../../src/RadioBoxes/index.ts"],"sourcesContent":["import type { TVClassName } from '@fuf-stack/pixel-utils';\nimport 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, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nexport const radioBoxVariants = tv({\n slots: {\n base: '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 control: '',\n description: 'text-foreground opacity-70 text-small',\n icon: '',\n label: '',\n labelWrapper: 'grow',\n },\n variants: {\n isDisabled: {\n true: {\n base: 'pointer-events-none opacity-disabled',\n },\n },\n isInvalid: {\n true: {\n base: '!border-danger',\n },\n },\n },\n});\n\ntype ClassName = TVClassName<typeof radioBoxVariants>;\n\nexport interface RadioBoxProps extends Omit<HeroRadioProps, 'className'> {\n /** CSS class name */\n className?: ClassName;\n /** icon for the option */\n icon?: ReactNode;\n /** whether the radio is invalid */\n isInvalid?: boolean;\n}\n\nexport const RadioBox = ({\n classNames: _classNames = undefined,\n icon = undefined,\n isInvalid = false,\n ...props\n}: RadioBoxProps) => {\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 as HeroRadioProps);\n\n // classNames from slots\n const variants = radioBoxVariants({\n isDisabled,\n isInvalid,\n });\n const classNames = variantsToClassNames(\n variants,\n // @ts-expect-error not sure here, but it works\n _classNames,\n 'base',\n );\n\n return (\n <Component {...getBaseProps()} className={classNames.base}>\n <VisuallyHidden>\n <input {...getInputProps()} />\n </VisuallyHidden>\n {!icon ? (\n <span {...getWrapperProps()}>\n <span\n {...getControlProps()}\n className={cn(getControlProps().className, classNames.control)}\n />\n </span>\n ) : null}\n {icon ? <div className={classNames.icon}>{icon}</div> : null}\n <div\n {...getLabelWrapperProps()}\n className={cn(\n getLabelWrapperProps().className,\n classNames.labelWrapper,\n )}\n >\n {children ? (\n <span\n {...getLabelProps()}\n className={cn(getLabelProps().className, classNames.label)}\n >\n {children}\n </span>\n ) : null}\n {description ? (\n <div className={classNames.description}>{description}</div>\n ) : null}\n </div>\n {icon ? (\n <span {...getWrapperProps()}>\n <span\n {...getControlProps()}\n className={cn(getControlProps().className, classNames.control)}\n />\n </span>\n ) : null}\n </Component>\n );\n};\n\nexport default RadioBox;\n","import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n//\nimport type { RadioBoxProps } from './RadioBox';\n\nimport { RadioGroup as HeroRadioGroup } from '@heroui/radio';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { createOptionValueConverter } from '../helpers';\nimport { useUniformField } from '../hooks/useUniformField';\nimport { RadioBox } from './RadioBox';\n\nexport const radioBoxesVariants = tv({\n slots: {\n base: [\n // Needs group for group-data condition.\n 'group',\n // Match shared field wrapper layout.\n 'flex w-full flex-col',\n // Keep spacing between label/radio boxes consistent.\n 'gap-y-1.5',\n ],\n boxBase: '',\n boxControl: '',\n boxDescription: '',\n boxLabel: '',\n boxLabelWrapper: '',\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 'mb-2 inline-flex cursor-default 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 RadioBoxOption {\n /** Description of the value. Works with variant radioBox. */\n description?: ReactNode;\n /** disables the option */\n disabled?: boolean;\n /** option icon */\n icon?: ReactNode;\n /** option label */\n label?: ReactNode;\n /** HTML data-testid attribute of the option */\n testId?: string;\n /** option value */\n value: string | number;\n}\n\nexport interface RadioBoxesProps extends VariantProps {\n /** Custom aria-label for accessibility. If not provided, falls back to field name when no visible label exists */\n ariaLabel?: string;\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: RadioBoxOption[];\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 inline = false,\n name,\n options,\n ...uniformFieldProps\n}: RadioBoxesProps) => {\n const {\n ariaLabel,\n errorMessage,\n invalid,\n disabled,\n label,\n field: { onBlur, onChange, ref, value },\n required,\n testId,\n } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // Create converter to preserve number types for option values\n const { convertToOriginalType } = createOptionValueConverter(options);\n\n // classNames from slots\n const variants = radioBoxesVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n const boxClassNames: RadioBoxProps['classNames'] = {\n base: classNames.boxBase,\n control: classNames.boxControl,\n description: classNames.boxDescription,\n label: classNames.boxLabel,\n labelWrapper: classNames.boxLabelWrapper,\n };\n\n return (\n <HeroRadioGroup\n ref={ref}\n aria-label={ariaLabel}\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 errorMessage={errorMessage}\n isDisabled={disabled}\n isInvalid={invalid}\n isRequired={required}\n label={label ? <legend>{label}</legend> : null}\n name={name}\n onBlur={onBlur}\n onValueChange={(newValue) => {\n onChange(convertToOriginalType(newValue));\n }}\n orientation={inline ? 'horizontal' : 'vertical'}\n value={value != null ? String(value) : ''}\n >\n {options.map((option) => {\n if ('value' in option) {\n const optionTestId = slugify(\n `${testId}_option_${option.testId ?? option.value}`,\n { replaceDots: true },\n );\n return (\n <RadioBox\n key={String(option.value)}\n classNames={boxClassNames}\n data-testid={optionTestId}\n description={option.description}\n icon={option.icon}\n isDisabled={!!disabled || option.disabled}\n isInvalid={invalid}\n value={String(option.value)}\n >\n {option.label ?? option.value}\n </RadioBox>\n );\n }\n return null;\n })}\n </HeroRadioGroup>\n );\n};\n\nexport default RadioBoxes;\n","import RadioBoxes from './RadioBoxes';\n\nexport type { RadioBoxesProps, RadioBoxOption } from './RadioBoxes';\n\nexport { radioBoxVariants } from './RadioBox';\n\nexport default RadioBoxes;\n"],"mappings":";;;;;;;A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ACA,OACE,oBAAC,UAAD;KAEE,YAAY;KACZ,eAAa;KACb,aAAa,OAAO;KACpB,MAAM,OAAO;KACb,YAAY,CAAC,CAAC,YAAY,OAAO;KACjC,WAAW;KACX,OAAO,OAAO,OAAO,KAAK;KAEzB,UAAA,OAAO,SAAS,OAAO;IAChB,GAVH,OAAO,OAAO,KAAK,CAUhB;GAEd;GACA,OAAO;EACT,CAAC;CACa,CAAA;AAEpB;;ACzJA,IAAA,qBAAe"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["HeroRadioGroup"],"sources":["../../src/RadioBoxes/RadioBox.tsx","../../src/RadioBoxes/RadioBoxes.tsx","../../src/RadioBoxes/index.ts"],"sourcesContent":["import type { TVClassName } from '@fuf-stack/pixel-utils';\nimport 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, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nexport const radioBoxVariants = tv({\n slots: {\n base: '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 control: '',\n description: 'text-foreground opacity-70 text-small',\n icon: '',\n label: '',\n labelWrapper: 'grow',\n },\n variants: {\n disabled: {\n true: {\n // Keep pointer events so the not-allowed cursor shows; the disabled\n // input still blocks changes.\n base: '**:cursor-not-allowed cursor-not-allowed opacity-disabled hover:bg-transparent',\n },\n },\n invalid: {\n true: {\n base: '!border-danger',\n },\n },\n },\n});\n\ntype ClassName = TVClassName<typeof radioBoxVariants>;\n\nexport interface RadioBoxProps extends Omit<HeroRadioProps, 'className'> {\n /** CSS class name */\n className?: ClassName;\n /** icon for the option */\n icon?: ReactNode;\n /** whether the radio is invalid */\n isInvalid?: boolean;\n}\n\nexport const RadioBox = ({\n classNames: _classNames = undefined,\n icon = undefined,\n isInvalid = false,\n ...props\n}: RadioBoxProps) => {\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 as HeroRadioProps);\n\n // classNames from slots\n const variants = radioBoxVariants({\n disabled: isDisabled,\n invalid: isInvalid,\n });\n const classNames = variantsToClassNames(\n variants,\n // @ts-expect-error not sure here, but it works\n _classNames,\n 'base',\n );\n\n return (\n <Component {...getBaseProps()} className={classNames.base}>\n <VisuallyHidden>\n <input {...getInputProps()} />\n </VisuallyHidden>\n {!icon ? (\n <span {...getWrapperProps()}>\n <span\n {...getControlProps()}\n className={cn(getControlProps().className, classNames.control)}\n />\n </span>\n ) : null}\n {icon ? <div className={classNames.icon}>{icon}</div> : null}\n <div\n {...getLabelWrapperProps()}\n className={cn(\n getLabelWrapperProps().className,\n classNames.labelWrapper,\n )}\n >\n {children ? (\n <span\n {...getLabelProps()}\n className={cn(getLabelProps().className, classNames.label)}\n >\n {children}\n </span>\n ) : null}\n {description ? (\n <div className={classNames.description}>{description}</div>\n ) : null}\n </div>\n {icon ? (\n <span {...getWrapperProps()}>\n <span\n {...getControlProps()}\n className={cn(getControlProps().className, classNames.control)}\n />\n </span>\n ) : null}\n </Component>\n );\n};\n\nexport default RadioBox;\n","import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n//\nimport type { RadioBoxProps } from './RadioBox';\n\nimport { RadioGroup as HeroRadioGroup } from '@heroui/radio';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { createOptionValueConverter } from '../helpers';\nimport { useUniformField } from '../hooks/useUniformField';\nimport { RadioBox } from './RadioBox';\n\nexport const radioBoxesVariants = tv({\n slots: {\n base: [\n // Needs group for group-data condition.\n 'group',\n // Match shared field wrapper layout.\n 'flex w-full flex-col',\n // Keep spacing between label/radio boxes consistent.\n 'gap-y-1.5',\n ],\n boxBase: '',\n boxControl: '',\n boxDescription: '',\n boxLabel: '',\n boxLabelWrapper: '',\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 'mb-2 inline-flex cursor-default text-sm text-foreground subpixel-antialiased group-data-[invalid=true]:text-danger',\n wrapper: '',\n },\n variants: {\n readOnly: {\n true: {\n // Inner controls set their own cursors, so override every descendant.\n base: '**:cursor-not-allowed cursor-not-allowed opacity-disabled',\n boxBase: 'hover:bg-transparent',\n },\n },\n },\n});\n\ntype VariantProps = TVProps<typeof radioBoxesVariants>;\ntype ClassName = TVClassName<typeof radioBoxesVariants>;\n\nexport interface RadioBoxOption {\n /** Description of the value. Works with variant radioBox. */\n description?: ReactNode;\n /** disables the option */\n disabled?: boolean;\n /** option icon */\n icon?: ReactNode;\n /** option label */\n label?: ReactNode;\n /** HTML data-testid attribute of the option */\n testId?: string;\n /** option value */\n value: string | number;\n}\n\nexport interface RadioBoxesProps extends VariantProps {\n /** Custom aria-label for accessibility. If not provided, falls back to field name when no visible label exists */\n ariaLabel?: string;\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: RadioBoxOption[];\n /** Prevents changes while keeping the radio boxes focusable and its value in validation and submission */\n readOnly?: boolean;\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 inline = false,\n name,\n options,\n ...uniformFieldProps\n}: RadioBoxesProps) => {\n const {\n ariaLabel,\n errorMessage,\n invalid,\n disabled,\n label,\n field: { onBlur, onChange, ref, value },\n readOnly,\n required,\n testId,\n } = useUniformField({\n name,\n ...uniformFieldProps,\n });\n\n // Create converter to preserve number types for option values\n const { convertToOriginalType } = createOptionValueConverter(options);\n\n // classNames from slots\n const variants = radioBoxesVariants({ readOnly });\n const classNames = variantsToClassNames(variants, className, 'base');\n const boxClassNames: RadioBoxProps['classNames'] = {\n base: classNames.boxBase,\n control: classNames.boxControl,\n description: classNames.boxDescription,\n label: classNames.boxLabel,\n labelWrapper: classNames.boxLabelWrapper,\n };\n\n return (\n <HeroRadioGroup\n ref={ref}\n aria-label={ariaLabel}\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 errorMessage={errorMessage}\n isDisabled={disabled}\n isInvalid={invalid}\n isReadOnly={readOnly}\n isRequired={required}\n label={label ? <legend>{label}</legend> : null}\n name={name}\n onBlur={onBlur}\n onValueChange={(newValue) => {\n onChange(convertToOriginalType(newValue));\n }}\n orientation={inline ? 'horizontal' : 'vertical'}\n value={value != null ? String(value) : ''}\n >\n {options.map((option) => {\n if ('value' in option) {\n const optionTestId = slugify(\n `${testId}_option_${option.testId ?? option.value}`,\n { replaceDots: true },\n );\n return (\n <RadioBox\n key={String(option.value)}\n classNames={boxClassNames}\n data-testid={optionTestId}\n description={option.description}\n icon={option.icon}\n isDisabled={!!disabled || option.disabled}\n isInvalid={invalid}\n value={String(option.value)}\n >\n {option.label ?? option.value}\n </RadioBox>\n );\n }\n return null;\n })}\n </HeroRadioGroup>\n );\n};\n\nexport default RadioBoxes;\n","import RadioBoxes from './RadioBoxes';\n\nexport type { RadioBoxesProps, RadioBoxOption } from './RadioBoxes';\n\nexport { radioBoxVariants } from './RadioBox';\n\nexport default RadioBoxes;\n"],"mappings":";;;;;;;AASA,MAAa,mBAAmB,GAAG;CACjC,OAAO;EACL,MAAM;EACN,SAAS;EACT,aAAa;EACb,MAAM;EACN,OAAO;EACP,cAAc;CAChB;CACA,UAAU;EACR,UAAU,EACR,MAAM,EAGJ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,YAAY;KACZ,eAAa;KACb,aAAa,OAAO;KACpB,MAAM,OAAO;KACb,YAAY,CAAC,CAAC,YAAY,OAAO;KACjC,WAAW;KACX,OAAO,OAAO,OAAO,KAAK;KAEzB,UAAA,OAAO,SAAS,OAAO;IAChB,GAVH,OAAO,OAAO,KAAK,CAUhB;GAEd;GACA,OAAO;EACT,CAAC;CACa,CAAA;AAEpB;;ACtKA,IAAA,qBAAe"}
|
|
@@ -2,7 +2,8 @@ import { TVClassName, TVProps } from "@fuf-stack/pixel-utils";
|
|
|
2
2
|
import { ReactElement, ReactNode } from "react";
|
|
3
3
|
import { TabsProps } from "@fuf-stack/pixels";
|
|
4
4
|
export declare const radioTabsVariants: ((props?: ({
|
|
5
|
-
|
|
5
|
+
readOnly?: boolean | undefined;
|
|
6
|
+
invalid?: boolean | undefined;
|
|
6
7
|
hasContent?: boolean | undefined;
|
|
7
8
|
fullWidth?: boolean | undefined;
|
|
8
9
|
} & ({
|
|
@@ -13,7 +14,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
13
14
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
14
15
|
})) | undefined) => {
|
|
15
16
|
base: (slotProps?: ({
|
|
16
|
-
|
|
17
|
+
readOnly?: boolean | undefined;
|
|
18
|
+
invalid?: boolean | undefined;
|
|
17
19
|
hasContent?: boolean | undefined;
|
|
18
20
|
fullWidth?: boolean | undefined;
|
|
19
21
|
} & ({
|
|
@@ -24,7 +26,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
24
26
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
25
27
|
})) | undefined) => string;
|
|
26
28
|
cursor: (slotProps?: ({
|
|
27
|
-
|
|
29
|
+
readOnly?: boolean | undefined;
|
|
30
|
+
invalid?: boolean | undefined;
|
|
28
31
|
hasContent?: boolean | undefined;
|
|
29
32
|
fullWidth?: boolean | undefined;
|
|
30
33
|
} & ({
|
|
@@ -35,7 +38,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
35
38
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
36
39
|
})) | undefined) => string;
|
|
37
40
|
label: (slotProps?: ({
|
|
38
|
-
|
|
41
|
+
readOnly?: boolean | undefined;
|
|
42
|
+
invalid?: boolean | undefined;
|
|
39
43
|
hasContent?: boolean | undefined;
|
|
40
44
|
fullWidth?: boolean | undefined;
|
|
41
45
|
} & ({
|
|
@@ -46,7 +50,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
46
50
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
47
51
|
})) | undefined) => string;
|
|
48
52
|
tab: (slotProps?: ({
|
|
49
|
-
|
|
53
|
+
readOnly?: boolean | undefined;
|
|
54
|
+
invalid?: boolean | undefined;
|
|
50
55
|
hasContent?: boolean | undefined;
|
|
51
56
|
fullWidth?: boolean | undefined;
|
|
52
57
|
} & ({
|
|
@@ -57,7 +62,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
57
62
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
58
63
|
})) | undefined) => string;
|
|
59
64
|
tabBase: (slotProps?: ({
|
|
60
|
-
|
|
65
|
+
readOnly?: boolean | undefined;
|
|
66
|
+
invalid?: boolean | undefined;
|
|
61
67
|
hasContent?: boolean | undefined;
|
|
62
68
|
fullWidth?: boolean | undefined;
|
|
63
69
|
} & ({
|
|
@@ -68,7 +74,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
68
74
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
69
75
|
})) | undefined) => string;
|
|
70
76
|
tabContent: (slotProps?: ({
|
|
71
|
-
|
|
77
|
+
readOnly?: boolean | undefined;
|
|
78
|
+
invalid?: boolean | undefined;
|
|
72
79
|
hasContent?: boolean | undefined;
|
|
73
80
|
fullWidth?: boolean | undefined;
|
|
74
81
|
} & ({
|
|
@@ -79,7 +86,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
79
86
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
80
87
|
})) | undefined) => string;
|
|
81
88
|
tabList: (slotProps?: ({
|
|
82
|
-
|
|
89
|
+
readOnly?: boolean | undefined;
|
|
90
|
+
invalid?: boolean | undefined;
|
|
83
91
|
hasContent?: boolean | undefined;
|
|
84
92
|
fullWidth?: boolean | undefined;
|
|
85
93
|
} & ({
|
|
@@ -90,7 +98,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
90
98
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
91
99
|
})) | undefined) => string;
|
|
92
100
|
tabPanel: (slotProps?: ({
|
|
93
|
-
|
|
101
|
+
readOnly?: boolean | undefined;
|
|
102
|
+
invalid?: boolean | undefined;
|
|
94
103
|
hasContent?: boolean | undefined;
|
|
95
104
|
fullWidth?: boolean | undefined;
|
|
96
105
|
} & ({
|
|
@@ -101,7 +110,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
101
110
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
102
111
|
})) | undefined) => string;
|
|
103
112
|
tabWrapper: (slotProps?: ({
|
|
104
|
-
|
|
113
|
+
readOnly?: boolean | undefined;
|
|
114
|
+
invalid?: boolean | undefined;
|
|
105
115
|
hasContent?: boolean | undefined;
|
|
106
116
|
fullWidth?: boolean | undefined;
|
|
107
117
|
} & ({
|
|
@@ -112,7 +122,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
112
122
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
113
123
|
})) | undefined) => string;
|
|
114
124
|
wrapper: (slotProps?: ({
|
|
115
|
-
|
|
125
|
+
readOnly?: boolean | undefined;
|
|
126
|
+
invalid?: boolean | undefined;
|
|
116
127
|
hasContent?: boolean | undefined;
|
|
117
128
|
fullWidth?: boolean | undefined;
|
|
118
129
|
} & ({
|
|
@@ -124,7 +135,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
124
135
|
})) | undefined) => string;
|
|
125
136
|
} & {
|
|
126
137
|
base: (slotProps?: ({
|
|
127
|
-
|
|
138
|
+
readOnly?: boolean | undefined;
|
|
139
|
+
invalid?: boolean | undefined;
|
|
128
140
|
hasContent?: boolean | undefined;
|
|
129
141
|
fullWidth?: boolean | undefined;
|
|
130
142
|
} & ({
|
|
@@ -135,7 +147,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
135
147
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
136
148
|
})) | undefined) => string;
|
|
137
149
|
cursor: (slotProps?: ({
|
|
138
|
-
|
|
150
|
+
readOnly?: boolean | undefined;
|
|
151
|
+
invalid?: boolean | undefined;
|
|
139
152
|
hasContent?: boolean | undefined;
|
|
140
153
|
fullWidth?: boolean | undefined;
|
|
141
154
|
} & ({
|
|
@@ -146,7 +159,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
146
159
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
147
160
|
})) | undefined) => string;
|
|
148
161
|
label: (slotProps?: ({
|
|
149
|
-
|
|
162
|
+
readOnly?: boolean | undefined;
|
|
163
|
+
invalid?: boolean | undefined;
|
|
150
164
|
hasContent?: boolean | undefined;
|
|
151
165
|
fullWidth?: boolean | undefined;
|
|
152
166
|
} & ({
|
|
@@ -157,7 +171,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
157
171
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
158
172
|
})) | undefined) => string;
|
|
159
173
|
tab: (slotProps?: ({
|
|
160
|
-
|
|
174
|
+
readOnly?: boolean | undefined;
|
|
175
|
+
invalid?: boolean | undefined;
|
|
161
176
|
hasContent?: boolean | undefined;
|
|
162
177
|
fullWidth?: boolean | undefined;
|
|
163
178
|
} & ({
|
|
@@ -168,7 +183,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
168
183
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
169
184
|
})) | undefined) => string;
|
|
170
185
|
tabBase: (slotProps?: ({
|
|
171
|
-
|
|
186
|
+
readOnly?: boolean | undefined;
|
|
187
|
+
invalid?: boolean | undefined;
|
|
172
188
|
hasContent?: boolean | undefined;
|
|
173
189
|
fullWidth?: boolean | undefined;
|
|
174
190
|
} & ({
|
|
@@ -179,7 +195,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
179
195
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
180
196
|
})) | undefined) => string;
|
|
181
197
|
tabContent: (slotProps?: ({
|
|
182
|
-
|
|
198
|
+
readOnly?: boolean | undefined;
|
|
199
|
+
invalid?: boolean | undefined;
|
|
183
200
|
hasContent?: boolean | undefined;
|
|
184
201
|
fullWidth?: boolean | undefined;
|
|
185
202
|
} & ({
|
|
@@ -190,7 +207,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
190
207
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
191
208
|
})) | undefined) => string;
|
|
192
209
|
tabList: (slotProps?: ({
|
|
193
|
-
|
|
210
|
+
readOnly?: boolean | undefined;
|
|
211
|
+
invalid?: boolean | undefined;
|
|
194
212
|
hasContent?: boolean | undefined;
|
|
195
213
|
fullWidth?: boolean | undefined;
|
|
196
214
|
} & ({
|
|
@@ -201,7 +219,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
201
219
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
202
220
|
})) | undefined) => string;
|
|
203
221
|
tabPanel: (slotProps?: ({
|
|
204
|
-
|
|
222
|
+
readOnly?: boolean | undefined;
|
|
223
|
+
invalid?: boolean | undefined;
|
|
205
224
|
hasContent?: boolean | undefined;
|
|
206
225
|
fullWidth?: boolean | undefined;
|
|
207
226
|
} & ({
|
|
@@ -212,7 +231,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
212
231
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
213
232
|
})) | undefined) => string;
|
|
214
233
|
tabWrapper: (slotProps?: ({
|
|
215
|
-
|
|
234
|
+
readOnly?: boolean | undefined;
|
|
235
|
+
invalid?: boolean | undefined;
|
|
216
236
|
hasContent?: boolean | undefined;
|
|
217
237
|
fullWidth?: boolean | undefined;
|
|
218
238
|
} & ({
|
|
@@ -223,7 +243,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
223
243
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
224
244
|
})) | undefined) => string;
|
|
225
245
|
wrapper: (slotProps?: ({
|
|
226
|
-
|
|
246
|
+
readOnly?: boolean | undefined;
|
|
247
|
+
invalid?: boolean | undefined;
|
|
227
248
|
hasContent?: boolean | undefined;
|
|
228
249
|
fullWidth?: boolean | undefined;
|
|
229
250
|
} & ({
|
|
@@ -235,7 +256,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
235
256
|
})) | undefined) => string;
|
|
236
257
|
} & {}) & {
|
|
237
258
|
extend: ((props?: ({
|
|
238
|
-
|
|
259
|
+
readOnly?: boolean | undefined;
|
|
260
|
+
invalid?: boolean | undefined;
|
|
239
261
|
hasContent?: boolean | undefined;
|
|
240
262
|
fullWidth?: boolean | undefined;
|
|
241
263
|
} & ({
|
|
@@ -246,7 +268,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
246
268
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
247
269
|
})) | undefined) => {} & {
|
|
248
270
|
base: (slotProps?: ({
|
|
249
|
-
|
|
271
|
+
readOnly?: boolean | undefined;
|
|
272
|
+
invalid?: boolean | undefined;
|
|
250
273
|
hasContent?: boolean | undefined;
|
|
251
274
|
fullWidth?: boolean | undefined;
|
|
252
275
|
} & ({
|
|
@@ -257,7 +280,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
257
280
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
258
281
|
})) | undefined) => string;
|
|
259
282
|
cursor: (slotProps?: ({
|
|
260
|
-
|
|
283
|
+
readOnly?: boolean | undefined;
|
|
284
|
+
invalid?: boolean | undefined;
|
|
261
285
|
hasContent?: boolean | undefined;
|
|
262
286
|
fullWidth?: boolean | undefined;
|
|
263
287
|
} & ({
|
|
@@ -268,7 +292,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
268
292
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
269
293
|
})) | undefined) => string;
|
|
270
294
|
label: (slotProps?: ({
|
|
271
|
-
|
|
295
|
+
readOnly?: boolean | undefined;
|
|
296
|
+
invalid?: boolean | undefined;
|
|
272
297
|
hasContent?: boolean | undefined;
|
|
273
298
|
fullWidth?: boolean | undefined;
|
|
274
299
|
} & ({
|
|
@@ -279,7 +304,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
279
304
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
280
305
|
})) | undefined) => string;
|
|
281
306
|
tab: (slotProps?: ({
|
|
282
|
-
|
|
307
|
+
readOnly?: boolean | undefined;
|
|
308
|
+
invalid?: boolean | undefined;
|
|
283
309
|
hasContent?: boolean | undefined;
|
|
284
310
|
fullWidth?: boolean | undefined;
|
|
285
311
|
} & ({
|
|
@@ -290,7 +316,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
290
316
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
291
317
|
})) | undefined) => string;
|
|
292
318
|
tabBase: (slotProps?: ({
|
|
293
|
-
|
|
319
|
+
readOnly?: boolean | undefined;
|
|
320
|
+
invalid?: boolean | undefined;
|
|
294
321
|
hasContent?: boolean | undefined;
|
|
295
322
|
fullWidth?: boolean | undefined;
|
|
296
323
|
} & ({
|
|
@@ -301,7 +328,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
301
328
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
302
329
|
})) | undefined) => string;
|
|
303
330
|
tabContent: (slotProps?: ({
|
|
304
|
-
|
|
331
|
+
readOnly?: boolean | undefined;
|
|
332
|
+
invalid?: boolean | undefined;
|
|
305
333
|
hasContent?: boolean | undefined;
|
|
306
334
|
fullWidth?: boolean | undefined;
|
|
307
335
|
} & ({
|
|
@@ -312,7 +340,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
312
340
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
313
341
|
})) | undefined) => string;
|
|
314
342
|
tabList: (slotProps?: ({
|
|
315
|
-
|
|
343
|
+
readOnly?: boolean | undefined;
|
|
344
|
+
invalid?: boolean | undefined;
|
|
316
345
|
hasContent?: boolean | undefined;
|
|
317
346
|
fullWidth?: boolean | undefined;
|
|
318
347
|
} & ({
|
|
@@ -323,7 +352,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
323
352
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
324
353
|
})) | undefined) => string;
|
|
325
354
|
tabPanel: (slotProps?: ({
|
|
326
|
-
|
|
355
|
+
readOnly?: boolean | undefined;
|
|
356
|
+
invalid?: boolean | undefined;
|
|
327
357
|
hasContent?: boolean | undefined;
|
|
328
358
|
fullWidth?: boolean | undefined;
|
|
329
359
|
} & ({
|
|
@@ -334,7 +364,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
334
364
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
335
365
|
})) | undefined) => string;
|
|
336
366
|
tabWrapper: (slotProps?: ({
|
|
337
|
-
|
|
367
|
+
readOnly?: boolean | undefined;
|
|
368
|
+
invalid?: boolean | undefined;
|
|
338
369
|
hasContent?: boolean | undefined;
|
|
339
370
|
fullWidth?: boolean | undefined;
|
|
340
371
|
} & ({
|
|
@@ -345,7 +376,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
345
376
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
346
377
|
})) | undefined) => string;
|
|
347
378
|
wrapper: (slotProps?: ({
|
|
348
|
-
|
|
379
|
+
readOnly?: boolean | undefined;
|
|
380
|
+
invalid?: boolean | undefined;
|
|
349
381
|
hasContent?: boolean | undefined;
|
|
350
382
|
fullWidth?: boolean | undefined;
|
|
351
383
|
} & ({
|
|
@@ -383,19 +415,26 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
383
415
|
tabWrapper: string;
|
|
384
416
|
};
|
|
385
417
|
};
|
|
386
|
-
|
|
418
|
+
invalid: {
|
|
387
419
|
true: {
|
|
388
420
|
tabWrapper: string;
|
|
389
421
|
};
|
|
390
422
|
};
|
|
423
|
+
readOnly: {
|
|
424
|
+
true: {
|
|
425
|
+
base: string;
|
|
426
|
+
};
|
|
427
|
+
};
|
|
391
428
|
};
|
|
392
429
|
defaultVariants: {
|
|
393
|
-
|
|
430
|
+
readOnly?: boolean | undefined;
|
|
431
|
+
invalid?: boolean | undefined;
|
|
394
432
|
hasContent?: boolean | undefined;
|
|
395
433
|
fullWidth?: boolean | undefined;
|
|
396
434
|
};
|
|
397
435
|
compoundVariants: ({
|
|
398
|
-
|
|
436
|
+
readOnly?: boolean | boolean[] | undefined;
|
|
437
|
+
invalid?: boolean | boolean[] | undefined;
|
|
399
438
|
hasContent?: boolean | boolean[] | undefined;
|
|
400
439
|
fullWidth?: boolean | boolean[] | undefined;
|
|
401
440
|
} & ({
|
|
@@ -432,7 +471,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
432
471
|
} & ({
|
|
433
472
|
hasContent?: boolean | boolean[] | undefined;
|
|
434
473
|
fullWidth?: boolean | boolean[] | undefined;
|
|
435
|
-
|
|
474
|
+
invalid?: boolean | boolean[] | undefined;
|
|
475
|
+
readOnly?: boolean | boolean[] | undefined;
|
|
436
476
|
} & ({
|
|
437
477
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
438
478
|
className?: never;
|
|
@@ -440,7 +480,7 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
440
480
|
class?: never;
|
|
441
481
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
442
482
|
})))[];
|
|
443
|
-
variantKeys: ("
|
|
483
|
+
variantKeys: ("readOnly" | "invalid" | "hasContent" | "fullWidth")[];
|
|
444
484
|
};
|
|
445
485
|
base: undefined;
|
|
446
486
|
slots: {
|
|
@@ -468,19 +508,26 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
468
508
|
tabWrapper: string;
|
|
469
509
|
};
|
|
470
510
|
};
|
|
471
|
-
|
|
511
|
+
invalid: {
|
|
472
512
|
true: {
|
|
473
513
|
tabWrapper: string;
|
|
474
514
|
};
|
|
475
515
|
};
|
|
516
|
+
readOnly: {
|
|
517
|
+
true: {
|
|
518
|
+
base: string;
|
|
519
|
+
};
|
|
520
|
+
};
|
|
476
521
|
};
|
|
477
522
|
defaultVariants: {
|
|
478
|
-
|
|
523
|
+
readOnly?: boolean | undefined;
|
|
524
|
+
invalid?: boolean | undefined;
|
|
479
525
|
hasContent?: boolean | undefined;
|
|
480
526
|
fullWidth?: boolean | undefined;
|
|
481
527
|
};
|
|
482
528
|
compoundVariants: ({
|
|
483
|
-
|
|
529
|
+
readOnly?: boolean | boolean[] | undefined;
|
|
530
|
+
invalid?: boolean | boolean[] | undefined;
|
|
484
531
|
hasContent?: boolean | boolean[] | undefined;
|
|
485
532
|
fullWidth?: boolean | boolean[] | undefined;
|
|
486
533
|
} & ({
|
|
@@ -517,7 +564,8 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
517
564
|
} & ({
|
|
518
565
|
hasContent?: boolean | boolean[] | undefined;
|
|
519
566
|
fullWidth?: boolean | boolean[] | undefined;
|
|
520
|
-
|
|
567
|
+
invalid?: boolean | boolean[] | undefined;
|
|
568
|
+
readOnly?: boolean | boolean[] | undefined;
|
|
521
569
|
} & ({
|
|
522
570
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
523
571
|
className?: never;
|
|
@@ -525,7 +573,7 @@ export declare const radioTabsVariants: ((props?: ({
|
|
|
525
573
|
class?: never;
|
|
526
574
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
527
575
|
})))[];
|
|
528
|
-
variantKeys: ("
|
|
576
|
+
variantKeys: ("readOnly" | "invalid" | "hasContent" | "fullWidth")[];
|
|
529
577
|
};
|
|
530
578
|
type VariantProps = TVProps<typeof radioTabsVariants>;
|
|
531
579
|
type ClassName = TVClassName<typeof radioTabsVariants>;
|
|
@@ -543,7 +591,7 @@ interface RadioTabOption {
|
|
|
543
591
|
/** option value */
|
|
544
592
|
value: string | number | boolean;
|
|
545
593
|
}
|
|
546
|
-
interface RadioTabsProps extends Omit<VariantProps, 'hasContent'> {
|
|
594
|
+
interface RadioTabsProps extends Omit<VariantProps, 'hasContent' | 'invalid'> {
|
|
547
595
|
/** Custom aria-label for accessibility. If not provided, falls back to field name when no visible label exists */
|
|
548
596
|
ariaLabel?: string;
|
|
549
597
|
/** CSS class name */
|
|
@@ -560,6 +608,8 @@ interface RadioTabsProps extends Omit<VariantProps, 'hasContent'> {
|
|
|
560
608
|
name: string;
|
|
561
609
|
/** Radio button configuration. */
|
|
562
610
|
options: RadioTabOption[];
|
|
611
|
+
/** Prevents changes while keeping the tabs focusable and its value in validation and submission */
|
|
612
|
+
readOnly?: boolean;
|
|
563
613
|
/** Id to grab element in internal tests. */
|
|
564
614
|
testId?: string;
|
|
565
615
|
/** How the RadioTabs should look like. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/RadioTabs/RadioTabs.tsx"],"mappings":";;;qBAgBa,qBAAiB
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/RadioTabs/RadioTabs.tsx"],"mappings":";;;qBAgBa,qBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqDzB,eAAe,eAAe;KAC9B,YAAY,mBAAmB;UAEnB;;EAEf,UAAU;;EAEV;;EAEA,OAAO;;EAEP,QAAQ;;EAER;;EAEA;;UAGe,uBAAuB,KACtC;;EAIA;;EAEA,YAAY;;EAEZ;;EAEA;;EAEA;;EAEA,QAAQ;;EAER;;EAEA,SAAS;;EAET;;EAEA;;EAEA,UAAU;;;;;;cAON,cAAa,WAAA,WAAA,QAAA,MAAA,SAAA,YAAA,qBAQhB,mBAAiB"}
|