dce-reactkit 1.0.19 → 2.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 (203) hide show
  1. package/.eslintrc.js +95 -0
  2. package/lib/components/LoadingSpinner.d.ts +6 -0
  3. package/lib/components/LoadingSpinner.js +41 -0
  4. package/lib/components/LoadingSpinner.js.map +1 -0
  5. package/lib/components/Modal.d.ts +69 -0
  6. package/lib/components/Modal.js +315 -0
  7. package/lib/components/Modal.js.map +1 -0
  8. package/lib/helpers/abbreviate.d.ts +9 -0
  9. package/lib/helpers/abbreviate.js +21 -0
  10. package/lib/helpers/abbreviate.js.map +1 -0
  11. package/lib/helpers/avg.d.ts +8 -0
  12. package/lib/helpers/avg.js +24 -0
  13. package/lib/helpers/avg.js.map +1 -0
  14. package/lib/helpers/ceilToNumDecimals.d.ts +9 -0
  15. package/lib/helpers/ceilToNumDecimals.js +15 -0
  16. package/lib/helpers/ceilToNumDecimals.js.map +1 -0
  17. package/lib/helpers/floorToNumDecimals.d.ts +9 -0
  18. package/lib/helpers/floorToNumDecimals.js +15 -0
  19. package/lib/helpers/floorToNumDecimals.js.map +1 -0
  20. package/lib/helpers/forceNumIntoBounds.d.ts +10 -0
  21. package/lib/helpers/forceNumIntoBounds.js +15 -0
  22. package/lib/helpers/forceNumIntoBounds.js.map +1 -0
  23. package/lib/helpers/padDecimalZeros.d.ts +10 -0
  24. package/lib/helpers/padDecimalZeros.js +30 -0
  25. package/lib/helpers/padDecimalZeros.js.map +1 -0
  26. package/lib/helpers/padZerosLeft.d.ts +9 -0
  27. package/lib/helpers/padZerosLeft.js +21 -0
  28. package/lib/helpers/padZerosLeft.js.map +1 -0
  29. package/lib/helpers/roundToNumDecimals.d.ts +9 -0
  30. package/lib/helpers/roundToNumDecimals.js +15 -0
  31. package/lib/helpers/roundToNumDecimals.js.map +1 -0
  32. package/lib/helpers/sum.d.ts +8 -0
  33. package/lib/helpers/sum.js +15 -0
  34. package/lib/helpers/sum.js.map +1 -0
  35. package/lib/helpers/waitMs.d.ts +7 -0
  36. package/lib/helpers/waitMs.js +55 -0
  37. package/lib/helpers/waitMs.js.map +1 -0
  38. package/lib/types/Variant.d.ts +15 -0
  39. package/lib/types/Variant.js +19 -0
  40. package/lib/types/Variant.js.map +1 -0
  41. package/package.json +21 -39
  42. package/src/components/LoadingSpinner.tsx +105 -0
  43. package/src/components/Modal.tsx +447 -0
  44. package/src/helpers/abbreviate.tsx +23 -0
  45. package/src/helpers/avg.tsx +22 -0
  46. package/src/helpers/ceilToNumDecimals.tsx +13 -0
  47. package/src/helpers/floorToNumDecimals.tsx +13 -0
  48. package/src/helpers/forceNumIntoBounds.tsx +19 -0
  49. package/src/helpers/padDecimalZeros.tsx +32 -0
  50. package/src/helpers/padZerosLeft.tsx +21 -0
  51. package/src/helpers/roundToNumDecimals.tsx +13 -0
  52. package/src/helpers/sum.tsx +16 -0
  53. package/src/helpers/waitMs.tsx +12 -0
  54. package/src/types/Variant.tsx +16 -0
  55. package/tsconfig.json +24 -0
  56. package/index.js +0 -1
  57. package/lib/Bar.js +0 -169
  58. package/lib/Donut.js +0 -145
  59. package/lib/DownloadButton.js +0 -81
  60. package/lib/Histogram.js +0 -193
  61. package/lib/Scatter.js +0 -162
  62. package/lib/StackedBar.js +0 -243
  63. package/lib/common/chart/Holder/index.js +0 -182
  64. package/lib/common/chart/Holder/style.css +0 -41
  65. package/lib/common/chart/colors.js +0 -12
  66. package/lib/common/csvToString.js +0 -23
  67. package/lib/common/isFloat.js +0 -14
  68. package/lib/common/isInteger.js +0 -24
  69. package/lib/common/math.js +0 -21
  70. package/lib/common/validators.js +0 -18
  71. package/lib/glyph/Adjust.js +0 -13
  72. package/lib/glyph/Angle.js +0 -44
  73. package/lib/glyph/Archive.js +0 -13
  74. package/lib/glyph/Arrow.js +0 -49
  75. package/lib/glyph/ArrowsHorizontal.js +0 -13
  76. package/lib/glyph/ArrowsVertical.js +0 -13
  77. package/lib/glyph/Award.js +0 -13
  78. package/lib/glyph/Ban.js +0 -13
  79. package/lib/glyph/Barcode.js +0 -13
  80. package/lib/glyph/Bed.js +0 -13
  81. package/lib/glyph/Bell.js +0 -35
  82. package/lib/glyph/Bolt.js +0 -13
  83. package/lib/glyph/Bookmark.js +0 -37
  84. package/lib/glyph/Bug.js +0 -13
  85. package/lib/glyph/Calendar.js +0 -13
  86. package/lib/glyph/Check.js +0 -36
  87. package/lib/glyph/Checkbox.js +0 -40
  88. package/lib/glyph/Chevron.js +0 -63
  89. package/lib/glyph/Circle.js +0 -15
  90. package/lib/glyph/Cog.js +0 -13
  91. package/lib/glyph/DoubleAngle.js +0 -45
  92. package/lib/glyph/Download.js +0 -13
  93. package/lib/glyph/Ellipsis.js +0 -36
  94. package/lib/glyph/Envelope.js +0 -13
  95. package/lib/glyph/File.js +0 -37
  96. package/lib/glyph/IdCard.js +0 -13
  97. package/lib/glyph/Menu.js +0 -13
  98. package/lib/glyph/Minus.js +0 -13
  99. package/lib/glyph/Move.js +0 -13
  100. package/lib/glyph/Plus.js +0 -13
  101. package/lib/glyph/Square.js +0 -47
  102. package/lib/glyph/Teacher.js +0 -13
  103. package/lib/glyph/TextAlign.js +0 -53
  104. package/lib/glyph/Times.js +0 -36
  105. package/lib/glyph/WarningTriangle.js +0 -13
  106. package/lib/index.js +0 -1
  107. package/src-old/common/csvToString.js +0 -5
  108. package/src-old/common/isFloat.js +0 -3
  109. package/src-old/common/isInteger.js +0 -14
  110. package/src-old/common/math.js +0 -16
  111. package/src-old/common/validators.js +0 -14
  112. package/src-old/components/Alert.js +0 -79
  113. package/src-old/components/Button.js +0 -64
  114. package/src-old/components/CSV/autoMatch.js +0 -174
  115. package/src-old/components/CSV/getNumCols.js +0 -15
  116. package/src-old/components/CSV/index.js +0 -743
  117. package/src-old/components/Card.js +0 -64
  118. package/src-old/components/Chart/Bar.js +0 -169
  119. package/src-old/components/Chart/Donut.js +0 -160
  120. package/src-old/components/Chart/Histogram.js +0 -189
  121. package/src-old/components/Chart/Scatter.js +0 -162
  122. package/src-old/components/Chart/colors.js +0 -20
  123. package/src-old/components/Checkbox/index.js +0 -106
  124. package/src-old/components/Checkbox/style.css +0 -11
  125. package/src-old/components/DatePicker.js +0 -59
  126. package/src-old/components/DownloadButton.js +0 -72
  127. package/src-old/components/Dropdown.js +0 -120
  128. package/src-old/components/Layout/LeftAddon.js +0 -63
  129. package/src-old/components/Layout/RightAddon.js +0 -64
  130. package/src-old/components/Layout/TwoCol.js +0 -67
  131. package/src-old/components/Modal.js +0 -161
  132. package/src-old/components/PhotoRoster.js +0 -152
  133. package/src-old/components/Pills.js +0 -117
  134. package/src-old/components/Radio.js +0 -94
  135. package/src-old/components/Splash/Error.js +0 -62
  136. package/src-old/components/Splash/Load/index.js +0 -32
  137. package/src-old/components/Splash/Load/style.css +0 -51
  138. package/src-old/components/Stat/General.js +0 -252
  139. package/src-old/components/Stat/helpers/calcAverage.js +0 -20
  140. package/src-old/components/Stat/helpers/calcExtremes.js +0 -27
  141. package/src-old/components/Stat/helpers/calcMedian.js +0 -32
  142. package/src-old/components/Stat/helpers/calcStdDev.js +0 -30
  143. package/src-old/components/Stat/helpers/calcSum.js +0 -8
  144. package/src-old/components/UserProfile/index.js +0 -151
  145. package/src-old/components/UserProfile/style.css +0 -33
  146. package/src-old/components/Well.js +0 -28
  147. package/src-old/components/Wizard/Question/CSV.js +0 -307
  148. package/src-old/components/Wizard/Question/Chooser/Assignment.js +0 -108
  149. package/src-old/components/Wizard/Question/Chooser/Course.js +0 -214
  150. package/src-old/components/Wizard/Question/Chooser/helpers/divideIntoSections.js +0 -16
  151. package/src-old/components/Wizard/Question/Chooser/helpers/genGetItemsPromise.js +0 -20
  152. package/src-old/components/Wizard/Question/Chooser/helpers/preprocessSections.js +0 -36
  153. package/src-old/components/Wizard/Question/Chooser/index.js +0 -306
  154. package/src-old/components/Wizard/Question/Form/Field/CheckableItem.js +0 -155
  155. package/src-old/components/Wizard/Question/Form/Field/Input.js +0 -149
  156. package/src-old/components/Wizard/Question/Form/Field/NumberItem.js +0 -374
  157. package/src-old/components/Wizard/Question/Form/Field/index.js +0 -34
  158. package/src-old/components/Wizard/Question/Form/Field/readme.md +0 -7
  159. package/src-old/components/Wizard/Question/Form/index.js +0 -175
  160. package/src-old/components/Wizard/Question/Form/style.css +0 -3
  161. package/src-old/components/Wizard/Question/OneButton.js +0 -80
  162. package/src-old/components/Wizard/Question/index.js +0 -46
  163. package/src-old/components/Wizard/Question/readme.md +0 -10
  164. package/src-old/components/Wizard/QuestionGroup/AnswerAll.js +0 -126
  165. package/src-old/components/Wizard/QuestionGroup/AnswerAny.js +0 -60
  166. package/src-old/components/Wizard/index.js +0 -233
  167. package/src-old/components/Wizard/style.css +0 -21
  168. package/src-old/glyphs/Adjust.js +0 -13
  169. package/src-old/glyphs/Angle.js +0 -57
  170. package/src-old/glyphs/Archive.js +0 -13
  171. package/src-old/glyphs/Arrow.js +0 -85
  172. package/src-old/glyphs/ArrowsHorizontal.js +0 -13
  173. package/src-old/glyphs/ArrowsVertical.js +0 -13
  174. package/src-old/glyphs/Award.js +0 -13
  175. package/src-old/glyphs/Ban.js +0 -13
  176. package/src-old/glyphs/Barcode.js +0 -13
  177. package/src-old/glyphs/Bed.js +0 -13
  178. package/src-old/glyphs/Bell.js +0 -34
  179. package/src-old/glyphs/Bolt.js +0 -13
  180. package/src-old/glyphs/Bookmark.js +0 -36
  181. package/src-old/glyphs/Bug.js +0 -13
  182. package/src-old/glyphs/Calendar.js +0 -13
  183. package/src-old/glyphs/Check.js +0 -34
  184. package/src-old/glyphs/Checkbox.js +0 -42
  185. package/src-old/glyphs/Chevron.js +0 -88
  186. package/src-old/glyphs/Circle.js +0 -16
  187. package/src-old/glyphs/Cog.js +0 -13
  188. package/src-old/glyphs/DoubleAngle.js +0 -58
  189. package/src-old/glyphs/Download.js +0 -13
  190. package/src-old/glyphs/Ellipsis.js +0 -35
  191. package/src-old/glyphs/Envelope.js +0 -13
  192. package/src-old/glyphs/File.js +0 -40
  193. package/src-old/glyphs/IdCard.js +0 -13
  194. package/src-old/glyphs/Menu.js +0 -13
  195. package/src-old/glyphs/Minus.js +0 -13
  196. package/src-old/glyphs/Move.js +0 -13
  197. package/src-old/glyphs/Plus.js +0 -13
  198. package/src-old/glyphs/Square.js +0 -48
  199. package/src-old/glyphs/Teacher.js +0 -13
  200. package/src-old/glyphs/TextAlign.js +0 -58
  201. package/src-old/glyphs/Times.js +0 -34
  202. package/src-old/glyphs/WarningTriangle.js +0 -13
  203. package/src-old/index.js +0 -1
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faBed } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Bed extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faBed} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Bed;
@@ -1,34 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
- import { faBell, faBellSlash } from '@fortawesome/free-solid-svg-icons';
5
-
6
- class Bell extends Component {
7
- render() {
8
- // Extract props
9
- const {
10
- slashed,
11
- ...props
12
- } = this.props;
13
-
14
- if (slashed) {
15
- return (
16
- <FontAwesomeIcon icon={faBellSlash} {...props} />
17
- );
18
- }
19
- return (
20
- <FontAwesomeIcon icon={faBell} {...props} />
21
- );
22
- }
23
- }
24
-
25
- Bell.propTypes = {
26
- // If true, a slash is shown cutting through the bell
27
- slashed: PropTypes.bool,
28
- };
29
-
30
- Bell.defaultProps = {
31
- slashed: false,
32
- };
33
-
34
- export default Bell;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faBolt } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Bolt extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faBolt} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Bolt;
@@ -1,36 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faBookmark } from '@fortawesome/free-solid-svg-icons';
6
- import { faBookmark as faBookmarkOutlined } from '@fortawesome/free-regular-svg-icons';
7
-
8
- class Bookmark extends Component {
9
- render() {
10
- // Extract props
11
- const {
12
- outlined,
13
- ...props
14
- } = this.props;
15
-
16
- if (outlined) {
17
- return (
18
- <FontAwesomeIcon icon={faBookmarkOutlined} {...props} />
19
- );
20
- }
21
- return (
22
- <FontAwesomeIcon icon={faBookmark} {...props} />
23
- );
24
- }
25
- }
26
-
27
- Bookmark.propTypes = {
28
- // If true, bolt is shown in an outline instead of filled
29
- outlined: PropTypes.bool,
30
- };
31
-
32
- Bookmark.defaultProps = {
33
- outlined: false,
34
- };
35
-
36
- export default Bookmark;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faBug } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Bug extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faBug} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Bug;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faCalendar } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Calendar extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faCalendar} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Calendar;
@@ -1,34 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faCheck } from '@fortawesome/free-solid-svg-icons';
6
-
7
- class Check extends Component {
8
- render() {
9
- // Deconstruct props
10
- const {
11
- grow,
12
- ...props
13
- } = this.props;
14
-
15
- return (
16
- <FontAwesomeIcon
17
- icon={faCheck}
18
- transform={grow ? `grow-${grow}` : undefined}
19
- {...props}
20
- />
21
- );
22
- }
23
- }
24
-
25
- Check.propTypes = {
26
- // Factor by which to grow the check mark
27
- grow: PropTypes.number,
28
- };
29
-
30
- Check.defaultProps = {
31
- grow: null,
32
- };
33
-
34
- export default Check;
@@ -1,42 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faCheckSquare, faSquare } from '@fortawesome/free-solid-svg-icons';
6
-
7
- class Checkbox extends Component {
8
- render() {
9
- // Deconstruct props
10
- const {
11
- grow,
12
- checked,
13
- ...props
14
- } = this.props;
15
-
16
- return (
17
- <FontAwesomeIcon
18
- icon={(
19
- checked
20
- ? faCheckSquare
21
- : faSquare
22
- )}
23
- transform={grow ? `grow-${grow}` : undefined}
24
- {...props}
25
- />
26
- );
27
- }
28
- }
29
-
30
- Checkbox.propTypes = {
31
- // If true, the checkbox is checked
32
- checked: PropTypes.bool,
33
- // Factor by which to grow the checkbox
34
- grow: PropTypes.number,
35
- };
36
-
37
- Checkbox.defaultProps = {
38
- checked: false,
39
- grow: null,
40
- };
41
-
42
- export default Checkbox;
@@ -1,88 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import {
6
- faChevronUp,
7
- faChevronDown,
8
- faChevronRight,
9
- faChevronLeft,
10
- faChevronCircleUp,
11
- faChevronCircleDown,
12
- faChevronCircleRight,
13
- faChevronCircleLeft,
14
- } from '@fortawesome/free-solid-svg-icons';
15
-
16
- /* use direction="up|down|left|right" (default is "right")
17
- * add circled prop to put the chevron in a circle bubble
18
- */
19
-
20
- class Chevron extends Component {
21
- render() {
22
- // Extract props
23
- const {
24
- circled,
25
- direction,
26
- ...props
27
- } = this.props;
28
-
29
- if (circled) {
30
- switch (direction) {
31
- case 'up':
32
- return (
33
- <FontAwesomeIcon icon={faChevronCircleUp} {...props} />
34
- );
35
- case 'down':
36
- return (
37
- <FontAwesomeIcon icon={faChevronCircleDown} {...props} />
38
- );
39
- case 'left':
40
- return (
41
- <FontAwesomeIcon icon={faChevronCircleLeft} {...props} />
42
- );
43
- default:
44
- return (
45
- <FontAwesomeIcon icon={faChevronCircleRight} {...props} />
46
- );
47
- }
48
- } else {
49
- switch (direction) {
50
- case 'up':
51
- return (
52
- <FontAwesomeIcon icon={faChevronUp} {...props} />
53
- );
54
- case 'down':
55
- return (
56
- <FontAwesomeIcon icon={faChevronDown} {...props} />
57
- );
58
- case 'left':
59
- return (
60
- <FontAwesomeIcon icon={faChevronLeft} {...props} />
61
- );
62
- default:
63
- return (
64
- <FontAwesomeIcon icon={faChevronRight} {...props} />
65
- );
66
- }
67
- }
68
- }
69
- }
70
-
71
- Chevron.propTypes = {
72
- // If true, the chevron is shown in a circle
73
- circled: PropTypes.bool,
74
- // The direction of the chevron
75
- direction: PropTypes.oneOf([
76
- 'up',
77
- 'down',
78
- 'left',
79
- 'right',
80
- ]),
81
- };
82
-
83
- Chevron.defaultProps = {
84
- circled: false,
85
- direction: 'right',
86
- };
87
-
88
- export default Chevron;
@@ -1,16 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faCircle } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Circle extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon
9
- icon={faCircle}
10
- {...this.props}
11
- />
12
- );
13
- }
14
- }
15
-
16
- export default Circle;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faCog } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Cog extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faCog} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Cog;
@@ -1,58 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import {
6
- faAngleDoubleUp,
7
- faAngleDoubleDown,
8
- faAngleDoubleRight,
9
- faAngleDoubleLeft,
10
- } from '@fortawesome/free-solid-svg-icons';
11
-
12
- /* use direction="up|down|left|right" (default is "right")
13
- */
14
-
15
- class DoubleAngle extends Component {
16
- render() {
17
- // Extract props
18
- const {
19
- direction,
20
- ...props
21
- } = this.props;
22
-
23
- switch (direction) {
24
- case 'up':
25
- return (
26
- <FontAwesomeIcon icon={faAngleDoubleUp} {...props} />
27
- );
28
- case 'down':
29
- return (
30
- <FontAwesomeIcon icon={faAngleDoubleDown} {...props} />
31
- );
32
- case 'left':
33
- return (
34
- <FontAwesomeIcon icon={faAngleDoubleLeft} {...props} />
35
- );
36
- default:
37
- return (
38
- <FontAwesomeIcon icon={faAngleDoubleRight} {...props} />
39
- );
40
- }
41
- }
42
- }
43
-
44
- DoubleAngle.propTypes = {
45
- /* Direction of the angle */
46
- direction: PropTypes.oneOf([
47
- 'up',
48
- 'down',
49
- 'left',
50
- 'right',
51
- ]),
52
- };
53
-
54
- DoubleAngle.defaultProps = {
55
- direction: 'right',
56
- };
57
-
58
- export default DoubleAngle;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faCloudDownloadAlt } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Download extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faCloudDownloadAlt} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Download;
@@ -1,35 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faEllipsisH, faEllipsisV } from '@fortawesome/free-solid-svg-icons';
6
-
7
- class Adjust extends Component {
8
- render() {
9
- // Deconstruct props
10
- const {
11
- vertical,
12
- ...props
13
- } = this.props;
14
-
15
- if (vertical) {
16
- return (
17
- <FontAwesomeIcon icon={faEllipsisV} {...props} />
18
- );
19
- }
20
- return (
21
- <FontAwesomeIcon icon={faEllipsisH} {...props} />
22
- );
23
- }
24
- }
25
-
26
- Adjust.propTypes = {
27
- // If true, ellipsis is vertical
28
- vertical: PropTypes.bool,
29
- };
30
-
31
- Adjust.defaultProps = {
32
- vertical: false,
33
- };
34
-
35
- export default Adjust;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faEnvelope } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Envelope extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faEnvelope} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Envelope;
@@ -1,40 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import {
6
- faFile,
7
- faFileCsv,
8
- } from '@fortawesome/free-solid-svg-icons';
9
-
10
- class File extends Component {
11
- render() {
12
- const { type } = this.props;
13
-
14
- // Choose an icon
15
- let icon;
16
- switch (type) {
17
- case 'csv':
18
- icon = faFileCsv;
19
- break;
20
- default:
21
- icon = faFile;
22
- break;
23
- }
24
-
25
- return (
26
- <FontAwesomeIcon icon={icon} {...this.props} />
27
- );
28
- }
29
- }
30
-
31
- File.propTypes = {
32
- // Supported file types: 'csv'
33
- type: PropTypes.string,
34
- };
35
-
36
- File.defaultProps = {
37
- type: null,
38
- };
39
-
40
- export default File;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faIdCard } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class IdCard extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faIdCard} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default IdCard;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faBars } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Menu extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faBars} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Menu;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faMinus } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Minus extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faMinus} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Minus;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faArrowsAlt } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Move extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faArrowsAlt} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Move;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faPlus } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Plus extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faPlus} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Plus;
@@ -1,48 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faSquare as faSquareFilled } from '@fortawesome/free-solid-svg-icons';
6
- import { faSquare } from '@fortawesome/free-regular-svg-icons';
7
-
8
- class Square extends Component {
9
- render() {
10
- // Deconstruct props
11
- const {
12
- grow,
13
- filled,
14
- ...props
15
- } = this.props;
16
-
17
- if (filled) {
18
- return (
19
- <FontAwesomeIcon
20
- icon={faSquareFilled}
21
- transform={grow ? `grow-${grow}` : undefined}
22
- {...props}
23
- />
24
- );
25
- }
26
- return (
27
- <FontAwesomeIcon
28
- icon={faSquare}
29
- transform={grow ? `grow-${grow}` : undefined}
30
- {...props}
31
- />
32
- );
33
- }
34
- }
35
-
36
- Square.propTypes = {
37
- // If true, the square is filled
38
- filled: PropTypes.bool,
39
- // Factor by which to grow the check mark
40
- grow: PropTypes.number,
41
- };
42
-
43
- Square.defaultProps = {
44
- filled: false,
45
- grow: null,
46
- };
47
-
48
- export default Square;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faChalkboardTeacher } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Teacher extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faChalkboardTeacher} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Teacher;
@@ -1,58 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import {
6
- faAlignCenter,
7
- faAlignLeft,
8
- faAlignRight,
9
- faAlignJustify,
10
- } from '@fortawesome/free-solid-svg-icons';
11
-
12
- class TextAlign extends Component {
13
- render() {
14
- // Deconstruct props
15
- const {
16
- left,
17
- right,
18
- justify,
19
- center,
20
- } = this.props;
21
-
22
- let icon;
23
- if (left) {
24
- icon = faAlignLeft;
25
- } else if (right) {
26
- icon = faAlignRight;
27
- } else if (justify) {
28
- icon = faAlignJustify;
29
- } else if (center) {
30
- icon = faAlignCenter;
31
- } else {
32
- icon = faAlignLeft;
33
- }
34
- return (
35
- <FontAwesomeIcon icon={icon} {...this.props} />
36
- );
37
- }
38
- }
39
-
40
- TextAlign.propTypes = {
41
- // If true, left align is shown
42
- left: PropTypes.bool,
43
- // If true, right align is shown
44
- right: PropTypes.bool,
45
- // If true, justify alignment is shown
46
- justify: PropTypes.bool,
47
- // If true, center align is shown
48
- center: PropTypes.bool,
49
- };
50
-
51
- TextAlign.defaultProps = {
52
- left: null,
53
- right: null,
54
- justify: null,
55
- center: null,
56
- };
57
-
58
- export default TextAlign;