@apia/icons 2.0.11 → 3.0.2

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/dist/index.d.ts CHANGED
@@ -1,4 +1,411 @@
1
- export { FileIcon } from './FileIcon.js';
2
- export { Icon } from './Icon.js';
3
- export { IconsMap, TIconName, TIconType, icons, isIconName } from './iconMap.js';
1
+ import * as React from 'react';
2
+ import React__default from 'react';
3
+ import { IconType, IconBaseProps } from '@meronex/icons';
4
+ import { RequireExactlyOne } from 'type-fest';
5
+ import * as _meronex_icons_lib from '@meronex/icons/lib';
6
+
7
+ declare const FileIcon: ({ docName, iconSize, }: {
8
+ docName: string;
9
+ iconSize?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
10
+ }) => React.JSX.Element;
11
+
12
+ type TIconType = IconType;
13
+ type TIconName = keyof typeof IconsMap;
14
+ /**
15
+ * La idea original al menos, es que los nombres de los íconos sean lo más
16
+ * genérico posible. Como ejemplo, tenemos el ícono Plus, cuyo nombre no indica
17
+ * nada acerca del rol que ocupa en la aplicación, sino que solamente describe
18
+ * qué ícono podemos esperar encontrar.
19
+ *
20
+ * Para indicar qué uso podría tener en la aplicación, se pueden agregar tags
21
+ * en el array tags correspondiente.
22
+ */
23
+ declare const IconsMap: {
24
+ Alert: {
25
+ icon: IconType;
26
+ tags: string[];
27
+ };
28
+ AreaSelect: {
29
+ icon: IconType;
30
+ tags: never[];
31
+ };
32
+ ArrowLeft: {
33
+ icon: IconType;
34
+ tags: never[];
35
+ };
36
+ ArrowRight: {
37
+ icon: IconType;
38
+ tags: never[];
39
+ };
40
+ ArrowUp: {
41
+ icon: IconType;
42
+ tags: never[];
43
+ };
44
+ ArrowDown: {
45
+ icon: IconType;
46
+ tags: never[];
47
+ };
48
+ ArrowRightThin: {
49
+ icon: _meronex_icons_lib.IconType;
50
+ tags: never[];
51
+ };
52
+ ArrowLeftThin: {
53
+ icon: _meronex_icons_lib.IconType;
54
+ tags: never[];
55
+ };
56
+ ArrowUpThin: {
57
+ icon: IconType;
58
+ tags: never[];
59
+ };
60
+ ArrowDownThin: {
61
+ icon: IconType;
62
+ tags: never[];
63
+ };
64
+ Broom: {
65
+ icon: IconType;
66
+ tags: string[];
67
+ };
68
+ Bulb: {
69
+ icon: IconType;
70
+ tags: string[];
71
+ };
72
+ Calendar: {
73
+ icon: IconType;
74
+ tags: string[];
75
+ };
76
+ Check: {
77
+ icon: IconType;
78
+ tags: string[];
79
+ };
80
+ CircleFilled: {
81
+ icon: IconType;
82
+ tags: never[];
83
+ };
84
+ Clock: {
85
+ icon: IconType;
86
+ tags: never[];
87
+ };
88
+ CloudArrow: {
89
+ icon: IconType;
90
+ tags: string[];
91
+ };
92
+ Close: {
93
+ icon: IconType;
94
+ tags: string[];
95
+ };
96
+ CloseThin: {
97
+ icon: IconType;
98
+ tags: string[];
99
+ };
100
+ Comment: {
101
+ icon: IconType;
102
+ tags: never[];
103
+ };
104
+ Copy: {
105
+ icon: IconType;
106
+ tags: never[];
107
+ };
108
+ CrossFilter: {
109
+ icon: IconType;
110
+ tags: never[];
111
+ };
112
+ Cube: {
113
+ icon: IconType;
114
+ tags: never[];
115
+ };
116
+ Desktop: {
117
+ icon: IconType;
118
+ tags: string[];
119
+ };
120
+ Difference: {
121
+ icon: IconType;
122
+ tags: never[];
123
+ };
124
+ Download: {
125
+ icon: IconType;
126
+ tags: never[];
127
+ };
128
+ DotSmall: {
129
+ icon: IconType;
130
+ tags: never[];
131
+ };
132
+ DotBig: {
133
+ icon: IconType;
134
+ tags: never[];
135
+ };
136
+ DragAndDrop: {
137
+ icon: IconType;
138
+ tags: string[];
139
+ };
140
+ Edit: {
141
+ icon: IconType;
142
+ tags: string[];
143
+ };
144
+ Ellipsis: {
145
+ icon: IconType;
146
+ tags: string[];
147
+ };
148
+ External: {
149
+ icon: IconType;
150
+ tags: string[];
151
+ };
152
+ File: {
153
+ icon: IconType;
154
+ tags: string[];
155
+ };
156
+ Filter: {
157
+ icon: IconType;
158
+ tags: never[];
159
+ };
160
+ First: {
161
+ icon: IconType;
162
+ tags: never[];
163
+ };
164
+ FlowTree: {
165
+ icon: IconType;
166
+ tags: never[];
167
+ };
168
+ FolderClosed: {
169
+ icon: IconType;
170
+ tags: string[];
171
+ };
172
+ FolderOpen: {
173
+ icon: IconType;
174
+ tags: string[];
175
+ };
176
+ FolderPlus: {
177
+ icon: IconType;
178
+ tags: string[];
179
+ };
180
+ Groups: {
181
+ icon: IconType;
182
+ tags: never[];
183
+ };
184
+ Hamburguer: {
185
+ icon: IconType;
186
+ tags: string[];
187
+ };
188
+ Help: {
189
+ icon: IconType;
190
+ tags: string[];
191
+ };
192
+ Home: {
193
+ icon: IconType;
194
+ tags: string[];
195
+ };
196
+ Info: {
197
+ icon: IconType;
198
+ tags: never[];
199
+ };
200
+ Laptop: {
201
+ icon: IconType;
202
+ tags: never[];
203
+ };
204
+ Last: {
205
+ icon: IconType;
206
+ tags: never[];
207
+ };
208
+ LetterAutocomplete: {
209
+ icon: IconType;
210
+ tags: never[];
211
+ };
212
+ Locked: {
213
+ icon: IconType;
214
+ tags: string[];
215
+ };
216
+ Magic: {
217
+ icon: IconType;
218
+ tags: string[];
219
+ };
220
+ Maximize: {
221
+ icon: IconType;
222
+ tags: string[];
223
+ };
224
+ Merge: {
225
+ icon: IconType;
226
+ tags: never[];
227
+ };
228
+ Minimize: {
229
+ icon: IconType;
230
+ tags: string[];
231
+ };
232
+ Minus: {
233
+ icon: IconType;
234
+ tags: string[];
235
+ };
236
+ MinusReverse: {
237
+ icon: IconType;
238
+ tags: string[];
239
+ };
240
+ MinusFilled: {
241
+ icon: IconType;
242
+ tags: string[];
243
+ };
244
+ Molecule: {
245
+ icon: IconType;
246
+ tags: string[];
247
+ };
248
+ Next: {
249
+ icon: IconType;
250
+ tags: never[];
251
+ };
252
+ Note: {
253
+ icon: IconType;
254
+ tags: never[];
255
+ };
256
+ PanHand: {
257
+ icon: IconType;
258
+ tags: string[];
259
+ };
260
+ Pin: {
261
+ icon: IconType;
262
+ tags: never[];
263
+ };
264
+ Plus: {
265
+ icon: IconType;
266
+ tags: string[];
267
+ };
268
+ PlusReverse: {
269
+ icon: IconType;
270
+ tags: string[];
271
+ };
272
+ PlusFilled: {
273
+ icon: IconType;
274
+ tags: string[];
275
+ };
276
+ PlusThin: {
277
+ icon: IconType;
278
+ tags: never[];
279
+ };
280
+ Pointer: {
281
+ icon: IconType;
282
+ tags: string[];
283
+ };
284
+ Previous: {
285
+ icon: IconType;
286
+ tags: never[];
287
+ };
288
+ Print: {
289
+ icon: IconType;
290
+ tags: never[];
291
+ };
292
+ Redo: {
293
+ icon: IconType;
294
+ tags: never[];
295
+ };
296
+ Refresh: {
297
+ icon: IconType;
298
+ tags: string[];
299
+ };
300
+ Save: {
301
+ icon: IconType;
302
+ tags: never[];
303
+ };
304
+ Search: {
305
+ icon: IconType;
306
+ tags: never[];
307
+ };
308
+ Settings: {
309
+ icon: IconType;
310
+ tags: string[];
311
+ };
312
+ SquareFilled: {
313
+ icon: IconType;
314
+ tags: never[];
315
+ };
316
+ SquareOutline: {
317
+ icon: IconType;
318
+ tags: never[];
319
+ };
320
+ Sort: {
321
+ icon: IconType;
322
+ tags: never[];
323
+ };
324
+ Star: {
325
+ icon: IconType;
326
+ tags: string[];
327
+ };
328
+ Sum: {
329
+ icon: IconType;
330
+ tags: string[];
331
+ };
332
+ TaskList: {
333
+ icon: IconType;
334
+ tags: string[];
335
+ };
336
+ Translate: {
337
+ icon: IconType;
338
+ tags: string[];
339
+ };
340
+ Trash: {
341
+ icon: IconType;
342
+ tags: string[];
343
+ };
344
+ Undo: {
345
+ icon: IconType;
346
+ tags: string[];
347
+ };
348
+ Upload: {
349
+ icon: IconType;
350
+ tags: never[];
351
+ };
352
+ User: {
353
+ icon: IconType;
354
+ tags: never[];
355
+ };
356
+ User2: {
357
+ icon: IconType;
358
+ tags: never[];
359
+ };
360
+ Volume: {
361
+ icon: IconType;
362
+ tags: never[];
363
+ };
364
+ WindowMaximize: {
365
+ icon: IconType;
366
+ tags: never[];
367
+ };
368
+ WindowMinimize: {
369
+ icon: IconType;
370
+ tags: never[];
371
+ };
372
+ Work: {
373
+ icon: IconType;
374
+ tags: never[];
375
+ };
376
+ ZoomIn: {
377
+ icon: IconType;
378
+ tags: string[];
379
+ };
380
+ ZoomOut: {
381
+ icon: IconType;
382
+ tags: string[];
383
+ };
384
+ };
385
+ declare const icons: Record<"Alert" | "AreaSelect" | "ArrowLeft" | "ArrowRight" | "ArrowUp" | "ArrowDown" | "ArrowRightThin" | "ArrowLeftThin" | "ArrowUpThin" | "ArrowDownThin" | "Broom" | "Bulb" | "Calendar" | "Check" | "CircleFilled" | "Clock" | "CloudArrow" | "Close" | "CloseThin" | "Comment" | "Copy" | "CrossFilter" | "Cube" | "Desktop" | "Difference" | "Download" | "DotSmall" | "DotBig" | "DragAndDrop" | "Edit" | "Ellipsis" | "External" | "File" | "Filter" | "First" | "FlowTree" | "FolderClosed" | "FolderOpen" | "FolderPlus" | "Groups" | "Hamburguer" | "Help" | "Home" | "Info" | "Laptop" | "Last" | "LetterAutocomplete" | "Locked" | "Magic" | "Maximize" | "Merge" | "Minimize" | "Minus" | "MinusReverse" | "MinusFilled" | "Molecule" | "Next" | "Note" | "PanHand" | "Pin" | "Plus" | "PlusReverse" | "PlusFilled" | "PlusThin" | "Pointer" | "Previous" | "Print" | "Redo" | "Refresh" | "Save" | "Search" | "Settings" | "SquareFilled" | "SquareOutline" | "Sort" | "Star" | "Sum" | "TaskList" | "Translate" | "Trash" | "Undo" | "Upload" | "User" | "User2" | "Volume" | "WindowMaximize" | "WindowMinimize" | "Work" | "ZoomIn" | "ZoomOut", IconType>;
386
+ /**
387
+ * Se puede utilizar este type guard para aceptar argumentos en los componentes
388
+ * que permitan pasar tanto un nombre de ícono como un ícono en sí.
389
+ *
390
+ * @example
391
+ *-
392
+ * ({icon}: {icon: TIconName | TIconType}) => {
393
+ * const ActualIcon = React.useMemo(
394
+ * ()=> isIconName(icon) ? (() => <Icon name={icon} />) : icon
395
+ * , [])
396
+ * return <ActualIcon />
397
+ * }
398
+ */
399
+ declare function isIconName(arg: TIconName | TIconType): arg is TIconName;
400
+
401
+ type TIconArgs = RequireExactlyOne<{
402
+ icon: TIconName | TIconType;
403
+ name: TIconName;
404
+ }>;
405
+ declare const Icon: React__default.ForwardRefExoticComponent<(TIconArgs & IconBaseProps & {
406
+ title: string;
407
+ imageSrc?: string | undefined;
408
+ }) & React__default.RefAttributes<any>>;
409
+
410
+ export { FileIcon, Icon, IconsMap, type TIconName, type TIconType, icons, isIconName };
4
411
  //# sourceMappingURL=index.d.ts.map