@@ -2,18 +2,40 @@ import { parse, icon } from '@fortawesome/fontawesome-svg-core';
2
2
import PropTypes from 'prop-types' ;
3
3
import React from 'react' ;
4
4
5
- function _typeof ( obj ) {
6
- if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) {
7
- _typeof = function ( obj ) {
8
- return typeof obj ;
9
- } ;
10
- } else {
11
- _typeof = function ( obj ) {
12
- return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ;
13
- } ;
5
+ function ownKeys ( object , enumerableOnly ) {
6
+ var keys = Object . keys ( object ) ;
7
+
8
+ if ( Object . getOwnPropertySymbols ) {
9
+ var symbols = Object . getOwnPropertySymbols ( object ) ;
10
+ enumerableOnly && ( symbols = symbols . filter ( function ( sym ) {
11
+ return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ;
12
+ } ) ) , keys . push . apply ( keys , symbols ) ;
13
+ }
14
+
15
+ return keys ;
16
+ }
17
+
18
+ function _objectSpread2 ( target ) {
19
+ for ( var i = 1 ; i < arguments . length ; i ++ ) {
20
+ var source = null != arguments [ i ] ? arguments [ i ] : { } ;
21
+ i % 2 ? ownKeys ( Object ( source ) , ! 0 ) . forEach ( function ( key ) {
22
+ _defineProperty ( target , key , source [ key ] ) ;
23
+ } ) : Object . getOwnPropertyDescriptors ? Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) : ownKeys ( Object ( source ) ) . forEach ( function ( key ) {
24
+ Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ;
25
+ } ) ;
14
26
}
15
27
16
- return _typeof ( obj ) ;
28
+ return target ;
29
+ }
30
+
31
+ function _typeof ( obj ) {
32
+ "@babel/helpers - typeof" ;
33
+
34
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol . iterator ? function ( obj ) {
35
+ return typeof obj ;
36
+ } : function ( obj ) {
37
+ return obj && "function" == typeof Symbol && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ;
38
+ } , _typeof ( obj ) ;
17
39
}
18
40
19
41
function _defineProperty ( obj , key , value ) {
@@ -31,40 +53,6 @@ function _defineProperty(obj, key, value) {
31
53
return obj ;
32
54
}
33
55
34
- function ownKeys ( object , enumerableOnly ) {
35
- var keys = Object . keys ( object ) ;
36
-
37
- if ( Object . getOwnPropertySymbols ) {
38
- var symbols = Object . getOwnPropertySymbols ( object ) ;
39
- if ( enumerableOnly ) symbols = symbols . filter ( function ( sym ) {
40
- return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ;
41
- } ) ;
42
- keys . push . apply ( keys , symbols ) ;
43
- }
44
-
45
- return keys ;
46
- }
47
-
48
- function _objectSpread2 ( target ) {
49
- for ( var i = 1 ; i < arguments . length ; i ++ ) {
50
- var source = arguments [ i ] != null ? arguments [ i ] : { } ;
51
-
52
- if ( i % 2 ) {
53
- ownKeys ( Object ( source ) , true ) . forEach ( function ( key ) {
54
- _defineProperty ( target , key , source [ key ] ) ;
55
- } ) ;
56
- } else if ( Object . getOwnPropertyDescriptors ) {
57
- Object . defineProperties ( target , Object . getOwnPropertyDescriptors ( source ) ) ;
58
- } else {
59
- ownKeys ( Object ( source ) ) . forEach ( function ( key ) {
60
- Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ;
61
- } ) ;
62
- }
63
- }
64
-
65
- return target ;
66
- }
67
-
68
56
function _objectWithoutPropertiesLoose ( source , excluded ) {
69
57
if ( source == null ) return { } ;
70
58
var target = { } ;
@@ -102,30 +90,48 @@ function _objectWithoutProperties(source, excluded) {
102
90
}
103
91
104
92
function _toConsumableArray ( arr ) {
105
- return _arrayWithoutHoles ( arr ) || _iterableToArray ( arr ) || _nonIterableSpread ( ) ;
93
+ return _arrayWithoutHoles ( arr ) || _iterableToArray ( arr ) || _unsupportedIterableToArray ( arr ) || _nonIterableSpread ( ) ;
106
94
}
107
95
108
96
function _arrayWithoutHoles ( arr ) {
109
- if ( Array . isArray ( arr ) ) {
110
- for ( var i = 0 , arr2 = new Array ( arr . length ) ; i < arr . length ; i ++ ) arr2 [ i ] = arr [ i ] ;
111
-
112
- return arr2 ;
113
- }
97
+ if ( Array . isArray ( arr ) ) return _arrayLikeToArray ( arr ) ;
114
98
}
115
99
116
100
function _iterableToArray ( iter ) {
117
- if ( Symbol . iterator in Object ( iter ) || Object . prototype . toString . call ( iter ) === "[object Arguments]" ) return Array . from ( iter ) ;
101
+ if ( typeof Symbol !== "undefined" && iter [ Symbol . iterator ] != null || iter [ "@@iterator" ] != null ) return Array . from ( iter ) ;
102
+ }
103
+
104
+ function _unsupportedIterableToArray ( o , minLen ) {
105
+ if ( ! o ) return ;
106
+ if ( typeof o === "string" ) return _arrayLikeToArray ( o , minLen ) ;
107
+ var n = Object . prototype . toString . call ( o ) . slice ( 8 , - 1 ) ;
108
+ if ( n === "Object" && o . constructor ) n = o . constructor . name ;
109
+ if ( n === "Map" || n === "Set" ) return Array . from ( o ) ;
110
+ if ( n === "Arguments" || / ^ (?: U i | I ) n t (?: 8 | 1 6 | 3 2 ) (?: C l a m p e d ) ? A r r a y $ / . test ( n ) ) return _arrayLikeToArray ( o , minLen ) ;
111
+ }
112
+
113
+ function _arrayLikeToArray ( arr , len ) {
114
+ if ( len == null || len > arr . length ) len = arr . length ;
115
+
116
+ for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) arr2 [ i ] = arr [ i ] ;
117
+
118
+ return arr2 ;
118
119
}
119
120
120
121
function _nonIterableSpread ( ) {
121
- throw new TypeError ( "Invalid attempt to spread non-iterable instance" ) ;
122
+ 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
}
123
124
124
125
// Get CSS class list from a props object
125
126
function classList ( props ) {
126
127
var _classes ;
127
128
128
- var spin = props . spin ,
129
+ var beat = props . beat ,
130
+ fade = props . fade ,
131
+ flash = props . flash ,
132
+ spin = props . spin ,
133
+ spinPulse = props . spinPulse ,
134
+ spinReverse = props . spinReverse ,
129
135
pulse = props . pulse ,
130
136
fixedWidth = props . fixedWidth ,
131
137
inverse = props . inverse ,
@@ -137,7 +143,12 @@ function classList(props) {
137
143
pull = props . pull ; // map of CSS class names to properties
138
144
139
145
var classes = ( _classes = {
146
+ 'fa-beat' : beat ,
147
+ 'fa-fade' : fade ,
148
+ 'fa-flash' : flash ,
140
149
'fa-spin' : spin ,
150
+ 'fa-spin-reverse' : spinReverse ,
151
+ 'fa-spin-pulse' : spinPulse ,
141
152
'fa-pulse' : pulse ,
142
153
'fa-fw' : fixedWidth ,
143
154
'fa-inverse' : inverse ,
@@ -178,6 +189,8 @@ function camelize(string) {
178
189
return string . substr ( 0 , 1 ) . toLowerCase ( ) + string . substr ( 1 ) ;
179
190
}
180
191
192
+ var _excluded$1 = [ "style" ] ;
193
+
181
194
function capitalize ( val ) {
182
195
return val . charAt ( 0 ) . toUpperCase ( ) + val . slice ( 1 ) ;
183
196
}
@@ -237,12 +250,12 @@ function convert(createElement, element) {
237
250
238
251
var _extraProps$style = extraProps . style ,
239
252
existingStyle = _extraProps$style === void 0 ? { } : _extraProps$style ,
240
- remaining = _objectWithoutProperties ( extraProps , [ "style" ] ) ;
253
+ remaining = _objectWithoutProperties ( extraProps , _excluded$1 ) ;
241
254
242
- mixins . attrs [ 'style' ] = _objectSpread2 ( { } , mixins . attrs [ 'style' ] , { } , existingStyle ) ;
255
+ mixins . attrs [ 'style' ] = _objectSpread2 ( _objectSpread2 ( { } , mixins . attrs [ 'style' ] ) , existingStyle ) ;
243
256
/* eslint-enable */
244
257
245
- return createElement . apply ( void 0 , [ element . tag , _objectSpread2 ( { } , mixins . attrs , { } , remaining ) ] . concat ( _toConsumableArray ( children ) ) ) ;
258
+ return createElement . apply ( void 0 , [ element . tag , _objectSpread2 ( _objectSpread2 ( { } , mixins . attrs ) , remaining ) ] . concat ( _toConsumableArray ( children ) ) ) ;
246
259
}
247
260
248
261
var PRODUCTION = false ;
@@ -309,9 +322,10 @@ function objectWithKey(key, value) {
309
322
return Array . isArray ( value ) && value . length > 0 || ! Array . isArray ( value ) && value ? _defineProperty ( { } , key , value ) : { } ;
310
323
}
311
324
325
+ var _excluded = [ "forwardedRef" ] ;
312
326
function FontAwesomeIcon ( _ref ) {
313
327
var forwardedRef = _ref . forwardedRef ,
314
- props = _objectWithoutProperties ( _ref , [ "forwardedRef" ] ) ;
328
+ props = _objectWithoutProperties ( _ref , _excluded ) ;
315
329
316
330
var iconArgs = props . icon ,
317
331
maskArgs = props . mask ,
@@ -323,7 +337,7 @@ function FontAwesomeIcon(_ref) {
323
337
var classes = objectWithKey ( 'classes' , [ ] . concat ( _toConsumableArray ( classList ( props ) ) , _toConsumableArray ( className . split ( ' ' ) ) ) ) ;
324
338
var transform = objectWithKey ( 'transform' , typeof props . transform === 'string' ? parse . transform ( props . transform ) : props . transform ) ;
325
339
var mask = objectWithKey ( 'mask' , normalizeIconArgs ( maskArgs ) ) ;
326
- var renderedIcon = icon ( iconLookup , _objectSpread2 ( { } , classes , { } , transform , { } , mask , {
340
+ var renderedIcon = icon ( iconLookup , _objectSpread2 ( _objectSpread2 ( _objectSpread2 ( _objectSpread2 ( { } , classes ) , transform ) , mask ) , { } , {
327
341
symbol : symbol ,
328
342
title : title ,
329
343
titleId : titleId
@@ -348,8 +362,11 @@ function FontAwesomeIcon(_ref) {
348
362
}
349
363
FontAwesomeIcon . displayName = 'FontAwesomeIcon' ;
350
364
FontAwesomeIcon . propTypes = {
365
+ beat : PropTypes . bool ,
351
366
border : PropTypes . bool ,
352
367
className : PropTypes . string ,
368
+ fade : PropTypes . bool ,
369
+ flash : PropTypes . bool ,
353
370
mask : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . array , PropTypes . string ] ) ,
354
371
fixedWidth : PropTypes . bool ,
355
372
inverse : PropTypes . bool ,
@@ -359,8 +376,10 @@ FontAwesomeIcon.propTypes = {
359
376
pull : PropTypes . oneOf ( [ 'right' , 'left' ] ) ,
360
377
pulse : PropTypes . bool ,
361
378
rotation : PropTypes . oneOf ( [ 0 , 90 , 180 , 270 ] ) ,
362
- size : PropTypes . oneOf ( [ 'lg ' , 'xs' , 'sm' , '1x' , '2x' , '3x' , '4x' , '5x' , '6x' , '7x' , '8x' , '9x' , '10x' ] ) ,
379
+ size : PropTypes . oneOf ( [ '2xs ' , 'xs' , 'sm' , 'lg' , 'xl' , '2xl ', '1x' , '2x' , '3x' , '4x' , '5x' , '6x' , '7x' , '8x' , '9x' , '10x' ] ) ,
363
380
spin : PropTypes . bool ,
381
+ spinPulse : PropTypes . bool ,
382
+ spinReverse : PropTypes . bool ,
364
383
symbol : PropTypes . oneOfType ( [ PropTypes . bool , PropTypes . string ] ) ,
365
384
title : PropTypes . string ,
366
385
transform : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . object ] ) ,
0 commit comments