@xsolla/xui-progress-line 0.99.0 → 0.100.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 +68 -9
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,27 +1,86 @@
1
- # @xsolla/xui-progress-line
1
+ ---
2
+ title: Progress Line
3
+ subtitle: A linear progress indicator.
4
+ description: A cross-platform React linear progress bar component for displaying completion status.
5
+ ---
2
6
 
3
- Minimal horizontal progress line indicator with size and state variants.
7
+ # Progress Line
8
+
9
+ A cross-platform React linear progress bar component for displaying completion status horizontally.
4
10
 
5
11
  ## Installation
6
12
 
7
13
  ```bash
14
+ npm install @xsolla/xui-progress-line
15
+ # or
8
16
  yarn add @xsolla/xui-progress-line
9
17
  ```
10
18
 
11
- ## Usage
19
+ ## Demo
20
+
21
+ ### Basic Progress Line
22
+
23
+ ```tsx
24
+ import * as React from 'react';
25
+ import { ProgressLine } from '@xsolla/xui-progress-line';
26
+
27
+ export default function BasicProgressLine() {
28
+ return <ProgressLine value={75} />;
29
+ }
30
+ ```
31
+
32
+ ### Progress Line Sizes
12
33
 
13
34
  ```tsx
35
+ import * as React from 'react';
14
36
  import { ProgressLine } from '@xsolla/xui-progress-line';
15
37
 
16
- <ProgressLine percent={75} size="md" state="default" />
38
+ export default function ProgressLineSizes() {
39
+ return (
40
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
41
+ <ProgressLine value={60} size="sm" />
42
+ <ProgressLine value={60} size="md" />
43
+ <ProgressLine value={60} size="lg" />
44
+ </div>
45
+ );
46
+ }
17
47
  ```
18
48
 
19
- ## Props
49
+ ### With Label
50
+
51
+ ```tsx
52
+ import * as React from 'react';
53
+ import { ProgressLine } from '@xsolla/xui-progress-line';
54
+
55
+ export default function ProgressLineWithLabel() {
56
+ const [progress, setProgress] = React.useState(45);
57
+
58
+ return (
59
+ <div>
60
+ <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 8 }}>
61
+ <span>Uploading...</span>
62
+ <span>{progress}%</span>
63
+ </div>
64
+ <ProgressLine value={progress} />
65
+ </div>
66
+ );
67
+ }
68
+ ```
69
+
70
+ ## API Reference
20
71
 
21
72
  ### ProgressLine
22
73
 
74
+ **ProgressLine Props:**
75
+
23
76
  | Prop | Type | Default | Description |
24
- |------|------|---------|-------------|
25
- | `percent` | `number` | `0` | Progress value from 0 to 100 |
26
- | `size` | `"sm" \| "md" \| "lg"` | `"md"` | Height of the progress line |
27
- | `state` | `"default" \| "success" \| "error"` | `"default"` | Colour of the filled portion |
77
+ | :--- | :--- | :------ | :---------- |
78
+ | value | `number` | `0` | Progress value (0-100). |
79
+ | size | `"sm" \| "md" \| "lg"` | `"md"` | Height of the progress line. |
80
+
81
+ ## Theming
82
+
83
+ ```typescript
84
+ theme.colors.background.brand.primary // Progress fill color
85
+ theme.colors.background.secondary // Track color
86
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-progress-line",
3
- "version": "0.99.0",
3
+ "version": "0.100.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.99.0",
14
- "@xsolla/xui-primitives-core": "0.99.0"
13
+ "@xsolla/xui-core": "0.100.0",
14
+ "@xsolla/xui-primitives-core": "0.100.0"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "react": ">=16.8.0",