UNPKG

@loke/ui

Version:
41 lines (40 loc) 2.42 kB
import { Primitive } from "@loke/ui/primitive"; import * as RovingFocusGroup from "@loke/ui/roving-focus"; import { type ComponentPropsWithoutRef } from "react"; import { Radio, RadioIndicator } from "./radio"; declare const createRadioGroupScope: import("@loke/ui/context").CreateScope; type RadioGroupContextValue = { name?: string; required: boolean; disabled: boolean; value: string | null; onValueChange(value: string): void; }; type RovingFocusGroupProps = ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>; type PrimitiveDivProps = ComponentPropsWithoutRef<typeof Primitive.div>; interface RadioGroupProps extends PrimitiveDivProps { defaultValue?: string; dir?: RovingFocusGroupProps["dir"]; disabled?: ComponentPropsWithoutRef<typeof Radio>["disabled"]; loop?: RovingFocusGroupProps["loop"]; name?: RadioGroupContextValue["name"]; onValueChange?: RadioGroupContextValue["onValueChange"]; orientation?: RovingFocusGroupProps["orientation"]; required?: ComponentPropsWithoutRef<typeof Radio>["required"]; value?: string | null; } declare const RadioGroup: import("react").ForwardRefExoticComponent<RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>; type RadioProps = ComponentPropsWithoutRef<typeof Radio>; interface RadioGroupItemProps extends Omit<RadioProps, "onCheck" | "name"> { value: string; } declare const RadioGroupItem: import("react").ForwardRefExoticComponent<RadioGroupItemProps & import("react").RefAttributes<HTMLButtonElement>>; type RadioIndicatorProps = ComponentPropsWithoutRef<typeof RadioIndicator>; interface RadioGroupIndicatorProps extends RadioIndicatorProps { } declare const RadioGroupIndicator: import("react").ForwardRefExoticComponent<RadioGroupIndicatorProps & import("react").RefAttributes<HTMLSpanElement>>; declare const Root: import("react").ForwardRefExoticComponent<RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>; declare const Item: import("react").ForwardRefExoticComponent<RadioGroupItemProps & import("react").RefAttributes<HTMLButtonElement>>; declare const Indicator: import("react").ForwardRefExoticComponent<RadioGroupIndicatorProps & import("react").RefAttributes<HTMLSpanElement>>; export { createRadioGroupScope, RadioGroup, RadioGroupItem, RadioGroupIndicator, Root, Item, Indicator, }; export type { RadioGroupProps, RadioGroupItemProps, RadioGroupIndicatorProps };