@fortawesome/vue-fontawesome 3.0.0-4 → 3.0.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.
- package/CHANGELOG.md +31 -0
- package/README.md +9 -802
- package/index.d.ts +1 -1
- package/index.es.js +319 -222
- package/index.js +651 -554
- package/package.json +43 -21
- package/src/components/FontAwesomeIcon.js +45 -5
- package/src/utils.js +10 -1
- package/.babelrc +0 -3
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -24
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/.github/workflows/ci.yml +0 -29
- package/.tool-versions +0 -2
- package/CODE_OF_CONDUCT.md +0 -74
- package/CONTRIBUTING.md +0 -57
- package/DEVELOPMENT.md +0 -46
- package/bin/dev +0 -3
- package/bin/setup +0 -8
- package/examples/vue-awesome-example/.browserslistrc +0 -3
- package/examples/vue-awesome-example/.editorconfig +0 -7
- package/examples/vue-awesome-example/.eslintrc.js +0 -18
- package/examples/vue-awesome-example/babel.config.js +0 -5
- package/examples/vue-awesome-example/package-lock.json +0 -20468
- package/examples/vue-awesome-example/package.json +0 -38
- package/examples/vue-awesome-example/public/favicon.ico +0 -0
- package/examples/vue-awesome-example/public/index.html +0 -18
- package/examples/vue-awesome-example/src/App.vue +0 -74
- package/examples/vue-awesome-example/src/main.ts +0 -19
- package/examples/vue-awesome-example/src/shims-vue.d.ts +0 -5
- package/examples/vue-awesome-example/tsconfig.json +0 -39
- package/examples/vue-awesome-example/vue.config.js +0 -3
- package/rollup.config.js +0 -55
- package/src/components/__fixtures__/helpers.js +0 -10
- package/src/components/__fixtures__/icons.js +0 -23
- package/src/components/__tests__/FontAwesomeIcon.test.js +0 -299
- package/src/components/__tests__/FontAwesomeLayers.test.js +0 -83
- package/src/components/__tests__/FontAwesomeLayersText.test.js +0 -94
package/index.js
CHANGED
|
@@ -1,555 +1,652 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}(this, (function (exports,vue
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
}))
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@fortawesome/fontawesome-svg-core'), require('vue')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@fortawesome/fontawesome-svg-core', 'vue'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["vue-fontawesome"] = {}, global.FontAwesome, global.vue));
|
|
5
|
+
})(this, (function (exports, fontawesomeSvgCore, vue) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function ownKeys(object, enumerableOnly) {
|
|
8
|
+
var keys = Object.keys(object);
|
|
9
|
+
|
|
10
|
+
if (Object.getOwnPropertySymbols) {
|
|
11
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
12
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
13
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
14
|
+
})), keys.push.apply(keys, symbols);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return keys;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function _objectSpread2(target) {
|
|
21
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
22
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
23
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
24
|
+
_defineProperty(target, key, source[key]);
|
|
25
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
26
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return target;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function _typeof(obj) {
|
|
34
|
+
"@babel/helpers - typeof";
|
|
35
|
+
|
|
36
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
37
|
+
return typeof obj;
|
|
38
|
+
} : function (obj) {
|
|
39
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
40
|
+
}, _typeof(obj);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function _defineProperty(obj, key, value) {
|
|
44
|
+
if (key in obj) {
|
|
45
|
+
Object.defineProperty(obj, key, {
|
|
46
|
+
value: value,
|
|
47
|
+
enumerable: true,
|
|
48
|
+
configurable: true,
|
|
49
|
+
writable: true
|
|
50
|
+
});
|
|
51
|
+
} else {
|
|
52
|
+
obj[key] = value;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return obj;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
59
|
+
if (source == null) return {};
|
|
60
|
+
var target = {};
|
|
61
|
+
var sourceKeys = Object.keys(source);
|
|
62
|
+
var key, i;
|
|
63
|
+
|
|
64
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
65
|
+
key = sourceKeys[i];
|
|
66
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
67
|
+
target[key] = source[key];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return target;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function _objectWithoutProperties(source, excluded) {
|
|
74
|
+
if (source == null) return {};
|
|
75
|
+
|
|
76
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
77
|
+
|
|
78
|
+
var key, i;
|
|
79
|
+
|
|
80
|
+
if (Object.getOwnPropertySymbols) {
|
|
81
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
82
|
+
|
|
83
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
84
|
+
key = sourceSymbolKeys[i];
|
|
85
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
86
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
87
|
+
target[key] = source[key];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return target;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function _toConsumableArray(arr) {
|
|
95
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function _arrayWithoutHoles(arr) {
|
|
99
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function _iterableToArray(iter) {
|
|
103
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
107
|
+
if (!o) return;
|
|
108
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
109
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
110
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
111
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
112
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function _arrayLikeToArray(arr, len) {
|
|
116
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
117
|
+
|
|
118
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
119
|
+
|
|
120
|
+
return arr2;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function _nonIterableSpread() {
|
|
124
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
128
|
+
|
|
129
|
+
var humps$1 = {exports: {}};
|
|
130
|
+
|
|
131
|
+
(function (module) {
|
|
132
|
+
(function(global) {
|
|
133
|
+
|
|
134
|
+
var _processKeys = function(convert, obj, options) {
|
|
135
|
+
if(!_isObject(obj) || _isDate(obj) || _isRegExp(obj) || _isBoolean(obj) || _isFunction(obj)) {
|
|
136
|
+
return obj;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
var output,
|
|
140
|
+
i = 0,
|
|
141
|
+
l = 0;
|
|
142
|
+
|
|
143
|
+
if(_isArray(obj)) {
|
|
144
|
+
output = [];
|
|
145
|
+
for(l=obj.length; i<l; i++) {
|
|
146
|
+
output.push(_processKeys(convert, obj[i], options));
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
output = {};
|
|
151
|
+
for(var key in obj) {
|
|
152
|
+
if(Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
153
|
+
output[convert(key, options)] = _processKeys(convert, obj[key], options);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return output;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
// String conversion methods
|
|
161
|
+
|
|
162
|
+
var separateWords = function(string, options) {
|
|
163
|
+
options = options || {};
|
|
164
|
+
var separator = options.separator || '_';
|
|
165
|
+
var split = options.split || /(?=[A-Z])/;
|
|
166
|
+
|
|
167
|
+
return string.split(split).join(separator);
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
var camelize = function(string) {
|
|
171
|
+
if (_isNumerical(string)) {
|
|
172
|
+
return string;
|
|
173
|
+
}
|
|
174
|
+
string = string.replace(/[\-_\s]+(.)?/g, function(match, chr) {
|
|
175
|
+
return chr ? chr.toUpperCase() : '';
|
|
176
|
+
});
|
|
177
|
+
// Ensure 1st char is always lowercase
|
|
178
|
+
return string.substr(0, 1).toLowerCase() + string.substr(1);
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
var pascalize = function(string) {
|
|
182
|
+
var camelized = camelize(string);
|
|
183
|
+
// Ensure 1st char is always uppercase
|
|
184
|
+
return camelized.substr(0, 1).toUpperCase() + camelized.substr(1);
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
var decamelize = function(string, options) {
|
|
188
|
+
return separateWords(string, options).toLowerCase();
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
// Utilities
|
|
192
|
+
// Taken from Underscore.js
|
|
193
|
+
|
|
194
|
+
var toString = Object.prototype.toString;
|
|
195
|
+
|
|
196
|
+
var _isFunction = function(obj) {
|
|
197
|
+
return typeof(obj) === 'function';
|
|
198
|
+
};
|
|
199
|
+
var _isObject = function(obj) {
|
|
200
|
+
return obj === Object(obj);
|
|
201
|
+
};
|
|
202
|
+
var _isArray = function(obj) {
|
|
203
|
+
return toString.call(obj) == '[object Array]';
|
|
204
|
+
};
|
|
205
|
+
var _isDate = function(obj) {
|
|
206
|
+
return toString.call(obj) == '[object Date]';
|
|
207
|
+
};
|
|
208
|
+
var _isRegExp = function(obj) {
|
|
209
|
+
return toString.call(obj) == '[object RegExp]';
|
|
210
|
+
};
|
|
211
|
+
var _isBoolean = function(obj) {
|
|
212
|
+
return toString.call(obj) == '[object Boolean]';
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
// Performant way to determine if obj coerces to a number
|
|
216
|
+
var _isNumerical = function(obj) {
|
|
217
|
+
obj = obj - 0;
|
|
218
|
+
return obj === obj;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
// Sets up function which handles processing keys
|
|
222
|
+
// allowing the convert function to be modified by a callback
|
|
223
|
+
var _processor = function(convert, options) {
|
|
224
|
+
var callback = options && 'process' in options ? options.process : options;
|
|
225
|
+
|
|
226
|
+
if(typeof(callback) !== 'function') {
|
|
227
|
+
return convert;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
return function(string, options) {
|
|
231
|
+
return callback(string, convert, options);
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
var humps = {
|
|
236
|
+
camelize: camelize,
|
|
237
|
+
decamelize: decamelize,
|
|
238
|
+
pascalize: pascalize,
|
|
239
|
+
depascalize: decamelize,
|
|
240
|
+
camelizeKeys: function(object, options) {
|
|
241
|
+
return _processKeys(_processor(camelize, options), object);
|
|
242
|
+
},
|
|
243
|
+
decamelizeKeys: function(object, options) {
|
|
244
|
+
return _processKeys(_processor(decamelize, options), object, options);
|
|
245
|
+
},
|
|
246
|
+
pascalizeKeys: function(object, options) {
|
|
247
|
+
return _processKeys(_processor(pascalize, options), object);
|
|
248
|
+
},
|
|
249
|
+
depascalizeKeys: function () {
|
|
250
|
+
return this.decamelizeKeys.apply(this, arguments);
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
if (module.exports) {
|
|
255
|
+
module.exports = humps;
|
|
256
|
+
} else {
|
|
257
|
+
global.humps = humps;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
})(commonjsGlobal);
|
|
261
|
+
} (humps$1));
|
|
262
|
+
|
|
263
|
+
var humps = humps$1.exports;
|
|
264
|
+
|
|
265
|
+
var _excluded = ["class", "style"];
|
|
266
|
+
/**
|
|
267
|
+
* Converts a CSS style into a plain Javascript object.
|
|
268
|
+
* @param {String} style The style to converts into a plain Javascript object.
|
|
269
|
+
* @returns {Object}
|
|
270
|
+
*/
|
|
271
|
+
|
|
272
|
+
function styleToObject(style) {
|
|
273
|
+
return style.split(';').map(function (s) {
|
|
274
|
+
return s.trim();
|
|
275
|
+
}).filter(function (s) {
|
|
276
|
+
return s;
|
|
277
|
+
}).reduce(function (output, pair) {
|
|
278
|
+
var idx = pair.indexOf(':');
|
|
279
|
+
var prop = humps.camelize(pair.slice(0, idx));
|
|
280
|
+
var value = pair.slice(idx + 1).trim();
|
|
281
|
+
output[prop] = value;
|
|
282
|
+
return output;
|
|
283
|
+
}, {});
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Converts a CSS class list into a plain Javascript object.
|
|
287
|
+
* @param {Array<String>} classes The class list to convert.
|
|
288
|
+
* @returns {Object}
|
|
289
|
+
*/
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
function classToObject(classes) {
|
|
293
|
+
return classes.split(/\s+/).reduce(function (output, className) {
|
|
294
|
+
output[className] = true;
|
|
295
|
+
return output;
|
|
296
|
+
}, {});
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Converts a FontAwesome abstract element of an icon into a Vue VNode.
|
|
300
|
+
* @param {AbstractElement | String} abstractElement The element to convert.
|
|
301
|
+
* @param {Object} props The user-defined props.
|
|
302
|
+
* @param {Object} attrs The user-defined native HTML attributes.
|
|
303
|
+
* @returns {VNode}
|
|
304
|
+
*/
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
function convert(abstractElement) {
|
|
308
|
+
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
309
|
+
var attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
310
|
+
|
|
311
|
+
// If the abstract element is a string, we'll just return a string render function
|
|
312
|
+
if (typeof abstractElement === 'string') {
|
|
313
|
+
return abstractElement;
|
|
314
|
+
} // Converting abstract element children into Vue VNodes
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
var children = (abstractElement.children || []).map(function (child) {
|
|
318
|
+
return convert(child);
|
|
319
|
+
}); // Converting abstract element attributes into valid Vue format
|
|
320
|
+
|
|
321
|
+
var mixins = Object.keys(abstractElement.attributes || {}).reduce(function (mixins, key) {
|
|
322
|
+
var value = abstractElement.attributes[key];
|
|
323
|
+
|
|
324
|
+
switch (key) {
|
|
325
|
+
case 'class':
|
|
326
|
+
mixins.class = classToObject(value);
|
|
327
|
+
break;
|
|
328
|
+
|
|
329
|
+
case 'style':
|
|
330
|
+
mixins.style = styleToObject(value);
|
|
331
|
+
break;
|
|
332
|
+
|
|
333
|
+
default:
|
|
334
|
+
mixins.attrs[key] = value;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
return mixins;
|
|
338
|
+
}, {
|
|
339
|
+
attrs: {},
|
|
340
|
+
class: {},
|
|
341
|
+
style: {}
|
|
342
|
+
}); // Now, we'll return the VNode
|
|
343
|
+
|
|
344
|
+
attrs.class;
|
|
345
|
+
var _attrs$style = attrs.style,
|
|
346
|
+
aStyle = _attrs$style === void 0 ? {} : _attrs$style,
|
|
347
|
+
otherAttrs = _objectWithoutProperties(attrs, _excluded);
|
|
348
|
+
|
|
349
|
+
return vue.h(abstractElement.tag, _objectSpread2(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
350
|
+
class: mixins.class,
|
|
351
|
+
style: _objectSpread2(_objectSpread2({}, mixins.style), aStyle)
|
|
352
|
+
}, mixins.attrs), otherAttrs), children);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
var PRODUCTION = false;
|
|
356
|
+
|
|
357
|
+
try {
|
|
358
|
+
PRODUCTION = process.env.NODE_ENV === 'production';
|
|
359
|
+
} catch (e) {}
|
|
360
|
+
|
|
361
|
+
function log () {
|
|
362
|
+
if (!PRODUCTION && console && typeof console.error === 'function') {
|
|
363
|
+
var _console;
|
|
364
|
+
|
|
365
|
+
(_console = console).error.apply(_console, arguments);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
function objectWithKey(key, value) {
|
|
370
|
+
return Array.isArray(value) && value.length > 0 || !Array.isArray(value) && value ? _defineProperty({}, key, value) : {};
|
|
371
|
+
}
|
|
372
|
+
function classList(props) {
|
|
373
|
+
var _classes;
|
|
374
|
+
|
|
375
|
+
var classes = (_classes = {
|
|
376
|
+
'fa-spin': props.spin,
|
|
377
|
+
'fa-pulse': props.pulse,
|
|
378
|
+
'fa-fw': props.fixedWidth,
|
|
379
|
+
'fa-border': props.border,
|
|
380
|
+
'fa-li': props.listItem,
|
|
381
|
+
'fa-inverse': props.inverse,
|
|
382
|
+
'fa-flip': props.flip === true,
|
|
383
|
+
'fa-flip-horizontal': props.flip === 'horizontal' || props.flip === 'both',
|
|
384
|
+
'fa-flip-vertical': props.flip === 'vertical' || props.flip === 'both'
|
|
385
|
+
}, _defineProperty(_classes, "fa-".concat(props.size), props.size !== null), _defineProperty(_classes, "fa-rotate-".concat(props.rotation), props.rotation !== null), _defineProperty(_classes, "fa-pull-".concat(props.pull), props.pull !== null), _defineProperty(_classes, 'fa-swap-opacity', props.swapOpacity), _defineProperty(_classes, 'fa-bounce', props.bounce), _defineProperty(_classes, 'fa-shake', props.shake), _defineProperty(_classes, 'fa-beat', props.beat), _defineProperty(_classes, 'fa-fade', props.fade), _defineProperty(_classes, 'fa-beat-fade', props.beatFade), _defineProperty(_classes, 'fa-flash', props.flash), _defineProperty(_classes, 'fa-spin-pulse', props.spinPulse), _defineProperty(_classes, 'fa-spin-reverse', props.spinReverse), _classes);
|
|
386
|
+
return Object.keys(classes).map(function (key) {
|
|
387
|
+
return classes[key] ? key : null;
|
|
388
|
+
}).filter(function (key) {
|
|
389
|
+
return key;
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
function normalizeIconArgs(icon) {
|
|
394
|
+
if (icon && _typeof(icon) === 'object' && icon.prefix && icon.iconName && icon.icon) {
|
|
395
|
+
return icon;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
if (fontawesomeSvgCore.parse.icon) {
|
|
399
|
+
return fontawesomeSvgCore.parse.icon(icon);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
if (icon === null) {
|
|
403
|
+
return null;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
if (_typeof(icon) === 'object' && icon.prefix && icon.iconName) {
|
|
407
|
+
return icon;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
if (Array.isArray(icon) && icon.length === 2) {
|
|
411
|
+
return {
|
|
412
|
+
prefix: icon[0],
|
|
413
|
+
iconName: icon[1]
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
if (typeof icon === 'string') {
|
|
418
|
+
return {
|
|
419
|
+
prefix: 'fas',
|
|
420
|
+
iconName: icon
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
var FontAwesomeIcon = vue.defineComponent({
|
|
426
|
+
name: 'FontAwesomeIcon',
|
|
427
|
+
props: {
|
|
428
|
+
border: {
|
|
429
|
+
type: Boolean,
|
|
430
|
+
default: false
|
|
431
|
+
},
|
|
432
|
+
fixedWidth: {
|
|
433
|
+
type: Boolean,
|
|
434
|
+
default: false
|
|
435
|
+
},
|
|
436
|
+
flip: {
|
|
437
|
+
type: [Boolean, String],
|
|
438
|
+
default: false,
|
|
439
|
+
validator: function validator(value) {
|
|
440
|
+
return [true, false, 'horizontal', 'vertical', 'both'].indexOf(value) > -1;
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
icon: {
|
|
444
|
+
type: [Object, Array, String],
|
|
445
|
+
required: true
|
|
446
|
+
},
|
|
447
|
+
mask: {
|
|
448
|
+
type: [Object, Array, String],
|
|
449
|
+
default: null
|
|
450
|
+
},
|
|
451
|
+
listItem: {
|
|
452
|
+
type: Boolean,
|
|
453
|
+
default: false
|
|
454
|
+
},
|
|
455
|
+
pull: {
|
|
456
|
+
type: String,
|
|
457
|
+
default: null,
|
|
458
|
+
validator: function validator(value) {
|
|
459
|
+
return ['right', 'left'].indexOf(value) > -1;
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
pulse: {
|
|
463
|
+
type: Boolean,
|
|
464
|
+
default: false
|
|
465
|
+
},
|
|
466
|
+
rotation: {
|
|
467
|
+
type: [String, Number],
|
|
468
|
+
default: null,
|
|
469
|
+
validator: function validator(value) {
|
|
470
|
+
return [90, 180, 270].indexOf(Number.parseInt(value, 10)) > -1;
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
swapOpacity: {
|
|
474
|
+
type: Boolean,
|
|
475
|
+
default: false
|
|
476
|
+
},
|
|
477
|
+
size: {
|
|
478
|
+
type: String,
|
|
479
|
+
default: null,
|
|
480
|
+
validator: function validator(value) {
|
|
481
|
+
return ['2xs', 'xs', 'sm', 'lg', 'xl', '2xl', '1x', '2x', '3x', '4x', '5x', '6x', '7x', '8x', '9x', '10x'].indexOf(value) > -1;
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
spin: {
|
|
485
|
+
type: Boolean,
|
|
486
|
+
default: false
|
|
487
|
+
},
|
|
488
|
+
transform: {
|
|
489
|
+
type: [String, Object],
|
|
490
|
+
default: null
|
|
491
|
+
},
|
|
492
|
+
symbol: {
|
|
493
|
+
type: [Boolean, String],
|
|
494
|
+
default: false
|
|
495
|
+
},
|
|
496
|
+
title: {
|
|
497
|
+
type: String,
|
|
498
|
+
default: null
|
|
499
|
+
},
|
|
500
|
+
inverse: {
|
|
501
|
+
type: Boolean,
|
|
502
|
+
default: false
|
|
503
|
+
},
|
|
504
|
+
bounce: {
|
|
505
|
+
type: Boolean,
|
|
506
|
+
default: false
|
|
507
|
+
},
|
|
508
|
+
shake: {
|
|
509
|
+
type: Boolean,
|
|
510
|
+
default: false
|
|
511
|
+
},
|
|
512
|
+
beat: {
|
|
513
|
+
type: Boolean,
|
|
514
|
+
default: false
|
|
515
|
+
},
|
|
516
|
+
fade: {
|
|
517
|
+
type: Boolean,
|
|
518
|
+
default: false
|
|
519
|
+
},
|
|
520
|
+
beatFade: {
|
|
521
|
+
type: Boolean,
|
|
522
|
+
default: false
|
|
523
|
+
},
|
|
524
|
+
flash: {
|
|
525
|
+
type: Boolean,
|
|
526
|
+
default: false
|
|
527
|
+
},
|
|
528
|
+
spinPulse: {
|
|
529
|
+
type: Boolean,
|
|
530
|
+
default: false
|
|
531
|
+
},
|
|
532
|
+
spinReverse: {
|
|
533
|
+
type: Boolean,
|
|
534
|
+
default: false
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
setup: function setup(props, _ref) {
|
|
538
|
+
var attrs = _ref.attrs;
|
|
539
|
+
var icon = vue.computed(function () {
|
|
540
|
+
return normalizeIconArgs(props.icon);
|
|
541
|
+
});
|
|
542
|
+
var classes = vue.computed(function () {
|
|
543
|
+
return objectWithKey('classes', classList(props));
|
|
544
|
+
});
|
|
545
|
+
var transform = vue.computed(function () {
|
|
546
|
+
return objectWithKey('transform', typeof props.transform === 'string' ? fontawesomeSvgCore.parse.transform(props.transform) : props.transform);
|
|
547
|
+
});
|
|
548
|
+
var mask = vue.computed(function () {
|
|
549
|
+
return objectWithKey('mask', normalizeIconArgs(props.mask));
|
|
550
|
+
});
|
|
551
|
+
var renderedIcon = vue.computed(function () {
|
|
552
|
+
return fontawesomeSvgCore.icon(icon.value, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, classes.value), transform.value), mask.value), {}, {
|
|
553
|
+
symbol: props.symbol,
|
|
554
|
+
title: props.title
|
|
555
|
+
}));
|
|
556
|
+
});
|
|
557
|
+
vue.watch(renderedIcon, function (value) {
|
|
558
|
+
if (!value) {
|
|
559
|
+
return log('Could not find one or more icon(s)', icon.value, mask.value);
|
|
560
|
+
}
|
|
561
|
+
}, {
|
|
562
|
+
immediate: true
|
|
563
|
+
});
|
|
564
|
+
var vnode = vue.computed(function () {
|
|
565
|
+
return renderedIcon.value ? convert(renderedIcon.value.abstract[0], {}, attrs) : null;
|
|
566
|
+
});
|
|
567
|
+
return function () {
|
|
568
|
+
return vnode.value;
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
});
|
|
572
|
+
|
|
573
|
+
var FontAwesomeLayers = vue.defineComponent({
|
|
574
|
+
name: 'FontAwesomeLayers',
|
|
575
|
+
props: {
|
|
576
|
+
fixedWidth: {
|
|
577
|
+
type: Boolean,
|
|
578
|
+
default: false
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
setup: function setup(props, _ref) {
|
|
582
|
+
var slots = _ref.slots;
|
|
583
|
+
var familyPrefix = fontawesomeSvgCore.config.familyPrefix;
|
|
584
|
+
var className = vue.computed(function () {
|
|
585
|
+
return ["".concat(familyPrefix, "-layers")].concat(_toConsumableArray(props.fixedWidth ? ["".concat(familyPrefix, "-fw")] : []));
|
|
586
|
+
});
|
|
587
|
+
return function () {
|
|
588
|
+
return vue.h('div', {
|
|
589
|
+
class: className.value
|
|
590
|
+
}, slots.default ? slots.default() : []);
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
});
|
|
594
|
+
|
|
595
|
+
var FontAwesomeLayersText = vue.defineComponent({
|
|
596
|
+
name: 'FontAwesomeLayersText',
|
|
597
|
+
props: {
|
|
598
|
+
value: {
|
|
599
|
+
type: [String, Number],
|
|
600
|
+
default: ''
|
|
601
|
+
},
|
|
602
|
+
transform: {
|
|
603
|
+
type: [String, Object],
|
|
604
|
+
default: null
|
|
605
|
+
},
|
|
606
|
+
counter: {
|
|
607
|
+
type: Boolean,
|
|
608
|
+
default: false
|
|
609
|
+
},
|
|
610
|
+
position: {
|
|
611
|
+
type: String,
|
|
612
|
+
default: null,
|
|
613
|
+
validator: function validator(value) {
|
|
614
|
+
return ['bottom-left', 'bottom-right', 'top-left', 'top-right'].indexOf(value) > -1;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
setup: function setup(props, _ref) {
|
|
619
|
+
var attrs = _ref.attrs;
|
|
620
|
+
var familyPrefix = fontawesomeSvgCore.config.familyPrefix;
|
|
621
|
+
var classes = vue.computed(function () {
|
|
622
|
+
return objectWithKey('classes', [].concat(_toConsumableArray(props.counter ? ["".concat(familyPrefix, "-layers-counter")] : []), _toConsumableArray(props.position ? ["".concat(familyPrefix, "-layers-").concat(props.position)] : [])));
|
|
623
|
+
});
|
|
624
|
+
var transform = vue.computed(function () {
|
|
625
|
+
return objectWithKey('transform', typeof props.transform === 'string' ? fontawesomeSvgCore.parse.transform(props.transform) : props.transform);
|
|
626
|
+
});
|
|
627
|
+
var abstractElement = vue.computed(function () {
|
|
628
|
+
var _text = fontawesomeSvgCore.text(props.value.toString(), _objectSpread2(_objectSpread2({}, transform.value), classes.value)),
|
|
629
|
+
abstract = _text.abstract;
|
|
630
|
+
|
|
631
|
+
if (props.counter) {
|
|
632
|
+
abstract[0].attributes.class = abstract[0].attributes.class.replace('fa-layers-text', '');
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
return abstract[0];
|
|
636
|
+
});
|
|
637
|
+
var vnode = vue.computed(function () {
|
|
638
|
+
return convert(abstractElement.value, {}, attrs);
|
|
639
|
+
});
|
|
640
|
+
return function () {
|
|
641
|
+
return vnode.value;
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
});
|
|
645
|
+
|
|
646
|
+
exports.FontAwesomeIcon = FontAwesomeIcon;
|
|
647
|
+
exports.FontAwesomeLayers = FontAwesomeLayers;
|
|
648
|
+
exports.FontAwesomeLayersText = FontAwesomeLayersText;
|
|
649
|
+
|
|
650
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
651
|
+
|
|
652
|
+
}));
|