dce-reactkit 1.0.20 → 2.0.2

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 (215) 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/errors/ErrorWithCode.d.ts +9 -0
  9. package/lib/errors/ErrorWithCode.js +33 -0
  10. package/lib/errors/ErrorWithCode.js.map +1 -0
  11. package/lib/helpers/abbreviate.d.ts +9 -0
  12. package/lib/helpers/abbreviate.js +21 -0
  13. package/lib/helpers/abbreviate.js.map +1 -0
  14. package/lib/helpers/avg.d.ts +8 -0
  15. package/lib/helpers/avg.js +24 -0
  16. package/lib/helpers/avg.js.map +1 -0
  17. package/lib/helpers/ceilToNumDecimals.d.ts +9 -0
  18. package/lib/helpers/ceilToNumDecimals.js +15 -0
  19. package/lib/helpers/ceilToNumDecimals.js.map +1 -0
  20. package/lib/helpers/floorToNumDecimals.d.ts +9 -0
  21. package/lib/helpers/floorToNumDecimals.js +15 -0
  22. package/lib/helpers/floorToNumDecimals.js.map +1 -0
  23. package/lib/helpers/forceNumIntoBounds.d.ts +10 -0
  24. package/lib/helpers/forceNumIntoBounds.js +15 -0
  25. package/lib/helpers/forceNumIntoBounds.js.map +1 -0
  26. package/lib/helpers/padDecimalZeros.d.ts +10 -0
  27. package/lib/helpers/padDecimalZeros.js +30 -0
  28. package/lib/helpers/padDecimalZeros.js.map +1 -0
  29. package/lib/helpers/padZerosLeft.d.ts +9 -0
  30. package/lib/helpers/padZerosLeft.js +21 -0
  31. package/lib/helpers/padZerosLeft.js.map +1 -0
  32. package/lib/helpers/roundToNumDecimals.d.ts +9 -0
  33. package/lib/helpers/roundToNumDecimals.js +15 -0
  34. package/lib/helpers/roundToNumDecimals.js.map +1 -0
  35. package/lib/helpers/sum.d.ts +8 -0
  36. package/lib/helpers/sum.js +15 -0
  37. package/lib/helpers/sum.js.map +1 -0
  38. package/lib/helpers/visitServerEndpoint.d.ts +17 -0
  39. package/lib/helpers/visitServerEndpoint.js +84 -0
  40. package/lib/helpers/visitServerEndpoint.js.map +1 -0
  41. package/lib/helpers/waitMs.d.ts +7 -0
  42. package/lib/helpers/waitMs.js +55 -0
  43. package/lib/helpers/waitMs.js.map +1 -0
  44. package/lib/types/ReactKitErrorCode.d.ts +9 -0
  45. package/lib/types/ReactKitErrorCode.js +14 -0
  46. package/lib/types/ReactKitErrorCode.js.map +1 -0
  47. package/lib/types/Variant.d.ts +15 -0
  48. package/lib/types/Variant.js +19 -0
  49. package/lib/types/Variant.js.map +1 -0
  50. package/package.json +22 -40
  51. package/src/components/LoadingSpinner.tsx +105 -0
  52. package/src/components/Modal.tsx +447 -0
  53. package/src/errors/ErrorWithCode.tsx +15 -0
  54. package/src/helpers/abbreviate.tsx +23 -0
  55. package/src/helpers/avg.tsx +22 -0
  56. package/src/helpers/ceilToNumDecimals.tsx +13 -0
  57. package/src/helpers/floorToNumDecimals.tsx +13 -0
  58. package/src/helpers/forceNumIntoBounds.tsx +19 -0
  59. package/src/helpers/padDecimalZeros.tsx +32 -0
  60. package/src/helpers/padZerosLeft.tsx +21 -0
  61. package/src/helpers/roundToNumDecimals.tsx +13 -0
  62. package/src/helpers/sum.tsx +16 -0
  63. package/src/helpers/visitServerEndpoint.tsx +59 -0
  64. package/src/helpers/waitMs.tsx +12 -0
  65. package/src/types/ReactKitErrorCode.tsx +12 -0
  66. package/src/types/Variant.tsx +16 -0
  67. package/tsconfig.json +24 -0
  68. package/index.js +0 -1
  69. package/lib/Bar.js +0 -169
  70. package/lib/Donut.js +0 -145
  71. package/lib/DownloadButton.js +0 -81
  72. package/lib/Histogram.js +0 -193
  73. package/lib/Scatter.js +0 -162
  74. package/lib/StackedBar.js +0 -243
  75. package/lib/common/chart/Holder/index.js +0 -182
  76. package/lib/common/chart/Holder/style.css +0 -41
  77. package/lib/common/chart/colors.js +0 -12
  78. package/lib/common/csvToString.js +0 -23
  79. package/lib/common/isFloat.js +0 -14
  80. package/lib/common/isInteger.js +0 -24
  81. package/lib/common/math.js +0 -21
  82. package/lib/common/validators.js +0 -18
  83. package/lib/glyph/Adjust.js +0 -13
  84. package/lib/glyph/Angle.js +0 -44
  85. package/lib/glyph/Archive.js +0 -13
  86. package/lib/glyph/Arrow.js +0 -49
  87. package/lib/glyph/ArrowsHorizontal.js +0 -13
  88. package/lib/glyph/ArrowsVertical.js +0 -13
  89. package/lib/glyph/Award.js +0 -13
  90. package/lib/glyph/Ban.js +0 -13
  91. package/lib/glyph/Barcode.js +0 -13
  92. package/lib/glyph/Bed.js +0 -13
  93. package/lib/glyph/Bell.js +0 -35
  94. package/lib/glyph/Bolt.js +0 -13
  95. package/lib/glyph/Bookmark.js +0 -37
  96. package/lib/glyph/Bug.js +0 -13
  97. package/lib/glyph/Calendar.js +0 -13
  98. package/lib/glyph/Check.js +0 -36
  99. package/lib/glyph/Checkbox.js +0 -40
  100. package/lib/glyph/Chevron.js +0 -63
  101. package/lib/glyph/Circle.js +0 -15
  102. package/lib/glyph/Cog.js +0 -13
  103. package/lib/glyph/DoubleAngle.js +0 -45
  104. package/lib/glyph/Download.js +0 -13
  105. package/lib/glyph/Ellipsis.js +0 -36
  106. package/lib/glyph/Envelope.js +0 -13
  107. package/lib/glyph/File.js +0 -37
  108. package/lib/glyph/IdCard.js +0 -13
  109. package/lib/glyph/Menu.js +0 -13
  110. package/lib/glyph/Minus.js +0 -13
  111. package/lib/glyph/Move.js +0 -13
  112. package/lib/glyph/Plus.js +0 -13
  113. package/lib/glyph/Square.js +0 -47
  114. package/lib/glyph/Teacher.js +0 -13
  115. package/lib/glyph/TextAlign.js +0 -53
  116. package/lib/glyph/Times.js +0 -36
  117. package/lib/glyph/WarningTriangle.js +0 -13
  118. package/lib/index.js +0 -1
  119. package/src-old/common/csvToString.js +0 -5
  120. package/src-old/common/isFloat.js +0 -3
  121. package/src-old/common/isInteger.js +0 -14
  122. package/src-old/common/math.js +0 -16
  123. package/src-old/common/validators.js +0 -14
  124. package/src-old/components/Alert.js +0 -79
  125. package/src-old/components/Button.js +0 -64
  126. package/src-old/components/CSV/autoMatch.js +0 -174
  127. package/src-old/components/CSV/getNumCols.js +0 -15
  128. package/src-old/components/CSV/index.js +0 -743
  129. package/src-old/components/Card.js +0 -64
  130. package/src-old/components/Chart/Bar.js +0 -169
  131. package/src-old/components/Chart/Donut.js +0 -160
  132. package/src-old/components/Chart/Histogram.js +0 -189
  133. package/src-old/components/Chart/Scatter.js +0 -162
  134. package/src-old/components/Chart/colors.js +0 -20
  135. package/src-old/components/Checkbox/index.js +0 -106
  136. package/src-old/components/Checkbox/style.css +0 -11
  137. package/src-old/components/DatePicker.js +0 -59
  138. package/src-old/components/DownloadButton.js +0 -72
  139. package/src-old/components/Dropdown.js +0 -120
  140. package/src-old/components/Layout/LeftAddon.js +0 -63
  141. package/src-old/components/Layout/RightAddon.js +0 -64
  142. package/src-old/components/Layout/TwoCol.js +0 -67
  143. package/src-old/components/Modal.js +0 -161
  144. package/src-old/components/PhotoRoster.js +0 -152
  145. package/src-old/components/Pills.js +0 -117
  146. package/src-old/components/Radio.js +0 -94
  147. package/src-old/components/Splash/Error.js +0 -62
  148. package/src-old/components/Splash/Load/index.js +0 -32
  149. package/src-old/components/Splash/Load/style.css +0 -51
  150. package/src-old/components/Stat/General.js +0 -252
  151. package/src-old/components/Stat/helpers/calcAverage.js +0 -20
  152. package/src-old/components/Stat/helpers/calcExtremes.js +0 -27
  153. package/src-old/components/Stat/helpers/calcMedian.js +0 -32
  154. package/src-old/components/Stat/helpers/calcStdDev.js +0 -30
  155. package/src-old/components/Stat/helpers/calcSum.js +0 -8
  156. package/src-old/components/UserProfile/index.js +0 -151
  157. package/src-old/components/UserProfile/style.css +0 -33
  158. package/src-old/components/Well.js +0 -28
  159. package/src-old/components/Wizard/Question/CSV.js +0 -307
  160. package/src-old/components/Wizard/Question/Chooser/Assignment.js +0 -108
  161. package/src-old/components/Wizard/Question/Chooser/Course.js +0 -214
  162. package/src-old/components/Wizard/Question/Chooser/helpers/divideIntoSections.js +0 -16
  163. package/src-old/components/Wizard/Question/Chooser/helpers/genGetItemsPromise.js +0 -20
  164. package/src-old/components/Wizard/Question/Chooser/helpers/preprocessSections.js +0 -36
  165. package/src-old/components/Wizard/Question/Chooser/index.js +0 -306
  166. package/src-old/components/Wizard/Question/Form/Field/CheckableItem.js +0 -155
  167. package/src-old/components/Wizard/Question/Form/Field/Input.js +0 -149
  168. package/src-old/components/Wizard/Question/Form/Field/NumberItem.js +0 -374
  169. package/src-old/components/Wizard/Question/Form/Field/index.js +0 -34
  170. package/src-old/components/Wizard/Question/Form/Field/readme.md +0 -7
  171. package/src-old/components/Wizard/Question/Form/index.js +0 -175
  172. package/src-old/components/Wizard/Question/Form/style.css +0 -3
  173. package/src-old/components/Wizard/Question/OneButton.js +0 -80
  174. package/src-old/components/Wizard/Question/index.js +0 -46
  175. package/src-old/components/Wizard/Question/readme.md +0 -10
  176. package/src-old/components/Wizard/QuestionGroup/AnswerAll.js +0 -126
  177. package/src-old/components/Wizard/QuestionGroup/AnswerAny.js +0 -60
  178. package/src-old/components/Wizard/index.js +0 -233
  179. package/src-old/components/Wizard/style.css +0 -21
  180. package/src-old/glyphs/Adjust.js +0 -13
  181. package/src-old/glyphs/Angle.js +0 -57
  182. package/src-old/glyphs/Archive.js +0 -13
  183. package/src-old/glyphs/Arrow.js +0 -85
  184. package/src-old/glyphs/ArrowsHorizontal.js +0 -13
  185. package/src-old/glyphs/ArrowsVertical.js +0 -13
  186. package/src-old/glyphs/Award.js +0 -13
  187. package/src-old/glyphs/Ban.js +0 -13
  188. package/src-old/glyphs/Barcode.js +0 -13
  189. package/src-old/glyphs/Bed.js +0 -13
  190. package/src-old/glyphs/Bell.js +0 -34
  191. package/src-old/glyphs/Bolt.js +0 -13
  192. package/src-old/glyphs/Bookmark.js +0 -36
  193. package/src-old/glyphs/Bug.js +0 -13
  194. package/src-old/glyphs/Calendar.js +0 -13
  195. package/src-old/glyphs/Check.js +0 -34
  196. package/src-old/glyphs/Checkbox.js +0 -42
  197. package/src-old/glyphs/Chevron.js +0 -88
  198. package/src-old/glyphs/Circle.js +0 -16
  199. package/src-old/glyphs/Cog.js +0 -13
  200. package/src-old/glyphs/DoubleAngle.js +0 -58
  201. package/src-old/glyphs/Download.js +0 -13
  202. package/src-old/glyphs/Ellipsis.js +0 -35
  203. package/src-old/glyphs/Envelope.js +0 -13
  204. package/src-old/glyphs/File.js +0 -40
  205. package/src-old/glyphs/IdCard.js +0 -13
  206. package/src-old/glyphs/Menu.js +0 -13
  207. package/src-old/glyphs/Minus.js +0 -13
  208. package/src-old/glyphs/Move.js +0 -13
  209. package/src-old/glyphs/Plus.js +0 -13
  210. package/src-old/glyphs/Square.js +0 -48
  211. package/src-old/glyphs/Teacher.js +0 -13
  212. package/src-old/glyphs/TextAlign.js +0 -58
  213. package/src-old/glyphs/Times.js +0 -34
  214. package/src-old/glyphs/WarningTriangle.js +0 -13
  215. package/src-old/index.js +0 -1
@@ -1,182 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- // Import other components
5
- import DownloadButton from '../../../DownloadButton';
6
-
7
- // Import custom styles
8
- import './style.css';
9
-
10
- /* Holder Component */
11
- class Holder extends Component {
12
- render() {
13
- // Deconstruct props (see propTypes below for detailed information)
14
- const {
15
- title,
16
- xLabel,
17
- xUnit,
18
- yLabel,
19
- yUnit,
20
- width,
21
- height,
22
- csvContents,
23
- children
24
- } = this.props;
25
-
26
- // Calculate dimensions of the holder
27
- // > Chart height depends on if the title is included
28
- const chartHeight = `calc(${height}${title ? ' - 2.5em' : ''}${xLabel ? ' - 1.5em' : ''})`;
29
- // > Chart width depends on if there is a y axis label
30
- const chartWidth = `calc(${width}${yLabel ? ' - 1.5em' : ''})`;
31
-
32
- // The many parts of this component look like this:
33
- // |""""""""""""""""""""""""""""""""""""""""""|
34
- // | Chart title [Download] | <- title content
35
- // """"""""""""""""""""""""""""""""""""""""""""
36
- // |"""""|""""""""""""""""""""""""""""""""""""|
37
- // | Y | |
38
- // | L | |
39
- // | A | |
40
- // | B | Chart Here | <- top content
41
- // | E | |
42
- // | L | |
43
- // | | |
44
- // """"""""""""""""""""""""""""""""""""""""""""
45
- // |""""""""""""""""""""""""""""""""""""""""""|
46
- // | X LABEL | <- bottom content
47
- // """"""""""""""""""""""""""""""""""""""""""""
48
-
49
- // Create the title content (if there's a tite)
50
- const titleContent = title ? React.createElement(
51
- 'div',
52
- {
53
- style: {
54
- height: '2.5em'
55
- }
56
- },
57
- React.createElement(
58
- 'h4',
59
- { className: 'text-center' },
60
- title,
61
- csvContents && React.createElement(DownloadButton, {
62
- text: 'CSV',
63
- filename: `${title}.csv`,
64
- contents: csvContents,
65
- marginLeft: '5px'
66
- })
67
- )
68
- ) : null;
69
-
70
- // Create the top content
71
- // (includes the y-axis label and the chart, side by side)
72
- const topContent = React.createElement(
73
- 'div',
74
- null,
75
- yLabel && React.createElement(
76
- 'div',
77
- {
78
- className: 'y-label-container',
79
- style: {
80
- height: chartHeight
81
- }
82
- },
83
- React.createElement(
84
- 'div',
85
- {
86
- style: {
87
- width: chartHeight
88
- },
89
- className: 'y-label-text label-text'
90
- },
91
- yLabel,
92
- yUnit && React.createElement(
93
- 'span',
94
- { className: 'unit' },
95
- '(',
96
- yUnit,
97
- ')'
98
- )
99
- )
100
- ),
101
- React.createElement(
102
- 'div',
103
- {
104
- className: 'd-inline-block',
105
- style: {
106
- width: chartWidth,
107
- height: chartHeight
108
- }
109
- },
110
- children
111
- )
112
- );
113
-
114
- // Create the bottom if there's an x label
115
- // (includes the x label below the chart)
116
- const bottomContent = xLabel ? React.createElement(
117
- 'div',
118
- { className: 'x-label-text label-text' },
119
- xLabel,
120
- xUnit && React.createElement(
121
- 'span',
122
- { className: 'unit' },
123
- '(',
124
- xUnit,
125
- ')'
126
- )
127
- ) : null;
128
-
129
- // Put all the pieces together into one component
130
- return React.createElement(
131
- 'div',
132
- { className: 'mb-4' },
133
- React.createElement(
134
- 'div',
135
- {
136
- className: 'outer-container',
137
- style: {
138
- width,
139
- height
140
- }
141
- },
142
- titleContent,
143
- topContent,
144
- bottomContent
145
- )
146
- );
147
- }
148
- }
149
-
150
- Holder.propTypes = {
151
- // Title of the chart
152
- title: PropTypes.string,
153
- // Label of the x axis
154
- xLabel: PropTypes.string,
155
- // Units on the x axis
156
- xUnit: PropTypes.string,
157
- // Label of the y axis
158
- yLabel: PropTypes.string,
159
- // Units on the y axis
160
- yUnit: PropTypes.string,
161
- // Width of the chart (does not include the title)
162
- width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
163
- // Height of the chart (does not include the title)
164
- height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
165
- // The chart object (should be set to fill 100% width an height)
166
- children: PropTypes.node.isRequired,
167
- // File contents to download
168
- csvContents: PropTypes.string
169
- };
170
-
171
- Holder.defaultProps = {
172
- title: null,
173
- xLabel: null,
174
- xUnit: null,
175
- yLabel: null,
176
- yUnit: null,
177
- width: '100%',
178
- height: '500px',
179
- csvContents: null
180
- };
181
-
182
- export default Holder;
@@ -1,41 +0,0 @@
1
- /* the outermost container of the holder */
2
- .outer-container {
3
- display: inline-block;
4
- vertical-align: middle;
5
- }
6
-
7
- /* container for the y label - automatically moves to the left of the chart */
8
- .y-label-container {
9
- display: inline-block;
10
- width: 1.5em;
11
- float: left;
12
- }
13
-
14
- /* text of the y label - text is centered, vertical, and rotated */
15
- .y-label-text {
16
- display: inline-block;
17
- height: 1.5em;
18
- float: left;
19
- transform: rotate(90deg);
20
- transform-origin: 0.75em;
21
- text-align: center;
22
- }
23
-
24
- /* text of the x label - text is centered */
25
- .x-label-text {
26
- height: 1.5em;
27
- text-align: center;
28
- }
29
-
30
- /* styles shared between both x and y labels - bold, slightly larger text*/
31
- .label-text {
32
- font-size: 1.1em;
33
- font-weight: bold;
34
- }
35
-
36
- /* axis unit style */
37
- .unit {
38
- margin-left: 5px;
39
- font-style: italic;
40
- font-weight: normal;
41
- }
@@ -1,12 +0,0 @@
1
- /* Default colors for use in charts, etc */
2
- export default {
3
- // A pretty neutral blue to use as a default color
4
- defaultBlue: '#419bf7',
5
-
6
- // A simple assortment of 14 colors
7
- assortment: [
8
- // First 10:
9
- '#ec4f6a', '#f19542', '#f6c353', '#61cbcc', '#419bf7', '#005392', '#7d5297', '#d261ab', '#7edfcf', '#5eac88',
10
- // Last 4:
11
- '#f4ce63', '#929000', '#5e5e5e', '#008e00']
12
- };
@@ -1,23 +0,0 @@
1
- import CSVParser from 'papaparse';
2
-
3
- /**
4
- * Function for turning a csv object into a csv string
5
- * @param {string[]} [csv.fields] - an array of field names. These will be used
6
- * generate the header row of the csv
7
- * @param {string[][]} [csv.data] - an array of csv rows, where each row is an
8
- * array of strings that correspond to the cells of the row
9
- * @return {string} the csv file contents
10
- */
11
- export default (csv => {
12
- return CSVParser.unparse(csv);
13
- });
14
-
15
- // Example:
16
- // const fields = ['Name', 'Age'];
17
- // const data = [['Divardo', '19'], ['Calicci', '22']];
18
- // const csv = { fields, data}
19
- //
20
- // Calling csvToString(csv) results in the following csv file:
21
- // Name, Age
22
- // Divardo, 19
23
- // Calicci, 22
@@ -1,14 +0,0 @@
1
- /**
2
- * Returns true if a string is a float (not an integer)
3
- * @param {string} str - the string to check
4
- * @return {boolean} whether or not the string represents a float
5
- */
6
- export default (str => {
7
- const match = String(str).match(/^-?\d*(\.\d+)?$/);
8
- // If no matches at all, this is not a float
9
- if (!match || match.length < 2) {
10
- return false;
11
- }
12
- // We found a match. Make sure it's a float
13
- return !!match[1];
14
- });
@@ -1,24 +0,0 @@
1
- import isFloat from './isFloat';
2
-
3
- /**
4
- * Returns true if the string is an integer
5
- * @param {string} str - the string to check
6
- * @return {boolean} whether or not the string represents an integer
7
- */
8
- export default (str => {
9
- // Attempt to match
10
- const matchSucceeded = String(str).match(/^-{0,1}\d+$/);
11
- if (matchSucceeded) {
12
- return true;
13
- }
14
-
15
- // Allow integers of form '1.'
16
- const newStr = str.endsWith('.') ? `${str}0` : str;
17
-
18
- // If no match, check if string represents an integer with decimals but all
19
- // of which are zeroes
20
- if (isFloat(newStr)) {
21
- return parseFloat(newStr) % 1 === 0;
22
- }
23
- return false;
24
- });
@@ -1,21 +0,0 @@
1
- import _ from 'lodash-arithmetic';
2
-
3
- /* Simple object with high-precision mathematical functions */
4
- export default {
5
- // Adds a + b
6
- add: (a, b) => {
7
- return _.add(a, b);
8
- },
9
- // Subtracts b from a
10
- sub: (a, b) => {
11
- return _.subtract(a, b);
12
- },
13
- // Multiplies a * b
14
- mult: (a, b) => {
15
- return _.multiply(a, b);
16
- },
17
- // Divides a / b
18
- div: (a, b) => {
19
- return _.divide(a, b);
20
- }
21
- };
@@ -1,18 +0,0 @@
1
- import Validator from 'validator';
2
-
3
- /* Simple object of built-in text validators */
4
- export default {
5
- // Validates emails
6
- email: Validator.isEmail,
7
- // Validates 8-digit numbers (HUIDs)
8
- eightDigit: datum => {
9
- if (!Number.isNaN(parseFloat(datum))) {
10
- return false;
11
- }
12
- return String(datum).length === 8;
13
- },
14
- // Validates numbers
15
- number: datum => {
16
- return !Number.isNaN(parseFloat(datum));
17
- }
18
- };
@@ -1,13 +0,0 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- import React, { Component } from 'react';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faAdjust } from '@fortawesome/free-solid-svg-icons';
6
-
7
- class Adjust extends Component {
8
- render() {
9
- return React.createElement(FontAwesomeIcon, _extends({ icon: faAdjust }, this.props));
10
- }
11
- }
12
-
13
- export default Adjust;
@@ -1,44 +0,0 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
4
-
5
- import React, { Component } from 'react';
6
- import PropTypes from 'prop-types';
7
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
8
- import { faAngleUp, faAngleDown, faAngleRight, faAngleLeft } from '@fortawesome/free-solid-svg-icons';
9
-
10
- /* use direction="up|down|left|right" (default is "right")
11
- */
12
-
13
- class Angle extends Component {
14
- render() {
15
- // Extract props
16
- const _props = this.props,
17
- {
18
- direction
19
- } = _props,
20
- props = _objectWithoutProperties(_props, ['direction']);
21
-
22
- switch (direction) {
23
- case 'up':
24
- return React.createElement(FontAwesomeIcon, _extends({ icon: faAngleUp }, props));
25
- case 'down':
26
- return React.createElement(FontAwesomeIcon, _extends({ icon: faAngleDown }, props));
27
- case 'left':
28
- return React.createElement(FontAwesomeIcon, _extends({ icon: faAngleLeft }, props));
29
- default:
30
- return React.createElement(FontAwesomeIcon, _extends({ icon: faAngleRight }, props));
31
- }
32
- }
33
- }
34
-
35
- Angle.propTypes = {
36
- /* Direction of the angle */
37
- direction: PropTypes.oneOf(['up', 'down', 'left', 'right'])
38
- };
39
-
40
- Angle.defaultProps = {
41
- direction: 'right'
42
- };
43
-
44
- export default Angle;
@@ -1,13 +0,0 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- import React, { Component } from 'react';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faArchive } from '@fortawesome/free-solid-svg-icons';
6
-
7
- class Archive extends Component {
8
- render() {
9
- return React.createElement(FontAwesomeIcon, _extends({ icon: faArchive }, this.props));
10
- }
11
- }
12
-
13
- export default Archive;
@@ -1,49 +0,0 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
4
-
5
- import React, { Component } from 'react';
6
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
7
- import { faArrowUp, faArrowDown, faArrowRight, faArrowLeft, faArrowCircleUp, faArrowCircleDown, faArrowCircleRight, faArrowCircleLeft } from '@fortawesome/free-solid-svg-icons';
8
-
9
- /* use direction="up|down|left|right" (default is "right")
10
- * add circled prop to put the chevron in a circle bubble
11
- */
12
-
13
- class Arrow extends Component {
14
- render() {
15
- // Extract props
16
- const _props = this.props,
17
- {
18
- circled,
19
- direction
20
- } = _props,
21
- props = _objectWithoutProperties(_props, ['circled', 'direction']);
22
-
23
- if (circled) {
24
- switch (direction) {
25
- case 'up':
26
- return React.createElement(FontAwesomeIcon, _extends({ icon: faArrowCircleUp }, props));
27
- case 'down':
28
- return React.createElement(FontAwesomeIcon, _extends({ icon: faArrowCircleDown }, props));
29
- case 'left':
30
- return React.createElement(FontAwesomeIcon, _extends({ icon: faArrowCircleLeft }, props));
31
- default:
32
- return React.createElement(FontAwesomeIcon, _extends({ icon: faArrowCircleRight }, props));
33
- }
34
- } else {
35
- switch (direction) {
36
- case 'up':
37
- return React.createElement(FontAwesomeIcon, _extends({ icon: faArrowUp }, props));
38
- case 'down':
39
- return React.createElement(FontAwesomeIcon, _extends({ icon: faArrowDown }, props));
40
- case 'left':
41
- return React.createElement(FontAwesomeIcon, _extends({ icon: faArrowLeft }, props));
42
- default:
43
- return React.createElement(FontAwesomeIcon, _extends({ icon: faArrowRight }, props));
44
- }
45
- }
46
- }
47
- }
48
-
49
- export default Arrow;
@@ -1,13 +0,0 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- import React, { Component } from 'react';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faArrowsAltH } from '@fortawesome/free-solid-svg-icons';
6
-
7
- class ArrowsHorizontal extends Component {
8
- render() {
9
- return React.createElement(FontAwesomeIcon, _extends({ icon: faArrowsAltH }, this.props));
10
- }
11
- }
12
-
13
- export default ArrowsHorizontal;
@@ -1,13 +0,0 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- import React, { Component } from 'react';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faArrowsAltV } from '@fortawesome/free-solid-svg-icons';
6
-
7
- class ArrowsVertical extends Component {
8
- render() {
9
- return React.createElement(FontAwesomeIcon, _extends({ icon: faArrowsAltV }, this.props));
10
- }
11
- }
12
-
13
- export default ArrowsVertical;
@@ -1,13 +0,0 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- import React, { Component } from 'react';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faAward } from '@fortawesome/free-solid-svg-icons';
6
-
7
- class Award extends Component {
8
- render() {
9
- return React.createElement(FontAwesomeIcon, _extends({ icon: faAward }, this.props));
10
- }
11
- }
12
-
13
- export default Award;
package/lib/glyph/Ban.js DELETED
@@ -1,13 +0,0 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- import React, { Component } from 'react';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faBan } from '@fortawesome/free-solid-svg-icons';
6
-
7
- class Ban extends Component {
8
- render() {
9
- return React.createElement(FontAwesomeIcon, _extends({ icon: faBan }, this.props));
10
- }
11
- }
12
-
13
- export default Ban;
@@ -1,13 +0,0 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- import React, { Component } from 'react';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faBarcode } from '@fortawesome/free-solid-svg-icons';
6
-
7
- class Barcode extends Component {
8
- render() {
9
- return React.createElement(FontAwesomeIcon, _extends({ icon: faBarcode }, this.props));
10
- }
11
- }
12
-
13
- export default Barcode;
package/lib/glyph/Bed.js DELETED
@@ -1,13 +0,0 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- import React, { Component } from 'react';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faBed } from '@fortawesome/free-solid-svg-icons';
6
-
7
- class Bed extends Component {
8
- render() {
9
- return React.createElement(FontAwesomeIcon, _extends({ icon: faBed }, this.props));
10
- }
11
- }
12
-
13
- export default Bed;
package/lib/glyph/Bell.js DELETED
@@ -1,35 +0,0 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
4
-
5
- import React, { Component } from 'react';
6
- import PropTypes from 'prop-types';
7
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
8
- import { faBell, faBellSlash } from '@fortawesome/free-solid-svg-icons';
9
-
10
- class Bell extends Component {
11
- render() {
12
- // Extract props
13
- const _props = this.props,
14
- {
15
- slashed
16
- } = _props,
17
- props = _objectWithoutProperties(_props, ['slashed']);
18
-
19
- if (slashed) {
20
- return React.createElement(FontAwesomeIcon, _extends({ icon: faBellSlash }, props));
21
- }
22
- return React.createElement(FontAwesomeIcon, _extends({ icon: faBell }, props));
23
- }
24
- }
25
-
26
- Bell.propTypes = {
27
- // If true, a slash is shown cutting through the bell
28
- slashed: PropTypes.bool
29
- };
30
-
31
- Bell.defaultProps = {
32
- slashed: false
33
- };
34
-
35
- export default Bell;
package/lib/glyph/Bolt.js DELETED
@@ -1,13 +0,0 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- import React, { Component } from 'react';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faBolt } from '@fortawesome/free-solid-svg-icons';
6
-
7
- class Bolt extends Component {
8
- render() {
9
- return React.createElement(FontAwesomeIcon, _extends({ icon: faBolt }, this.props));
10
- }
11
- }
12
-
13
- export default Bolt;
@@ -1,37 +0,0 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
4
-
5
- import React, { Component } from 'react';
6
- import PropTypes from 'prop-types';
7
-
8
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
9
- import { faBookmark } from '@fortawesome/free-solid-svg-icons';
10
- import { faBookmark as faBookmarkOutlined } from '@fortawesome/free-regular-svg-icons';
11
-
12
- class Bolt extends Component {
13
- render() {
14
- // Extract props
15
- const _props = this.props,
16
- {
17
- outlined
18
- } = _props,
19
- props = _objectWithoutProperties(_props, ['outlined']);
20
-
21
- if (outlined) {
22
- return React.createElement(FontAwesomeIcon, _extends({ icon: faBookmarkOutlined }, props));
23
- }
24
- return React.createElement(FontAwesomeIcon, _extends({ icon: faBookmark }, props));
25
- }
26
- }
27
-
28
- Bolt.propTypes = {
29
- // If true, bolt is shown in an outline instead of filled
30
- outlined: PropTypes.bool
31
- };
32
-
33
- Bolt.defaultProps = {
34
- outlined: false
35
- };
36
-
37
- export default Bolt;
package/lib/glyph/Bug.js DELETED
@@ -1,13 +0,0 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- import React, { Component } from 'react';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faBug } from '@fortawesome/free-solid-svg-icons';
6
-
7
- class Bug extends Component {
8
- render() {
9
- return React.createElement(FontAwesomeIcon, _extends({ icon: faBug }, this.props));
10
- }
11
- }
12
-
13
- export default Bug;
@@ -1,13 +0,0 @@
1
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
2
-
3
- import React, { Component } from 'react';
4
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
- import { faCalendar } from '@fortawesome/free-solid-svg-icons';
6
-
7
- class Calendar extends Component {
8
- render() {
9
- return React.createElement(FontAwesomeIcon, _extends({ icon: faCalendar }, this.props));
10
- }
11
- }
12
-
13
- export default Calendar;