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.
- package/.eslintrc.js +95 -0
- package/lib/components/LoadingSpinner.d.ts +6 -0
- package/lib/components/LoadingSpinner.js +41 -0
- package/lib/components/LoadingSpinner.js.map +1 -0
- package/lib/components/Modal.d.ts +69 -0
- package/lib/components/Modal.js +315 -0
- package/lib/components/Modal.js.map +1 -0
- package/lib/errors/ErrorWithCode.d.ts +9 -0
- package/lib/errors/ErrorWithCode.js +33 -0
- package/lib/errors/ErrorWithCode.js.map +1 -0
- package/lib/helpers/abbreviate.d.ts +9 -0
- package/lib/helpers/abbreviate.js +21 -0
- package/lib/helpers/abbreviate.js.map +1 -0
- package/lib/helpers/avg.d.ts +8 -0
- package/lib/helpers/avg.js +24 -0
- package/lib/helpers/avg.js.map +1 -0
- package/lib/helpers/ceilToNumDecimals.d.ts +9 -0
- package/lib/helpers/ceilToNumDecimals.js +15 -0
- package/lib/helpers/ceilToNumDecimals.js.map +1 -0
- package/lib/helpers/floorToNumDecimals.d.ts +9 -0
- package/lib/helpers/floorToNumDecimals.js +15 -0
- package/lib/helpers/floorToNumDecimals.js.map +1 -0
- package/lib/helpers/forceNumIntoBounds.d.ts +10 -0
- package/lib/helpers/forceNumIntoBounds.js +15 -0
- package/lib/helpers/forceNumIntoBounds.js.map +1 -0
- package/lib/helpers/padDecimalZeros.d.ts +10 -0
- package/lib/helpers/padDecimalZeros.js +30 -0
- package/lib/helpers/padDecimalZeros.js.map +1 -0
- package/lib/helpers/padZerosLeft.d.ts +9 -0
- package/lib/helpers/padZerosLeft.js +21 -0
- package/lib/helpers/padZerosLeft.js.map +1 -0
- package/lib/helpers/roundToNumDecimals.d.ts +9 -0
- package/lib/helpers/roundToNumDecimals.js +15 -0
- package/lib/helpers/roundToNumDecimals.js.map +1 -0
- package/lib/helpers/sum.d.ts +8 -0
- package/lib/helpers/sum.js +15 -0
- package/lib/helpers/sum.js.map +1 -0
- package/lib/helpers/visitServerEndpoint.d.ts +17 -0
- package/lib/helpers/visitServerEndpoint.js +84 -0
- package/lib/helpers/visitServerEndpoint.js.map +1 -0
- package/lib/helpers/waitMs.d.ts +7 -0
- package/lib/helpers/waitMs.js +55 -0
- package/lib/helpers/waitMs.js.map +1 -0
- package/lib/types/ReactKitErrorCode.d.ts +9 -0
- package/lib/types/ReactKitErrorCode.js +14 -0
- package/lib/types/ReactKitErrorCode.js.map +1 -0
- package/lib/types/Variant.d.ts +15 -0
- package/lib/types/Variant.js +19 -0
- package/lib/types/Variant.js.map +1 -0
- package/package.json +22 -40
- package/src/components/LoadingSpinner.tsx +105 -0
- package/src/components/Modal.tsx +447 -0
- package/src/errors/ErrorWithCode.tsx +15 -0
- package/src/helpers/abbreviate.tsx +23 -0
- package/src/helpers/avg.tsx +22 -0
- package/src/helpers/ceilToNumDecimals.tsx +13 -0
- package/src/helpers/floorToNumDecimals.tsx +13 -0
- package/src/helpers/forceNumIntoBounds.tsx +19 -0
- package/src/helpers/padDecimalZeros.tsx +32 -0
- package/src/helpers/padZerosLeft.tsx +21 -0
- package/src/helpers/roundToNumDecimals.tsx +13 -0
- package/src/helpers/sum.tsx +16 -0
- package/src/helpers/visitServerEndpoint.tsx +59 -0
- package/src/helpers/waitMs.tsx +12 -0
- package/src/types/ReactKitErrorCode.tsx +12 -0
- package/src/types/Variant.tsx +16 -0
- package/tsconfig.json +24 -0
- package/index.js +0 -1
- package/lib/Bar.js +0 -169
- package/lib/Donut.js +0 -145
- package/lib/DownloadButton.js +0 -81
- package/lib/Histogram.js +0 -193
- package/lib/Scatter.js +0 -162
- package/lib/StackedBar.js +0 -243
- package/lib/common/chart/Holder/index.js +0 -182
- package/lib/common/chart/Holder/style.css +0 -41
- package/lib/common/chart/colors.js +0 -12
- package/lib/common/csvToString.js +0 -23
- package/lib/common/isFloat.js +0 -14
- package/lib/common/isInteger.js +0 -24
- package/lib/common/math.js +0 -21
- package/lib/common/validators.js +0 -18
- package/lib/glyph/Adjust.js +0 -13
- package/lib/glyph/Angle.js +0 -44
- package/lib/glyph/Archive.js +0 -13
- package/lib/glyph/Arrow.js +0 -49
- package/lib/glyph/ArrowsHorizontal.js +0 -13
- package/lib/glyph/ArrowsVertical.js +0 -13
- package/lib/glyph/Award.js +0 -13
- package/lib/glyph/Ban.js +0 -13
- package/lib/glyph/Barcode.js +0 -13
- package/lib/glyph/Bed.js +0 -13
- package/lib/glyph/Bell.js +0 -35
- package/lib/glyph/Bolt.js +0 -13
- package/lib/glyph/Bookmark.js +0 -37
- package/lib/glyph/Bug.js +0 -13
- package/lib/glyph/Calendar.js +0 -13
- package/lib/glyph/Check.js +0 -36
- package/lib/glyph/Checkbox.js +0 -40
- package/lib/glyph/Chevron.js +0 -63
- package/lib/glyph/Circle.js +0 -15
- package/lib/glyph/Cog.js +0 -13
- package/lib/glyph/DoubleAngle.js +0 -45
- package/lib/glyph/Download.js +0 -13
- package/lib/glyph/Ellipsis.js +0 -36
- package/lib/glyph/Envelope.js +0 -13
- package/lib/glyph/File.js +0 -37
- package/lib/glyph/IdCard.js +0 -13
- package/lib/glyph/Menu.js +0 -13
- package/lib/glyph/Minus.js +0 -13
- package/lib/glyph/Move.js +0 -13
- package/lib/glyph/Plus.js +0 -13
- package/lib/glyph/Square.js +0 -47
- package/lib/glyph/Teacher.js +0 -13
- package/lib/glyph/TextAlign.js +0 -53
- package/lib/glyph/Times.js +0 -36
- package/lib/glyph/WarningTriangle.js +0 -13
- package/lib/index.js +0 -1
- package/src-old/common/csvToString.js +0 -5
- package/src-old/common/isFloat.js +0 -3
- package/src-old/common/isInteger.js +0 -14
- package/src-old/common/math.js +0 -16
- package/src-old/common/validators.js +0 -14
- package/src-old/components/Alert.js +0 -79
- package/src-old/components/Button.js +0 -64
- package/src-old/components/CSV/autoMatch.js +0 -174
- package/src-old/components/CSV/getNumCols.js +0 -15
- package/src-old/components/CSV/index.js +0 -743
- package/src-old/components/Card.js +0 -64
- package/src-old/components/Chart/Bar.js +0 -169
- package/src-old/components/Chart/Donut.js +0 -160
- package/src-old/components/Chart/Histogram.js +0 -189
- package/src-old/components/Chart/Scatter.js +0 -162
- package/src-old/components/Chart/colors.js +0 -20
- package/src-old/components/Checkbox/index.js +0 -106
- package/src-old/components/Checkbox/style.css +0 -11
- package/src-old/components/DatePicker.js +0 -59
- package/src-old/components/DownloadButton.js +0 -72
- package/src-old/components/Dropdown.js +0 -120
- package/src-old/components/Layout/LeftAddon.js +0 -63
- package/src-old/components/Layout/RightAddon.js +0 -64
- package/src-old/components/Layout/TwoCol.js +0 -67
- package/src-old/components/Modal.js +0 -161
- package/src-old/components/PhotoRoster.js +0 -152
- package/src-old/components/Pills.js +0 -117
- package/src-old/components/Radio.js +0 -94
- package/src-old/components/Splash/Error.js +0 -62
- package/src-old/components/Splash/Load/index.js +0 -32
- package/src-old/components/Splash/Load/style.css +0 -51
- package/src-old/components/Stat/General.js +0 -252
- package/src-old/components/Stat/helpers/calcAverage.js +0 -20
- package/src-old/components/Stat/helpers/calcExtremes.js +0 -27
- package/src-old/components/Stat/helpers/calcMedian.js +0 -32
- package/src-old/components/Stat/helpers/calcStdDev.js +0 -30
- package/src-old/components/Stat/helpers/calcSum.js +0 -8
- package/src-old/components/UserProfile/index.js +0 -151
- package/src-old/components/UserProfile/style.css +0 -33
- package/src-old/components/Well.js +0 -28
- package/src-old/components/Wizard/Question/CSV.js +0 -307
- package/src-old/components/Wizard/Question/Chooser/Assignment.js +0 -108
- package/src-old/components/Wizard/Question/Chooser/Course.js +0 -214
- package/src-old/components/Wizard/Question/Chooser/helpers/divideIntoSections.js +0 -16
- package/src-old/components/Wizard/Question/Chooser/helpers/genGetItemsPromise.js +0 -20
- package/src-old/components/Wizard/Question/Chooser/helpers/preprocessSections.js +0 -36
- package/src-old/components/Wizard/Question/Chooser/index.js +0 -306
- package/src-old/components/Wizard/Question/Form/Field/CheckableItem.js +0 -155
- package/src-old/components/Wizard/Question/Form/Field/Input.js +0 -149
- package/src-old/components/Wizard/Question/Form/Field/NumberItem.js +0 -374
- package/src-old/components/Wizard/Question/Form/Field/index.js +0 -34
- package/src-old/components/Wizard/Question/Form/Field/readme.md +0 -7
- package/src-old/components/Wizard/Question/Form/index.js +0 -175
- package/src-old/components/Wizard/Question/Form/style.css +0 -3
- package/src-old/components/Wizard/Question/OneButton.js +0 -80
- package/src-old/components/Wizard/Question/index.js +0 -46
- package/src-old/components/Wizard/Question/readme.md +0 -10
- package/src-old/components/Wizard/QuestionGroup/AnswerAll.js +0 -126
- package/src-old/components/Wizard/QuestionGroup/AnswerAny.js +0 -60
- package/src-old/components/Wizard/index.js +0 -233
- package/src-old/components/Wizard/style.css +0 -21
- package/src-old/glyphs/Adjust.js +0 -13
- package/src-old/glyphs/Angle.js +0 -57
- package/src-old/glyphs/Archive.js +0 -13
- package/src-old/glyphs/Arrow.js +0 -85
- package/src-old/glyphs/ArrowsHorizontal.js +0 -13
- package/src-old/glyphs/ArrowsVertical.js +0 -13
- package/src-old/glyphs/Award.js +0 -13
- package/src-old/glyphs/Ban.js +0 -13
- package/src-old/glyphs/Barcode.js +0 -13
- package/src-old/glyphs/Bed.js +0 -13
- package/src-old/glyphs/Bell.js +0 -34
- package/src-old/glyphs/Bolt.js +0 -13
- package/src-old/glyphs/Bookmark.js +0 -36
- package/src-old/glyphs/Bug.js +0 -13
- package/src-old/glyphs/Calendar.js +0 -13
- package/src-old/glyphs/Check.js +0 -34
- package/src-old/glyphs/Checkbox.js +0 -42
- package/src-old/glyphs/Chevron.js +0 -88
- package/src-old/glyphs/Circle.js +0 -16
- package/src-old/glyphs/Cog.js +0 -13
- package/src-old/glyphs/DoubleAngle.js +0 -58
- package/src-old/glyphs/Download.js +0 -13
- package/src-old/glyphs/Ellipsis.js +0 -35
- package/src-old/glyphs/Envelope.js +0 -13
- package/src-old/glyphs/File.js +0 -40
- package/src-old/glyphs/IdCard.js +0 -13
- package/src-old/glyphs/Menu.js +0 -13
- package/src-old/glyphs/Minus.js +0 -13
- package/src-old/glyphs/Move.js +0 -13
- package/src-old/glyphs/Plus.js +0 -13
- package/src-old/glyphs/Square.js +0 -48
- package/src-old/glyphs/Teacher.js +0 -13
- package/src-old/glyphs/TextAlign.js +0 -58
- package/src-old/glyphs/Times.js +0 -34
- package/src-old/glyphs/WarningTriangle.js +0 -13
- package/src-old/index.js +0 -1
package/src-old/glyphs/Bed.js
DELETED
|
@@ -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;
|
package/src-old/glyphs/Bell.js
DELETED
|
@@ -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;
|
package/src-old/glyphs/Bolt.js
DELETED
|
@@ -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;
|
package/src-old/glyphs/Bug.js
DELETED
|
@@ -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;
|
package/src-old/glyphs/Check.js
DELETED
|
@@ -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;
|
package/src-old/glyphs/Circle.js
DELETED
|
@@ -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;
|
package/src-old/glyphs/Cog.js
DELETED
|
@@ -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;
|
package/src-old/glyphs/File.js
DELETED
|
@@ -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;
|
package/src-old/glyphs/IdCard.js
DELETED
|
@@ -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;
|
package/src-old/glyphs/Menu.js
DELETED
|
@@ -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;
|
package/src-old/glyphs/Minus.js
DELETED
|
@@ -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;
|
package/src-old/glyphs/Move.js
DELETED
|
@@ -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;
|
package/src-old/glyphs/Plus.js
DELETED
|
@@ -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;
|
package/src-old/glyphs/Square.js
DELETED
|
@@ -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;
|