@medely/react-fontawesome 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. package/README.md +36 -20
  2. package/index.d.ts +34 -33
  3. package/index.es.js +273 -207
  4. package/index.js +342 -419
  5. package/package.json +21 -11
package/README.md CHANGED
@@ -6,19 +6,30 @@
6
6
 
7
7
  [![npm](https://img.shields.io/npm/v/@fortawesome/react-fontawesome.svg?style=flat-square)](https://www.npmjs.com/package/@fortawesome/react-fontawesome)
8
8
 
9
- > Font Awesome 5 React component using SVG with JS
9
+ > Font Awesome React component using SVG with JS
10
10
 
11
11
  <!-- toc -->
12
12
 
13
- - [Documentation](#documentation)
14
- - [How to Help](#how-to-help)
15
- - [Contributors](#contributors)
16
- - [Releasing this project (only project owners can do this)](#releasing-this-project-only-project-owners-can-do-this)
13
+ - [react-fontawesome](#react-fontawesome)
14
+ - [Documentation](#documentation)
15
+ - [Compatibility](#compatibility)
16
+ - [How to Help](#how-to-help)
17
+ - [Contributors](#contributors)
18
+ - [Releasing this project (only project owners can do this)](#releasing-this-project-only-project-owners-can-do-this)
17
19
 
18
20
  <!-- tocstop -->
19
21
 
20
22
  ## Documentation
21
23
 
24
+ `react-fontawesome` now supports `forwardRef` for version `0.2.x` or above. This was a breaking change so if you are using React older than version 16.3.0 choose the `0.1.x` version of this component.
25
+
26
+ ## Compatibility
27
+
28
+ | React version | react-fontawesome version |
29
+ | ------------- | ------------------------- |
30
+ | < 16.3.0 | 0.1.x |
31
+ | >= 16.3.0 | 0.2.x |
32
+
22
33
  Official documentation is hosted at fontawesome.com:
23
34
 
24
35
  [Check it out here](https://fontawesome.com/v6/docs/web/use-with/react/)
@@ -40,21 +51,26 @@ The following contributors have either helped to start this project, have contri
40
51
  code, are actively maintaining it (including documentation), or in other ways
41
52
  being awesome contributors to this project. **We'd like to take a moment to recognize them.**
42
53
 
43
- | Name | GitHub |
44
- | ----------------- | --------------------------------------------------------- |
45
- | Nate Radebaugh | [@NateRadebaugh](https://github.com/NateRadebaugh) |
46
- | Kirk Ross | [@kirkbross](https://github.com/kirkbross) |
47
- | Prateek Goel | [@prateekgoel](https://github.com/prateekgoel) |
48
- | Naor Torgeman | [@naortor](https://github.com/naortor) |
49
- | Matthew Hand | [@mmhand123](https://github.com/mmhand123) |
50
- | calvinf | [@calvinf](https://github.com/calvinf) |
51
- | Bill Parrott | [@chimericdream](https://github.com/chimericdream) |
52
- | Mike Lynch | [@baelec](https://github.com/baelec) |
53
- | Lukáš Rod | [@rodlukas](https://github.com/rodlukas) |
54
- | Proudust | [@proudust](https://github.com/proudust) |
55
- | Tiago Sousa | [@TiagoPortfolio](https://github.com/TiagoPortfolio) |
56
- | Alexey Victorov | [@AliMamed](https://github.com/AliMamed) |
57
- | Font Awesome Team | [@FortAwesome](https://github.com/orgs/FortAwesome/people)|
54
+ | Name | GitHub |
55
+ | ----------------- | ---------------------------------------------------------- |
56
+ | Nate Radebaugh | [@NateRadebaugh](https://github.com/NateRadebaugh) |
57
+ | Kirk Ross | [@kirkbross](https://github.com/kirkbross) |
58
+ | Prateek Goel | [@prateekgoel](https://github.com/prateekgoel) |
59
+ | Naor Torgeman | [@naortor](https://github.com/naortor) |
60
+ | Matthew Hand | [@mmhand123](https://github.com/mmhand123) |
61
+ | calvinf | [@calvinf](https://github.com/calvinf) |
62
+ | Bill Parrott | [@chimericdream](https://github.com/chimericdream) |
63
+ | Mike Lynch | [@baelec](https://github.com/baelec) |
64
+ | Lukáš Rod | [@rodlukas](https://github.com/rodlukas) |
65
+ | Proudust | [@proudust](https://github.com/proudust) |
66
+ | Tiago Sousa | [@TiagoPortfolio](https://github.com/TiagoPortfolio) |
67
+ | Alexey Victorov | [@AliMamed](https://github.com/AliMamed) |
68
+ | Calum Smith | [@cpmsmith](https://github.com/cpmsmith) |
69
+ | squiaios | [@squiaios](https://github.com/squiaios) |
70
+ | WyvernDrexx | [@WyvernDrexx](https://github.com/WyvernDrexx) |
71
+ | Jon Defresne | [@jdufresne](https://github.com/jdufresne) |
72
+ | Charles Harwood | [@charles4221](https://github.com/charles4221) |
73
+ | Font Awesome Team | [@FortAwesome](https://github.com/orgs/FortAwesome/people) |
58
74
 
59
75
  If we've missed someone (which is quite likely) submit a Pull Request to us and we'll get it resolved.
60
76
 
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { CSSProperties, SVGAttributes } from 'react'
2
+ import { CSSProperties, SVGAttributes, RefAttributes } from 'react'
3
3
  import {
4
4
  Transform,
5
5
  IconProp,
@@ -8,9 +8,9 @@ import {
8
8
  PullProp,
9
9
  RotateProp,
10
10
  FaSymbol
11
- } from '../fontawesome-svg-core'
11
+ } from '@fortawesome/fontawesome-svg-core'
12
12
 
13
- export function FontAwesomeIcon(props: FontAwesomeIconProps): JSX.Element
13
+ export function FontAwesomeIcon(props: FontAwesomeIconProps): React.JSX.Element
14
14
 
15
15
  /**
16
16
  * @deprecated use FontAwesomeIconProps
@@ -20,35 +20,36 @@ export type Props = FontAwesomeIconProps
20
20
  // This is identical to the version of Omit in Typescript 3.5. It is included for compatibility with older versions of Typescript.
21
21
  type BackwardCompatibleOmit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
22
22
 
23
- export interface FontAwesomeIconProps extends BackwardCompatibleOmit<SVGAttributes<SVGSVGElement>, 'children' | 'mask' | 'transform'> {
24
- forwardedRef?: ((e: any) => void) | React.MutableRefObject<any> | null
23
+ export interface FontAwesomeIconProps extends BackwardCompatibleOmit<SVGAttributes<SVGSVGElement>, 'children' | 'mask' | 'transform'>, RefAttributes<SVGSVGElement> {
25
24
  icon: IconProp
26
- mask?: IconProp
27
- maskId?: string
28
- className?: string
29
- color?: string
30
- spin?: boolean
31
- spinPulse?: boolean
32
- spinReverse?: boolean
33
- pulse?: boolean
34
- beat?: boolean
35
- fade?: boolean
36
- beatFade?: boolean
37
- bounce?: boolean
38
- shake?: boolean
39
- border?: boolean
40
- fixedWidth?: boolean
41
- inverse?: boolean
42
- listItem?: boolean
43
- flip?: FlipProp
44
- size?: SizeProp
45
- pull?: PullProp
46
- rotation?: RotateProp
47
- transform?: string | Transform
48
- symbol?: FaSymbol
49
- style?: CSSProperties
50
- tabIndex?: number;
51
- title?: string;
52
- titleId?: string;
53
- swapOpacity?: boolean;
25
+ mask?: IconProp | undefined;
26
+ maskId?: string | undefined;
27
+ className?: string | undefined;
28
+ color?: string | undefined;
29
+ spin?: boolean | undefined;
30
+ spinPulse?: boolean | undefined;
31
+ spinReverse?: boolean | undefined;
32
+ pulse?: boolean | undefined;
33
+ beat?: boolean | undefined;
34
+ fade?: boolean | undefined;
35
+ beatFade?: boolean | undefined;
36
+ bounce?: boolean | undefined;
37
+ shake?: boolean | undefined;
38
+ border?: boolean | undefined;
39
+ fixedWidth?: boolean | undefined;
40
+ inverse?: boolean | undefined;
41
+ listItem?: boolean | undefined;
42
+ flip?: FlipProp | undefined;
43
+ size?: SizeProp | undefined;
44
+ pull?: PullProp | undefined;
45
+ rotation?: RotateProp | undefined;
46
+ rotateBy?: boolean | undefined;
47
+ transform?: string | Transform | undefined;
48
+ symbol?: FaSymbol | undefined;
49
+ style?: CSSProperties | undefined;
50
+ tabIndex?: number | undefined;
51
+ title?: string | undefined;
52
+ titleId?: string | undefined;
53
+ swapOpacity?: boolean | undefined;
54
+ widthAuto?: boolean | undefined;
54
55
  }