@xsolla/xui-status 0.174.3 → 0.176.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 +55 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,6 +2,61 @@
|
|
|
2
2
|
|
|
3
3
|
A cross-platform React status indicator that pairs a coloured dot with an optional inline label.
|
|
4
4
|
|
|
5
|
+
<!-- BEGIN:xui-mcp-instructions:status -->
|
|
6
|
+
Use to visually and textually label of transactions, purchases, etc.
|
|
7
|
+
|
|
8
|
+
### When to use
|
|
9
|
+
|
|
10
|
+
When you need to communicate the state or outcome of an item (transaction, payment, order, account, system health)
|
|
11
|
+
|
|
12
|
+
When a compact, color-coded indicator helps users quickly assess status in tables, lists, cards, or detail views
|
|
13
|
+
|
|
14
|
+
When the state maps to one of the defined palettes — Success, Warning, Alert, Neutral, or Default
|
|
15
|
+
|
|
16
|
+
### When not to use
|
|
17
|
+
|
|
18
|
+
When the element should trigger an action on click — use a Button or interactive Chip instead
|
|
19
|
+
- When you need to show a count or quantity — use a Badge or counter instead
|
|
20
|
+
- When the element represents a removable selection or filter — use a Tag instead
|
|
21
|
+
- When the meaning requires more than a short label — use regular descriptive text instead
|
|
22
|
+
|
|
23
|
+
### Content guidelines
|
|
24
|
+
|
|
25
|
+
Keep labels short — one or two words — and use the same vocabulary for the same state across the whole product.
|
|
26
|
+
|
|
27
|
+
Map each palette to a consistent meaning: Success for positive or completed states, Warning for states needing attention, Alert for failures or critical states, Neutral for inactive or muted states, and Default for a generic state.
|
|
28
|
+
|
|
29
|
+
Do not invent new color meanings or reuse a palette for an unrelated state.
|
|
30
|
+
|
|
31
|
+
Never let color carry the meaning by itself — always keep the text label, or, for the dot-only variant, provide an equivalent accessible name.
|
|
32
|
+
|
|
33
|
+
Use consistent casing for labels across all sizes and palettes.
|
|
34
|
+
|
|
35
|
+
### Behaviour guidelines
|
|
36
|
+
|
|
37
|
+
Status is display-only — it presents state and does not respond to clicks or hold interactive behavior.
|
|
38
|
+
|
|
39
|
+
Label: true shows the dot (or colored text) together with its label; Label: false shows the dot only, so use it only where context already makes the meaning obvious.
|
|
40
|
+
|
|
41
|
+
Label type — Primary colors the text itself in the palette color, while Dot color keeps the text neutral and carries the meaning through a colored dot; pick one approach and apply it consistently within a view.
|
|
42
|
+
|
|
43
|
+
Size — M [16], L [18], and S [14] scale the text and dot together; match the size to the surrounding content density.
|
|
44
|
+
|
|
45
|
+
Keep the palette set consistent within a single screen so the same color always means the same thing.
|
|
46
|
+
|
|
47
|
+
### Accessibility
|
|
48
|
+
|
|
49
|
+
Never rely on color alone to convey state — always pair it with text or an equivalent text alternative.
|
|
50
|
+
|
|
51
|
+
The dot-only variant (Label: false) must expose its meaning through an accessible label or tooltip, not just the dot color.
|
|
52
|
+
|
|
53
|
+
Ensure the text and dot meet contrast requirements against their background across every palette.
|
|
54
|
+
|
|
55
|
+
Use consistent, descriptive wording so the state is unambiguous when announced by a screen reader.
|
|
56
|
+
|
|
57
|
+
As a non-interactive element, Status should not be focusable; expose its meaning through its text content or accessible name instead.
|
|
58
|
+
<!-- END:xui-mcp-instructions:status -->
|
|
59
|
+
|
|
5
60
|
## Installation
|
|
6
61
|
|
|
7
62
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-status",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.176.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.176.0",
|
|
14
|
+
"@xsolla/xui-primitives-core": "0.176.0"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": ">=16.8.0",
|