@fortawesome/vue-fontawesome 2.0.8 → 2.0.9

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 CHANGED
@@ -1,4 +1,5 @@
1
1
  # Change Log
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
4
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
@@ -10,61 +11,70 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
10
11
 
11
12
  ---
12
13
 
14
+ ## [2.0.9](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.9) - 2022-11-07
15
+
16
+ ### Changed
17
+ - README.md updated with spelling correction, linter fixes, and new contributor
18
+ - App.vue updated icon example to use `fixed-width` rather than `full-width`
19
+ - Added some tests for Sharp icons
20
+
21
+ ---
22
+
13
23
  ## [2.0.8](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.8) - 2022-06-17
14
24
 
15
25
  ### Changed
16
- * README.md Documentation now points to https://fontawesome.com/docs/web/use-with/vue/
26
+ - README.md Documentation now points to https://fontawesome.com/docs/web/use-with/vue/
17
27
 
18
28
  ---
19
29
 
20
30
  ## [2.0.7](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.7) - 2022-06-07
21
31
 
22
32
  ### Fixed
23
- * Animations for bounce, shake, beat and beat-fade
24
- * Flip animation when used by itself
33
+ - Animations for bounce, shake, beat and beat-fade
34
+ - Flip animation when used by itself
25
35
 
26
36
  ---
27
37
 
28
38
  ## [2.0.6](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.6) - 2021-10-18
29
39
 
30
40
  ### Fixed
31
- * Include 1.3.0-beta versions in peer dependencies
41
+ - Include 1.3.0-beta versions in peer dependencies
32
42
 
33
43
  ---
34
44
 
35
45
  ## [2.0.5](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.5) - 2021-10-15
36
46
 
37
47
  ### Added
38
- * New sizes for `size` prop: 2xs, xl, 2xl
39
- * New animation booleans: `beat`, `fade`, `flash`, `spin-pulse`, & `spin-reverse`
48
+ - New sizes for `size` prop: 2xs, xl, 2xl
49
+ - New animation booleans: `beat`, `fade`, `flash`, `spin-pulse`, & `spin-reverse`
40
50
 
41
51
  ---
42
52
 
43
53
  ## [2.0.4](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.4) - 2021-10-15
44
54
 
45
55
  ### Fixed
46
- * Relax the peer dependency for @fortawesome/fontawesome-svg-core
56
+ - Relax the peer dependency for @fortawesome/fontawesome-svg-core
47
57
 
48
58
  ---
49
59
 
50
60
  ## [2.0.3](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.3) - 2021-10-15
51
61
 
52
62
  ### Fixed
53
- * Skip parse.icon if the icon is imported directly from an icon package
63
+ - Skip parse.icon if the icon is imported directly from an icon package
54
64
 
55
65
  ---
56
66
 
57
67
  ## [2.0.2](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.2) - 2020-12-17
58
68
 
59
69
  ### Fixed
60
- * Bumping version to fix a failed release for 2.0.1
70
+ - Bumping version to fix a failed release for 2.0.1
61
71
 
62
72
  ---
63
73
 
64
74
  ## [2.0.1](https://github.com/FortAwesome/vue-fontawesome/releases/tag/2.0.1) - 2020-12-17
65
75
 
66
76
  ### Added
67
- * Support for the new parse.icon function from the Font Awesome version 6 @fortawesome/fontawesome-svg-core
77
+ - Support for the new parse.icon function from the Font Awesome version 6 @fortawesome/fontawesome-svg-core
68
78
 
69
79
  ---
70
80
 
@@ -94,89 +104,89 @@ release. The 0.1 release line will not be getting any further updates.
94
104
  ## [0.1.10](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.10) - 2020-06-15
95
105
 
96
106
  ### Fixed
97
- * Add TSX support to Typescript definition
107
+ - Add TSX support to Typescript definition
98
108
 
99
109
  ---
100
110
 
101
111
  ## [0.1.9](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.9) - 2019-12-13
102
112
 
103
113
  ### Added
104
- * Counters support for the FontAwesomeLayersText component #174
105
- * FontAwesomeIcon now supports the "inverse" property #174
114
+ - Counters support for the FontAwesomeLayersText component #174
115
+ - FontAwesomeIcon now supports the "inverse" property #174
106
116
 
107
117
  ---
108
118
 
109
119
  ## [0.1.8](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.8) - 2019-11-03
110
120
 
111
121
  ### Fixed
112
- * Removed declare namespace in the TypeScript definition file #177
122
+ - Removed declare namespace in the TypeScript definition file #177
113
123
 
114
124
  ---
115
125
 
116
126
  ## [0.1.7](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.7) - 2019-08-31
117
127
 
118
128
  ### Added
119
- * Duotone icon support
129
+ - Duotone icon support
120
130
 
121
131
  ---
122
132
 
123
133
  ## [0.1.6](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.6) - 2019-03-18
124
134
 
125
135
  ### Changed
126
- * Allow the rotation property to be either string or number #171
136
+ - Allow the rotation property to be either string or number #171
127
137
 
128
138
  ---
129
139
 
130
140
  ## [0.1.5](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.5) - 2019-01-13
131
141
 
132
142
  ### Added
133
- * Title prop #164
143
+ - Title prop #164
134
144
 
135
145
  ---
136
146
 
137
147
  ## [0.1.4](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.4) - 2018-12-24
138
148
 
139
149
  ### Fixed
140
- * Fixing TypeScript definition file #165
150
+ - Fixing TypeScript definition file #165
141
151
 
142
152
  ---
143
153
 
144
154
  ## [0.1.3](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.3) - 2018-12-04
145
155
 
146
156
  ### Added
147
- * Adding TypeScript definition file #159
157
+ - Adding TypeScript definition file #159
148
158
 
149
159
  ---
150
160
 
151
161
  ## [0.1.2](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.2) - 2018-10-29
152
162
 
153
163
  ### Added
154
- * Adding ES module to package
164
+ - Adding ES module to package
155
165
 
156
166
  ---
157
167
 
158
168
  ## [0.1.1](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.1) - 2018-07-16
159
169
 
160
170
  ### Fixed
161
- * LayersText can use a number as it's value #115
171
+ - LayersText can use a number as it's value #115
162
172
 
163
173
  ---
164
174
 
165
175
  ## [0.1.0](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.1.0) - 2018-06-20
166
176
 
167
177
  ### Changed
168
- * Upgraded to the newer Font Awesome 5.1 packages
178
+ - Upgraded to the newer Font Awesome 5.1 packages
169
179
 
170
180
  ---
171
181
 
172
182
  ## [0.0.23](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.0.23) - 2018-06-04
173
183
 
174
184
  ### Changed
175
- * Update Vue dependency version to support > 2.4
185
+ - Update Vue dependency version to support > 2.4
176
186
 
177
187
  ---
178
188
 
179
189
  ## [0.0.22](https://github.com/FortAwesome/vue-fontawesome/releases/tag/0.0.22) - 2017-12-19
180
190
 
181
191
  ### Changed
182
- * Support for @fortawesome/fontawesome 1.1.0
192
+ - Support for @fortawesome/fontawesome 1.1.0
package/README.md CHANGED
@@ -27,22 +27,29 @@
27
27
 
28
28
  ## Documentation
29
29
 
30
- Official documentation is hosted at fontawesome.com: [Check it out here](https://fontawesome.com/docs/web/use-with/vue/)
30
+ Official documentation is hosted at fontawesome.com
31
+
32
+ Helpful Vue links:
33
+
34
+ - [Add Icons with Vue](https://fontawesome.com/docs/web/use-with/vue/add-icons)
35
+ - [Adding Icon Styling with Vue](https://fontawesome.com/docs/web/use-with/vue/style)
36
+
37
+ To find the Vue setup, go to our [Web docs](https://fontawesome.com/docs/web) and click the ***"Set Up with Vue"*** (left hand side menu).
31
38
 
32
39
  ## How to Help
33
40
 
34
41
  Review the following docs before diving in:
35
42
 
36
- * [CONTRIBUTING.md](CONTRIBUTING.md)
37
- * [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
43
+ - [CONTRIBUTING.md](CONTRIBUTING.md)
44
+ - [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
38
45
 
39
46
  And then:
40
47
 
41
- * Check the existing [issues](https://github.com/FortAwesome/vue-fontawesome/issues) and see if you can help!
48
+ - Check the existing [issues](https://github.com/FortAwesome/vue-fontawesome/issues) and see if you can help!
42
49
 
43
50
  ## Contributors
44
51
 
45
- The following contributors have either hepled to start this project, have contributed
52
+ The following contributors have either helped to start this project, have contributed
46
53
  code, are actively maintaining it (including documentation), or in other ways
47
54
  being awesome contributors to this project. **We'd like to take a moment to recognize them.**
48
55
 
@@ -55,6 +62,7 @@ being awesome contributors to this project. **We'd like to take a moment to reco
55
62
  | <img src="https://github.com/btaens.png?size=72" /> | btaens | [@btaens](https://github.com/btaens) |
56
63
  | <img src="https://github.com/david-driscoll.png?size=72" /> | David Driscoll | [@david-driscoll](https://github.com/david-driscoll) |
57
64
  | <img src="https://github.com/tyranteon.png?size=72" /> | Tyranteon | [@tyranteon](https://github.com/tyranteon) |
65
+ | <img src="https://github.com/parkeyparker.png?size=72" /> | Aaron Parker | [@parkeyparker](https://github.com/parkeyparker) |
58
66
 
59
67
  If we've missed someone (which is quite likely) submit a Pull Request to us and we'll get it resolved.
60
68
 
package/index.es.js CHANGED
@@ -2,17 +2,14 @@ import { parse, icon, config, text } from '@fortawesome/fontawesome-svg-core';
2
2
 
3
3
  function ownKeys(object, enumerableOnly) {
4
4
  var keys = Object.keys(object);
5
-
6
5
  if (Object.getOwnPropertySymbols) {
7
6
  var symbols = Object.getOwnPropertySymbols(object);
8
7
  enumerableOnly && (symbols = symbols.filter(function (sym) {
9
8
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
10
9
  })), keys.push.apply(keys, symbols);
11
10
  }
12
-
13
11
  return keys;
14
12
  }
15
-
16
13
  function _objectSpread2(target) {
17
14
  for (var i = 1; i < arguments.length; i++) {
18
15
  var source = null != arguments[i] ? arguments[i] : {};
@@ -22,10 +19,8 @@ function _objectSpread2(target) {
22
19
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
23
20
  });
24
21
  }
25
-
26
22
  return target;
27
23
  }
28
-
29
24
  function _typeof(obj) {
30
25
  "@babel/helpers - typeof";
31
26
 
@@ -35,7 +30,6 @@ function _typeof(obj) {
35
30
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
36
31
  }, _typeof(obj);
37
32
  }
38
-
39
33
  function _defineProperty(obj, key, value) {
40
34
  if (key in obj) {
41
35
  Object.defineProperty(obj, key, {
@@ -47,35 +41,26 @@ function _defineProperty(obj, key, value) {
47
41
  } else {
48
42
  obj[key] = value;
49
43
  }
50
-
51
44
  return obj;
52
45
  }
53
-
54
46
  function _objectWithoutPropertiesLoose(source, excluded) {
55
47
  if (source == null) return {};
56
48
  var target = {};
57
49
  var sourceKeys = Object.keys(source);
58
50
  var key, i;
59
-
60
51
  for (i = 0; i < sourceKeys.length; i++) {
61
52
  key = sourceKeys[i];
62
53
  if (excluded.indexOf(key) >= 0) continue;
63
54
  target[key] = source[key];
64
55
  }
65
-
66
56
  return target;
67
57
  }
68
-
69
58
  function _objectWithoutProperties(source, excluded) {
70
59
  if (source == null) return {};
71
-
72
60
  var target = _objectWithoutPropertiesLoose(source, excluded);
73
-
74
61
  var key, i;
75
-
76
62
  if (Object.getOwnPropertySymbols) {
77
63
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
78
-
79
64
  for (i = 0; i < sourceSymbolKeys.length; i++) {
80
65
  key = sourceSymbolKeys[i];
81
66
  if (excluded.indexOf(key) >= 0) continue;
@@ -83,22 +68,17 @@ function _objectWithoutProperties(source, excluded) {
83
68
  target[key] = source[key];
84
69
  }
85
70
  }
86
-
87
71
  return target;
88
72
  }
89
-
90
73
  function _toConsumableArray(arr) {
91
74
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
92
75
  }
93
-
94
76
  function _arrayWithoutHoles(arr) {
95
77
  if (Array.isArray(arr)) return _arrayLikeToArray(arr);
96
78
  }
97
-
98
79
  function _iterableToArray(iter) {
99
80
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
100
81
  }
101
-
102
82
  function _unsupportedIterableToArray(o, minLen) {
103
83
  if (!o) return;
104
84
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -107,15 +87,11 @@ function _unsupportedIterableToArray(o, minLen) {
107
87
  if (n === "Map" || n === "Set") return Array.from(o);
108
88
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
109
89
  }
110
-
111
90
  function _arrayLikeToArray(arr, len) {
112
91
  if (len == null || len > arr.length) len = arr.length;
113
-
114
92
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
115
-
116
93
  return arr2;
117
94
  }
118
-
119
95
  function _nonIterableSpread() {
120
96
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
121
97
  }
@@ -259,7 +235,6 @@ var humps$1 = {exports: {}};
259
235
  var humps = humps$1.exports;
260
236
 
261
237
  var _excluded = ["class", "style", "attrs"];
262
-
263
238
  function styleToObject(style) {
264
239
  return style.split(';').map(function (s) {
265
240
  return s.trim();
@@ -273,65 +248,54 @@ function styleToObject(style) {
273
248
  return acc;
274
249
  }, {});
275
250
  }
276
-
277
251
  function classToObject(cls) {
278
252
  return cls.split(/\s+/).reduce(function (acc, c) {
279
253
  acc[c] = true;
280
254
  return acc;
281
255
  }, {});
282
256
  }
283
-
284
257
  function combineClassObjects() {
285
258
  for (var _len = arguments.length, objs = new Array(_len), _key = 0; _key < _len; _key++) {
286
259
  objs[_key] = arguments[_key];
287
260
  }
288
-
289
261
  return objs.reduce(function (acc, obj) {
290
262
  if (Array.isArray(obj)) {
291
263
  acc = acc.concat(obj);
292
264
  } else {
293
265
  acc.push(obj);
294
266
  }
295
-
296
267
  return acc;
297
268
  }, []);
298
269
  }
299
-
300
270
  function convert(h, element) {
301
271
  var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
302
272
  var data = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
303
273
  var children = (element.children || []).map(convert.bind(null, h));
304
274
  var mixins = Object.keys(element.attributes || {}).reduce(function (acc, key) {
305
275
  var val = element.attributes[key];
306
-
307
276
  switch (key) {
308
277
  case 'class':
309
278
  acc['class'] = classToObject(val);
310
279
  break;
311
-
312
280
  case 'style':
313
281
  acc['style'] = styleToObject(val);
314
282
  break;
315
-
316
283
  default:
317
284
  acc.attrs[key] = val;
318
285
  }
319
-
320
286
  return acc;
321
287
  }, {
322
288
  'class': {},
323
289
  style: {},
324
290
  attrs: {}
325
291
  });
326
-
327
292
  var _data$class = data.class,
328
- dClass = _data$class === void 0 ? {} : _data$class,
329
- _data$style = data.style,
330
- dStyle = _data$style === void 0 ? {} : _data$style,
331
- _data$attrs = data.attrs,
332
- dAttrs = _data$attrs === void 0 ? {} : _data$attrs,
333
- remainingData = _objectWithoutProperties(data, _excluded);
334
-
293
+ dClass = _data$class === void 0 ? {} : _data$class,
294
+ _data$style = data.style,
295
+ dStyle = _data$style === void 0 ? {} : _data$style,
296
+ _data$attrs = data.attrs,
297
+ dAttrs = _data$attrs === void 0 ? {} : _data$attrs,
298
+ remainingData = _objectWithoutProperties(data, _excluded);
335
299
  if (typeof element === 'string') {
336
300
  return element;
337
301
  } else {
@@ -346,15 +310,12 @@ function convert(h, element) {
346
310
  }
347
311
 
348
312
  var PRODUCTION = false;
349
-
350
313
  try {
351
314
  PRODUCTION = process.env.NODE_ENV === 'production';
352
315
  } catch (e) {}
353
-
354
316
  function log () {
355
317
  if (!PRODUCTION && console && typeof console.error === 'function') {
356
318
  var _console;
357
-
358
319
  (_console = console).error.apply(_console, arguments);
359
320
  }
360
321
  }
@@ -364,7 +325,6 @@ function objectWithKey(key, value) {
364
325
  }
365
326
  function classList(props) {
366
327
  var _classes;
367
-
368
328
  var classes = (_classes = {
369
329
  'fa-spin': props.spin,
370
330
  'fa-spin-pulse': props.spinPulse,
@@ -398,26 +358,21 @@ function normalizeIconArgs(icon) {
398
358
  if (icon && _typeof(icon) === 'object' && icon.prefix && icon.iconName && icon.icon) {
399
359
  return icon;
400
360
  }
401
-
402
361
  if (parse.icon) {
403
362
  return parse.icon(icon);
404
363
  }
405
-
406
364
  if (icon === null) {
407
365
  return null;
408
366
  }
409
-
410
367
  if (_typeof(icon) === 'object' && icon.prefix && icon.iconName) {
411
368
  return icon;
412
369
  }
413
-
414
370
  if (Array.isArray(icon) && icon.length === 2) {
415
371
  return {
416
372
  prefix: icon[0],
417
373
  iconName: icon[1]
418
374
  };
419
375
  }
420
-
421
376
  if (typeof icon === 'string') {
422
377
  return {
423
378
  prefix: 'fas',
@@ -425,7 +380,6 @@ function normalizeIconArgs(icon) {
425
380
  };
426
381
  }
427
382
  }
428
-
429
383
  var FontAwesomeIcon = {
430
384
  name: 'FontAwesomeIcon',
431
385
  functional: true,
@@ -542,9 +496,9 @@ var FontAwesomeIcon = {
542
496
  render: function render(createElement, context) {
543
497
  var props = context.props;
544
498
  var iconArgs = props.icon,
545
- maskArgs = props.mask,
546
- symbol = props.symbol,
547
- title = props.title;
499
+ maskArgs = props.mask,
500
+ symbol = props.symbol,
501
+ title = props.title;
548
502
  var icon$1 = normalizeIconArgs(iconArgs);
549
503
  var classes = objectWithKey('classes', classList(props));
550
504
  var transform = objectWithKey('transform', typeof props.transform === 'string' ? parse.transform(props.transform) : props.transform);
@@ -553,11 +507,9 @@ var FontAwesomeIcon = {
553
507
  symbol: symbol,
554
508
  title: title
555
509
  }));
556
-
557
510
  if (!renderedIcon) {
558
511
  return log('Could not find one or more icon(s)', icon$1, mask);
559
512
  }
560
-
561
513
  var abstract = renderedIcon.abstract;
562
514
  var convertCurry = convert.bind(null, createElement);
563
515
  return convertCurry(abstract[0], {}, context.data);
@@ -614,11 +566,9 @@ var FontAwesomeLayersText = {
614
566
  var transform = objectWithKey('transform', typeof props.transform === 'string' ? parse.transform(props.transform) : props.transform);
615
567
  var renderedText = text(props.value.toString(), _objectSpread2(_objectSpread2({}, transform), classes));
616
568
  var abstract = renderedText.abstract;
617
-
618
569
  if (props.counter) {
619
570
  abstract[0].attributes.class = abstract[0].attributes.class.replace('fa-layers-text', '');
620
571
  }
621
-
622
572
  var convertCurry = convert.bind(null, createElement);
623
573
  return convertCurry(abstract[0], {}, context.data);
624
574
  }
package/index.js CHANGED
@@ -6,17 +6,14 @@
6
6
 
7
7
  function ownKeys(object, enumerableOnly) {
8
8
  var keys = Object.keys(object);
9
-
10
9
  if (Object.getOwnPropertySymbols) {
11
10
  var symbols = Object.getOwnPropertySymbols(object);
12
11
  enumerableOnly && (symbols = symbols.filter(function (sym) {
13
12
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
14
13
  })), keys.push.apply(keys, symbols);
15
14
  }
16
-
17
15
  return keys;
18
16
  }
19
-
20
17
  function _objectSpread2(target) {
21
18
  for (var i = 1; i < arguments.length; i++) {
22
19
  var source = null != arguments[i] ? arguments[i] : {};
@@ -26,10 +23,8 @@
26
23
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
27
24
  });
28
25
  }
29
-
30
26
  return target;
31
27
  }
32
-
33
28
  function _typeof(obj) {
34
29
  "@babel/helpers - typeof";
35
30
 
@@ -39,7 +34,6 @@
39
34
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
40
35
  }, _typeof(obj);
41
36
  }
42
-
43
37
  function _defineProperty(obj, key, value) {
44
38
  if (key in obj) {
45
39
  Object.defineProperty(obj, key, {
@@ -51,35 +45,26 @@
51
45
  } else {
52
46
  obj[key] = value;
53
47
  }
54
-
55
48
  return obj;
56
49
  }
57
-
58
50
  function _objectWithoutPropertiesLoose(source, excluded) {
59
51
  if (source == null) return {};
60
52
  var target = {};
61
53
  var sourceKeys = Object.keys(source);
62
54
  var key, i;
63
-
64
55
  for (i = 0; i < sourceKeys.length; i++) {
65
56
  key = sourceKeys[i];
66
57
  if (excluded.indexOf(key) >= 0) continue;
67
58
  target[key] = source[key];
68
59
  }
69
-
70
60
  return target;
71
61
  }
72
-
73
62
  function _objectWithoutProperties(source, excluded) {
74
63
  if (source == null) return {};
75
-
76
64
  var target = _objectWithoutPropertiesLoose(source, excluded);
77
-
78
65
  var key, i;
79
-
80
66
  if (Object.getOwnPropertySymbols) {
81
67
  var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
82
-
83
68
  for (i = 0; i < sourceSymbolKeys.length; i++) {
84
69
  key = sourceSymbolKeys[i];
85
70
  if (excluded.indexOf(key) >= 0) continue;
@@ -87,22 +72,17 @@
87
72
  target[key] = source[key];
88
73
  }
89
74
  }
90
-
91
75
  return target;
92
76
  }
93
-
94
77
  function _toConsumableArray(arr) {
95
78
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
96
79
  }
97
-
98
80
  function _arrayWithoutHoles(arr) {
99
81
  if (Array.isArray(arr)) return _arrayLikeToArray(arr);
100
82
  }
101
-
102
83
  function _iterableToArray(iter) {
103
84
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
104
85
  }
105
-
106
86
  function _unsupportedIterableToArray(o, minLen) {
107
87
  if (!o) return;
108
88
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -111,15 +91,11 @@
111
91
  if (n === "Map" || n === "Set") return Array.from(o);
112
92
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
113
93
  }
114
-
115
94
  function _arrayLikeToArray(arr, len) {
116
95
  if (len == null || len > arr.length) len = arr.length;
117
-
118
96
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
119
-
120
97
  return arr2;
121
98
  }
122
-
123
99
  function _nonIterableSpread() {
124
100
  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
101
  }
@@ -263,7 +239,6 @@
263
239
  var humps = humps$1.exports;
264
240
 
265
241
  var _excluded = ["class", "style", "attrs"];
266
-
267
242
  function styleToObject(style) {
268
243
  return style.split(';').map(function (s) {
269
244
  return s.trim();
@@ -277,65 +252,54 @@
277
252
  return acc;
278
253
  }, {});
279
254
  }
280
-
281
255
  function classToObject(cls) {
282
256
  return cls.split(/\s+/).reduce(function (acc, c) {
283
257
  acc[c] = true;
284
258
  return acc;
285
259
  }, {});
286
260
  }
287
-
288
261
  function combineClassObjects() {
289
262
  for (var _len = arguments.length, objs = new Array(_len), _key = 0; _key < _len; _key++) {
290
263
  objs[_key] = arguments[_key];
291
264
  }
292
-
293
265
  return objs.reduce(function (acc, obj) {
294
266
  if (Array.isArray(obj)) {
295
267
  acc = acc.concat(obj);
296
268
  } else {
297
269
  acc.push(obj);
298
270
  }
299
-
300
271
  return acc;
301
272
  }, []);
302
273
  }
303
-
304
274
  function convert(h, element) {
305
275
  var props = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
306
276
  var data = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
307
277
  var children = (element.children || []).map(convert.bind(null, h));
308
278
  var mixins = Object.keys(element.attributes || {}).reduce(function (acc, key) {
309
279
  var val = element.attributes[key];
310
-
311
280
  switch (key) {
312
281
  case 'class':
313
282
  acc['class'] = classToObject(val);
314
283
  break;
315
-
316
284
  case 'style':
317
285
  acc['style'] = styleToObject(val);
318
286
  break;
319
-
320
287
  default:
321
288
  acc.attrs[key] = val;
322
289
  }
323
-
324
290
  return acc;
325
291
  }, {
326
292
  'class': {},
327
293
  style: {},
328
294
  attrs: {}
329
295
  });
330
-
331
296
  var _data$class = data.class,
332
- dClass = _data$class === void 0 ? {} : _data$class,
333
- _data$style = data.style,
334
- dStyle = _data$style === void 0 ? {} : _data$style,
335
- _data$attrs = data.attrs,
336
- dAttrs = _data$attrs === void 0 ? {} : _data$attrs,
337
- remainingData = _objectWithoutProperties(data, _excluded);
338
-
297
+ dClass = _data$class === void 0 ? {} : _data$class,
298
+ _data$style = data.style,
299
+ dStyle = _data$style === void 0 ? {} : _data$style,
300
+ _data$attrs = data.attrs,
301
+ dAttrs = _data$attrs === void 0 ? {} : _data$attrs,
302
+ remainingData = _objectWithoutProperties(data, _excluded);
339
303
  if (typeof element === 'string') {
340
304
  return element;
341
305
  } else {
@@ -350,15 +314,12 @@
350
314
  }
351
315
 
352
316
  var PRODUCTION = false;
353
-
354
317
  try {
355
318
  PRODUCTION = process.env.NODE_ENV === 'production';
356
319
  } catch (e) {}
357
-
358
320
  function log () {
359
321
  if (!PRODUCTION && console && typeof console.error === 'function') {
360
322
  var _console;
361
-
362
323
  (_console = console).error.apply(_console, arguments);
363
324
  }
364
325
  }
@@ -368,7 +329,6 @@
368
329
  }
369
330
  function classList(props) {
370
331
  var _classes;
371
-
372
332
  var classes = (_classes = {
373
333
  'fa-spin': props.spin,
374
334
  'fa-spin-pulse': props.spinPulse,
@@ -402,26 +362,21 @@
402
362
  if (icon && _typeof(icon) === 'object' && icon.prefix && icon.iconName && icon.icon) {
403
363
  return icon;
404
364
  }
405
-
406
365
  if (fontawesomeSvgCore.parse.icon) {
407
366
  return fontawesomeSvgCore.parse.icon(icon);
408
367
  }
409
-
410
368
  if (icon === null) {
411
369
  return null;
412
370
  }
413
-
414
371
  if (_typeof(icon) === 'object' && icon.prefix && icon.iconName) {
415
372
  return icon;
416
373
  }
417
-
418
374
  if (Array.isArray(icon) && icon.length === 2) {
419
375
  return {
420
376
  prefix: icon[0],
421
377
  iconName: icon[1]
422
378
  };
423
379
  }
424
-
425
380
  if (typeof icon === 'string') {
426
381
  return {
427
382
  prefix: 'fas',
@@ -429,7 +384,6 @@
429
384
  };
430
385
  }
431
386
  }
432
-
433
387
  var FontAwesomeIcon = {
434
388
  name: 'FontAwesomeIcon',
435
389
  functional: true,
@@ -546,9 +500,9 @@
546
500
  render: function render(createElement, context) {
547
501
  var props = context.props;
548
502
  var iconArgs = props.icon,
549
- maskArgs = props.mask,
550
- symbol = props.symbol,
551
- title = props.title;
503
+ maskArgs = props.mask,
504
+ symbol = props.symbol,
505
+ title = props.title;
552
506
  var icon = normalizeIconArgs(iconArgs);
553
507
  var classes = objectWithKey('classes', classList(props));
554
508
  var transform = objectWithKey('transform', typeof props.transform === 'string' ? fontawesomeSvgCore.parse.transform(props.transform) : props.transform);
@@ -557,11 +511,9 @@
557
511
  symbol: symbol,
558
512
  title: title
559
513
  }));
560
-
561
514
  if (!renderedIcon) {
562
515
  return log('Could not find one or more icon(s)', icon, mask);
563
516
  }
564
-
565
517
  var abstract = renderedIcon.abstract;
566
518
  var convertCurry = convert.bind(null, createElement);
567
519
  return convertCurry(abstract[0], {}, context.data);
@@ -618,11 +570,9 @@
618
570
  var transform = objectWithKey('transform', typeof props.transform === 'string' ? fontawesomeSvgCore.parse.transform(props.transform) : props.transform);
619
571
  var renderedText = fontawesomeSvgCore.text(props.value.toString(), _objectSpread2(_objectSpread2({}, transform), classes));
620
572
  var abstract = renderedText.abstract;
621
-
622
573
  if (props.counter) {
623
574
  abstract[0].attributes.class = abstract[0].attributes.class.replace('fa-layers-text', '');
624
575
  }
625
-
626
576
  var convertCurry = convert.bind(null, createElement);
627
577
  return convertCurry(abstract[0], {}, context.data);
628
578
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fortawesome/vue-fontawesome",
3
3
  "description": "Official Vue 2 component for Font Awesome",
4
- "version": "2.0.8",
4
+ "version": "2.0.9",
5
5
  "main": "index.js",
6
6
  "files": [
7
7
  "README.md",
@@ -34,7 +34,8 @@
34
34
  "Yannick Ihmels <github.com/ihmels>",
35
35
  "btaens <github.com/btaens>",
36
36
  "David Driscoll <github.com/david-driscoll>",
37
- "Tyranteon <github.com/tyranteon>"
37
+ "Tyranteon <github.com/tyranteon>",
38
+ "Aaron Parker <github.com/parkeyparker>"
38
39
  ],
39
40
  "license": "MIT",
40
41
  "scripts": {