@xsolla/xui-select 0.96.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-select
2
+
3
+ Single-value dropdown select input with optional search and configurable size/state.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ yarn add @xsolla/xui-select
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { Select } from '@xsolla/xui-select';
15
+
16
+ <Select
17
+ label="Country"
18
+ options={['Australia', 'Canada', 'United Kingdom']}
19
+ placeholder="Choose a country"
20
+ onChange={(value) => console.log(value)}
21
+ />
22
+ ```
23
+
24
+ ## Props
25
+
26
+ ### Select
27
+
28
+ | Prop | Type | Default | Description |
29
+ |------|------|---------|-------------|
30
+ | `options` | `(string \| SelectOption)[]` | `[]` | List of options to display in the dropdown |
31
+ | `value` | `string` | — | Currently selected value |
32
+ | `onChange` | `(value: string) => void` | — | Called when the selected value changes |
33
+ | `placeholder` | `string` | `"Select"` | Placeholder text when no value is selected |
34
+ | `label` | `string` | — | Label displayed above the control |
35
+ | `size` | `"xl" \| "lg" \| "md" \| "sm" \| "xs"` | `"md"` | Size of the control |
36
+ | `state` | `"default" \| "hover" \| "focus" \| "disable" \| "error"` | `"default"` | Visual state |
37
+ | `disabled` | `boolean` | `false` | Disables the control |
38
+ | `errorMessage` | `string` | — | Error message shown below the control |
39
+ | `searchable` | `boolean` | `false` | Enables filtering options by typing |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-select",
3
- "version": "0.96.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",
@@ -10,8 +10,8 @@
10
10
  "build:native": "PLATFORM=native tsup"
11
11
  },
12
12
  "dependencies": {
13
- "@xsolla/xui-core": "0.96.0",
14
- "@xsolla/xui-primitives-core": "0.96.0"
13
+ "@xsolla/xui-core": "0.97.0",
14
+ "@xsolla/xui-primitives-core": "0.97.0"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "react": ">=16.8.0",