@ladder-ui/radio-group 0.6.0 → 0.7.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.
@@ -19,8 +19,20 @@ declare const radioGroupItemVariants: (props?: (import("packages/core/dist/cva")
19
19
  className?: string;
20
20
  }) | undefined) => string;
21
21
  export interface RadioGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, "defaultValue">, UseRadioGroupProps {
22
+ /** React 19 ref — points to the root `<div>` element. */
22
23
  ref?: Ref<HTMLDivElement>;
23
24
  children?: ReactNode;
25
+ /** Controlled selected value. */
26
+ value?: string;
27
+ /** Initial selected value for uncontrolled usage. */
28
+ defaultValue?: string;
29
+ /** Callback fired when the selected value changes. */
30
+ onValueChange?: (value: string) => void;
31
+ /** Shared `name` attribute forwarded to all radio inputs — required for native form submission. */
32
+ name?: string;
33
+ /** Disables all radio items in the group. @default false */
34
+ disabled?: boolean;
35
+ /** Layout direction of the radio items. @default "vertical" */
24
36
  orientation?: "vertical" | "horizontal";
25
37
  }
26
38
  export declare function RadioGroup({ ref, children, className, value, defaultValue, onValueChange, name, disabled, orientation, ...props }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
@@ -28,9 +40,13 @@ export declare namespace RadioGroup {
28
40
  var displayName: string;
29
41
  }
30
42
  export interface RadioGroupItemProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type" | "value">, VariantProps<typeof radioGroupItemVariants> {
43
+ /** React 19 ref — points to the native `<input type="radio">` element. */
31
44
  ref?: Ref<HTMLInputElement>;
45
+ /** Value submitted with the form when this item is selected. */
32
46
  value: string;
47
+ /** Size of the radio control. @default "md" */
33
48
  size?: "sm" | "md" | "lg";
49
+ /** Visual validation state — `"error"` highlights the control in red. @default "default" */
34
50
  status?: "default" | "error";
35
51
  }
36
52
  export declare function RadioGroupItem({ ref, className, value, size, status, disabled, ...props }: RadioGroupItemProps): import("react/jsx-runtime").JSX.Element | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ladder-ui/radio-group",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -49,7 +49,7 @@
49
49
  "sass": "^1.90.0",
50
50
  "tslib": "^2.6.2",
51
51
  "typescript": "^5.3.3",
52
- "@ladder-ui/core": "0.6.0"
52
+ "@ladder-ui/core": "0.7.0"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@ladder-ui/core": ">=0.0.0",
@@ -59,8 +59,8 @@
59
59
  "**/*.css"
60
60
  ],
61
61
  "dependencies": {
62
- "@ladder-ui/layout": "^0.6.0",
63
- "@ladder-ui/primitives": "^0.6.0"
62
+ "@ladder-ui/layout": "^0.7.0",
63
+ "@ladder-ui/primitives": "^0.7.0"
64
64
  },
65
65
  "scripts": {
66
66
  "build": "pnpm clean && rollup -c",