@xsolla/xui-progress-bar 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.
Files changed (2) hide show
  1. package/README.md +63 -0
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,6 +1,69 @@
1
1
  # ProgressBar
2
2
 
3
3
  A cross-platform React linear progress bar with optional label, status icon, helper text, and error state.
4
+ <!-- BEGIN:xui-mcp-instructions:progress-bar -->
5
+ A visual indicator that communicates how far along a process is. Displays a filled track proportional to the current value, with optional label, helper text, status icon, and icon pair. Supports three sizes and five semantic states including success and error.
6
+
7
+ ### When to use
8
+
9
+ To show progress of a long-running operation — file upload, form completion, onboarding steps, level progression
10
+ - When the user needs to understand how much work remains before a task finishes
11
+ - When communicating a measurable quantity against a known maximum (e.g. storage used, quiz score, achievement progress)
12
+ - When a process has a defined success or failure outcome that should be surfaced inline
13
+
14
+ ### When not to use
15
+
16
+ - For indeterminate loading (duration unknown) — use a Spinner or skeleton instead
17
+ - For binary on/off states — use a Toggle or Checkbox
18
+ - For navigation between steps
19
+ - When the value does not represent progress toward a goal — use a data visualisation chart instead
20
+
21
+ ### Content guidelines
22
+
23
+ Label — describe what is progressing, not the percentage. *"Uploading file"* not *"50% complete"*. The bar communicates the percentage visually.
24
+
25
+ Helper text — use a concrete format: *"1.2 GB of 5 GB"*, *"Step 3 of 8"*, *"12 seconds remaining"*. Avoid vague text like *"Loading…"* if a specific value is available.
26
+
27
+ Error helper text — be specific about what failed and what the user should do: *"Upload failed — file exceeds 50 MB limit"*, not *"Error"*.
28
+
29
+ Success helper text — confirm completion positively: *"Upload complete"*, *"All steps finished"*.
30
+
31
+ Label length — keep the label to a single line. If it wraps, shorten or move to a heading outside the component.
32
+
33
+ ### Behaviour guidelines
34
+
35
+ Value updates — the filled track should animate smoothly when the value changes. Use a CSS transition on width (left-to-right direction). Avoid abrupt jumps except on initial render.
36
+
37
+ Direction — progress always flows left to right in LTR layouts. Mirror to right-to-left in RTL contexts.
38
+
39
+ 0% state — when value is 0%, the indicator may be invisible or show a minimal visible stub (1–2px) so the user can perceive the track exists. Do not omit the track entirely.
40
+
41
+ 100% vs Success — reaching 100% fill does not automatically trigger the Success state. Switch to Percent=Success only after the process is confirmed complete on the backend. This prevents false positives during the final data transfer window.
42
+
43
+ Error state — switch to Percent=Error immediately when a failure is detected. The fill level at the point of failure should be preserved — do not reset to 0%. Pair with Helper text explaining the error and an action to recover (e.g. *"Retry"*).
44
+
45
+ Indeterminate — if the duration is unknown, do not use Progress bar. Use a Spinner or an animated skeleton instead. Do not fake progress by auto-incrementing the bar without real data.
46
+
47
+ Real-time updates — when progress is driven by a WebSocket or polling interval, throttle UI updates to no more than once every 100–200ms to avoid visual jitter on fast transfers.
48
+
49
+ Completion transition — after reaching Success, consider keeping the bar visible for 1–2 seconds before replacing it with final content. This gives users time to register the completed state.
50
+
51
+ Multiple bars — when showing several progress bars simultaneously (e.g. a file upload queue), keep all bars the same size and align them in a vertical list with consistent spacing.
52
+
53
+ ### Accessibility
54
+
55
+ The progress element must use role=*"progressbar"* with aria-valuenow, aria-valuemin=*"0"*, and aria-valuemax=*"100"*.
56
+
57
+ Provide aria-label or aria-labelledby pointing to the Label text so screen readers announce what is progressing.
58
+
59
+ Link the Helper text via aria-describedby so additional context (including error messages) is announced.
60
+
61
+ Enable Status-icon for terminal states (Success / Error) to communicate state through shape, not colour alone — this satisfies WCAG 1.4.1 (Use of Colour).
62
+
63
+ For Percent=Error, the error description in Helper text must be programmatically associated with the component so assistive technology surfaces it without the user needing to navigate separately.
64
+
65
+ When the value updates dynamically, use aria-live=*"polite"* on the helper text region so screen readers announce the change without interrupting current speech.
66
+ <!-- END:xui-mcp-instructions:progress-bar -->
4
67
 
5
68
  ## Installation
6
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-progress-bar",
3
- "version": "0.174.3",
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,9 +10,9 @@
10
10
  "build:native": "PLATFORM=native tsup"
11
11
  },
12
12
  "dependencies": {
13
- "@xsolla/xui-core": "0.174.3",
14
- "@xsolla/xui-icons": "0.174.3",
15
- "@xsolla/xui-primitives-core": "0.174.3"
13
+ "@xsolla/xui-core": "0.175.0",
14
+ "@xsolla/xui-icons": "0.175.0",
15
+ "@xsolla/xui-primitives-core": "0.175.0"
16
16
  },
17
17
  "peerDependencies": {
18
18
  "react": ">=16.8.0",