@xsolla/xui-icons-product 0.141.0 → 0.141.1

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/package.json +1 -1
  2. package/README.md +0 -270
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-icons-product",
3
- "version": "0.141.0",
3
+ "version": "0.141.1",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
package/README.md DELETED
@@ -1,270 +0,0 @@
1
- # Icons Product
2
-
3
- A cross-platform React product icons package containing Xsolla product and service symbols for use in dashboards, documentation, and marketing materials.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install @xsolla/xui-icons-product
9
- # or
10
- yarn add @xsolla/xui-icons-product
11
- ```
12
-
13
- ## Demo
14
-
15
- ### All Product Icons
16
-
17
- ```tsx
18
- import * as React from 'react';
19
- import {
20
- PayStation,
21
- Login,
22
- InGameStore,
23
- Launcher,
24
- } from '@xsolla/xui-icons-product';
25
-
26
- export default function AllProducts() {
27
- return (
28
- <div style={{ display: 'flex', gap: 16 }}>
29
- <PayStation size={32} />
30
- <Login size={32} />
31
- <InGameStore size={32} />
32
- <Launcher size={32} />
33
- </div>
34
- );
35
- }
36
- ```
37
-
38
- ### Different Sizes
39
-
40
- ```tsx
41
- import * as React from 'react';
42
- import { PayStation } from '@xsolla/xui-icons-product';
43
-
44
- export default function Sizes() {
45
- return (
46
- <div style={{ display: 'flex', alignItems: 'center', gap: 16 }}>
47
- <PayStation size={24} />
48
- <PayStation size={32} />
49
- <PayStation size={48} />
50
- <PayStation size={64} />
51
- </div>
52
- );
53
- }
54
- ```
55
-
56
- ### With Custom Color
57
-
58
- ```tsx
59
- import * as React from 'react';
60
- import { Login, InGameStore } from '@xsolla/xui-icons-product';
61
-
62
- export default function CustomColor() {
63
- return (
64
- <div style={{ display: 'flex', gap: 16 }}>
65
- <Login size={32} color="#6366F1" />
66
- <InGameStore size={32} color="#10B981" />
67
- </div>
68
- );
69
- }
70
- ```
71
-
72
- ## Anatomy
73
-
74
- ```jsx
75
- import { PayStation } from '@xsolla/xui-icons-product';
76
-
77
- <PayStation
78
- size={24} // Size in pixels
79
- color="#000" // Icon color
80
- className="product-icon" // CSS class
81
- style={{ margin: 4 }} // Inline styles
82
- aria-label="Pay Station" // Accessible label
83
- />
84
- ```
85
-
86
- ## Examples
87
-
88
- ### Product Feature List
89
-
90
- ```tsx
91
- import * as React from 'react';
92
- import {
93
- PayStation,
94
- Login,
95
- InGameStore,
96
- AntiFraud,
97
- Subscriptions,
98
- } from '@xsolla/xui-icons-product';
99
-
100
- export default function FeatureList() {
101
- const features = [
102
- { icon: PayStation, name: 'Pay Station', desc: 'Payment processing' },
103
- { icon: Login, name: 'Login', desc: 'User authentication' },
104
- { icon: InGameStore, name: 'In-Game Store', desc: 'Virtual goods' },
105
- { icon: AntiFraud, name: 'Anti-Fraud', desc: 'Payment protection' },
106
- { icon: Subscriptions, name: 'Subscriptions', desc: 'Recurring payments' },
107
- ];
108
-
109
- return (
110
- <div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>
111
- {features.map(({ icon: Icon, name, desc }) => (
112
- <div key={name} style={{ display: 'flex', alignItems: 'center', gap: 12 }}>
113
- <Icon size={32} aria-hidden />
114
- <div>
115
- <strong>{name}</strong>
116
- <p style={{ margin: 0, color: '#666' }}>{desc}</p>
117
- </div>
118
- </div>
119
- ))}
120
- </div>
121
- );
122
- }
123
- ```
124
-
125
- ### Product Dashboard Cards
126
-
127
- ```tsx
128
- import * as React from 'react';
129
- import { PayStation, Login, InGameStore, Launcher } from '@xsolla/xui-icons-product';
130
-
131
- export default function DashboardCards() {
132
- const products = [
133
- { icon: PayStation, name: 'Pay Station', status: 'Active' },
134
- { icon: Login, name: 'Login', status: 'Active' },
135
- { icon: InGameStore, name: 'In-Game Store', status: 'Setup Required' },
136
- { icon: Launcher, name: 'Launcher', status: 'Not Configured' },
137
- ];
138
-
139
- return (
140
- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)', gap: 16 }}>
141
- {products.map(({ icon: Icon, name, status }) => (
142
- <div
143
- key={name}
144
- style={{
145
- padding: 16,
146
- border: '1px solid #e0e0e0',
147
- borderRadius: 8,
148
- display: 'flex',
149
- alignItems: 'center',
150
- gap: 12,
151
- }}
152
- >
153
- <Icon size={40} />
154
- <div>
155
- <strong>{name}</strong>
156
- <p style={{ margin: 0, fontSize: 12, color: '#666' }}>{status}</p>
157
- </div>
158
- </div>
159
- ))}
160
- </div>
161
- );
162
- }
163
- ```
164
-
165
- ### Navigation Menu
166
-
167
- ```tsx
168
- import * as React from 'react';
169
- import {
170
- PayStation,
171
- InGameStore,
172
- PlayerInventory,
173
- Documentation,
174
- } from '@xsolla/xui-icons-product';
175
-
176
- export default function NavigationMenu() {
177
- const [selected, setSelected] = React.useState('paystation');
178
-
179
- const menuItems = [
180
- { id: 'paystation', icon: PayStation, label: 'Pay Station' },
181
- { id: 'store', icon: InGameStore, label: 'Store' },
182
- { id: 'inventory', icon: PlayerInventory, label: 'Inventory' },
183
- { id: 'docs', icon: Documentation, label: 'Documentation' },
184
- ];
185
-
186
- return (
187
- <nav style={{ width: 240, padding: 8 }}>
188
- {menuItems.map(({ id, icon: Icon, label }) => (
189
- <button
190
- key={id}
191
- onClick={() => setSelected(id)}
192
- style={{
193
- display: 'flex',
194
- alignItems: 'center',
195
- gap: 12,
196
- width: '100%',
197
- padding: '12px 16px',
198
- border: 'none',
199
- borderRadius: 8,
200
- background: selected === id ? '#E3F2FD' : 'transparent',
201
- cursor: 'pointer',
202
- textAlign: 'left',
203
- }}
204
- >
205
- <Icon size={20} color={selected === id ? '#1976D2' : '#666'} />
206
- <span style={{ color: selected === id ? '#1976D2' : '#333' }}>{label}</span>
207
- </button>
208
- ))}
209
- </nav>
210
- );
211
- }
212
- ```
213
-
214
- ## API Reference
215
-
216
- ### Product Icon Components
217
-
218
- Each product icon component accepts the same props:
219
-
220
- **ProductIconProps:**
221
-
222
- | Prop | Type | Default | Description |
223
- | :--- | :--- | :------ | :---------- |
224
- | size | `number` | `24` | Size in pixels. |
225
- | color | `string` | - | Icon color (uses original colors if not set). |
226
- | className | `string` | - | CSS class name. |
227
- | style | `CSSProperties` | - | Inline styles. |
228
- | data-testid | `string` | - | Test ID (web). |
229
- | testID | `string` | - | Test ID (React Native). |
230
- | aria-label | `string` | - | Accessible label. |
231
- | aria-hidden | `boolean` | `true` if no aria-label | Hide from screen readers. |
232
-
233
- ## Available Icons
234
-
235
- | Component | Product |
236
- | :-------- | :------ |
237
- | `Accelerator` | Xsolla Accelerator |
238
- | `AntiFraud` | Anti-Fraud protection |
239
- | `BuyButton` | Buy Button widget |
240
- | `Documentation` | Documentation portal |
241
- | `Funding` | Game funding |
242
- | `Gip` | Game Inventory Platform |
243
- | `InGameStore` | In-Game Store |
244
- | `Launcher` | Game Launcher |
245
- | `Login` | Login & authentication |
246
- | `PartnerNetwork` | Partner Network |
247
- | `PayStation` | Pay Station payments |
248
- | `PlayerInventory` | Player Inventory |
249
- | `Publisher` | Publisher Account |
250
- | `SiteBuilder` | Site Builder |
251
- | `Subscriptions` | Subscriptions |
252
-
253
- ## Tree Shaking
254
-
255
- Import individual icons for optimal bundle size:
256
-
257
- ```tsx
258
- // Good - only imports needed icons
259
- import { PayStation, Login } from '@xsolla/xui-icons-product';
260
-
261
- // Avoid - imports all icons
262
- import * as ProductIcons from '@xsolla/xui-icons-product';
263
- ```
264
-
265
- ## Accessibility
266
-
267
- - Icons are hidden from screen readers by default (`aria-hidden="true"`)
268
- - Use `aria-label` when the icon conveys meaningful information
269
- - When used in navigation or buttons, the parent element should have the accessible label
270
- - For decorative product badges, keep the default hidden behavior