@xsolla/xui-checkbox-tag-group 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.
- package/README.md +47 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# @xsolla/xui-checkbox-tag-group
|
|
2
|
+
|
|
3
|
+
Multi-select tag group where each tag acts as a checkbox.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @xsolla/xui-checkbox-tag-group
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { CheckboxTagGroup } from '@xsolla/xui-checkbox-tag-group';
|
|
15
|
+
|
|
16
|
+
<CheckboxTagGroup
|
|
17
|
+
options={[
|
|
18
|
+
{ label: 'Action', value: 'action' },
|
|
19
|
+
{ label: 'RPG', value: 'rpg' },
|
|
20
|
+
{ label: 'Strategy', value: 'strategy' },
|
|
21
|
+
]}
|
|
22
|
+
value={selected}
|
|
23
|
+
onChange={setSelected}
|
|
24
|
+
/>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Props
|
|
28
|
+
|
|
29
|
+
### CheckboxTagGroup
|
|
30
|
+
|
|
31
|
+
| Prop | Type | Default | Description |
|
|
32
|
+
|------|------|---------|-------------|
|
|
33
|
+
| `options` | `CheckboxTagGroupItem[]` | — | Array of tag options (required) |
|
|
34
|
+
| `value` | `string[]` | — | Controlled selected values |
|
|
35
|
+
| `defaultValue` | `string[]` | `[]` | Initial selected values (uncontrolled) |
|
|
36
|
+
| `onChange` | `(values: string[]) => void` | — | Callback when selection changes |
|
|
37
|
+
| `size` | `'xl' \| 'lg' \| 'md' \| 'sm'` | `'md'` | Size variant |
|
|
38
|
+
| `disabled` | `boolean` | `false` | Disables all tags |
|
|
39
|
+
| `errorMessage` | `string` | — | Error message displayed below the group |
|
|
40
|
+
|
|
41
|
+
#### CheckboxTagGroupItem
|
|
42
|
+
|
|
43
|
+
| Field | Type | Description |
|
|
44
|
+
|-------|------|-------------|
|
|
45
|
+
| `label` | `string` | Display text |
|
|
46
|
+
| `value` | `string` | Unique value |
|
|
47
|
+
| `disabled` | `boolean` | Disables this tag individually |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-checkbox-tag-group",
|
|
3
|
-
"version": "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.
|
|
17
|
-
"@xsolla/xui-primitives-core": "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",
|