UNPKG

its-just-ui

Version:

ITS Just UI - The easiest and best React UI component library. Modern, accessible, and customizable components built with TypeScript and Tailwind CSS. Simple to use, production-ready components for building beautiful user interfaces with ease.

127 lines (125 loc) 4.45 kB
import { default as React } from 'react'; export interface RadioGroupContextValue { value?: string; onChange?: (value: string) => void; disabled?: boolean; required?: boolean; loading?: boolean; variant?: RadioGroupVariant; size?: RadioGroupSize; status?: RadioGroupStatus; name?: string; } export type RadioGroupVariant = 'default' | 'filled' | 'outlined' | 'ghost' | 'card'; export type RadioGroupSize = 'sm' | 'md' | 'lg'; export type RadioGroupStatus = 'default' | 'success' | 'warning' | 'error'; export type RadioGroupOrientation = 'horizontal' | 'vertical'; export interface RadioGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> { value?: string; defaultValue?: string; onChange?: (value: string) => void; disabled?: boolean; required?: boolean; loading?: boolean; name?: string; variant?: RadioGroupVariant; size?: RadioGroupSize; status?: RadioGroupStatus; orientation?: RadioGroupOrientation; label?: React.ReactNode; helperText?: React.ReactNode; errorMessage?: string; emptyMessage?: string; transition?: 'none' | 'slide' | 'fade' | 'bounce' | 'smooth'; transitionDuration?: number; containerClassName?: string; containerStyle?: React.CSSProperties; backgroundColor?: string; borderWidth?: string; borderColor?: string; borderStyle?: string; borderRadius?: string; padding?: string; paddingX?: string; paddingY?: string; boxShadow?: string; gap?: string; groupBackgroundColor?: string; groupBorderWidth?: string; groupBorderColor?: string; groupBorderRadius?: string; groupPadding?: string; labelColor?: string; labelFontSize?: string; labelFontWeight?: string; labelFontFamily?: string; helperTextColor?: string; helperTextFontSize?: string; errorMessageColor?: string; focusRingColor?: string; focusRingWidth?: string; focusRingOffset?: string; focusBorderColor?: string; focusBackgroundColor?: string; focusBoxShadow?: string; renderLabel?: (required?: boolean) => React.ReactNode; renderOption?: (option: RadioOptionProps, isSelected: boolean, isDisabled?: boolean) => React.ReactNode; successColor?: string; warningColor?: string; errorColor?: string; children?: React.ReactNode; } export interface RadioOptionProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> { value: string; label?: React.ReactNode; description?: React.ReactNode; disabled?: boolean; icon?: React.ReactNode; checkedIcon?: React.ReactNode; optionBackgroundColor?: string; optionBorderColor?: string; optionBorderWidth?: string; optionBorderRadius?: string; optionPadding?: string; radioSize?: string; radioBackgroundColor?: string; radioBorderColor?: string; radioBorderWidth?: string; radioCheckedColor?: string; radioBoxShadow?: string; labelColor?: string; labelFontSize?: string; labelFontWeight?: string; descriptionColor?: string; descriptionFontSize?: string; focusRingColor?: string; focusRingWidth?: string; focusBackgroundColor?: string; hoverBackgroundColor?: string; hoverBorderColor?: string; children?: React.ReactNode; } export interface RadioGroupLabelProps { className?: string; style?: React.CSSProperties; required?: boolean; children: React.ReactNode; } export interface RadioGroupHelperTextProps { className?: string; style?: React.CSSProperties; id?: string; children: React.ReactNode; } export declare const useRadioGroupContext: () => RadioGroupContextValue; export declare const RadioGroupLabel: React.ForwardRefExoticComponent<RadioGroupLabelProps & React.RefAttributes<HTMLLabelElement>>; export declare const RadioGroupHelperText: React.ForwardRefExoticComponent<RadioGroupHelperTextProps & React.RefAttributes<HTMLDivElement>>; export declare const RadioOption: React.ForwardRefExoticComponent<RadioOptionProps & React.RefAttributes<HTMLInputElement>>; interface RadioGroupComponent extends React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>> { Option: typeof RadioOption; Label: typeof RadioGroupLabel; HelperText: typeof RadioGroupHelperText; } declare const RadioGroup: RadioGroupComponent; export { RadioGroup }; export default RadioGroup;