@xsolla/xui-radio 0.95.0 → 0.97.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.
Files changed (2) hide show
  1. package/README.md +39 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # @xsolla/xui-radio
2
+
3
+ Accessible radio button with label, description, and error state; integrates with RadioGroup.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ yarn add @xsolla/xui-radio
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { Radio } from '@xsolla/xui-radio';
15
+
16
+ <Radio
17
+ value="monthly"
18
+ checked={billing === 'monthly'}
19
+ label="Monthly billing"
20
+ description="Billed every month"
21
+ onPress={() => setBilling('monthly')}
22
+ />
23
+ ```
24
+
25
+ ## Props
26
+
27
+ ### Radio
28
+
29
+ | Prop | Type | Default | Description |
30
+ |------|------|---------|-------------|
31
+ | `checked` | `boolean` | `false` | Whether the radio button is selected |
32
+ | `value` | `string` | — | Value passed to the parent `RadioGroup` |
33
+ | `onPress` | `() => void` | — | Called when the radio button is activated |
34
+ | `label` | `string` | — | Label text displayed next to the button |
35
+ | `description` | `string` | — | Descriptive text shown below the label |
36
+ | `errorLabel` | `string` | — | Error message shown when `state` is `"error"` |
37
+ | `size` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` | Size of the control |
38
+ | `state` | `"default" \| "hover" \| "disable" \| "error"` | `"default"` | Visual state |
39
+ | `disabled` | `boolean` | `false` | Disables the control |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-radio",
3
- "version": "0.95.0",
3
+ "version": "0.97.0",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -13,8 +13,8 @@
13
13
  "test:coverage": "vitest run --coverage"
14
14
  },
15
15
  "dependencies": {
16
- "@xsolla/xui-core": "0.95.0",
17
- "@xsolla/xui-primitives-core": "0.95.0"
16
+ "@xsolla/xui-core": "0.97.0",
17
+ "@xsolla/xui-primitives-core": "0.97.0"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "react": ">=16.8.0",