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