@rescui/icons 1.7.6 → 1.7.7-RUI-293-Update-menu-component-6ca9d26d3.22
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 +4 -2
- package/lib/external-outline.d.ts +16 -0
- package/lib/external-outline.js +108 -0
- package/lib/external-outline.js.map +1 -0
- package/lib/external.d.ts +16 -0
- package/lib/external.js +108 -0
- package/lib/external.js.map +1 -0
- package/lib/index.css +21 -21
- package/lib/index.css.js +12 -12
- package/lib/index.css.js.map +1 -1
- package/lib/index.d.ts +16 -0
- package/lib/index.js +8 -0
- package/lib/index.js.map +1 -1
- package/lib/moon-outline.d.ts +16 -0
- package/lib/moon-outline.js +108 -0
- package/lib/moon-outline.js.map +1 -0
- package/lib/moon.d.ts +16 -0
- package/lib/moon.js +108 -0
- package/lib/moon.js.map +1 -0
- package/lib/sidebar-outline.d.ts +16 -0
- package/lib/sidebar-outline.js +108 -0
- package/lib/sidebar-outline.js.map +1 -0
- package/lib/sidebar.d.ts +16 -0
- package/lib/sidebar.js +108 -0
- package/lib/sidebar.js.map +1 -0
- package/lib/sun-outline.d.ts +16 -0
- package/lib/sun-outline.js +108 -0
- package/lib/sun-outline.js.map +1 -0
- package/lib/sun.d.ts +16 -0
- package/lib/sun.js +108 -0
- package/lib/sun.js.map +1 -0
- package/llm/components/icons.md +585 -0
- package/llm/index.md +2 -0
- package/package.json +8 -7
- package/svg/external-outline_16.svg +1 -0
- package/svg/external-outline_20.svg +1 -0
- package/svg/external-outline_24.svg +1 -0
- package/svg/external-outline_28.svg +1 -0
- package/svg/external_16.svg +1 -0
- package/svg/external_20.svg +1 -0
- package/svg/external_24.svg +1 -0
- package/svg/external_28.svg +1 -0
- package/svg/moon-outline_16.svg +1 -0
- package/svg/moon-outline_20.svg +1 -0
- package/svg/moon-outline_24.svg +1 -0
- package/svg/moon-outline_28.svg +1 -0
- package/svg/moon_16.svg +1 -0
- package/svg/moon_20.svg +1 -0
- package/svg/moon_24.svg +1 -0
- package/svg/moon_28.svg +1 -0
- package/svg/sidebar-outline_16.svg +1 -0
- package/svg/sidebar-outline_20.svg +1 -0
- package/svg/sidebar-outline_24.svg +1 -0
- package/svg/sidebar-outline_28.svg +1 -0
- package/svg/sidebar_16.svg +1 -0
- package/svg/sidebar_20.svg +1 -0
- package/svg/sidebar_24.svg +1 -0
- package/svg/sidebar_28.svg +1 -0
- package/svg/sun-outline_16.svg +1 -0
- package/svg/sun-outline_20.svg +1 -0
- package/svg/sun-outline_24.svg +1 -0
- package/svg/sun-outline_28.svg +1 -0
- package/svg/sun_16.svg +1 -0
- package/svg/sun_20.svg +1 -0
- package/svg/sun_24.svg +1 -0
- package/svg/sun_28.svg +1 -0
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
# Icons
|
|
2
|
+
|
|
3
|
+
Icons are visual symbols used to represent products, objects, or actions.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
All Icons list
|
|
8
|
+
|
|
9
|
+
- AddCircleIcon
|
|
10
|
+
- AddCircleOutlineIcon
|
|
11
|
+
- AddIcon
|
|
12
|
+
- AddOutlineIcon
|
|
13
|
+
- AddPersonIcon
|
|
14
|
+
- AddPersonOutlineIcon
|
|
15
|
+
- AiIcon
|
|
16
|
+
- AndroidIcon
|
|
17
|
+
- AppleIcon
|
|
18
|
+
- ArrowBottomIcon
|
|
19
|
+
- ArrowBottomLeftIcon
|
|
20
|
+
- ArrowBottomLeftOutlineIcon
|
|
21
|
+
- ArrowBottomOutlineIcon
|
|
22
|
+
- ArrowBottomRightIcon
|
|
23
|
+
- ArrowBottomRightOutlineIcon
|
|
24
|
+
- ArrowLeftIcon
|
|
25
|
+
- ArrowLeftOutlineIcon
|
|
26
|
+
- ArrowRightIcon
|
|
27
|
+
- ArrowRightOutlineIcon
|
|
28
|
+
- ArrowTopIcon
|
|
29
|
+
- ArrowTopLeftIcon
|
|
30
|
+
- ArrowTopLeftOutlineIcon
|
|
31
|
+
- ArrowTopOutlineIcon
|
|
32
|
+
- ArrowTopRightIcon
|
|
33
|
+
- ArrowTopRightOutlineIcon
|
|
34
|
+
- AttachedIcon
|
|
35
|
+
- AttachedOutlineIcon
|
|
36
|
+
- BellCrossedIcon
|
|
37
|
+
- BellCrossedOutlineIcon
|
|
38
|
+
- BellIcon
|
|
39
|
+
- BellOutlineIcon
|
|
40
|
+
- BilibiliIcon
|
|
41
|
+
- BitbucketIcon
|
|
42
|
+
- BlockIcon
|
|
43
|
+
- BlockOutlineIcon
|
|
44
|
+
- BlogIcon
|
|
45
|
+
- BlogOutlineIcon
|
|
46
|
+
- BlueskyIcon
|
|
47
|
+
- BranchIcon
|
|
48
|
+
- BranchOutlineIcon
|
|
49
|
+
- BriefcaseIcon
|
|
50
|
+
- BriefcaseOutlineIcon
|
|
51
|
+
- BugIcon
|
|
52
|
+
- BugOutlineIcon
|
|
53
|
+
- BulletsIcon
|
|
54
|
+
- BulletsOutlineIcon
|
|
55
|
+
- CartIcon
|
|
56
|
+
- CartOutlineIcon
|
|
57
|
+
- CheckAsterixIcon
|
|
58
|
+
- CheckAsterixOutlineIcon
|
|
59
|
+
- CheckDollarIcon
|
|
60
|
+
- CheckDollarOutlineIcon
|
|
61
|
+
- CheckDoubleIcon
|
|
62
|
+
- CheckDoubleOutlineIcon
|
|
63
|
+
- CheckIcon
|
|
64
|
+
- CheckLimetedIcon
|
|
65
|
+
- CheckLimetedOutlineIcon
|
|
66
|
+
- CheckOutlineIcon
|
|
67
|
+
- CheckVsIcon
|
|
68
|
+
- CheckVsOutlineIcon
|
|
69
|
+
- CircleIcon
|
|
70
|
+
- CircleOutlineIcon
|
|
71
|
+
- ClockIcon
|
|
72
|
+
- ClockOutlineIcon
|
|
73
|
+
- CloseIcon
|
|
74
|
+
- CloseOutlineIcon
|
|
75
|
+
- CloudCrossedIcon
|
|
76
|
+
- CloudCrossedOutlineIcon
|
|
77
|
+
- CloudDownloadIcon
|
|
78
|
+
- CloudDownloadOutlineIcon
|
|
79
|
+
- CloudIcon
|
|
80
|
+
- CloudOutlineIcon
|
|
81
|
+
- CloudPublishIcon
|
|
82
|
+
- CloudPublishOutlineIcon
|
|
83
|
+
- CodeClosedIcon
|
|
84
|
+
- CodeClosedOutlineIcon
|
|
85
|
+
- CodeIcon
|
|
86
|
+
- CodeOutlineIcon
|
|
87
|
+
- ColorIcon
|
|
88
|
+
- ColorOutlineIcon
|
|
89
|
+
- CommitIcon
|
|
90
|
+
- CommitOutlineIcon
|
|
91
|
+
- CompanyIcon
|
|
92
|
+
- CompanyOutlineIcon
|
|
93
|
+
- ComputerIcon
|
|
94
|
+
- ComputerOutlineIcon
|
|
95
|
+
- CopyIcon
|
|
96
|
+
- CopyOutlineIcon
|
|
97
|
+
- CouponIcon
|
|
98
|
+
- CouponOutlineIcon
|
|
99
|
+
- CropIcon
|
|
100
|
+
- CropOutlineIcon
|
|
101
|
+
- DateIcon
|
|
102
|
+
- DateOutlineIcon
|
|
103
|
+
- DiscordIcon
|
|
104
|
+
- DiscourseIcon
|
|
105
|
+
- DownIcon
|
|
106
|
+
- DownOutlineIcon
|
|
107
|
+
- DownloadIcon
|
|
108
|
+
- DownloadOutlineIcon
|
|
109
|
+
- EmailIcon
|
|
110
|
+
- EmailOutlineIcon
|
|
111
|
+
- EnterIcon
|
|
112
|
+
- EnterOutlineIcon
|
|
113
|
+
- ErrorIcon
|
|
114
|
+
- ErrorOutlineIcon
|
|
115
|
+
- ExitIcon
|
|
116
|
+
- ExitOutlineIcon
|
|
117
|
+
- ExposedIcon
|
|
118
|
+
- ExternalIcon
|
|
119
|
+
- ExternalOutlineIcon
|
|
120
|
+
- EyeCrossedIcon
|
|
121
|
+
- EyeCrossedOutlineIcon
|
|
122
|
+
- EyeIcon
|
|
123
|
+
- EyeOutlineIcon
|
|
124
|
+
- FacebookIcon
|
|
125
|
+
- FigmaIcon
|
|
126
|
+
- FileExcelIcon
|
|
127
|
+
- FileExcelOutlineIcon
|
|
128
|
+
- FileIcon
|
|
129
|
+
- FileOutlineIcon
|
|
130
|
+
- FilesIcon
|
|
131
|
+
- FilesOutlineIcon
|
|
132
|
+
- FilterIcon
|
|
133
|
+
- FilterOutlineIcon
|
|
134
|
+
- FolderIcon
|
|
135
|
+
- FolderOutlineIcon
|
|
136
|
+
- FrameworkIcon
|
|
137
|
+
- FrameworkOutlineIcon
|
|
138
|
+
- FullScreenExitIcon
|
|
139
|
+
- FullScreenExitOutlineIcon
|
|
140
|
+
- FullScreenIcon
|
|
141
|
+
- FullScreenOutlineIcon
|
|
142
|
+
- GearIcon
|
|
143
|
+
- GearOutlineIcon
|
|
144
|
+
- GitHubIcon
|
|
145
|
+
- GitlabIcon
|
|
146
|
+
- GlobusIcon
|
|
147
|
+
- GlobusOutlineIcon
|
|
148
|
+
- GoogleAppIcon
|
|
149
|
+
- GoogleIcon
|
|
150
|
+
- HamburgerIcon
|
|
151
|
+
- HamburgerOutlineIcon
|
|
152
|
+
- HelpIcon
|
|
153
|
+
- HelpOutlineIcon
|
|
154
|
+
- HintIcon
|
|
155
|
+
- HintOutlineIcon
|
|
156
|
+
- HistoryIcon
|
|
157
|
+
- HistoryOutlineIcon
|
|
158
|
+
- HomeIcon
|
|
159
|
+
- HomeOutlineIcon
|
|
160
|
+
- InfinityIcon
|
|
161
|
+
- InfinityOutlineIcon
|
|
162
|
+
- InfoIcon
|
|
163
|
+
- InfoOutlineIcon
|
|
164
|
+
- InstagramIcon
|
|
165
|
+
- JetBrainsIcon
|
|
166
|
+
- JetBrainsOutlineIcon
|
|
167
|
+
- JuejinIcon
|
|
168
|
+
- JunieIcon
|
|
169
|
+
- KeyHoleIcon
|
|
170
|
+
- KeyHoleOutlineIcon
|
|
171
|
+
- KeyIcon
|
|
172
|
+
- KeyOutlineIcon
|
|
173
|
+
- KotlinIcon
|
|
174
|
+
- KtorIcon
|
|
175
|
+
- LanguageIcon
|
|
176
|
+
- LanguageOutlineIcon
|
|
177
|
+
- LearnIcon
|
|
178
|
+
- LearnOutlineIcon
|
|
179
|
+
- LeftIcon
|
|
180
|
+
- LeftOutlineIcon
|
|
181
|
+
- LightningIcon
|
|
182
|
+
- LightningOutlineIcon
|
|
183
|
+
- LinkCrossedIcon
|
|
184
|
+
- LinkCrossedOutlineIcon
|
|
185
|
+
- LinkIcon
|
|
186
|
+
- LinkOutlineIcon
|
|
187
|
+
- LinkedinIcon
|
|
188
|
+
- LinuxIcon
|
|
189
|
+
- LoadingIcon
|
|
190
|
+
- LoadingOutlineIcon
|
|
191
|
+
- LocationIcon
|
|
192
|
+
- LocationOutlineIcon
|
|
193
|
+
- LockIcon
|
|
194
|
+
- LockOpenedIcon
|
|
195
|
+
- LockOpenedOutlineIcon
|
|
196
|
+
- LockOutlineIcon
|
|
197
|
+
- LoveCrossedIcon
|
|
198
|
+
- LoveCrossedOutlineIcon
|
|
199
|
+
- LoveIcon
|
|
200
|
+
- LoveOutlineIcon
|
|
201
|
+
- MagicIcon
|
|
202
|
+
- MagicOutlineIcon
|
|
203
|
+
- MarginHIcon
|
|
204
|
+
- MarginHOutlineIcon
|
|
205
|
+
- MarginVIcon
|
|
206
|
+
- MarginVOutlineIcon
|
|
207
|
+
- MarkerIcon
|
|
208
|
+
- MastodonIcon
|
|
209
|
+
- MerchandiseIcon
|
|
210
|
+
- MerchandiseOutlineIcon
|
|
211
|
+
- MessageIcon
|
|
212
|
+
- MessageOutlineIcon
|
|
213
|
+
- MicrocontrollerIcon
|
|
214
|
+
- MicrocontrollerOutlineIcon
|
|
215
|
+
- MiniPlayerIcon
|
|
216
|
+
- MiniPlayerOutlineIcon
|
|
217
|
+
- MinusIcon
|
|
218
|
+
- MinusOutlineIcon
|
|
219
|
+
- MobileIcon
|
|
220
|
+
- MobileOutlineIcon
|
|
221
|
+
- MoonIcon
|
|
222
|
+
- MoonOutlineIcon
|
|
223
|
+
- MoreIcon
|
|
224
|
+
- MoreOutlineIcon
|
|
225
|
+
- MuteIcon
|
|
226
|
+
- MuteOutlineIcon
|
|
227
|
+
- OrderIcon
|
|
228
|
+
- OrderOutlineIcon
|
|
229
|
+
- PackageIcon
|
|
230
|
+
- PackageOutlineIcon
|
|
231
|
+
- PaddingHIcon
|
|
232
|
+
- PaddingHOutlineIcon
|
|
233
|
+
- PaddingVIcon
|
|
234
|
+
- PaddingVOutlineIcon
|
|
235
|
+
- PauseIcon
|
|
236
|
+
- PauseOutlineIcon
|
|
237
|
+
- PenIcon
|
|
238
|
+
- PenOutlineIcon
|
|
239
|
+
- PercentIcon
|
|
240
|
+
- PercentOutlineIcon
|
|
241
|
+
- PersonIcon
|
|
242
|
+
- PersonOutlineIcon
|
|
243
|
+
- PlayIcon
|
|
244
|
+
- PlayOutlineIcon
|
|
245
|
+
- PlusIcon
|
|
246
|
+
- PlusOutlineIcon
|
|
247
|
+
- PocketIcon
|
|
248
|
+
- PresentIcon
|
|
249
|
+
- PresentOutlineIcon
|
|
250
|
+
- PrintIcon
|
|
251
|
+
- PrintOutlineIcon
|
|
252
|
+
- ProjectsIcon
|
|
253
|
+
- ProjectsOutlineIcon
|
|
254
|
+
- QuoteIcon
|
|
255
|
+
- QuoteOutlineIcon
|
|
256
|
+
- ReadIcon
|
|
257
|
+
- ReadOutlineIcon
|
|
258
|
+
- RedditIcon
|
|
259
|
+
- RedoIcon
|
|
260
|
+
- RedoOutlineIcon
|
|
261
|
+
- RefreshIcon
|
|
262
|
+
- RefreshOutlineIcon
|
|
263
|
+
- RemovePersonIcon
|
|
264
|
+
- RemovePersonOutlineIcon
|
|
265
|
+
- RenewIcon
|
|
266
|
+
- RenewOutlineIcon
|
|
267
|
+
- RequestIcon
|
|
268
|
+
- RequestOutlineIcon
|
|
269
|
+
- ResellerIcon
|
|
270
|
+
- ResellerOutlineIcon
|
|
271
|
+
- RightIcon
|
|
272
|
+
- RightOutlineIcon
|
|
273
|
+
- RocketIcon
|
|
274
|
+
- RocketOutlineIcon
|
|
275
|
+
- RssFeedIcon
|
|
276
|
+
- SearchIcon
|
|
277
|
+
- SearchOutlineIcon
|
|
278
|
+
- SendIcon
|
|
279
|
+
- SendOutlineIcon
|
|
280
|
+
- ServerIcon
|
|
281
|
+
- ServerOutlineIcon
|
|
282
|
+
- SettingsIcon
|
|
283
|
+
- SettingsOutlineIcon
|
|
284
|
+
- ShareIcon
|
|
285
|
+
- ShareOutlineIcon
|
|
286
|
+
- SidebarIcon
|
|
287
|
+
- SidebarOutlineIcon
|
|
288
|
+
- SlackIcon
|
|
289
|
+
- SmileHappyIcon
|
|
290
|
+
- SmileHappyOutlineIcon
|
|
291
|
+
- SmileNeutralIcon
|
|
292
|
+
- SmileNeutralOutlineIcon
|
|
293
|
+
- SmileSadIcon
|
|
294
|
+
- SmileSadOutlineIcon
|
|
295
|
+
- SolarisIcon
|
|
296
|
+
- SpaceIcon
|
|
297
|
+
- SpringIcon
|
|
298
|
+
- StackOverflowIcon
|
|
299
|
+
- StampCrossedIcon
|
|
300
|
+
- StampCrossedOutlineIcon
|
|
301
|
+
- StampIcon
|
|
302
|
+
- StampOutlineIcon
|
|
303
|
+
- StarIcon
|
|
304
|
+
- StarOutlineIcon
|
|
305
|
+
- StatsIcon
|
|
306
|
+
- StatsOutlineIcon
|
|
307
|
+
- StopIcon
|
|
308
|
+
- StopOutlineIcon
|
|
309
|
+
- StyleIcon
|
|
310
|
+
- StyleOutlineIcon
|
|
311
|
+
- SubtitlesCrossedIcon
|
|
312
|
+
- SubtitlesCrossedOutlineIcon
|
|
313
|
+
- SubtitlesIcon
|
|
314
|
+
- SubtitlesOutlineIcon
|
|
315
|
+
- SuccessIcon
|
|
316
|
+
- SuccessOutlineIcon
|
|
317
|
+
- SunIcon
|
|
318
|
+
- SunOutlineIcon
|
|
319
|
+
- TabletIcon
|
|
320
|
+
- TabletOutlineIcon
|
|
321
|
+
- TagIcon
|
|
322
|
+
- TagOutlineIcon
|
|
323
|
+
- TargetIcon
|
|
324
|
+
- TargetOutlineIcon
|
|
325
|
+
- TeamIcon
|
|
326
|
+
- TeamOutlineIcon
|
|
327
|
+
- TelegramIcon
|
|
328
|
+
- TextAlignCenterIcon
|
|
329
|
+
- TextAlignCenterOutlineIcon
|
|
330
|
+
- TextAlignLeftIcon
|
|
331
|
+
- TextAlignLeftOutlineIcon
|
|
332
|
+
- TextAlignRightIcon
|
|
333
|
+
- TextAlignRightOutlineIcon
|
|
334
|
+
- ThemeIcon
|
|
335
|
+
- ThemeOutlineIcon
|
|
336
|
+
- ThumbsDownIcon
|
|
337
|
+
- ThumbsDownOutlineIcon
|
|
338
|
+
- ThumbsUpIcon
|
|
339
|
+
- ThumbsUpOutlineIcon
|
|
340
|
+
- TiktokIcon
|
|
341
|
+
- TouchIcon
|
|
342
|
+
- TouchOutlineIcon
|
|
343
|
+
- TrashIcon
|
|
344
|
+
- TrashOutlineIcon
|
|
345
|
+
- TreeIcon
|
|
346
|
+
- TreeOutlineIcon
|
|
347
|
+
- TwitterIcon
|
|
348
|
+
- UndoIcon
|
|
349
|
+
- UndoOutlineIcon
|
|
350
|
+
- UpIcon
|
|
351
|
+
- UpOutlineIcon
|
|
352
|
+
- UploadIcon
|
|
353
|
+
- UploadOutlineIcon
|
|
354
|
+
- VkIcon
|
|
355
|
+
- VolumeIcon
|
|
356
|
+
- VolumeOutlineIcon
|
|
357
|
+
- WarningIcon
|
|
358
|
+
- WarningOutlineIcon
|
|
359
|
+
- WechatIcon
|
|
360
|
+
- WeiboIcon
|
|
361
|
+
- WiFiIcon
|
|
362
|
+
- WiFiOutlineIcon
|
|
363
|
+
- WinIcon
|
|
364
|
+
- WinOutlineIcon
|
|
365
|
+
- WindowsIcon
|
|
366
|
+
- YoutubeIcon
|
|
367
|
+
- ZhihuIcon
|
|
368
|
+
|
|
369
|
+
### Usage
|
|
370
|
+
|
|
371
|
+
```tsx
|
|
372
|
+
import { CompanyIcon } from '@rescui/icons';
|
|
373
|
+
|
|
374
|
+
<CompanyIcon />;
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
### Loading icon animation
|
|
378
|
+
|
|
379
|
+
Animation inside `<svg>` tags can affect performance on pages with lots of loading icons.
|
|
380
|
+
|
|
381
|
+
If you encounter performance issues, put loading icons as a background image for span and animate them like in this example:
|
|
382
|
+
|
|
383
|
+
```tsx
|
|
384
|
+
import loadingOutlineIconSrc from '@rescui/icons/svg/loading-outline_24.svg';
|
|
385
|
+
|
|
386
|
+
<>
|
|
387
|
+
<style>{`
|
|
388
|
+
.my-loading-icon {
|
|
389
|
+
background-image: url(${loadingOutlineIconSrc.src});
|
|
390
|
+
background-repeat: no-repeat;
|
|
391
|
+
background-size: contain;
|
|
392
|
+
background-position: center center;
|
|
393
|
+
width: 24px;
|
|
394
|
+
height: 24px;
|
|
395
|
+
display: inline-block;
|
|
396
|
+
animation: rs-icon-rotate 1s linear infinite;
|
|
397
|
+
transform-origin:center center
|
|
398
|
+
}
|
|
399
|
+
`}</style>
|
|
400
|
+
<span className="my-loading-icon" />
|
|
401
|
+
</>;
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
#### Simple benchmark
|
|
405
|
+
|
|
406
|
+
Here's an interactive comparison showcasing a possible performance hit (More FPS = Better).
|
|
407
|
+
|
|
408
|
+
```tsx
|
|
409
|
+
import { useRef, useEffect, useState } from 'react';
|
|
410
|
+
import { textCn } from '@rescui/typography';
|
|
411
|
+
import { LoadingOutlineIcon } from '@rescui/icons';
|
|
412
|
+
import { Switcher } from '@rescui/switcher';
|
|
413
|
+
import loadingOutlineIconSrc from '@rescui/icons/svg/loading-outline_24.svg';
|
|
414
|
+
|
|
415
|
+
class FPSMeter {
|
|
416
|
+
constructor(element) {
|
|
417
|
+
this.times = [];
|
|
418
|
+
this.element = element;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
start() {
|
|
422
|
+
this.running = true;
|
|
423
|
+
this._refreshLoop();
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
stop() {
|
|
427
|
+
this.running = false;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
_refreshLoop() {
|
|
431
|
+
window.requestAnimationFrame(() => {
|
|
432
|
+
const now = performance.now();
|
|
433
|
+
while (this.times.length > 0 && this.times[0] <= now - 1000) {
|
|
434
|
+
this.times.shift();
|
|
435
|
+
}
|
|
436
|
+
this.times.push(now);
|
|
437
|
+
this.fps = this.times.length;
|
|
438
|
+
if (this.element) {
|
|
439
|
+
this.element.textContent = this.fps;
|
|
440
|
+
}
|
|
441
|
+
if (this.running) {
|
|
442
|
+
this._refreshLoop();
|
|
443
|
+
} else {
|
|
444
|
+
this.element.textContent = '';
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
const Benchmark = () => {
|
|
451
|
+
const fpsMeterElement = useRef();
|
|
452
|
+
const [variant, setVariant] = useState('off');
|
|
453
|
+
useEffect(() => {
|
|
454
|
+
if (variant === 'off') {
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
const fpsMeter = new FPSMeter(fpsMeterElement.current);
|
|
458
|
+
fpsMeter.start();
|
|
459
|
+
return () => fpsMeter.stop();
|
|
460
|
+
}, [variant]);
|
|
461
|
+
return (
|
|
462
|
+
<>
|
|
463
|
+
<div>
|
|
464
|
+
<Switcher
|
|
465
|
+
value={variant}
|
|
466
|
+
onChange={setVariant}
|
|
467
|
+
options={[
|
|
468
|
+
{ label: 'Off', value: 'off' },
|
|
469
|
+
{ label: 'Animated SVG', value: 'svg' },
|
|
470
|
+
{ label: 'Animated Background', value: 'span' }
|
|
471
|
+
]}
|
|
472
|
+
/>
|
|
473
|
+
<span style={{ marginLeft: '24px' }} className={textCn('rs-text-2')}>
|
|
474
|
+
Current FPS:{' '}
|
|
475
|
+
</span>
|
|
476
|
+
<span ref={fpsMeterElement} />
|
|
477
|
+
</div>
|
|
478
|
+
<div>
|
|
479
|
+
{Array(1000)
|
|
480
|
+
.fill(0)
|
|
481
|
+
.map((_, i) => {
|
|
482
|
+
switch (variant) {
|
|
483
|
+
case 'svg':
|
|
484
|
+
return <LoadingOutlineIcon key={i} />;
|
|
485
|
+
case 'span':
|
|
486
|
+
return <span key={i} className="bench-loading-icon" />;
|
|
487
|
+
default:
|
|
488
|
+
return null;
|
|
489
|
+
}
|
|
490
|
+
})}
|
|
491
|
+
</div>
|
|
492
|
+
<style>{`
|
|
493
|
+
.bench-loading-icon {
|
|
494
|
+
background-image: url(${loadingOutlineIconSrc.src});
|
|
495
|
+
background-repeat: no-repeat;
|
|
496
|
+
background-size: contain;
|
|
497
|
+
background-position: center center;
|
|
498
|
+
width: 24px;
|
|
499
|
+
height: 24px;
|
|
500
|
+
display: inline-block;
|
|
501
|
+
animation: rs-icon-rotate 1s linear infinite;
|
|
502
|
+
transform-origin:center center
|
|
503
|
+
}
|
|
504
|
+
`}</style>
|
|
505
|
+
</>
|
|
506
|
+
);
|
|
507
|
+
};
|
|
508
|
+
render(<Benchmark />);
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
## CSS API
|
|
512
|
+
|
|
513
|
+
#### `Icon` mixins
|
|
514
|
+
|
|
515
|
+
| Mixin name | Details |
|
|
516
|
+
| --- | --- |
|
|
517
|
+
| `rs-icon-size-xs` | prop: `size`<br><br>value: `"xs"` |
|
|
518
|
+
| `rs-icon-size-s` | prop: `size`<br><br>value: `"s"` |
|
|
519
|
+
| `rs-icon-size-m` | prop: `size`<br><br>value: `"m"` |
|
|
520
|
+
| `rs-icon-size-l` | prop: `size`<br><br>value: `"l"` |
|
|
521
|
+
|
|
522
|
+
##### Demo
|
|
523
|
+
|
|
524
|
+
Must be used with `data-render-all-sizes` prop
|
|
525
|
+
|
|
526
|
+
Instead of separate classes, it may be a single class with `@media` queries inside:
|
|
527
|
+
|
|
528
|
+
```tsx
|
|
529
|
+
import { PersonOutlineIcon } from '@rescui/icons';
|
|
530
|
+
|
|
531
|
+
const MyIcon = ({ className }) => {
|
|
532
|
+
return (
|
|
533
|
+
<div style={{ padding: 12, backgroundColor: 'var(--rs-color-black-t5)' }}>
|
|
534
|
+
<PersonOutlineIcon className={className} size="m" data-render-all-sizes />
|
|
535
|
+
</div>
|
|
536
|
+
);
|
|
537
|
+
};
|
|
538
|
+
|
|
539
|
+
render(
|
|
540
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 24 }}>
|
|
541
|
+
<div>
|
|
542
|
+
<p>Default:</p>
|
|
543
|
+
<MyIcon />
|
|
544
|
+
</div>
|
|
545
|
+
<div>
|
|
546
|
+
<p>Var1:</p>
|
|
547
|
+
<MyIcon className={`my-icon-var-1`} />
|
|
548
|
+
</div>
|
|
549
|
+
<div>
|
|
550
|
+
<p>Var1 & Var2 combined:</p>
|
|
551
|
+
<MyIcon className={`my-icon-var-1 my-icon-var-2`} />
|
|
552
|
+
</div>
|
|
553
|
+
</div>
|
|
554
|
+
);
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
```postcss attached
|
|
558
|
+
@import '@rescui/icons/lib/public-api.p.css';
|
|
559
|
+
|
|
560
|
+
.my-icon-var-1 {
|
|
561
|
+
@mixin rs-icon-size-l;
|
|
562
|
+
}
|
|
563
|
+
.my-icon-var-2 {
|
|
564
|
+
@mixin rs-icon-size-s;
|
|
565
|
+
}
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
#### CSS Vars
|
|
569
|
+
|
|
570
|
+
| Variable | Syntax | Description |
|
|
571
|
+
| --- | --- | --- |
|
|
572
|
+
| `--rs-icons-height` | [height](https://developer.mozilla.org/en-US/docs/Web/CSS/height) | The height of the icon. Because of the fixed `view-box` (which corresponds to the aspect-ration), this variable controls both width and height of the icon by default. |
|
|
573
|
+
| `--rs-icons-width` | [width](https://developer.mozilla.org/en-US/docs/Web/CSS/width) | The width of the icon. `auto` by default - calculates automatically based on the icon height. Should be used only for edge-cases like fixing the flex dimensions. |
|
|
574
|
+
|
|
575
|
+
##### Demo
|
|
576
|
+
|
|
577
|
+
```tsx
|
|
578
|
+
import { PersonOutlineIcon } from '@rescui/icons';
|
|
579
|
+
|
|
580
|
+
render(
|
|
581
|
+
<div>
|
|
582
|
+
<PersonOutlineIcon size="m" style={{ '--rs-icons-height': '64px' }} />
|
|
583
|
+
</div>
|
|
584
|
+
);
|
|
585
|
+
```
|
package/llm/index.md
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/icons",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.7-RUI-293-Update-menu-component-6ca9d26d3.22+6ca9d26d3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"lib",
|
|
12
12
|
"!lib/*.doc-only.*",
|
|
13
|
+
"llm",
|
|
13
14
|
"svg",
|
|
14
15
|
"LICENSE.txt"
|
|
15
16
|
],
|
|
@@ -29,11 +30,11 @@
|
|
|
29
30
|
"react": ">=16.8.0 <20"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
|
-
"@rescui/babel-plugin-postcss-modules": "
|
|
33
|
-
"@rescui/colors": "
|
|
34
|
-
"@rescui/postcss-preset-library": "
|
|
35
|
-
"@rescui/scripts": "
|
|
36
|
-
"@rescui/typography": "
|
|
33
|
+
"@rescui/babel-plugin-postcss-modules": "0.0.5",
|
|
34
|
+
"@rescui/colors": "0.3.1-RUI-293-Update-menu-component-6ca9d26d3.57+6ca9d26d3",
|
|
35
|
+
"@rescui/postcss-preset-library": "0.2.2",
|
|
36
|
+
"@rescui/scripts": "0.5.2",
|
|
37
|
+
"@rescui/typography": "0.27.1-RUI-293-Update-menu-component-6ca9d26d3.22+6ca9d26d3",
|
|
37
38
|
"postcss-modules": "^4.0.0",
|
|
38
39
|
"postsvg": "2.2.7",
|
|
39
40
|
"react-copy-to-clipboard": "^5.0.3"
|
|
@@ -44,5 +45,5 @@
|
|
|
44
45
|
"svg-to-jsx": "rescui-scripts svg-to-jsx --src=svg --out=lib --template=template.js --ts-template=ts-template.js --typings-dir=lib"
|
|
45
46
|
},
|
|
46
47
|
"nx": {},
|
|
47
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "6ca9d26d30da536dc5a10fdd86222129e2832efa"
|
|
48
49
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M3 11.5v-6A1.5 1.5 0 0 1 4.5 4h3.444a.5.5 0 0 1 0 1H4.5a.5.5 0 0 0-.5.5v6a.5.5 0 0 0 .5.5h6a.5.5 0 0 0 .5-.5V8.056a.5.5 0 0 1 1 0V11.5a1.5 1.5 0 0 1-1.5 1.5h-6A1.5 1.5 0 0 1 3 11.5M13.5 2q.049 0 .098.009.014.004.028.009a.5.5 0 0 1 .228.128.5.5 0 0 1 .09.128A.5.5 0 0 1 14 2.5v4a.5.5 0 0 1-1 0V3.707L7.854 8.854a.5.5 0 0 1-.707-.708L12.293 3H9.5a.5.5 0 0 1 0-1z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M4 13.957V7.043C4 5.915 4.915 5 6.043 5h3.98a.786.786 0 0 1 0 1.571h-3.98a.47.47 0 0 0-.472.472v6.914c0 .26.212.472.472.472h6.914c.26 0 .472-.212.472-.472v-3.98a.786.786 0 1 1 1.571 0v3.98A2.043 2.043 0 0 1 12.957 16H6.043A2.043 2.043 0 0 1 4 13.957M16.308 3c.382 0 .692.31.692.692v4.616a.692.692 0 0 1-1.385 0V5.445L9.28 11.78a.75.75 0 0 1-1.06-1.06l6.335-6.335h-2.862a.692.692 0 0 1 0-1.385z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M4 17.5v-9A2.5 2.5 0 0 1 6.5 6H12a1 1 0 1 1 0 2H6.5a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h9a.5.5 0 0 0 .5-.5V12a1 1 0 1 1 2 0v5.5a2.5 2.5 0 0 1-2.5 2.5h-9A2.5 2.5 0 0 1 4 17.5M20 3q.088 0 .172.016l.021.003.047.011.051.013a1 1 0 0 1 .263.125 1 1 0 0 1 .387.499l.015.04.016.062A1 1 0 0 1 21 4v6a1 1 0 1 1-2 0V6.414l-8.293 8.293a1 1 0 0 1-1.414-1.414L17.586 5H14a1 1 0 0 1 0-2z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path d="M5 20V10a3 3 0 0 1 3-3h7a1 1 0 1 1 0 2H8a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-7a1 1 0 1 1 2 0v7a3 3 0 0 1-3 3H8a3 3 0 0 1-3-3M23 4q.088 0 .172.016l.021.003.047.011.051.013a1 1 0 0 1 .263.125 1 1 0 0 1 .387.499l.015.04.016.062A1 1 0 0 1 24 5v6a1 1 0 1 1-2 0V7.414l-9.793 9.793a1 1 0 0 1-1.414-1.414L20.586 6H17a1 1 0 0 1 0-2z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M2 12.158V5.842C2 4.825 2.825 4 3.842 4H7a.79.79 0 0 1 0 1.579H3.842a.263.263 0 0 0-.263.263v6.316c0 .145.118.263.263.263h6.316a.263.263 0 0 0 .263-.263V9A.79.79 0 1 1 12 9v3.158A1.84 1.84 0 0 1 10.158 14H3.842A1.84 1.84 0 0 1 2 12.158M13.2 2l.017.001q.045.002.088.009a.8.8 0 0 1 .46.224c.13.13.202.292.224.46a1 1 0 0 1 .01.088v.024l.001.012v4.364a.818.818 0 0 1-1.637 0V4.768L7.365 9.766a.8.8 0 1 1-1.13-1.131l4.997-4.998H8.818a.819.819 0 0 1 0-1.637z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M3 14.8V8.2A2.2 2.2 0 0 1 5.2 6H8a1 1 0 0 1 0 2H5.2a.2.2 0 0 0-.2.2v6.6c0 .11.09.2.2.2h6.6a.2.2 0 0 0 .2-.2V12a1 1 0 1 1 2 0v2.8a2.2 2.2 0 0 1-2.2 2.2H5.2A2.2 2.2 0 0 1 3 14.8M16 3a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V6.414l-6.293 6.293a1 1 0 1 1-1.414-1.414L13.586 5H10a1 1 0 0 1 0-2z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M3 18V9a3 3 0 0 1 3-3h2.5a1.5 1.5 0 1 1 0 3H6v9h9v-2.5a1.5 1.5 0 0 1 3 0V18a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3M19.5 3q.075 0 .149.007l.061.009q.041.004.082.012l.01.002.125.032.009.002.053.019q.045.014.09.033.031.014.062.03l.06.028q.05.026.097.056l.031.019q.036.025.07.053.027.019.053.039.173.142.297.329l.037.061.034.059q.019.034.034.07.016.033.032.069.008.017.013.035c.064.167.101.347.101.536v7a1.5 1.5 0 0 1-3 0V8.121l-7.44 7.44a1.5 1.5 0 0 1-2.12-2.121L15.879 6H12.5a1.5 1.5 0 0 1 0-3z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path d="M4 20.5v-10A3.5 3.5 0 0 1 7.5 7h3a1.5 1.5 0 0 1 0 3h-3a.5.5 0 0 0-.5.5v10a.5.5 0 0 0 .5.5h10a.5.5 0 0 0 .5-.5v-3a1.5 1.5 0 0 1 3 0v3a3.5 3.5 0 0 1-3.5 3.5h-10A3.5 3.5 0 0 1 4 20.5M22.55 4a1.5 1.5 0 0 1 1.5 1.5v8a1.5 1.5 0 0 1-3 0V9.113l-9.49 9.49a1.5 1.5 0 1 1-2.12-2.122L18.92 7H14.55a1.5 1.5 0 0 1 0-3z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M5.531 2.53a6 6 0 1 0 7.938 7.936A5.96 5.96 0 0 1 11 11a6 6 0 0 1-5.469-8.47M6 5a5 5 0 0 0 5 5 4.97 4.97 0 0 0 3.052-1.044.5.5 0 0 1 .795.5 7 7 0 1 1-8.305-8.303.501.501 0 0 1 .499.795A4.97 4.97 0 0 0 6 5"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M6.5 6c0-.542.06-1.071.169-1.581A6.5 6.5 0 0 0 10 16.5a6.49 6.49 0 0 0 5.578-3.171A7.5 7.5 0 0 1 6.5 5.999M8 6a6 6 0 0 0 8.617 5.396.75.75 0 0 1 1.047.89A7.999 7.999 0 0 1 2 10a8 8 0 0 1 5.713-7.665.75.75 0 0 1 .889 1.047A6 6 0 0 0 8 6"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M8 7c0-.708.082-1.398.237-2.06A8 8 0 0 0 12 20a8 8 0 0 0 7.059-4.24A9 9 0 0 1 8 7m2 0a7 7 0 0 0 10.29 6.178 1 1 0 0 1 1.443 1.11C20.698 18.707 16.737 22 12 22 6.477 22 2 17.523 2 12c0-4.736 3.292-8.699 7.71-9.734a1 1 0 0 1 1.11 1.444C10.297 4.69 10 5.81 10 7"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path d="M10 8c0-.747.082-1.475.237-2.176A9 9 0 0 0 14 23a8.99 8.99 0 0 0 8.174-5.24c-.7.156-1.427.24-2.174.24-5.523 0-10-4.477-10-10m2 0a8 8 0 0 0 11.338 7.268 1.001 1.001 0 0 1 1.395 1.125C23.641 21.317 19.254 25 14 25 7.925 25 3 20.075 3 14c0-5.253 3.682-9.642 8.605-10.736a1 1 0 0 1 1.124 1.396A8 8 0 0 0 12 8"/></svg>
|
package/svg/moon_16.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M5.827 1.346a.75.75 0 0 1 .877 1.098 5 5 0 0 0 6.853 6.852.75.75 0 0 1 1.097.875A7 7 0 0 1 1 8.001a7 7 0 0 1 4.827-6.655"/></svg>
|
package/svg/moon_20.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M7.108 2.541a1 1 0 0 1 1.294 1.294 6 6 0 0 0 7.76 7.76 1 1 0 0 1 1.295 1.295A8 8 0 0 1 10 18 8 8 0 0 1 7.108 2.541"/></svg>
|
package/svg/moon_24.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M8.509 2.627a1.5 1.5 0 0 1 1.928 1.929A7 7 0 0 0 10 7a7 7 0 0 0 9.442 6.562 1.5 1.5 0 0 1 1.93 1.928C19.957 19.29 16.298 22 12 22 6.477 22 2 17.523 2 12c0-4.297 2.71-7.957 6.509-9.373"/></svg>
|
package/svg/moon_28.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path d="M10.515 3.567a1.5 1.5 0 0 1 1.897 1.899 8 8 0 0 0 10.121 10.12 1.5 1.5 0 0 1 1.899 1.897C22.976 21.85 18.86 25 14 25 7.925 25 3 20.075 3 14c0-4.859 3.15-8.976 7.515-10.433"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M12.25 2c.967 0 1.75.784 1.75 1.75v8.5A1.75 1.75 0 0 1 12.25 14h-8.5l-.179-.009A1.75 1.75 0 0 1 2 12.25v-8.5a1.75 1.75 0 0 1 1.571-1.741L3.75 2zm-8.5 1a.75.75 0 0 0-.75.75v8.5c0 .414.336.75.75.75H5V3zm8.5 10a.75.75 0 0 0 .75-.75v-8.5a.75.75 0 0 0-.75-.75H6v10z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M15 3a2 2 0 0 1 2 2v10a2 2 0 0 1-1.796 1.99L15 17H5l-.204-.01a2 2 0 0 1-1.785-1.786L3 15V5a2 2 0 0 1 2-2zM5 4.5a.5.5 0 0 0-.5.5v10a.5.5 0 0 0 .5.5h2v-11zm3.5 11H15a.5.5 0 0 0 .5-.5V5a.5.5 0 0 0-.5-.5H8.5z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M18.756 3.013A2.5 2.5 0 0 1 21 5.5v13l-.013.256a2.5 2.5 0 0 1-2.231 2.231L18.5 21h-13a2.5 2.5 0 0 1-2.487-2.244L3 18.5v-13A2.5 2.5 0 0 1 5.5 3h13zM5.5 5a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 .5.5H8V5zm13 14a.5.5 0 0 0 .5-.5v-13a.5.5 0 0 0-.5-.5H10v14z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path d="M21 4a3 3 0 0 1 3 3v14a3 3 0 0 1-2.846 2.996L21 24H7l-.154-.004a3 3 0 0 1-2.842-2.842L4 21V7a3 3 0 0 1 3-3zM7 6a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h3V6zm14 16a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1h-9v16z"/></svg>
|