dce-reactkit 1.0.20 → 2.0.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 (205) hide show
  1. package/.eslintrc.js +95 -0
  2. package/lib/components/LoadingSpinner.d.ts +7 -0
  3. package/lib/components/LoadingSpinner.js +39 -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 +311 -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 +22 -40
  42. package/src/components/LoadingSpinner.scss +50 -0
  43. package/src/components/LoadingSpinner.tsx +50 -0
  44. package/src/components/Modal.scss +48 -0
  45. package/src/components/Modal.tsx +391 -0
  46. package/src/helpers/abbreviate.tsx +23 -0
  47. package/src/helpers/avg.tsx +22 -0
  48. package/src/helpers/ceilToNumDecimals.tsx +13 -0
  49. package/src/helpers/floorToNumDecimals.tsx +13 -0
  50. package/src/helpers/forceNumIntoBounds.tsx +19 -0
  51. package/src/helpers/padDecimalZeros.tsx +32 -0
  52. package/src/helpers/padZerosLeft.tsx +21 -0
  53. package/src/helpers/roundToNumDecimals.tsx +13 -0
  54. package/src/helpers/sum.tsx +16 -0
  55. package/src/helpers/waitMs.tsx +12 -0
  56. package/src/types/Variant.tsx +16 -0
  57. package/tsconfig.json +24 -0
  58. package/index.js +0 -1
  59. package/lib/Bar.js +0 -169
  60. package/lib/Donut.js +0 -145
  61. package/lib/DownloadButton.js +0 -81
  62. package/lib/Histogram.js +0 -193
  63. package/lib/Scatter.js +0 -162
  64. package/lib/StackedBar.js +0 -243
  65. package/lib/common/chart/Holder/index.js +0 -182
  66. package/lib/common/chart/Holder/style.css +0 -41
  67. package/lib/common/chart/colors.js +0 -12
  68. package/lib/common/csvToString.js +0 -23
  69. package/lib/common/isFloat.js +0 -14
  70. package/lib/common/isInteger.js +0 -24
  71. package/lib/common/math.js +0 -21
  72. package/lib/common/validators.js +0 -18
  73. package/lib/glyph/Adjust.js +0 -13
  74. package/lib/glyph/Angle.js +0 -44
  75. package/lib/glyph/Archive.js +0 -13
  76. package/lib/glyph/Arrow.js +0 -49
  77. package/lib/glyph/ArrowsHorizontal.js +0 -13
  78. package/lib/glyph/ArrowsVertical.js +0 -13
  79. package/lib/glyph/Award.js +0 -13
  80. package/lib/glyph/Ban.js +0 -13
  81. package/lib/glyph/Barcode.js +0 -13
  82. package/lib/glyph/Bed.js +0 -13
  83. package/lib/glyph/Bell.js +0 -35
  84. package/lib/glyph/Bolt.js +0 -13
  85. package/lib/glyph/Bookmark.js +0 -37
  86. package/lib/glyph/Bug.js +0 -13
  87. package/lib/glyph/Calendar.js +0 -13
  88. package/lib/glyph/Check.js +0 -36
  89. package/lib/glyph/Checkbox.js +0 -40
  90. package/lib/glyph/Chevron.js +0 -63
  91. package/lib/glyph/Circle.js +0 -15
  92. package/lib/glyph/Cog.js +0 -13
  93. package/lib/glyph/DoubleAngle.js +0 -45
  94. package/lib/glyph/Download.js +0 -13
  95. package/lib/glyph/Ellipsis.js +0 -36
  96. package/lib/glyph/Envelope.js +0 -13
  97. package/lib/glyph/File.js +0 -37
  98. package/lib/glyph/IdCard.js +0 -13
  99. package/lib/glyph/Menu.js +0 -13
  100. package/lib/glyph/Minus.js +0 -13
  101. package/lib/glyph/Move.js +0 -13
  102. package/lib/glyph/Plus.js +0 -13
  103. package/lib/glyph/Square.js +0 -47
  104. package/lib/glyph/Teacher.js +0 -13
  105. package/lib/glyph/TextAlign.js +0 -53
  106. package/lib/glyph/Times.js +0 -36
  107. package/lib/glyph/WarningTriangle.js +0 -13
  108. package/lib/index.js +0 -1
  109. package/src-old/common/csvToString.js +0 -5
  110. package/src-old/common/isFloat.js +0 -3
  111. package/src-old/common/isInteger.js +0 -14
  112. package/src-old/common/math.js +0 -16
  113. package/src-old/common/validators.js +0 -14
  114. package/src-old/components/Alert.js +0 -79
  115. package/src-old/components/Button.js +0 -64
  116. package/src-old/components/CSV/autoMatch.js +0 -174
  117. package/src-old/components/CSV/getNumCols.js +0 -15
  118. package/src-old/components/CSV/index.js +0 -743
  119. package/src-old/components/Card.js +0 -64
  120. package/src-old/components/Chart/Bar.js +0 -169
  121. package/src-old/components/Chart/Donut.js +0 -160
  122. package/src-old/components/Chart/Histogram.js +0 -189
  123. package/src-old/components/Chart/Scatter.js +0 -162
  124. package/src-old/components/Chart/colors.js +0 -20
  125. package/src-old/components/Checkbox/index.js +0 -106
  126. package/src-old/components/Checkbox/style.css +0 -11
  127. package/src-old/components/DatePicker.js +0 -59
  128. package/src-old/components/DownloadButton.js +0 -72
  129. package/src-old/components/Dropdown.js +0 -120
  130. package/src-old/components/Layout/LeftAddon.js +0 -63
  131. package/src-old/components/Layout/RightAddon.js +0 -64
  132. package/src-old/components/Layout/TwoCol.js +0 -67
  133. package/src-old/components/Modal.js +0 -161
  134. package/src-old/components/PhotoRoster.js +0 -152
  135. package/src-old/components/Pills.js +0 -117
  136. package/src-old/components/Radio.js +0 -94
  137. package/src-old/components/Splash/Error.js +0 -62
  138. package/src-old/components/Splash/Load/index.js +0 -32
  139. package/src-old/components/Splash/Load/style.css +0 -51
  140. package/src-old/components/Stat/General.js +0 -252
  141. package/src-old/components/Stat/helpers/calcAverage.js +0 -20
  142. package/src-old/components/Stat/helpers/calcExtremes.js +0 -27
  143. package/src-old/components/Stat/helpers/calcMedian.js +0 -32
  144. package/src-old/components/Stat/helpers/calcStdDev.js +0 -30
  145. package/src-old/components/Stat/helpers/calcSum.js +0 -8
  146. package/src-old/components/UserProfile/index.js +0 -151
  147. package/src-old/components/UserProfile/style.css +0 -33
  148. package/src-old/components/Well.js +0 -28
  149. package/src-old/components/Wizard/Question/CSV.js +0 -307
  150. package/src-old/components/Wizard/Question/Chooser/Assignment.js +0 -108
  151. package/src-old/components/Wizard/Question/Chooser/Course.js +0 -214
  152. package/src-old/components/Wizard/Question/Chooser/helpers/divideIntoSections.js +0 -16
  153. package/src-old/components/Wizard/Question/Chooser/helpers/genGetItemsPromise.js +0 -20
  154. package/src-old/components/Wizard/Question/Chooser/helpers/preprocessSections.js +0 -36
  155. package/src-old/components/Wizard/Question/Chooser/index.js +0 -306
  156. package/src-old/components/Wizard/Question/Form/Field/CheckableItem.js +0 -155
  157. package/src-old/components/Wizard/Question/Form/Field/Input.js +0 -149
  158. package/src-old/components/Wizard/Question/Form/Field/NumberItem.js +0 -374
  159. package/src-old/components/Wizard/Question/Form/Field/index.js +0 -34
  160. package/src-old/components/Wizard/Question/Form/Field/readme.md +0 -7
  161. package/src-old/components/Wizard/Question/Form/index.js +0 -175
  162. package/src-old/components/Wizard/Question/Form/style.css +0 -3
  163. package/src-old/components/Wizard/Question/OneButton.js +0 -80
  164. package/src-old/components/Wizard/Question/index.js +0 -46
  165. package/src-old/components/Wizard/Question/readme.md +0 -10
  166. package/src-old/components/Wizard/QuestionGroup/AnswerAll.js +0 -126
  167. package/src-old/components/Wizard/QuestionGroup/AnswerAny.js +0 -60
  168. package/src-old/components/Wizard/index.js +0 -233
  169. package/src-old/components/Wizard/style.css +0 -21
  170. package/src-old/glyphs/Adjust.js +0 -13
  171. package/src-old/glyphs/Angle.js +0 -57
  172. package/src-old/glyphs/Archive.js +0 -13
  173. package/src-old/glyphs/Arrow.js +0 -85
  174. package/src-old/glyphs/ArrowsHorizontal.js +0 -13
  175. package/src-old/glyphs/ArrowsVertical.js +0 -13
  176. package/src-old/glyphs/Award.js +0 -13
  177. package/src-old/glyphs/Ban.js +0 -13
  178. package/src-old/glyphs/Barcode.js +0 -13
  179. package/src-old/glyphs/Bed.js +0 -13
  180. package/src-old/glyphs/Bell.js +0 -34
  181. package/src-old/glyphs/Bolt.js +0 -13
  182. package/src-old/glyphs/Bookmark.js +0 -36
  183. package/src-old/glyphs/Bug.js +0 -13
  184. package/src-old/glyphs/Calendar.js +0 -13
  185. package/src-old/glyphs/Check.js +0 -34
  186. package/src-old/glyphs/Checkbox.js +0 -42
  187. package/src-old/glyphs/Chevron.js +0 -88
  188. package/src-old/glyphs/Circle.js +0 -16
  189. package/src-old/glyphs/Cog.js +0 -13
  190. package/src-old/glyphs/DoubleAngle.js +0 -58
  191. package/src-old/glyphs/Download.js +0 -13
  192. package/src-old/glyphs/Ellipsis.js +0 -35
  193. package/src-old/glyphs/Envelope.js +0 -13
  194. package/src-old/glyphs/File.js +0 -40
  195. package/src-old/glyphs/IdCard.js +0 -13
  196. package/src-old/glyphs/Menu.js +0 -13
  197. package/src-old/glyphs/Minus.js +0 -13
  198. package/src-old/glyphs/Move.js +0 -13
  199. package/src-old/glyphs/Plus.js +0 -13
  200. package/src-old/glyphs/Square.js +0 -48
  201. package/src-old/glyphs/Teacher.js +0 -13
  202. package/src-old/glyphs/TextAlign.js +0 -58
  203. package/src-old/glyphs/Times.js +0 -34
  204. package/src-old/glyphs/WarningTriangle.js +0 -13
  205. package/src-old/index.js +0 -1
@@ -1,10 +0,0 @@
1
- Each question must have the following properties:
2
-
3
- ```js
4
- {
5
- onAnswered,
6
- questionKey,
7
- }
8
- ```
9
-
10
- Each question must at least look like a Question component.
@@ -1,126 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- // Import glyphs
5
- import Check from '../../../glyphs/Check';
6
-
7
- // Import other components
8
- import Question from '../Question';
9
- import Button from '../../Button';
10
-
11
- /**
12
- * onAnswered is called with the following:
13
- * {
14
- * questionKey: answer from question,
15
- * ...
16
- * }
17
- */
18
-
19
- class AnswerAll extends Component {
20
- constructor(props) {
21
- super(props);
22
-
23
- // Initialize state
24
- this.state = {
25
- answerMap: {},
26
- answeredMap: {}, // questionKey => true if answered
27
- };
28
- }
29
-
30
- render() {
31
- // Deconstruct state
32
- const { answeredMap } = this.state;
33
-
34
- // Deconstruct props
35
- const {
36
- onAnswered,
37
- } = this.props;
38
-
39
- // Turn children into an array if it isn't already
40
- let { children } = this.props;
41
- if (!Array.isArray(children)) {
42
- children = [children];
43
- }
44
-
45
- // Wrap children so that if any child answers a question, our onAnswered is
46
- // called
47
- const wrappedChildren = children.map((child) => {
48
- const childOnAnswered = child.props.onAnswered;
49
- if (answeredMap[child.props.questionKey]) {
50
- // This is an answered question. Make it smaller
51
- return (
52
- <Question
53
- title={child.props.title}
54
- subtitle={child.props.subtitle}
55
- >
56
- <div className="text-center text-success">
57
- <h2>
58
- <Check className="mr-2" />
59
- Done
60
- </h2>
61
- <Button
62
- text="Change Response"
63
- onClick={() => {
64
- answeredMap[child.props.questionKey] = false;
65
- this.setState({
66
- answeredMap,
67
- });
68
- }}
69
- />
70
- </div>
71
- </Question>
72
- );
73
- }
74
- const wrappedChild = React.cloneElement(child, {
75
- onAnswered: (childAnswer) => {
76
- // Call child's onAnswered handler
77
- if (childOnAnswered) {
78
- childOnAnswered(childAnswer);
79
- }
80
-
81
- // Update state
82
- const {
83
- answerMap,
84
- } = this.state;
85
- answerMap[child.props.questionKey] = childAnswer;
86
- answeredMap[child.props.questionKey] = true;
87
- this.setState({
88
- answerMap,
89
- answeredMap,
90
- });
91
-
92
- // Call AnswerAll's onAnswered handler if all answers are in
93
- const numAnswered = (
94
- Object.values(answeredMap)
95
- .map((x) => { return (x ? 1 : 0); })
96
- .reduce((total, x) => { return total + x; })
97
- );
98
- const allAnswered = (numAnswered === children.length);
99
- if (allAnswered) {
100
- onAnswered(answerMap);
101
- }
102
- },
103
- key: child.props.questionKey,
104
- });
105
- return wrappedChild;
106
- });
107
-
108
- return (
109
- <div>
110
- {wrappedChildren}
111
- </div>
112
- );
113
- }
114
- }
115
-
116
- AnswerAll.propTypes = {
117
- /* A function to call when the one of the questions is answered */
118
- onAnswered: PropTypes.func.isRequired,
119
- /* The children of this component (must be questions) */
120
- children: PropTypes.oneOfType([
121
- PropTypes.arrayOf(PropTypes.node),
122
- PropTypes.node,
123
- ]).isRequired,
124
- };
125
-
126
- export default AnswerAll;
@@ -1,60 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- /**
5
- * onAnswered is called with the following:
6
- * {
7
- * questionKey: answer from the question that was answered
8
- * }
9
- */
10
-
11
- class AnswerAny extends Component {
12
- render() {
13
- // Deconstruct state
14
- const {
15
- onAnswered,
16
- children,
17
- } = this.props;
18
-
19
- // Wrap children so that if any child answers a question, our onAnswered is
20
- // called
21
- const wrappedChildren = children.map((child) => {
22
- const childOnAnswered = child.props.onAnswered;
23
- const wrappedChild = React.cloneElement(child, {
24
- onAnswered: (childAnswer) => {
25
- // Call child's onAnswered handler
26
- if (childOnAnswered) {
27
- childOnAnswered(childAnswer);
28
- }
29
-
30
- // Call AnswerAny's onAnswered handler
31
- if (onAnswered) {
32
- const answer = {};
33
- answer[child.props.questionKey] = childAnswer;
34
- onAnswered(answer);
35
- }
36
- },
37
- key: child.props.questionKey,
38
- });
39
- return wrappedChild;
40
- });
41
-
42
- return (
43
- <div>
44
- {wrappedChildren}
45
- </div>
46
- );
47
- }
48
- }
49
-
50
- AnswerAny.propTypes = {
51
- /* A function to call when the one of the questions is answered */
52
- onAnswered: PropTypes.func.isRequired,
53
- /* The children of this component (must be questions) */
54
- children: PropTypes.oneOfType([
55
- PropTypes.arrayOf(PropTypes.node),
56
- PropTypes.node,
57
- ]).isRequired,
58
- };
59
-
60
- export default AnswerAny;
@@ -1,233 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
-
4
- // Import bootstrap components
5
- import {
6
- Pagination,
7
- PaginationItem,
8
- PaginationLink,
9
- } from 'reactstrap';
10
- // Import bootstrap stylesheet
11
- import 'bootstrap/dist/css/bootstrap.min.css';
12
-
13
- // Import custom styles
14
- import './style.css';
15
-
16
- // Import other components
17
- import Alert from '../Alert';
18
-
19
- // Import glyphs
20
- import Ellipsis from '../../glyphs/Ellipsis';
21
-
22
- class Wizard extends Component {
23
- constructor(props) {
24
- super(props);
25
-
26
- // Initialize state
27
- this.state = {
28
- currentStep: 0,
29
- results: {},
30
- };
31
- }
32
-
33
- render() {
34
- // Deconstruct state
35
- const {
36
- currentStep,
37
- results,
38
- } = this.state;
39
-
40
- // Deconstruct props
41
- const {
42
- title,
43
- subtitle,
44
- color,
45
- onFinish,
46
- } = this.props;
47
-
48
- // Turn children into an array if it isn't already
49
- let { children } = this.props;
50
- if (!Array.isArray(children)) {
51
- children = [children];
52
- }
53
-
54
- // Pre-process and wrap child
55
- const currQuestion = children[currentStep];
56
- const originalOnAnswered = currQuestion.props.onAnswered;
57
- const wrappedChild = React.cloneElement(currQuestion, {
58
- onAnswered: (answer) => {
59
- // Call original onChoose listener
60
- if (originalOnAnswered) {
61
- originalOnAnswered(answer);
62
- }
63
-
64
- // Record answer
65
- results[currQuestion.props.questionKey] = answer;
66
-
67
- // Finish (if done)
68
- if (currentStep === children.length - 1) {
69
- // Done!
70
- if (onFinish) {
71
- onFinish(results);
72
- }
73
- return;
74
- }
75
-
76
- // Advance to the next step
77
- this.setState({
78
- currentStep: currentStep + 1,
79
- results,
80
- });
81
- },
82
- });
83
-
84
- // Create breadcrumbs (pages)
85
- const breadcrumbs = [];
86
- // Show 4 steps at maximum
87
- // > Create a function that turns a child into a page item
88
- const childToPage = (child, index) => {
89
- let buttonTitle = 'Complete this step to advance';
90
- if (index < currentStep) {
91
- buttonTitle = 'Back to this step';
92
- } else if (index > currentStep) {
93
- buttonTitle = 'Complete previous steps to advance';
94
- } else if (
95
- (index === currentStep)
96
- && (index === children.length - 1)
97
- ) {
98
- buttonTitle = 'Complete this step to finish';
99
- }
100
- return (
101
- <PaginationItem
102
- disabled={index > currentStep}
103
- className={(index > currentStep ? 'faded-item' : null)}
104
- title={buttonTitle}
105
- >
106
- <PaginationLink
107
- href="#"
108
- className={(index === currentStep ? 'active-link' : 'inactive-link')}
109
- onClick={() => {
110
- if (index !== currentStep) {
111
- // Update current step (jump back in the chain)
112
- this.setState({
113
- currentStep: index,
114
- });
115
- }
116
- }}
117
- >
118
- {child.props.stepTitle || `Step ${index + 1}`}
119
- </PaginationLink>
120
- </PaginationItem>
121
- );
122
- };
123
- const leavingOutSteps = (children.length > 4);
124
- let firstStepInBlock = 0;
125
- let lastStepInBlock = children.length - 1;
126
- if (leavingOutSteps) {
127
- if (currentStep === children.length - 1) {
128
- // On the last step
129
- firstStepInBlock = Math.max(currentStep - 3, 0);
130
- lastStepInBlock = currentStep;
131
- } else if (currentStep === 0) {
132
- // On the first step
133
- firstStepInBlock = 0;
134
- lastStepInBlock = 2;
135
- } else {
136
- // On a middle step
137
- firstStepInBlock = currentStep - 1;
138
- lastStepInBlock = currentStep + 1;
139
- }
140
- }
141
- // Add start ellipses
142
- if (firstStepInBlock > 0) {
143
- // Skipping at least one child
144
- // > Add initial child (for start over)
145
- breadcrumbs.push(childToPage(children[0], 0));
146
- // > Add '...'
147
- breadcrumbs.push((
148
- <PaginationItem
149
- style={{ opacity: 0.7 }}
150
- disabled
151
- >
152
- <PaginationLink>
153
- <Ellipsis
154
- style={{ color: '#aaa' }}
155
- />
156
- </PaginationLink>
157
- </PaginationItem>
158
- ));
159
- }
160
- // Add block of steps
161
- for (let i = firstStepInBlock; i <= lastStepInBlock; i++) {
162
- breadcrumbs.push(childToPage(children[i], i));
163
- }
164
- // Add end ellipses
165
- if (lastStepInBlock < children.length - 1) {
166
- // > Add '...'
167
- breadcrumbs.push((
168
- <PaginationItem
169
- style={{ opacity: 0.7 }}
170
- disabled
171
- >
172
- <PaginationLink>
173
- <Ellipsis
174
- style={{ color: '#aaa' }}
175
- />
176
- </PaginationLink>
177
- </PaginationItem>
178
- ));
179
- }
180
-
181
- // Render wizard
182
- return (
183
- <Alert
184
- color={color}
185
- className="mb-2 pb-0 text-center"
186
- >
187
- <h4>
188
- {title}
189
- </h4>
190
- {subtitle && (
191
- <div>
192
- {subtitle}
193
- </div>
194
- )}
195
- <Pagination
196
- style={{
197
- justifyContent: 'center',
198
- whiteSpace: 'nowrap',
199
- }}
200
- className="mb-0"
201
- aria-label="Steps navigator"
202
- >
203
- {breadcrumbs}
204
- </Pagination>
205
- {wrappedChild}
206
- </Alert>
207
- );
208
- }
209
- }
210
-
211
- Wizard.propTypes = {
212
- /* Title of the wizard */
213
- title: PropTypes.string,
214
- /* Subtitle of the wizard */
215
- subtitle: PropTypes.string,
216
- /* Bootstrap color of the wizard (background) */
217
- color: PropTypes.string,
218
- /* Handler to call when wizard is complete */
219
- onFinish: PropTypes.func.isRequired,
220
- /* The child questions of the wizard (shown one-by-one) */
221
- children: PropTypes.oneOfType([
222
- PropTypes.arrayOf(PropTypes.node),
223
- PropTypes.node,
224
- ]).isRequired,
225
- };
226
-
227
- Wizard.defaultProps = {
228
- title: 'Complete these steps to continue:',
229
- subtitle: null,
230
- color: 'info',
231
- };
232
-
233
- export default Wizard;
@@ -1,21 +0,0 @@
1
- .active-link {
2
- color: white;
3
- background-color: #333;
4
- }
5
- .active-link:hover {
6
- color: white;
7
- background-color: #000;
8
- }
9
-
10
- .inactive-link {
11
- color: black;
12
- background-color: #f8f8f8;
13
- }
14
- .inactive-link:hover {
15
- color: black;
16
- background-color: #fff;
17
- }
18
-
19
- .faded-item {
20
- opacity: 0.7;
21
- }
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faAdjust } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Adjust extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faAdjust} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Adjust;
@@ -1,57 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
- import {
5
- faAngleUp,
6
- faAngleDown,
7
- faAngleRight,
8
- faAngleLeft,
9
- } from '@fortawesome/free-solid-svg-icons';
10
-
11
- /* use direction="up|down|left|right" (default is "right")
12
- */
13
-
14
- class Angle extends Component {
15
- render() {
16
- // Extract props
17
- const {
18
- direction,
19
- ...props
20
- } = this.props;
21
-
22
- switch (direction) {
23
- case 'up':
24
- return (
25
- <FontAwesomeIcon icon={faAngleUp} {...props} />
26
- );
27
- case 'down':
28
- return (
29
- <FontAwesomeIcon icon={faAngleDown} {...props} />
30
- );
31
- case 'left':
32
- return (
33
- <FontAwesomeIcon icon={faAngleLeft} {...props} />
34
- );
35
- default:
36
- return (
37
- <FontAwesomeIcon icon={faAngleRight} {...props} />
38
- );
39
- }
40
- }
41
- }
42
-
43
- Angle.propTypes = {
44
- /* Direction of the angle */
45
- direction: PropTypes.oneOf([
46
- 'up',
47
- 'down',
48
- 'left',
49
- 'right',
50
- ]),
51
- };
52
-
53
- Angle.defaultProps = {
54
- direction: 'right',
55
- };
56
-
57
- export default Angle;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faArchive } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Archive extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faArchive} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Archive;
@@ -1,85 +0,0 @@
1
- import React, { Component } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
- import {
5
- faArrowUp,
6
- faArrowDown,
7
- faArrowRight,
8
- faArrowLeft,
9
- faArrowCircleUp,
10
- faArrowCircleDown,
11
- faArrowCircleRight,
12
- faArrowCircleLeft,
13
- } from '@fortawesome/free-solid-svg-icons';
14
-
15
- /* use direction="up|down|left|right" (default is "right")
16
- * add circled prop to put the chevron in a circle bubble
17
- */
18
-
19
- class Arrow extends Component {
20
- render() {
21
- // Extract props
22
- const {
23
- circled,
24
- direction,
25
- ...props
26
- } = this.props;
27
-
28
- if (circled) {
29
- switch (direction) {
30
- case 'up':
31
- return (
32
- <FontAwesomeIcon icon={faArrowCircleUp} {...props} />
33
- );
34
- case 'down':
35
- return (
36
- <FontAwesomeIcon icon={faArrowCircleDown} {...props} />
37
- );
38
- case 'left':
39
- return (
40
- <FontAwesomeIcon icon={faArrowCircleLeft} {...props} />
41
- );
42
- default:
43
- return (
44
- <FontAwesomeIcon icon={faArrowCircleRight} {...props} />
45
- );
46
- }
47
- } else {
48
- switch (direction) {
49
- case 'up':
50
- return (
51
- <FontAwesomeIcon icon={faArrowUp} {...props} />
52
- );
53
- case 'down':
54
- return (
55
- <FontAwesomeIcon icon={faArrowDown} {...props} />
56
- );
57
- case 'left':
58
- return (
59
- <FontAwesomeIcon icon={faArrowLeft} {...props} />
60
- );
61
- default:
62
- return (
63
- <FontAwesomeIcon icon={faArrowRight} {...props} />
64
- );
65
- }
66
- }
67
- }
68
- }
69
-
70
- Arrow.propTypes = {
71
- circled: PropTypes.bool,
72
- direction: PropTypes.oneOf([
73
- 'up',
74
- 'down',
75
- 'left',
76
- 'right',
77
- ]),
78
- };
79
-
80
- Arrow.defaultProps = {
81
- circled: false,
82
- direction: 'right',
83
- };
84
-
85
- export default Arrow;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faArrowsAltH } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class ArrowsHorizontal extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faArrowsAltH} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default ArrowsHorizontal;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faArrowsAltV } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class ArrowsVertical extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faArrowsAltV} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default ArrowsVertical;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faAward } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Award extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faAward} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Award;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faBan } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Ban extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faBan} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Ban;
@@ -1,13 +0,0 @@
1
- import React, { Component } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import { faBarcode } from '@fortawesome/free-solid-svg-icons';
4
-
5
- class Barcode extends Component {
6
- render() {
7
- return (
8
- <FontAwesomeIcon icon={faBarcode} {...this.props} />
9
- );
10
- }
11
- }
12
-
13
- export default Barcode;