@xsolla/xui-icons-base 0.141.0 → 0.147.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 -316
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-icons-base",
3
- "version": "0.141.0",
3
+ "version": "0.147.1",
4
4
  "main": "./web/index.js",
5
5
  "types": "./web/index.d.ts",
6
6
  "exports": {
package/README.md DELETED
@@ -1,316 +0,0 @@
1
- # Icons Base
2
-
3
- A comprehensive collection of functional UI icons organized by category. Each icon is available in both solid (filled) and line (outlined) variants for design flexibility.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install @xsolla/xui-icons-base
9
- # or
10
- yarn add @xsolla/xui-icons-base
11
- ```
12
-
13
- ## Demo
14
-
15
- ### Basic Usage
16
-
17
- ```tsx
18
- import * as React from 'react';
19
- import { HomeSolid, HomeLine } from '@xsolla/xui-icons-base';
20
-
21
- export default function BasicIconsBase() {
22
- return (
23
- <div style={{ display: 'flex', gap: 16 }}>
24
- <HomeSolid size={24} />
25
- <HomeLine size={24} />
26
- </div>
27
- );
28
- }
29
- ```
30
-
31
- ### Icon Variants
32
-
33
- ```tsx
34
- import * as React from 'react';
35
- import {
36
- StarSolid, StarLine,
37
- HeartSolid, HeartLine,
38
- BellSolid, BellLine,
39
- } from '@xsolla/xui-icons-base';
40
-
41
- export default function IconVariants() {
42
- return (
43
- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(2, auto)', gap: 16 }}>
44
- <div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
45
- <StarSolid size={24} />
46
- <span>Solid</span>
47
- </div>
48
- <div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
49
- <StarLine size={24} />
50
- <span>Line</span>
51
- </div>
52
- <div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
53
- <HeartSolid size={24} color="#e74c3c" />
54
- <span>Solid</span>
55
- </div>
56
- <div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
57
- <HeartLine size={24} color="#e74c3c" />
58
- <span>Line</span>
59
- </div>
60
- </div>
61
- );
62
- }
63
- ```
64
-
65
- ### Custom Sizes
66
-
67
- ```tsx
68
- import * as React from 'react';
69
- import { CheckCircleSolid } from '@xsolla/xui-icons-base';
70
-
71
- export default function IconSizes() {
72
- return (
73
- <div style={{ display: 'flex', gap: 16, alignItems: 'center' }}>
74
- <CheckCircleSolid size={16} />
75
- <CheckCircleSolid size={20} />
76
- <CheckCircleSolid size={24} />
77
- <CheckCircleSolid size={32} />
78
- <CheckCircleSolid size={48} />
79
- </div>
80
- );
81
- }
82
- ```
83
-
84
- ## Anatomy
85
-
86
- Import icons directly by name with their variant suffix:
87
-
88
- ```jsx
89
- import { IconNameSolid, IconNameLine } from '@xsolla/xui-icons-base';
90
-
91
- // Solid variant (filled)
92
- <IconNameSolid size={24} color="#color" />
93
-
94
- // Line variant (outlined)
95
- <IconNameLine size={24} color="#color" />
96
- ```
97
-
98
- ## Icon Categories
99
-
100
- ### User Interface
101
-
102
- ```tsx
103
- import {
104
- // Navigation
105
- HomeSolid, HomeLine,
106
- SearchSolid, SearchLine,
107
- MenuSolid, MenuLine,
108
- SettingsSolid, SettingsLine,
109
-
110
- // Actions
111
- PlusSolid, PlusLine,
112
- EditSolid, EditLine,
113
- TrashSolid, TrashLine,
114
- CopySolid, CopyLine,
115
- } from '@xsolla/xui-icons-base';
116
- ```
117
-
118
- ### Communication
119
-
120
- ```tsx
121
- import {
122
- MailSolid, MailLine,
123
- MessageSolid, MessageLine,
124
- NotificationSolid, NotificationLine,
125
- BellSolid, BellLine,
126
- } from '@xsolla/xui-icons-base';
127
- ```
128
-
129
- ### Media
130
-
131
- ```tsx
132
- import {
133
- ImageSolid, ImageLine,
134
- CameraSolid, CameraLine,
135
- VideoSolid, VideoLine,
136
- PlaySolid, PlayLine,
137
- PauseSolid, PauseLine,
138
- } from '@xsolla/xui-icons-base';
139
- ```
140
-
141
- ### Files & Folders
142
-
143
- ```tsx
144
- import {
145
- FileSolid, FileLine,
146
- FolderSolid, FolderLine,
147
- DocumentSolid, DocumentLine,
148
- DownloadSolid, DownloadLine,
149
- UploadSolid, UploadLine,
150
- } from '@xsolla/xui-icons-base';
151
- ```
152
-
153
- ### Status & Feedback
154
-
155
- ```tsx
156
- import {
157
- CheckCircleSolid, CheckCircleLine,
158
- WarningCircleSolid, WarningCircleLine,
159
- ErrorCircleSolid, ErrorCircleLine,
160
- InfoCircleSolid, InfoCircleLine,
161
- HelpCircleSolid, HelpCircleLine,
162
- } from '@xsolla/xui-icons-base';
163
- ```
164
-
165
- ### Shopping & E-commerce
166
-
167
- ```tsx
168
- import {
169
- CartSolid, CartLine,
170
- BagSolid, BagLine,
171
- CreditCardSolid, CreditCardLine,
172
- TagSolid, TagLine,
173
- GiftSolid, GiftLine,
174
- } from '@xsolla/xui-icons-base';
175
- ```
176
-
177
- ## Examples
178
-
179
- ### Icon Grid Display
180
-
181
- ```tsx
182
- import * as React from 'react';
183
- import * as Icons from '@xsolla/xui-icons-base';
184
-
185
- export default function IconGrid() {
186
- const solidIcons = [
187
- 'HomeSolid', 'SearchSolid', 'UserSolid', 'SettingsSolid',
188
- 'BellSolid', 'HeartSolid', 'StarSolid', 'BookmarkSolid'
189
- ];
190
-
191
- return (
192
- <div style={{ display: 'grid', gridTemplateColumns: 'repeat(4, 1fr)', gap: 24 }}>
193
- {solidIcons.map(name => {
194
- const IconComponent = Icons[name];
195
- return (
196
- <div key={name} style={{ textAlign: 'center' }}>
197
- <IconComponent size={24} />
198
- <div style={{ fontSize: 10, marginTop: 4 }}>
199
- {name.replace('Solid', '')}
200
- </div>
201
- </div>
202
- );
203
- })}
204
- </div>
205
- );
206
- }
207
- ```
208
-
209
- ### Toggle Between Variants
210
-
211
- ```tsx
212
- import * as React from 'react';
213
- import { HeartSolid, HeartLine } from '@xsolla/xui-icons-base';
214
-
215
- export default function ToggleIcon() {
216
- const [liked, setLiked] = React.useState(false);
217
-
218
- return (
219
- <button
220
- onClick={() => setLiked(!liked)}
221
- style={{ background: 'none', border: 'none', cursor: 'pointer' }}
222
- >
223
- {liked ? (
224
- <HeartSolid size={24} color="#e74c3c" />
225
- ) : (
226
- <HeartLine size={24} />
227
- )}
228
- </button>
229
- );
230
- }
231
- ```
232
-
233
- ### Status Indicators
234
-
235
- ```tsx
236
- import * as React from 'react';
237
- import {
238
- CheckCircleSolid,
239
- WarningCircleSolid,
240
- ErrorCircleSolid,
241
- InfoCircleSolid,
242
- } from '@xsolla/xui-icons-base';
243
-
244
- export default function StatusIndicators() {
245
- return (
246
- <div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
247
- <div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
248
- <CheckCircleSolid size={20} color="#2ecc71" />
249
- <span>Success message</span>
250
- </div>
251
- <div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
252
- <WarningCircleSolid size={20} color="#f39c12" />
253
- <span>Warning message</span>
254
- </div>
255
- <div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
256
- <ErrorCircleSolid size={20} color="#e74c3c" />
257
- <span>Error message</span>
258
- </div>
259
- <div style={{ display: 'flex', gap: 8, alignItems: 'center' }}>
260
- <InfoCircleSolid size={20} color="#3498db" />
261
- <span>Info message</span>
262
- </div>
263
- </div>
264
- );
265
- }
266
- ```
267
-
268
- ## API Reference
269
-
270
- ### Icon Components
271
-
272
- All icons share the same props interface.
273
-
274
- **Icon Props:**
275
-
276
- | Prop | Type | Default | Description |
277
- | :--- | :--- | :------ | :---------- |
278
- | size | `number` | `24` | Icon size in pixels. |
279
- | color | `string` | `currentColor` | Icon color. |
280
-
281
- ### Naming Convention
282
-
283
- Icons follow a consistent naming pattern:
284
-
285
- ```
286
- {IconName}{Variant}
287
-
288
- Where:
289
- - IconName: PascalCase name (e.g., Home, CheckCircle, ShoppingCart)
290
- - Variant: Either "Solid" or "Line"
291
-
292
- Examples:
293
- - HomeSolid, HomeLine
294
- - CheckCircleSolid, CheckCircleLine
295
- - ShoppingCartSolid, ShoppingCartLine
296
- ```
297
-
298
- ## Theming
299
-
300
- Icons use `currentColor` by default, inheriting color from parent elements:
301
-
302
- ```tsx
303
- // Icon inherits text color from parent
304
- <div style={{ color: '#3498db' }}>
305
- <HomeSolid /> {/* Will be #3498db */}
306
- </div>
307
-
308
- // Or set color directly
309
- <HomeSolid color="#e74c3c" />
310
- ```
311
-
312
- ## Accessibility
313
-
314
- - Icons are decorative by default (`aria-hidden="true"`)
315
- - When using icons to convey meaning, add appropriate `aria-label` to the container
316
- - For icon-only buttons, always provide accessible labels