seam-react 0.12.0 → 0.12.1
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/RadioGroup.d.ts +41 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3329 -3122
- package/dist/index.js.map +1 -1
- package/dist/styles.cjs +111 -0
- package/dist/styles.cjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.js +111 -0
- package/dist/styles.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type HTMLAttributes, type InputHTMLAttributes, type ReactElement, type ReactNode } from "react";
|
|
2
|
+
export type RadioGroupOrientation = "horizontal" | "vertical";
|
|
3
|
+
export interface RadioGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue" | "onChange" | "children"> {
|
|
4
|
+
/** Controlled selected value. */
|
|
5
|
+
value?: string;
|
|
6
|
+
/** Initial selected value for an uncontrolled group. */
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
/** Called with the newly selected value. */
|
|
9
|
+
onValueChange?: (value: string) => void;
|
|
10
|
+
/** Layout direction. Defaults to "vertical". */
|
|
11
|
+
orientation?: RadioGroupOrientation;
|
|
12
|
+
/** RadioGroupItem children. */
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
/** Merged onto the group root. */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Accessible name when no visible external label exists. */
|
|
17
|
+
"aria-label"?: string;
|
|
18
|
+
/** ID of an external element that labels the group. */
|
|
19
|
+
"aria-labelledby"?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface RadioGroupItemProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "value" | "checked" | "defaultChecked" | "children" | "className" | "size"> {
|
|
22
|
+
/** Value submitted and returned when this item is selected. */
|
|
23
|
+
value: string;
|
|
24
|
+
/** Visible option label. */
|
|
25
|
+
label: ReactNode;
|
|
26
|
+
/** Optional supporting text displayed below the label. */
|
|
27
|
+
description?: ReactNode;
|
|
28
|
+
/** Prevents focus and selection through the native disabled input. */
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/** Merged onto the outer item wrapper, not the native input. */
|
|
31
|
+
className?: string;
|
|
32
|
+
/** Optional stable native input ID. */
|
|
33
|
+
id?: string;
|
|
34
|
+
}
|
|
35
|
+
declare function RadioGroupRoot({ value, defaultValue, onValueChange, orientation, children, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...rest }: RadioGroupProps): ReactElement;
|
|
36
|
+
declare const RadioGroupItem: import("react").ForwardRefExoticComponent<RadioGroupItemProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
37
|
+
export declare const RadioGroup: typeof RadioGroupRoot & {
|
|
38
|
+
Item: import("react").ForwardRefExoticComponent<RadioGroupItemProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
39
|
+
};
|
|
40
|
+
export { RadioGroupItem };
|
|
41
|
+
export type RadioGroupComponent = typeof RadioGroup;
|