@xsolla/xui-tag-label 0.148.0-pr266.1777536173
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/native/index.d.mts +33 -0
- package/native/index.d.ts +33 -0
- package/native/index.js +642 -0
- package/native/index.js.map +1 -0
- package/native/index.mjs +612 -0
- package/native/index.mjs.map +1 -0
- package/package.json +50 -0
- package/web/index.d.mts +33 -0
- package/web/index.d.ts +33 -0
- package/web/index.js +684 -0
- package/web/index.js.map +1 -0
- package/web/index.mjs +647 -0
- package/web/index.mjs.map +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @xsolla/xui-tag-label
|
|
2
|
+
|
|
3
|
+
A specialized identification and categorization component for the Xsolla brand.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn add @xsolla/xui-tag-label
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { TagLabel } from "@xsolla/xui-tag-label";
|
|
15
|
+
|
|
16
|
+
const MyComponent = () => (
|
|
17
|
+
<TagLabel
|
|
18
|
+
entityType="item"
|
|
19
|
+
subentityType="skin"
|
|
20
|
+
series="XLA"
|
|
21
|
+
number="-001-001"
|
|
22
|
+
name="Backpack item"
|
|
23
|
+
status="sale"
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Props
|
|
29
|
+
|
|
30
|
+
| Prop | Type | Description |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| `entityType` | `'item' \| 'product' | 'account'` | Main category of the item. |
|
|
33
|
+
| `subentityType` | `SubentityType` | Detailed sub-category (e.g., 'skin', 'game', 'sdk'). |
|
|
34
|
+
| `series` | `string` | ID series prefix (e.g., 'XLA'). |
|
|
35
|
+
| `number` | `string` | ID number suffix (e.g., '-001-001'). |
|
|
36
|
+
| `name` | `string` | Name of the item. |
|
|
37
|
+
| `status` | `'sale' \| 'maintenance' \| 'inactive'` | Visual status indicator. |
|
|
38
|
+
| `compact` | `boolean` | Whether to show the simplified, icon-only version. |
|
|
39
|
+
| `icon` | `ReactNode` | Custom icon override for the entity segment. |
|
|
40
|
+
| `rarity` | `ReactNode` | Rarity icon or indicator. |
|
|
41
|
+
| `children` | `ReactNode` | Custom content for the tailing slot. |
|
|
42
|
+
| `themeMode` | `'light' \| 'dark' ...` | Theme mode override. |
|
|
43
|
+
| `themeProductContext` | `ProductContext` | Product context override. |
|
|
44
|
+
|
|
45
|
+
## Anatomy
|
|
46
|
+
|
|
47
|
+
The `TagLabel` is composed of multiple optional segments:
|
|
48
|
+
|
|
49
|
+
1. **Entity**: Primary categorization (colored background + icon + label).
|
|
50
|
+
2. **Subentity**: Secondary categorization (icon + label).
|
|
51
|
+
3. **ID**: Unique identification (Series + Number).
|
|
52
|
+
4. **Name**: Descriptive text.
|
|
53
|
+
5. **Rarity**: Status/rarity icon.
|
|
54
|
+
6. **Status**: Operational status icon.
|
|
55
|
+
7. **Custom Slot**: Additional flexible content.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ThemeOverrideProps } from '@xsolla/xui-core';
|
|
3
|
+
|
|
4
|
+
type EntityType = "item" | "product" | "account";
|
|
5
|
+
type StatusType = "sale" | "maintenance" | "inactive";
|
|
6
|
+
type SubentityType = "skin" | "in-game-item" | "currency" | "bundle" | "lootbox" | "game-key" | "discount" | "coupon" | "game" | "sdk" | "plugin" | "api" | "service" | "tool" | "webshop" | "app" | "launcher" | "library" | "engine" | "user" | "developer" | "influencer" | "publisher" | "settings";
|
|
7
|
+
interface TagLabelProps extends ThemeOverrideProps {
|
|
8
|
+
/** Main entity type */
|
|
9
|
+
entityType?: EntityType;
|
|
10
|
+
/** Detailed sub-category */
|
|
11
|
+
subentityType?: SubentityType;
|
|
12
|
+
/** Custom icon for entity/subentity if needed */
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
/** ID series (e.g. "XLA") */
|
|
15
|
+
series?: string;
|
|
16
|
+
/** ID number (e.g. "-001-001") */
|
|
17
|
+
number?: string;
|
|
18
|
+
/** Item label/name */
|
|
19
|
+
label?: string;
|
|
20
|
+
/** Rarity icon or indicator */
|
|
21
|
+
rarity?: ReactNode;
|
|
22
|
+
/** Status indicator */
|
|
23
|
+
status?: StatusType;
|
|
24
|
+
/** Whether to show the compact version */
|
|
25
|
+
compact?: boolean;
|
|
26
|
+
/** Custom content slot */
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
/** Custom styles */
|
|
29
|
+
style?: any;
|
|
30
|
+
}
|
|
31
|
+
declare const TagLabel: React.FC<TagLabelProps>;
|
|
32
|
+
|
|
33
|
+
export { type EntityType, type StatusType, type SubentityType, TagLabel, type TagLabelProps };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { ThemeOverrideProps } from '@xsolla/xui-core';
|
|
3
|
+
|
|
4
|
+
type EntityType = "item" | "product" | "account";
|
|
5
|
+
type StatusType = "sale" | "maintenance" | "inactive";
|
|
6
|
+
type SubentityType = "skin" | "in-game-item" | "currency" | "bundle" | "lootbox" | "game-key" | "discount" | "coupon" | "game" | "sdk" | "plugin" | "api" | "service" | "tool" | "webshop" | "app" | "launcher" | "library" | "engine" | "user" | "developer" | "influencer" | "publisher" | "settings";
|
|
7
|
+
interface TagLabelProps extends ThemeOverrideProps {
|
|
8
|
+
/** Main entity type */
|
|
9
|
+
entityType?: EntityType;
|
|
10
|
+
/** Detailed sub-category */
|
|
11
|
+
subentityType?: SubentityType;
|
|
12
|
+
/** Custom icon for entity/subentity if needed */
|
|
13
|
+
icon?: ReactNode;
|
|
14
|
+
/** ID series (e.g. "XLA") */
|
|
15
|
+
series?: string;
|
|
16
|
+
/** ID number (e.g. "-001-001") */
|
|
17
|
+
number?: string;
|
|
18
|
+
/** Item label/name */
|
|
19
|
+
label?: string;
|
|
20
|
+
/** Rarity icon or indicator */
|
|
21
|
+
rarity?: ReactNode;
|
|
22
|
+
/** Status indicator */
|
|
23
|
+
status?: StatusType;
|
|
24
|
+
/** Whether to show the compact version */
|
|
25
|
+
compact?: boolean;
|
|
26
|
+
/** Custom content slot */
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
/** Custom styles */
|
|
29
|
+
style?: any;
|
|
30
|
+
}
|
|
31
|
+
declare const TagLabel: React.FC<TagLabelProps>;
|
|
32
|
+
|
|
33
|
+
export { type EntityType, type StatusType, type SubentityType, TagLabel, type TagLabelProps };
|