@asteby/metacore-runtime-react 49.10.0 → 49.12.0
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/CHANGELOG.md +26 -0
- package/README.md +40 -0
- package/dist/column-filter-field.d.ts +21 -0
- package/dist/column-filter-field.d.ts.map +1 -0
- package/dist/column-filter-field.js +51 -0
- package/dist/dialogs/dynamic-record.d.ts +5 -2
- package/dist/dialogs/dynamic-record.d.ts.map +1 -1
- package/dist/dialogs/dynamic-record.js +96 -14
- package/dist/dynamic-columns.d.ts.map +1 -1
- package/dist/dynamic-columns.js +11 -1
- package/dist/dynamic-form.d.ts.map +1 -1
- package/dist/dynamic-form.js +10 -2
- package/dist/dynamic-icon.d.ts +16 -1
- package/dist/dynamic-icon.d.ts.map +1 -1
- package/dist/dynamic-icon.js +36 -5
- package/dist/dynamic-multi-select-field.d.ts +13 -1
- package/dist/dynamic-multi-select-field.d.ts.map +1 -1
- package/dist/dynamic-multi-select-field.js +19 -4
- package/dist/dynamic-table.d.ts.map +1 -1
- package/dist/dynamic-table.js +2 -1
- package/dist/field-widget-registry.d.ts +35 -0
- package/dist/field-widget-registry.d.ts.map +1 -0
- package/dist/field-widget-registry.js +66 -0
- package/dist/icon-aliases.d.ts +2 -0
- package/dist/icon-aliases.d.ts.map +1 -0
- package/dist/icon-aliases.js +594 -0
- package/dist/icon-resolvers.d.ts +13 -0
- package/dist/icon-resolvers.d.ts.map +1 -0
- package/dist/icon-resolvers.js +36 -0
- package/dist/icon-spec.d.ts +17 -0
- package/dist/icon-spec.d.ts.map +1 -0
- package/dist/icon-spec.js +165 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/column-filter-field.test.ts +105 -0
- package/src/__tests__/dynamic-record-field-types.test.tsx +221 -0
- package/src/__tests__/field-widget-registry.test.tsx +165 -0
- package/src/__tests__/icon-component.test.tsx +145 -0
- package/src/__tests__/icon-spec.test.ts +155 -0
- package/src/column-filter-field.ts +66 -0
- package/src/dialogs/dynamic-record.tsx +145 -13
- package/src/dynamic-columns.tsx +22 -1
- package/src/dynamic-form.tsx +12 -1
- package/src/dynamic-icon.tsx +68 -3
- package/src/dynamic-multi-select-field.tsx +29 -4
- package/src/dynamic-table.tsx +2 -1
- package/src/field-widget-registry.tsx +98 -0
- package/src/icon-aliases.ts +602 -0
- package/src/icon-resolvers.ts +59 -0
- package/src/icon-spec.ts +169 -0
- package/src/index.ts +12 -0
- package/src/types.ts +3 -0
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
// Alias table FontAwesome (5/6) -> Lucide slug (kebab, as in
|
|
2
|
+
// `lucide-react/dynamicIconImports`). Keys are the FontAwesome name WITHOUT the
|
|
3
|
+
// `fa-` prefix and without style (`fas`/`far`/`fa-solid`...): "fas fa-brain" ->
|
|
4
|
+
// "brain". Values are Lucide glyphs that exist (a test checks every entry
|
|
5
|
+
// against the installed lucide-react).
|
|
6
|
+
//
|
|
7
|
+
// Names that already match a Lucide glyph (`eye`, `heart`, `bone`...) need no
|
|
8
|
+
// entry: the parser tries the FontAwesome name against Lucide directly. The
|
|
9
|
+
// table is for names that differ, and for the ones doctores.lat stores in its
|
|
10
|
+
// database (specialties, services, categories). Lucide ships no brand logos
|
|
11
|
+
// (github, twitter...), so brands only map to a generic neighbour here; a host
|
|
12
|
+
// that needs the real logo registers a resolver (`registerIconResolver`).
|
|
13
|
+
export const FONT_AWESOME_ALIASES = {
|
|
14
|
+
// --- Medicine / health ---
|
|
15
|
+
'user-md': 'stethoscope',
|
|
16
|
+
'user-doctor': 'stethoscope',
|
|
17
|
+
'user-nurse': 'user-round-plus',
|
|
18
|
+
'user-injured': 'user-round-x',
|
|
19
|
+
'hospital-alt': 'hospital',
|
|
20
|
+
'hospital-user': 'hospital',
|
|
21
|
+
'hospital-symbol': 'hospital',
|
|
22
|
+
'clinic-medical': 'hospital',
|
|
23
|
+
'house-medical': 'house-plus',
|
|
24
|
+
'house-chimney-medical': 'house-plus',
|
|
25
|
+
'heartbeat': 'heart-pulse',
|
|
26
|
+
'heart-pulse': 'heart-pulse',
|
|
27
|
+
'heart-circle-plus': 'heart-plus',
|
|
28
|
+
'shield-heart': 'shield-plus',
|
|
29
|
+
'notes-medical': 'notebook-pen',
|
|
30
|
+
'file-medical': 'file-plus',
|
|
31
|
+
'file-medical-alt': 'file-heart',
|
|
32
|
+
'file-waveform': 'file-heart',
|
|
33
|
+
'file-prescription': 'file-heart',
|
|
34
|
+
'file-invoice': 'file-text',
|
|
35
|
+
'file-invoice-dollar': 'receipt',
|
|
36
|
+
'file-alt': 'file-text',
|
|
37
|
+
'file-lines': 'file-text',
|
|
38
|
+
'prescription': 'file-heart',
|
|
39
|
+
'prescription-bottle': 'pill-bottle',
|
|
40
|
+
'prescription-bottle-alt': 'pill-bottle',
|
|
41
|
+
'prescription-bottle-medical': 'pill-bottle',
|
|
42
|
+
'capsules': 'pill',
|
|
43
|
+
'pills': 'pill',
|
|
44
|
+
'tablets': 'tablets',
|
|
45
|
+
'syringe': 'syringe',
|
|
46
|
+
'vial': 'test-tube',
|
|
47
|
+
'vials': 'test-tubes',
|
|
48
|
+
'flask-vial': 'flask-conical',
|
|
49
|
+
'flask': 'flask-conical',
|
|
50
|
+
'microscope': 'microscope',
|
|
51
|
+
'dna': 'dna',
|
|
52
|
+
'x-ray': 'scan',
|
|
53
|
+
'xray': 'scan',
|
|
54
|
+
'radiation': 'radiation',
|
|
55
|
+
'procedures': 'bed',
|
|
56
|
+
'bed-pulse': 'bed',
|
|
57
|
+
'diagnoses': 'scan-heart',
|
|
58
|
+
'head-side-virus': 'virus',
|
|
59
|
+
'head-side-cough': 'wind',
|
|
60
|
+
'head-side-mask': 'shield-plus',
|
|
61
|
+
'viruses': 'virus',
|
|
62
|
+
'bacteria': 'bug',
|
|
63
|
+
'bacterium': 'bug',
|
|
64
|
+
'disease': 'virus',
|
|
65
|
+
'lungs': 'wind',
|
|
66
|
+
'lungs-virus': 'wind',
|
|
67
|
+
'tooth': 'toothbrush',
|
|
68
|
+
'teeth': 'toothbrush',
|
|
69
|
+
'teeth-open': 'toothbrush',
|
|
70
|
+
'allergies': 'flower-2',
|
|
71
|
+
'hand-holding-medical': 'hand-heart',
|
|
72
|
+
'hand-holding-heart': 'hand-heart',
|
|
73
|
+
'hands-helping': 'hand-helping',
|
|
74
|
+
'hand-holding-hand': 'hand-helping',
|
|
75
|
+
'hand-sparkles': 'sparkles',
|
|
76
|
+
'hands-wash': 'droplets',
|
|
77
|
+
'pump-soap': 'droplets',
|
|
78
|
+
'soap': 'droplets',
|
|
79
|
+
'first-aid': 'cross',
|
|
80
|
+
'plus-square': 'square-plus',
|
|
81
|
+
'square-plus': 'square-plus',
|
|
82
|
+
'medkit': 'cross',
|
|
83
|
+
'kit-medical': 'cross',
|
|
84
|
+
'briefcase-medical': 'briefcase',
|
|
85
|
+
'band-aid': 'bandage',
|
|
86
|
+
'bandage': 'bandage',
|
|
87
|
+
'crutch': 'accessibility',
|
|
88
|
+
'wheelchair': 'accessibility',
|
|
89
|
+
'wheelchair-move': 'accessibility',
|
|
90
|
+
'blind': 'eye-off',
|
|
91
|
+
'low-vision': 'eye-off',
|
|
92
|
+
'glasses': 'glasses',
|
|
93
|
+
'deaf': 'ear-off',
|
|
94
|
+
'assistive-listening-systems': 'ear',
|
|
95
|
+
'ear-listen': 'ear',
|
|
96
|
+
'ear-deaf': 'ear-off',
|
|
97
|
+
'weight': 'scale',
|
|
98
|
+
'weight-scale': 'scale',
|
|
99
|
+
'balance-scale': 'scale',
|
|
100
|
+
'scale-balanced': 'scale',
|
|
101
|
+
'thermometer-half': 'thermometer',
|
|
102
|
+
'temperature-high': 'thermometer-sun',
|
|
103
|
+
'temperature-low': 'thermometer-snowflake',
|
|
104
|
+
'cannabis': 'leaf',
|
|
105
|
+
'smoking': 'cigarette',
|
|
106
|
+
'smoking-ban': 'cigarette-off',
|
|
107
|
+
'pager': 'radio',
|
|
108
|
+
'stretcher': 'bed-single',
|
|
109
|
+
'user-clock': 'clock',
|
|
110
|
+
'ribbon': 'ribbon',
|
|
111
|
+
'heart-broken': 'heart-crack',
|
|
112
|
+
'heart-crack': 'heart-crack',
|
|
113
|
+
'baby-carriage': 'baby',
|
|
114
|
+
'child': 'baby',
|
|
115
|
+
'child-reaching': 'baby',
|
|
116
|
+
'person-pregnant': 'baby',
|
|
117
|
+
'pregnant': 'baby',
|
|
118
|
+
'female': 'venus',
|
|
119
|
+
'woman': 'venus',
|
|
120
|
+
'person-dress': 'venus',
|
|
121
|
+
'male': 'mars',
|
|
122
|
+
'man': 'mars',
|
|
123
|
+
'person': 'person-standing',
|
|
124
|
+
'venus-mars': 'venus-and-mars',
|
|
125
|
+
'genderless': 'circle',
|
|
126
|
+
'mars-and-venus': 'venus-and-mars',
|
|
127
|
+
'bone-break': 'bone-fracture',
|
|
128
|
+
'running': 'footprints',
|
|
129
|
+
'person-running': 'footprints',
|
|
130
|
+
'walking': 'footprints',
|
|
131
|
+
'person-walking': 'footprints',
|
|
132
|
+
'biking': 'bike',
|
|
133
|
+
'person-biking': 'bike',
|
|
134
|
+
'swimmer': 'waves',
|
|
135
|
+
'apple-alt': 'apple',
|
|
136
|
+
'apple-whole': 'apple',
|
|
137
|
+
'carrot': 'carrot',
|
|
138
|
+
'seedling': 'sprout',
|
|
139
|
+
'spa': 'flower',
|
|
140
|
+
'dumbbell': 'dumbbell',
|
|
141
|
+
// --- People / accounts ---
|
|
142
|
+
'user-tie': 'user-round',
|
|
143
|
+
'user-shield': 'shield-user',
|
|
144
|
+
'user-graduate': 'graduation-cap',
|
|
145
|
+
'user-friends': 'users',
|
|
146
|
+
'user-group': 'users',
|
|
147
|
+
'user-circle': 'circle-user',
|
|
148
|
+
'user-large': 'user-round',
|
|
149
|
+
'user-edit': 'user-round-pen',
|
|
150
|
+
'user-pen': 'user-round-pen',
|
|
151
|
+
'user-lock': 'user-lock',
|
|
152
|
+
'user-times': 'user-round-x',
|
|
153
|
+
'user-xmark': 'user-round-x',
|
|
154
|
+
'user-minus': 'user-round-minus',
|
|
155
|
+
'user-check': 'user-round-check',
|
|
156
|
+
'user-cog': 'user-round-cog',
|
|
157
|
+
'user-gear': 'user-round-cog',
|
|
158
|
+
'user-secret': 'venetian-mask',
|
|
159
|
+
'user-astronaut': 'rocket',
|
|
160
|
+
'user-ninja': 'venetian-mask',
|
|
161
|
+
'users-cog': 'users',
|
|
162
|
+
'users-gear': 'users',
|
|
163
|
+
'address-card': 'id-card',
|
|
164
|
+
'address-book': 'book-user',
|
|
165
|
+
'id-badge': 'id-card',
|
|
166
|
+
'id-card-alt': 'id-card',
|
|
167
|
+
'building-user': 'building-2',
|
|
168
|
+
'handshake': 'handshake',
|
|
169
|
+
'people-group': 'users',
|
|
170
|
+
'people-arrows': 'users',
|
|
171
|
+
'people-carry': 'users',
|
|
172
|
+
// --- Places / navigation ---
|
|
173
|
+
'map-marker-alt': 'map-pin',
|
|
174
|
+
'map-marker': 'map-pin',
|
|
175
|
+
'location-dot': 'map-pin',
|
|
176
|
+
'location-pin': 'map-pin',
|
|
177
|
+
'map-marked': 'map-pinned',
|
|
178
|
+
'map-marked-alt': 'map-pinned',
|
|
179
|
+
'map-location': 'map-pinned',
|
|
180
|
+
'map-location-dot': 'map-pinned',
|
|
181
|
+
'location-arrow': 'navigation',
|
|
182
|
+
'location-crosshairs': 'locate-fixed',
|
|
183
|
+
'crosshairs': 'crosshair',
|
|
184
|
+
'directions': 'signpost',
|
|
185
|
+
'diamond-turn-right': 'signpost',
|
|
186
|
+
'satellite': 'satellite',
|
|
187
|
+
'satellite-dish': 'satellite-dish',
|
|
188
|
+
'compass': 'compass',
|
|
189
|
+
'route': 'route',
|
|
190
|
+
'home': 'house',
|
|
191
|
+
'house-user': 'house',
|
|
192
|
+
'building': 'building-2',
|
|
193
|
+
'city': 'building',
|
|
194
|
+
'landmark': 'landmark',
|
|
195
|
+
'store': 'store',
|
|
196
|
+
'store-alt': 'store',
|
|
197
|
+
'shop': 'store',
|
|
198
|
+
'warehouse': 'warehouse',
|
|
199
|
+
'truck': 'truck',
|
|
200
|
+
'shipping-fast': 'truck',
|
|
201
|
+
'truck-fast': 'truck',
|
|
202
|
+
'globe': 'globe',
|
|
203
|
+
'globe-americas': 'globe',
|
|
204
|
+
'earth-americas': 'globe',
|
|
205
|
+
'earth-europe': 'globe',
|
|
206
|
+
// --- Time / calendar ---
|
|
207
|
+
'calendar-alt': 'calendar',
|
|
208
|
+
'calendar-days': 'calendar',
|
|
209
|
+
'calendar-day': 'calendar',
|
|
210
|
+
'calendar-week': 'calendar-range',
|
|
211
|
+
'calendar-times': 'calendar-x',
|
|
212
|
+
'calendar-xmark': 'calendar-x',
|
|
213
|
+
'calendar-minus': 'calendar-minus',
|
|
214
|
+
'calendar-plus': 'calendar-plus',
|
|
215
|
+
'calendar-check': 'calendar-check',
|
|
216
|
+
'clock': 'clock',
|
|
217
|
+
'history': 'history',
|
|
218
|
+
'hourglass-half': 'hourglass',
|
|
219
|
+
'hourglass-end': 'hourglass',
|
|
220
|
+
'hourglass-start': 'hourglass',
|
|
221
|
+
'stopwatch': 'timer',
|
|
222
|
+
'business-time': 'briefcase',
|
|
223
|
+
// --- Communication ---
|
|
224
|
+
'phone-alt': 'phone',
|
|
225
|
+
'phone-volume': 'phone-call',
|
|
226
|
+
'phone-square': 'phone',
|
|
227
|
+
'mobile-alt': 'smartphone',
|
|
228
|
+
'mobile': 'smartphone',
|
|
229
|
+
'mobile-screen': 'smartphone',
|
|
230
|
+
'mobile-screen-button': 'smartphone',
|
|
231
|
+
'envelope': 'mail',
|
|
232
|
+
'envelope-open': 'mail-open',
|
|
233
|
+
'envelope-open-text': 'mail-open',
|
|
234
|
+
'at': 'at-sign',
|
|
235
|
+
'comment': 'message-circle',
|
|
236
|
+
'comment-alt': 'message-square',
|
|
237
|
+
'comment-dots': 'message-circle-more',
|
|
238
|
+
'comment-medical': 'message-circle-plus',
|
|
239
|
+
'comment-sms': 'message-square-text',
|
|
240
|
+
'comments': 'messages-square',
|
|
241
|
+
'sms': 'message-square-text',
|
|
242
|
+
'paper-plane': 'send',
|
|
243
|
+
'reply': 'reply',
|
|
244
|
+
'share': 'share-2',
|
|
245
|
+
'share-alt': 'share-2',
|
|
246
|
+
'share-nodes': 'share-2',
|
|
247
|
+
'bullhorn': 'megaphone',
|
|
248
|
+
'headset': 'headset',
|
|
249
|
+
'headphones': 'headphones',
|
|
250
|
+
'microphone': 'mic',
|
|
251
|
+
'microphone-alt': 'mic',
|
|
252
|
+
'video': 'video',
|
|
253
|
+
'bell': 'bell',
|
|
254
|
+
'rss': 'rss',
|
|
255
|
+
'inbox': 'inbox',
|
|
256
|
+
'whatsapp': 'message-circle',
|
|
257
|
+
'whatsapp-square': 'message-circle',
|
|
258
|
+
'telegram': 'send',
|
|
259
|
+
'telegram-plane': 'send',
|
|
260
|
+
'waze': 'navigation',
|
|
261
|
+
'google-maps': 'map-pin',
|
|
262
|
+
// --- Status / feedback ---
|
|
263
|
+
'check': 'check',
|
|
264
|
+
'check-circle': 'circle-check',
|
|
265
|
+
'check-double': 'check-check',
|
|
266
|
+
'check-square': 'square-check',
|
|
267
|
+
'circle-check': 'circle-check',
|
|
268
|
+
'times': 'x',
|
|
269
|
+
'xmark': 'x',
|
|
270
|
+
'close': 'x',
|
|
271
|
+
'times-circle': 'circle-x',
|
|
272
|
+
'xmark-circle': 'circle-x',
|
|
273
|
+
'circle-xmark': 'circle-x',
|
|
274
|
+
'info-circle': 'info',
|
|
275
|
+
'circle-info': 'info',
|
|
276
|
+
'question-circle': 'circle-help',
|
|
277
|
+
'circle-question': 'circle-help',
|
|
278
|
+
'exclamation-circle': 'circle-alert',
|
|
279
|
+
'circle-exclamation': 'circle-alert',
|
|
280
|
+
'exclamation-triangle': 'triangle-alert',
|
|
281
|
+
'triangle-exclamation': 'triangle-alert',
|
|
282
|
+
'exclamation': 'circle-alert',
|
|
283
|
+
'ban': 'ban',
|
|
284
|
+
'bolt': 'zap',
|
|
285
|
+
'spinner': 'loader-circle',
|
|
286
|
+
'circle-notch': 'loader-circle',
|
|
287
|
+
'sync': 'refresh-cw',
|
|
288
|
+
'sync-alt': 'refresh-cw',
|
|
289
|
+
'rotate': 'refresh-cw',
|
|
290
|
+
'redo': 'redo-2',
|
|
291
|
+
'redo-alt': 'redo-2',
|
|
292
|
+
'undo': 'undo-2',
|
|
293
|
+
'undo-alt': 'undo-2',
|
|
294
|
+
'flag': 'flag',
|
|
295
|
+
'certificate': 'badge-check',
|
|
296
|
+
'medal': 'medal',
|
|
297
|
+
'award': 'award',
|
|
298
|
+
'trophy': 'trophy',
|
|
299
|
+
'star-half-alt': 'star-half',
|
|
300
|
+
'star-half-stroke': 'star-half',
|
|
301
|
+
'thumbs-up': 'thumbs-up',
|
|
302
|
+
'thumbs-down': 'thumbs-down',
|
|
303
|
+
'lightbulb': 'lightbulb',
|
|
304
|
+
'magic': 'wand-sparkles',
|
|
305
|
+
'wand-magic-sparkles': 'wand-sparkles',
|
|
306
|
+
'wand-magic': 'wand-sparkles',
|
|
307
|
+
'robot': 'bot',
|
|
308
|
+
'gift': 'gift',
|
|
309
|
+
// --- Interface ---
|
|
310
|
+
'search': 'search',
|
|
311
|
+
'magnifying-glass': 'search',
|
|
312
|
+
'search-plus': 'zoom-in',
|
|
313
|
+
'search-minus': 'zoom-out',
|
|
314
|
+
'magnifying-glass-plus': 'zoom-in',
|
|
315
|
+
'magnifying-glass-minus': 'zoom-out',
|
|
316
|
+
'plus-circle': 'circle-plus',
|
|
317
|
+
'circle-plus': 'circle-plus',
|
|
318
|
+
'minus-circle': 'circle-minus',
|
|
319
|
+
'circle-minus': 'circle-minus',
|
|
320
|
+
'pen': 'pen',
|
|
321
|
+
'pencil-alt': 'pencil',
|
|
322
|
+
'pen-to-square': 'square-pen',
|
|
323
|
+
'edit': 'square-pen',
|
|
324
|
+
'pen-alt': 'pen-line',
|
|
325
|
+
'trash-alt': 'trash-2',
|
|
326
|
+
'trash-can': 'trash-2',
|
|
327
|
+
'trash': 'trash-2',
|
|
328
|
+
'save': 'save',
|
|
329
|
+
'floppy-disk': 'save',
|
|
330
|
+
'cog': 'settings',
|
|
331
|
+
'cogs': 'settings',
|
|
332
|
+
'gear': 'settings',
|
|
333
|
+
'gears': 'settings',
|
|
334
|
+
'sliders-h': 'sliders-horizontal',
|
|
335
|
+
'sliders': 'sliders-horizontal',
|
|
336
|
+
'filter': 'funnel',
|
|
337
|
+
'sort': 'arrow-up-down',
|
|
338
|
+
'sort-amount-down': 'arrow-down-wide-narrow',
|
|
339
|
+
'sort-amount-up': 'arrow-up-narrow-wide',
|
|
340
|
+
'arrow-down-wide-short': 'arrow-down-wide-narrow',
|
|
341
|
+
'arrow-up-wide-short': 'arrow-up-narrow-wide',
|
|
342
|
+
'arrow-down-up': 'arrow-up-down',
|
|
343
|
+
'exchange-alt': 'arrow-left-right',
|
|
344
|
+
'arrows-alt-h': 'arrow-left-right',
|
|
345
|
+
'arrows-alt-v': 'arrow-up-down',
|
|
346
|
+
'arrows-alt': 'move',
|
|
347
|
+
'expand-arrows-alt': 'move',
|
|
348
|
+
'expand-alt': 'maximize-2',
|
|
349
|
+
'expand': 'maximize',
|
|
350
|
+
'compress': 'minimize',
|
|
351
|
+
'compress-alt': 'minimize-2',
|
|
352
|
+
'external-link-alt': 'external-link',
|
|
353
|
+
'external-link-square-alt': 'square-arrow-out-up-right',
|
|
354
|
+
'arrow-up-right-from-square': 'external-link',
|
|
355
|
+
'link': 'link',
|
|
356
|
+
'unlink': 'unlink',
|
|
357
|
+
'chain': 'link',
|
|
358
|
+
'copy': 'copy',
|
|
359
|
+
'clipboard': 'clipboard',
|
|
360
|
+
'clipboard-check': 'clipboard-check',
|
|
361
|
+
'clipboard-list': 'clipboard-list',
|
|
362
|
+
'paste': 'clipboard-paste',
|
|
363
|
+
'print': 'printer',
|
|
364
|
+
'download': 'download',
|
|
365
|
+
'upload': 'upload',
|
|
366
|
+
'cloud-upload-alt': 'cloud-upload',
|
|
367
|
+
'cloud-download-alt': 'cloud-download',
|
|
368
|
+
'sign-out-alt': 'log-out',
|
|
369
|
+
'right-from-bracket': 'log-out',
|
|
370
|
+
'sign-in-alt': 'log-in',
|
|
371
|
+
'right-to-bracket': 'log-in',
|
|
372
|
+
'ellipsis-h': 'ellipsis',
|
|
373
|
+
'ellipsis-v': 'ellipsis-vertical',
|
|
374
|
+
'ellipsis': 'ellipsis',
|
|
375
|
+
'bars': 'menu',
|
|
376
|
+
'navicon': 'menu',
|
|
377
|
+
'th': 'grid-3x3',
|
|
378
|
+
'th-large': 'layout-grid',
|
|
379
|
+
'th-list': 'list',
|
|
380
|
+
'table-cells': 'table',
|
|
381
|
+
'columns': 'columns-3',
|
|
382
|
+
'table-columns': 'columns-3',
|
|
383
|
+
'list-ul': 'list',
|
|
384
|
+
'list-ol': 'list-ordered',
|
|
385
|
+
'tasks': 'list-checks',
|
|
386
|
+
'list-check': 'list-checks',
|
|
387
|
+
'tachometer-alt': 'gauge',
|
|
388
|
+
'gauge-high': 'gauge',
|
|
389
|
+
'tachometer-alt-fast': 'gauge',
|
|
390
|
+
'chart-bar': 'chart-column',
|
|
391
|
+
'chart-column': 'chart-column',
|
|
392
|
+
'chart-line': 'chart-line',
|
|
393
|
+
'chart-pie': 'chart-pie',
|
|
394
|
+
'chart-area': 'chart-area',
|
|
395
|
+
'line-chart': 'chart-line',
|
|
396
|
+
'bar-chart': 'chart-column',
|
|
397
|
+
'pie-chart': 'chart-pie',
|
|
398
|
+
'poll': 'chart-column',
|
|
399
|
+
'eye-slash': 'eye-off',
|
|
400
|
+
'lock-open': 'lock-open',
|
|
401
|
+
'unlock': 'lock-open',
|
|
402
|
+
'unlock-alt': 'lock-open',
|
|
403
|
+
'key': 'key-round',
|
|
404
|
+
'shield-alt': 'shield',
|
|
405
|
+
'shield-halved': 'shield',
|
|
406
|
+
'fingerprint': 'fingerprint-pattern',
|
|
407
|
+
'qrcode': 'qr-code',
|
|
408
|
+
'barcode': 'barcode',
|
|
409
|
+
'tv': 'tv',
|
|
410
|
+
'desktop': 'monitor',
|
|
411
|
+
'laptop': 'laptop',
|
|
412
|
+
'laptop-medical': 'laptop',
|
|
413
|
+
'tablet-alt': 'tablet',
|
|
414
|
+
'wifi': 'wifi',
|
|
415
|
+
'camera': 'camera',
|
|
416
|
+
'camera-retro': 'camera',
|
|
417
|
+
'image': 'image',
|
|
418
|
+
'images': 'images',
|
|
419
|
+
'photo-video': 'images',
|
|
420
|
+
'play': 'play',
|
|
421
|
+
'play-circle': 'circle-play',
|
|
422
|
+
'circle-play': 'circle-play',
|
|
423
|
+
'pause': 'pause',
|
|
424
|
+
'pause-circle': 'circle-pause',
|
|
425
|
+
'stop': 'square',
|
|
426
|
+
'stop-circle': 'circle-stop',
|
|
427
|
+
// --- Arrows / chevrons ---
|
|
428
|
+
'angle-right': 'chevron-right',
|
|
429
|
+
'angle-left': 'chevron-left',
|
|
430
|
+
'angle-up': 'chevron-up',
|
|
431
|
+
'angle-down': 'chevron-down',
|
|
432
|
+
'angle-double-right': 'chevrons-right',
|
|
433
|
+
'angle-double-left': 'chevrons-left',
|
|
434
|
+
'angle-double-up': 'chevrons-up',
|
|
435
|
+
'angle-double-down': 'chevrons-down',
|
|
436
|
+
'angles-right': 'chevrons-right',
|
|
437
|
+
'angles-left': 'chevrons-left',
|
|
438
|
+
'chevron-circle-right': 'circle-chevron-right',
|
|
439
|
+
'chevron-circle-left': 'circle-chevron-left',
|
|
440
|
+
'chevron-circle-up': 'circle-chevron-up',
|
|
441
|
+
'chevron-circle-down': 'circle-chevron-down',
|
|
442
|
+
'long-arrow-alt-right': 'move-right',
|
|
443
|
+
'long-arrow-alt-left': 'move-left',
|
|
444
|
+
'arrow-circle-right': 'circle-arrow-right',
|
|
445
|
+
'arrow-circle-left': 'circle-arrow-left',
|
|
446
|
+
'arrow-circle-up': 'circle-arrow-up',
|
|
447
|
+
'arrow-circle-down': 'circle-arrow-down',
|
|
448
|
+
'caret-right': 'chevron-right',
|
|
449
|
+
'caret-left': 'chevron-left',
|
|
450
|
+
'caret-up': 'chevron-up',
|
|
451
|
+
'caret-down': 'chevron-down',
|
|
452
|
+
'level-up-alt': 'corner-right-up',
|
|
453
|
+
'level-down-alt': 'corner-right-down',
|
|
454
|
+
// --- Commerce / business ---
|
|
455
|
+
'shopping-bag': 'shopping-bag',
|
|
456
|
+
'shopping-basket': 'shopping-basket',
|
|
457
|
+
'cart-shopping': 'shopping-cart',
|
|
458
|
+
'cart-plus': 'shopping-cart',
|
|
459
|
+
'money-bill': 'banknote',
|
|
460
|
+
'money-bill-wave': 'banknote',
|
|
461
|
+
'money-bill-alt': 'banknote',
|
|
462
|
+
'money-check': 'banknote',
|
|
463
|
+
'money-check-alt': 'banknote',
|
|
464
|
+
'dollar-sign': 'dollar-sign',
|
|
465
|
+
'coins': 'coins',
|
|
466
|
+
'credit-card': 'credit-card',
|
|
467
|
+
'wallet': 'wallet',
|
|
468
|
+
'receipt': 'receipt',
|
|
469
|
+
'tag': 'tag',
|
|
470
|
+
'tags': 'tags',
|
|
471
|
+
'percent': 'percent',
|
|
472
|
+
'percentage': 'percent',
|
|
473
|
+
'box': 'package',
|
|
474
|
+
'box-open': 'package-open',
|
|
475
|
+
'boxes': 'package',
|
|
476
|
+
'boxes-stacked': 'package',
|
|
477
|
+
'cube': 'box',
|
|
478
|
+
'cubes': 'boxes',
|
|
479
|
+
'briefcase': 'briefcase',
|
|
480
|
+
'suitcase': 'briefcase',
|
|
481
|
+
'handshake-angle': 'hand-helping',
|
|
482
|
+
'hand-holding-usd': 'hand-coins',
|
|
483
|
+
'hand-holding-dollar': 'hand-coins',
|
|
484
|
+
'balance-scale-left': 'scale',
|
|
485
|
+
'gavel': 'gavel',
|
|
486
|
+
'file-contract': 'file-signature',
|
|
487
|
+
'signature': 'signature',
|
|
488
|
+
'stamp': 'stamp',
|
|
489
|
+
'sitemap': 'network',
|
|
490
|
+
'project-diagram': 'workflow',
|
|
491
|
+
'diagram-project': 'workflow',
|
|
492
|
+
'code-branch': 'git-branch',
|
|
493
|
+
'code': 'code',
|
|
494
|
+
'terminal': 'terminal',
|
|
495
|
+
'database': 'database',
|
|
496
|
+
'server': 'server',
|
|
497
|
+
'cloud': 'cloud',
|
|
498
|
+
'graduation-cap': 'graduation-cap',
|
|
499
|
+
'university': 'landmark',
|
|
500
|
+
'school': 'school',
|
|
501
|
+
'book': 'book',
|
|
502
|
+
'book-medical': 'book-heart',
|
|
503
|
+
'book-open': 'book-open',
|
|
504
|
+
'newspaper': 'newspaper',
|
|
505
|
+
'quote-left': 'quote',
|
|
506
|
+
'quote-right': 'quote',
|
|
507
|
+
'comment-alt-medical': 'message-circle-plus',
|
|
508
|
+
'utensils': 'utensils',
|
|
509
|
+
'coffee': 'coffee',
|
|
510
|
+
'mug-hot': 'coffee',
|
|
511
|
+
'bicycle': 'bike',
|
|
512
|
+
'car': 'car',
|
|
513
|
+
'bus': 'bus',
|
|
514
|
+
'plane': 'plane',
|
|
515
|
+
'ambulance': 'ambulance',
|
|
516
|
+
'hand-paper': 'hand',
|
|
517
|
+
'hand-pointer': 'pointer',
|
|
518
|
+
'hand-point-right': 'hand',
|
|
519
|
+
'sun': 'sun',
|
|
520
|
+
'moon': 'moon',
|
|
521
|
+
'fire': 'flame',
|
|
522
|
+
'fire-alt': 'flame',
|
|
523
|
+
'tint': 'droplet',
|
|
524
|
+
'water': 'waves',
|
|
525
|
+
'wind': 'wind',
|
|
526
|
+
'snowflake': 'snowflake',
|
|
527
|
+
'leaf': 'leaf',
|
|
528
|
+
'tree': 'tree-pine',
|
|
529
|
+
'paw': 'paw-print',
|
|
530
|
+
'dog': 'dog',
|
|
531
|
+
'cat': 'cat',
|
|
532
|
+
'horse': 'paw-print',
|
|
533
|
+
'bug': 'bug',
|
|
534
|
+
'smile': 'smile',
|
|
535
|
+
'frown': 'frown',
|
|
536
|
+
'meh': 'meh',
|
|
537
|
+
'grin': 'smile',
|
|
538
|
+
'laugh': 'laugh',
|
|
539
|
+
'dizzy': 'annoyed',
|
|
540
|
+
'heartbeat-alt': 'activity',
|
|
541
|
+
'wave-square': 'audio-waveform',
|
|
542
|
+
'wave-pulse': 'activity',
|
|
543
|
+
'chart-simple': 'chart-no-axes-column',
|
|
544
|
+
'ruler': 'ruler',
|
|
545
|
+
'tools': 'wrench',
|
|
546
|
+
'screwdriver-wrench': 'wrench',
|
|
547
|
+
'wrench': 'wrench',
|
|
548
|
+
'hammer': 'hammer',
|
|
549
|
+
'paint-brush': 'paintbrush',
|
|
550
|
+
'palette': 'palette',
|
|
551
|
+
'drafting-compass': 'drafting-compass',
|
|
552
|
+
'pen-nib': 'pen-tool',
|
|
553
|
+
'font': 'type',
|
|
554
|
+
'bold': 'bold',
|
|
555
|
+
'italic': 'italic',
|
|
556
|
+
'underline': 'underline',
|
|
557
|
+
'align-left': 'align-left',
|
|
558
|
+
'align-center': 'align-center',
|
|
559
|
+
'align-right': 'align-right',
|
|
560
|
+
'language': 'languages',
|
|
561
|
+
'heading': 'heading',
|
|
562
|
+
'paragraph': 'pilcrow',
|
|
563
|
+
'bookmark': 'bookmark',
|
|
564
|
+
'folder': 'folder',
|
|
565
|
+
'folder-open': 'folder-open',
|
|
566
|
+
'archive': 'archive',
|
|
567
|
+
'box-archive': 'archive',
|
|
568
|
+
'file': 'file',
|
|
569
|
+
'file-pdf': 'file-text',
|
|
570
|
+
'file-word': 'file-text',
|
|
571
|
+
'file-excel': 'file-spreadsheet',
|
|
572
|
+
'file-image': 'file-image',
|
|
573
|
+
'file-upload': 'file-up',
|
|
574
|
+
'file-download': 'file-down',
|
|
575
|
+
'file-export': 'file-output',
|
|
576
|
+
'file-import': 'file-input',
|
|
577
|
+
'file-signature': 'file-signature',
|
|
578
|
+
'file-csv': 'file-spreadsheet',
|
|
579
|
+
'circle': 'circle',
|
|
580
|
+
'square': 'square',
|
|
581
|
+
'dot-circle': 'circle-dot',
|
|
582
|
+
'circle-dot': 'circle-dot',
|
|
583
|
+
'plus': 'plus',
|
|
584
|
+
'minus': 'minus',
|
|
585
|
+
'star': 'star',
|
|
586
|
+
'heart': 'heart',
|
|
587
|
+
'eye': 'eye',
|
|
588
|
+
'bone': 'bone',
|
|
589
|
+
'brain': 'brain',
|
|
590
|
+
'baby': 'baby',
|
|
591
|
+
'stethoscope': 'stethoscope',
|
|
592
|
+
'hospital': 'hospital',
|
|
593
|
+
'cross': 'cross',
|
|
594
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type IconSpec } from './icon-spec';
|
|
3
|
+
export type IconResolver = (spec: string) => IconSpec | ReactNode | null | undefined;
|
|
4
|
+
/** Outcome of resolving: a built-in spec, or a node the host rendered itself. */
|
|
5
|
+
export type ResolvedIcon = IconSpec | {
|
|
6
|
+
kind: 'node';
|
|
7
|
+
node: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
/** Registers a resolver; returns the disposer that removes it. */
|
|
10
|
+
export declare function registerIconResolver(fn: IconResolver): () => void;
|
|
11
|
+
/** Host resolvers first (newest first), then the built-in parser. */
|
|
12
|
+
export declare function resolveIconSpec(spec: unknown): ResolvedIcon;
|
|
13
|
+
//# sourceMappingURL=icon-resolvers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-resolvers.d.ts","sourceRoot":"","sources":["../src/icon-resolvers.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAiB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE1D,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,QAAQ,GAAG,SAAS,GAAG,IAAI,GAAG,SAAS,CAAA;AAEpF,iFAAiF;AACjF,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,CAAA;CAAE,CAAA;AAevE,kEAAkE;AAClE,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,YAAY,GAAG,MAAM,IAAI,CAMjE;AAED,qEAAqE;AACrE,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,YAAY,CAc3D"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { parseIconSpec } from './icon-spec';
|
|
2
|
+
const resolvers = [];
|
|
3
|
+
const SPEC_KINDS = new Set(['lucide', 'emoji', 'image', 'unknown']);
|
|
4
|
+
function isIconSpec(v) {
|
|
5
|
+
return (typeof v === 'object' &&
|
|
6
|
+
v !== null &&
|
|
7
|
+
!('$$typeof' in v) &&
|
|
8
|
+
SPEC_KINDS.has(v.kind));
|
|
9
|
+
}
|
|
10
|
+
/** Registers a resolver; returns the disposer that removes it. */
|
|
11
|
+
export function registerIconResolver(fn) {
|
|
12
|
+
resolvers.push(fn);
|
|
13
|
+
return () => {
|
|
14
|
+
const i = resolvers.lastIndexOf(fn);
|
|
15
|
+
if (i >= 0)
|
|
16
|
+
resolvers.splice(i, 1);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/** Host resolvers first (newest first), then the built-in parser. */
|
|
20
|
+
export function resolveIconSpec(spec) {
|
|
21
|
+
if (typeof spec === 'string' && spec.trim() !== '') {
|
|
22
|
+
for (let i = resolvers.length - 1; i >= 0; i--) {
|
|
23
|
+
let out;
|
|
24
|
+
try {
|
|
25
|
+
out = resolvers[i](spec);
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
if (out === null || out === undefined)
|
|
31
|
+
continue;
|
|
32
|
+
return isIconSpec(out) ? out : { kind: 'node', node: out };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return parseIconSpec(spec);
|
|
36
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type IconSpec = {
|
|
2
|
+
kind: 'lucide';
|
|
3
|
+
name: string;
|
|
4
|
+
} | {
|
|
5
|
+
kind: 'emoji';
|
|
6
|
+
value: string;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'image';
|
|
9
|
+
src: string;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'unknown';
|
|
12
|
+
raw: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function isSingleEmoji(value: string): boolean;
|
|
15
|
+
/** Classifies an icon value. Pure and deterministic. */
|
|
16
|
+
export declare function parseIconSpec(spec: unknown): IconSpec;
|
|
17
|
+
//# sourceMappingURL=icon-spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-spec.d.ts","sourceRoot":"","sources":["../src/icon-spec.ts"],"names":[],"mappings":"AAiBA,MAAM,MAAM,QAAQ,GACd;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AA0FtC,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAMpD;AAcD,wDAAwD;AACxD,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,CAoCrD"}
|