@xsolla/xui-slider 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 +41 -0
  2. package/package.json +4 -4
package/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # @xsolla/xui-slider
2
+
3
+ Slider component supporting single value and range modes with optional input fields and icons.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ yarn add @xsolla/xui-slider
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { Slider } from '@xsolla/xui-slider';
15
+
16
+ <Slider
17
+ value={volume}
18
+ min={0}
19
+ max={100}
20
+ onChange={setVolume}
21
+ showLabels
22
+ inputPosition="right"
23
+ />
24
+ ```
25
+
26
+ ## Props
27
+
28
+ ### Slider
29
+
30
+ | Prop | Type | Default | Description |
31
+ |------|------|---------|-------------|
32
+ | `value` | `number` | `0` | Controlled value (single mode) |
33
+ | `min` | `number` | `0` | Minimum bound of the slider |
34
+ | `max` | `number` | `100` | Maximum bound of the slider |
35
+ | `step` | `number` | `1` | Step increment |
36
+ | `onChange` | `(value: number) => void` | — | Called when value changes (single mode) |
37
+ | `range` | `boolean` | `false` | Enables two-thumb range mode |
38
+ | `size` | `'sm' \| 'md' \| 'lg' \| 'xl'` | `'md'` | Slider size |
39
+ | `disabled` | `boolean` | `false` | Disables interaction |
40
+ | `label` | `string` | — | Label displayed above the slider |
41
+ | `inputPosition` | `'left' \| 'right' \| 'both' \| 'none'` | `'none'` | Position of editable input field(s) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-slider",
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-input": "0.95.0",
18
- "@xsolla/xui-primitives-core": "0.95.0"
16
+ "@xsolla/xui-core": "0.97.0",
17
+ "@xsolla/xui-input": "0.97.0",
18
+ "@xsolla/xui-primitives-core": "0.97.0"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "react": ">=16.8.0",