@xsolla/xui-checkbox 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 +37 -0
  2. package/package.json +4 -4
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # @xsolla/xui-checkbox
2
+
3
+ Accessible checkbox control with indeterminate state, description, and error message.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ yarn add @xsolla/xui-checkbox
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { Checkbox } from '@xsolla/xui-checkbox';
15
+
16
+ <Checkbox
17
+ checked={agreed}
18
+ onChange={(e) => setAgreed(e.target.checked)}
19
+ >
20
+ I agree to the terms and conditions
21
+ </Checkbox>
22
+ ```
23
+
24
+ ## Props
25
+
26
+ ### Checkbox
27
+
28
+ | Prop | Type | Default | Description |
29
+ |------|------|---------|-------------|
30
+ | `checked` | `boolean` | — | Controlled checked state |
31
+ | `onChange` | `(e: { target: { checked: boolean } }) => void` | — | Called when the checked state changes |
32
+ | `indeterminate` | `boolean` | `false` | Renders a minus icon to indicate a partially selected state |
33
+ | `size` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` | Size of the control |
34
+ | `disabled` | `boolean` | — | Disables the control |
35
+ | `description` | `string` | — | Descriptive text shown below the label |
36
+ | `errorMessage` | `string` | — | Error message shown below the label (also marks control invalid) |
37
+ | `error` | `boolean` | — | Marks the control as invalid without a message |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-checkbox",
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,9 +13,9 @@
13
13
  "test:coverage": "vitest run --coverage"
14
14
  },
15
15
  "dependencies": {
16
- "@xsolla/xui-core": "0.95.0",
17
- "@xsolla/xui-icons": "0.95.0",
18
- "@xsolla/xui-primitives-core": "0.95.0"
16
+ "@xsolla/xui-core": "0.97.0",
17
+ "@xsolla/xui-icons": "0.97.0",
18
+ "@xsolla/xui-primitives-core": "0.97.0"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "react": ">=16.8.0",