@xsolla/xui-progress-line 0.174.3 → 0.175.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 +51 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,57 @@
|
|
|
1
1
|
# Progress Line
|
|
2
2
|
|
|
3
3
|
A cross-platform React linear progress bar component for displaying completion status horizontally.
|
|
4
|
+
<!-- BEGIN:xui-mcp-instructions:progress-line -->
|
|
5
|
+
A thin, full-width track that communicates progress or a semantic state through fill and colour alone. Unlike Progress bar, it has no label, helper text, or icon slots — it is a purely visual indicator intended to be embedded as a decorative-functional element within other components or layout regions.
|
|
6
|
+
|
|
7
|
+
### When to use
|
|
8
|
+
|
|
9
|
+
As an inline loading indicator at the top of a card, modal, panel, or page section
|
|
10
|
+
|
|
11
|
+
Inside a multi-step flow to show how far the user has progressed without occupying vertical space
|
|
12
|
+
|
|
13
|
+
As a thin status stripe on a list item, table row, or media element (e.g. a video player scrubber base)
|
|
14
|
+
|
|
15
|
+
When the surrounding context already provides enough label information and a second text element would be redundant
|
|
16
|
+
|
|
17
|
+
### When not to use
|
|
18
|
+
|
|
19
|
+
When the user needs to understand the exact percentage or a numeric value — use Progress bar with Helper text instead
|
|
20
|
+
|
|
21
|
+
When the progress state needs an explanation (e.g. an error message) — use Progress bar with Label and Helper text
|
|
22
|
+
- For indeterminate loading — use a Spinner or animated skeleton
|
|
23
|
+
- As a standalone component on a page without any surrounding context — Progress line has no self-describing elements and will be meaningless without nearby copy
|
|
24
|
+
|
|
25
|
+
### Behaviour guidelines
|
|
26
|
+
|
|
27
|
+
Value as width — the indicator width maps directly to the progress percentage (0–100%). At 0% the track appears empty; at 100% the indicator fills the track completely.
|
|
28
|
+
|
|
29
|
+
Animation — animate the indicator width with a smooth CSS width transition when the value updates. Do not use instant jumps between values unless the component is being initialised.
|
|
30
|
+
|
|
31
|
+
State transitions — switch to State=Success only after backend confirmation of completion, not when the fill reaches 100%. Switch to State=Error immediately on failure and freeze the fill at its current width — do not reset to 0%.
|
|
32
|
+
|
|
33
|
+
Direction — the indicator always grows left to right in LTR. Mirror to right-to-left in RTL layouts using CSS logical properties or a transform.
|
|
34
|
+
|
|
35
|
+
Container width — Progress line always stretches to 100% of its parent container. Never set a fixed width on the component itself; control width by constraining the parent.
|
|
36
|
+
|
|
37
|
+
Stacking — when multiple Progress lines appear in a list (e.g. a file upload queue), align them to the same horizontal grid and use consistent size and spacing. Each line should map to exactly one process.
|
|
38
|
+
|
|
39
|
+
Indeterminate state — if the duration is unknown, do not use Progress line with a faked fill. Apply a looping animation (e.g. a sliding gradient or a bouncing indicator) as an indeterminate variant, or substitute a Spinner.
|
|
40
|
+
|
|
41
|
+
Completion hold — after transitioning to State=Success, keep the line visible for at least 600–800ms before removing or replacing it so users can register the completed state.
|
|
42
|
+
|
|
43
|
+
### Accessibility
|
|
44
|
+
|
|
45
|
+
Use role=*"progressbar"* with aria-valuenow, aria-valuemin=*"0"*, and aria-valuemax=*"100"* on the track element.
|
|
46
|
+
|
|
47
|
+
Always provide aria-label or aria-labelledby that describes what is progressing — for example, aria-label=*"File upload progress"*. Without this, screen readers cannot announce the purpose of the bar.
|
|
48
|
+
|
|
49
|
+
When State=Error is applied, pair the component with a visible error message nearby (outside the component) and link it via aria-describedby. Progress line itself has no error text slot.
|
|
50
|
+
|
|
51
|
+
For State=Success and State=Error transitions, use aria-live=*"polite"* on a nearby text region so the state change is announced to assistive technology without forcing the user to navigate to the component.
|
|
52
|
+
|
|
53
|
+
Do not rely on colour alone to communicate State — the track is too thin to show an icon. Always pair state changes with a text or icon announcement in the surrounding layout.
|
|
54
|
+
<!-- END:xui-mcp-instructions:progress-line -->
|
|
4
55
|
|
|
5
56
|
## Installation
|
|
6
57
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-progress-line",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.175.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.
|
|
14
|
-
"@xsolla/xui-primitives-core": "0.
|
|
13
|
+
"@xsolla/xui-core": "0.175.0",
|
|
14
|
+
"@xsolla/xui-primitives-core": "0.175.0"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": ">=16.8.0",
|