@xsolla/xui-tag-label 0.189.2 → 0.190.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 +59 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -3,7 +3,65 @@
|
|
|
3
3
|
A specialised cross-platform identification and categorisation tag composed of optional segments — entity, subentity, ID, label, rarity, status, and a custom slot.
|
|
4
4
|
|
|
5
5
|
<!-- BEGIN:xui-mcp-instructions:tag-label -->
|
|
6
|
-
|
|
6
|
+
A composite identification label that encodes the full semantic identity of an entity in the Xsolla Archive — its type, sub-type, unique ID, name, rarity, and status — as a horizontal sequence of joined chip modules. Each module contains either text or an icon displayed on a single line with no line breaks. The modules are joined together with no gaps between them, forming a continuous visual strip. Each slot is independently shown or hidden depending on context.
|
|
7
|
+
|
|
8
|
+
TagLabel is part of Xsolla's Functional Labels system — a branded language for categorising and communicating the attributes of every unique object within the Xsolla Archive. Functional labels have standardised colour profiles for both Light mode and Dark mode; status symbols are shared between both profiles and do not change.
|
|
9
|
+
|
|
10
|
+
### When to use
|
|
11
|
+
- To identify a game item, product, or account entity with structured metadata in one line
|
|
12
|
+
- In admin panels, CMS interfaces, and back-office tools where operators work with entities across multiple entity types simultaneously
|
|
13
|
+
- In search results, filter outputs, and lookup fields where multiple entity attributes must be visible at once
|
|
14
|
+
- When the difference between entity types (Item vs Product vs Account) must be immediately scannable
|
|
15
|
+
|
|
16
|
+
### When not to use
|
|
17
|
+
- For simple status labels — use a Badge or StatusDropdown
|
|
18
|
+
- When only the entity name needs to be shown — use a plain text label
|
|
19
|
+
- For public-facing storefronts where internal entity taxonomy is not relevant to the end user
|
|
20
|
+
- When only one attribute needs to be communicated — use a single appropriate chip rather than a full TagLabel
|
|
21
|
+
|
|
22
|
+
### Brand context: Xsolla Archive
|
|
23
|
+
- Functional Labels are the visual language of the Xsolla Archive — the internal catalogue of all items, products, and accounts in the Xsolla platform. The three core pillars of the Archive are Items, Products, and Accounts. Every TagLabel begins with an icon that identifies which pillar the entity belongs to; subsequent modules provide pillar-specific information.
|
|
24
|
+
- The Archive narrative is reinforced by the visual presence of the ID module: even when other modules are removed for space reasons, the ID number is the most visually representative element of the brand's Archive identity and should be preserved wherever possible.
|
|
25
|
+
|
|
26
|
+
### Content guidelines
|
|
27
|
+
- Entity and Subentity labels — use the canonical taxonomy names exactly as defined in the system. Do not create custom entity or subentity labels — they must match the platform's entity model.
|
|
28
|
+
- ID chip — always show the full entity ID. Never abbreviate or truncate the ID value — it is the primary machine-readable identifier and must be copy-able.
|
|
29
|
+
- Name chip — use the entity's display name as stored in the system. If the name is very long, truncate with an ellipsis and show the full name in a tooltip.
|
|
30
|
+
- Rarity chip — the colour of the rarity icon is determined by the entity's rarity tier in the system. Do not override the colour manually.
|
|
31
|
+
- Custom slot — keep custom slot content to a single short value (a number, a price, a version string). Do not place multi-word labels in the custom slot.
|
|
32
|
+
|
|
33
|
+
### Behaviour guidelines
|
|
34
|
+
- Read-only by default — TagLabel is a display component. It has no interactive states (hover, press, focus). If a TagLabel must be clickable (e.g. to navigate to the entity's detail page), wrap it in a Link or a clickable container at the product level.
|
|
35
|
+
- Slot visibility — show only the slots that are relevant and available for the entity being displayed. Do not show a Rarity slot for an Account entity. Do not show a Status slot if the entity has no applicable status.
|
|
36
|
+
- ID format — the ID chip always displays the entity's unique identifier with the prefix format used by the system (e.g. x00000001). Do not display raw UUIDs directly — use the system-formatted ID.
|
|
37
|
+
- Custom slot usage — the custom slot at position ⑦ is for supplementary values that do not fit the standard taxonomy. Examples: a version number (v2.3), a price ($9.99), a quantity (×3), or an internal flag. Do not duplicate information already present in another slot.
|
|
38
|
+
- Compact view consistency — apply the same Compact view setting to all TagLabel instances in the same list, table, or card group. Mixing compact and full view labels in the same context breaks visual rhythm.
|
|
39
|
+
- Max width — the full-view TagLabel at its maximum slot configuration is ~403 px wide. Ensure the containing element has enough horizontal space. Do not truncate individual chip text — if space is tight, switch to Compact view=True.
|
|
40
|
+
- ID preservation — the ID module is the most brand-representative element of the Archive narrative. Even when other modules are removed for space reasons, keep the ID visible wherever possible. Remove it only as a last resort.
|
|
41
|
+
|
|
42
|
+
### Accessibility
|
|
43
|
+
- TagLabel as a whole is a read-only display element. The containing element must have an aria-label that summarises the entity for screen readers — e.g. aria-label=*"Item: Skin, ID x00000001, Dragon Scale, On sale"*.
|
|
44
|
+
- Individual sub-components are decorative within the TagLabel's context — do not expose them as separate focusable or announced elements. Use a single accessible description on the container.
|
|
45
|
+
- Rarity and Status icon chips must not rely on colour alone to communicate meaning (WCAG 1.4.1). Ensure each icon has a distinct shape in addition to colour. Provide a legend or tooltip in the surrounding UI.
|
|
46
|
+
- If the TagLabel is placed inside a clickable container (e.g. a table row that navigates to the entity detail page), the accessible name of the link or button must include the entity's key identifying information — typically the entity type + name + ID.
|
|
47
|
+
- In compact view, icon-only chips must have aria-label or title attributes describing the entity type and subentity type they represent.
|
|
48
|
+
|
|
49
|
+
### Platform brand guidelines
|
|
50
|
+
- Each platform has its own official badge usage rules. Key general requirements:
|
|
51
|
+
- Do not alter the badge colours, proportions, text, or logo
|
|
52
|
+
- Minimum size — most platforms specify a minimum badge height (commonly 40px, which corresponds to Size=S)
|
|
53
|
+
- Clear space — maintain a minimum clear space around the badge equal to the badge's height or a specified fixed padding (varies by platform)
|
|
54
|
+
- Background contrast — use Palette=Dark on light backgrounds and Palette=Light on dark backgrounds to meet contrast requirements
|
|
55
|
+
- Always check the official brand guidelines page for the specific platforms you are using, as requirements may be updated by the platform.
|
|
56
|
+
|
|
57
|
+
### Truncation
|
|
58
|
+
- The full set of modules should not — and often cannot — be displayed in every context. The visible content is adjusted to present the most relevant information for each application. There are three truncation strategies:
|
|
59
|
+
- Remove the Name module when the entity can be identified by its ID alone (e.g. in a system log or a data export). The ID is the unique machine-readable identifier and sufficient for lookup.
|
|
60
|
+
- Remove entire modules that are not relevant in the current context — for example, hiding the Subentity module in a filtered list where all entities share the same sub-type, or hiding Rarity for Product and Account entities where rarity is not applicable.
|
|
61
|
+
- Text box truncation (Compact view)
|
|
62
|
+
- Switch .tag-label-entity and .tag-label-subentity to icon-only mode (Compact view=True) when horizontal space is limited. The icon conveys the pillar and sub-type without text.
|
|
63
|
+
|
|
64
|
+
ID preservation — the ID module is the most visually representative element of the Archive narrative. Even when other modules are removed, try to keep the ID module visible in most applications. Remove it only as a last resort when space is critically constrained.
|
|
7
65
|
<!-- END:xui-mcp-instructions:tag-label -->
|
|
8
66
|
|
|
9
67
|
## Installation
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-tag-label",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.190.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.
|
|
14
|
-
"@xsolla/xui-icons": "0.
|
|
15
|
-
"@xsolla/xui-primitives-core": "0.
|
|
13
|
+
"@xsolla/xui-core": "0.190.0",
|
|
14
|
+
"@xsolla/xui-icons": "0.190.0",
|
|
15
|
+
"@xsolla/xui-primitives-core": "0.190.0"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"react": ">=16.8.0",
|