@startupjs-ui/radio 0.2.0 → 0.3.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/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.3.1](https://github.com/startupjs/startupjs-ui/compare/v0.3.0...v0.3.1) (2026-06-08)
7
+
8
+ **Note:** Version bump only for package @startupjs-ui/radio
9
+
10
+
11
+
12
+
13
+
14
+ # [0.3.0](https://github.com/startupjs/startupjs-ui/compare/v0.2.3...v0.3.0) (2026-05-27)
15
+
16
+
17
+ ### Features
18
+
19
+ * [BREAKING] [0.3] improve accessibility props for E2E tests. Support testID everywhere ([#31](https://github.com/startupjs/startupjs-ui/issues/31)) ([882588c](https://github.com/startupjs/startupjs-ui/commit/882588ca37d5e1fd14b5717b5697cf9ed47042e4))
20
+
21
+
22
+
23
+
24
+
6
25
  # [0.2.0](https://github.com/startupjs/startupjs-ui/compare/v0.1.23...v0.2.0) (2026-05-04)
7
26
 
8
27
 
package/index.d.ts CHANGED
@@ -26,4 +26,6 @@ export interface RadioProps {
26
26
  onChange?: (value: any) => void;
27
27
  /** Error flag @private */
28
28
  _hasError?: boolean;
29
+ /** Additional props forwarded to the radio group */
30
+ [key: string]: any;
29
31
  }
package/index.tsx CHANGED
@@ -35,6 +35,8 @@ export interface RadioProps {
35
35
  onChange?: (value: any) => void
36
36
  /** Error flag @private */
37
37
  _hasError?: boolean
38
+ /** Additional props forwarded to the radio group */
39
+ [key: string]: any
38
40
  }
39
41
 
40
42
  function Radio ({
@@ -45,11 +47,18 @@ function Radio ({
45
47
  row = false,
46
48
  disabled = false,
47
49
  readonly = false,
50
+ onChange,
48
51
  _hasError,
49
52
  ...props
50
53
  }: RadioProps): ReactNode {
51
54
  return pug`
52
- Div.root(style=style styleName={ row })
55
+ Div.root(
56
+ ...props
57
+ style=style
58
+ styleName={ row }
59
+ role='radiogroup'
60
+ aria-disabled=disabled || readonly
61
+ )
53
62
  each option, index in options
54
63
  - const optionValue = stringifyValue(option)
55
64
  - const checked = optionValue === stringifyValue(value)
@@ -65,7 +74,7 @@ function Radio ({
65
74
  error=error
66
75
  disabled=disabled
67
76
  readonly=readonly
68
- ...props
77
+ onChange=onChange
69
78
  )= getOptionLabel(option)
70
79
  `
71
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startupjs-ui/radio",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -8,14 +8,14 @@
8
8
  "types": "index.d.ts",
9
9
  "type": "module",
10
10
  "dependencies": {
11
- "@startupjs-ui/core": "^0.2.0",
12
- "@startupjs-ui/div": "^0.2.0",
13
- "@startupjs-ui/span": "^0.2.0"
11
+ "@startupjs-ui/core": "^0.3.0",
12
+ "@startupjs-ui/div": "^0.3.1",
13
+ "@startupjs-ui/span": "^0.3.1"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "react": "*",
17
17
  "react-native": "*",
18
18
  "startupjs": "*"
19
19
  },
20
- "gitHead": "0c586b841cba1c9d820542f6eca07470f5ea2659"
20
+ "gitHead": "60311773bdc83f354c797a272774304502d28c58"
21
21
  }