dce-reactkit 1.0.18 → 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.
- package/.eslintrc.js +95 -0
- package/lib/components/LoadingSpinner.d.ts +7 -0
- package/lib/components/LoadingSpinner.js +39 -0
- package/lib/components/LoadingSpinner.js.map +1 -0
- package/lib/components/Modal.d.ts +69 -0
- package/lib/components/Modal.js +311 -0
- package/lib/components/Modal.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/waitMs.d.ts +7 -0
- package/lib/helpers/waitMs.js +55 -0
- package/lib/helpers/waitMs.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 -39
- package/src/components/LoadingSpinner.scss +50 -0
- package/src/components/LoadingSpinner.tsx +50 -0
- package/src/components/Modal.scss +48 -0
- package/src/components/Modal.tsx +391 -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/waitMs.tsx +12 -0
- package/src/types/Variant.tsx +16 -0
- package/tsconfig.json +24 -0
- package/Bar.js +0 -169
- package/Donut.js +0 -145
- package/DownloadButton.js +0 -81
- package/Histogram.js +0 -193
- package/Scatter.js +0 -162
- package/common/chart/Holder/index.js +0 -182
- package/common/chart/Holder/style.css +0 -41
- package/common/chart/colors.js +0 -12
- package/common/csvToString.js +0 -23
- package/common/isFloat.js +0 -14
- package/common/isInteger.js +0 -24
- package/common/math.js +0 -21
- package/common/validators.js +0 -18
- package/glyph/Adjust.js +0 -13
- package/glyph/Angle.js +0 -44
- package/glyph/Archive.js +0 -13
- package/glyph/Arrow.js +0 -49
- package/glyph/ArrowsHorizontal.js +0 -13
- package/glyph/ArrowsVertical.js +0 -13
- package/glyph/Award.js +0 -13
- package/glyph/Ban.js +0 -13
- package/glyph/Barcode.js +0 -13
- package/glyph/Bed.js +0 -13
- package/glyph/Bell.js +0 -35
- package/glyph/Bolt.js +0 -13
- package/glyph/Bookmark.js +0 -37
- package/glyph/Bug.js +0 -13
- package/glyph/Calendar.js +0 -13
- package/glyph/Check.js +0 -36
- package/glyph/Checkbox.js +0 -40
- package/glyph/Chevron.js +0 -63
- package/glyph/Circle.js +0 -15
- package/glyph/Cog.js +0 -13
- package/glyph/DoubleAngle.js +0 -45
- package/glyph/Download.js +0 -13
- package/glyph/Ellipsis.js +0 -36
- package/glyph/Envelope.js +0 -13
- package/glyph/File.js +0 -37
- package/glyph/IdCard.js +0 -13
- package/glyph/Menu.js +0 -13
- package/glyph/Minus.js +0 -13
- package/glyph/Move.js +0 -13
- package/glyph/Plus.js +0 -13
- package/glyph/Square.js +0 -47
- package/glyph/Teacher.js +0 -13
- package/glyph/TextAlign.js +0 -53
- package/glyph/Times.js +0 -36
- package/glyph/WarningTriangle.js +0 -13
- package/index.js +0 -1
package/glyph/TextAlign.js
DELETED
|
@@ -1,53 +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 PropTypes from 'prop-types';
|
|
5
|
-
|
|
6
|
-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
7
|
-
import { faAlignCenter, faAlignLeft, faAlignRight, faAlignJustify } from '@fortawesome/free-solid-svg-icons';
|
|
8
|
-
|
|
9
|
-
class TextAlign extends Component {
|
|
10
|
-
render() {
|
|
11
|
-
// Deconstruct props
|
|
12
|
-
const {
|
|
13
|
-
left,
|
|
14
|
-
right,
|
|
15
|
-
justify,
|
|
16
|
-
center
|
|
17
|
-
} = this.props;
|
|
18
|
-
|
|
19
|
-
let icon;
|
|
20
|
-
if (left) {
|
|
21
|
-
icon = faAlignLeft;
|
|
22
|
-
} else if (right) {
|
|
23
|
-
icon = faAlignRight;
|
|
24
|
-
} else if (justify) {
|
|
25
|
-
icon = faAlignJustify;
|
|
26
|
-
} else if (center) {
|
|
27
|
-
icon = faAlignCenter;
|
|
28
|
-
} else {
|
|
29
|
-
icon = faAlignLeft;
|
|
30
|
-
}
|
|
31
|
-
return React.createElement(FontAwesomeIcon, _extends({ icon: icon }, this.props));
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
TextAlign.propTypes = {
|
|
36
|
-
// If true, left align is shown
|
|
37
|
-
left: PropTypes.bool,
|
|
38
|
-
// If true, right align is shown
|
|
39
|
-
right: PropTypes.bool,
|
|
40
|
-
// If true, justify alignment is shown
|
|
41
|
-
justify: PropTypes.bool,
|
|
42
|
-
// If true, center align is shown
|
|
43
|
-
center: PropTypes.bool
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
TextAlign.defaultProps = {
|
|
47
|
-
left: null,
|
|
48
|
-
right: null,
|
|
49
|
-
justify: null,
|
|
50
|
-
center: null
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export default TextAlign;
|
package/glyph/Times.js
DELETED
|
@@ -1,36 +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 { faTimes } from '@fortawesome/free-solid-svg-icons';
|
|
10
|
-
|
|
11
|
-
class Times extends Component {
|
|
12
|
-
render() {
|
|
13
|
-
// Deconstruct props
|
|
14
|
-
const _props = this.props,
|
|
15
|
-
{
|
|
16
|
-
grow
|
|
17
|
-
} = _props,
|
|
18
|
-
props = _objectWithoutProperties(_props, ['grow']);
|
|
19
|
-
|
|
20
|
-
return React.createElement(FontAwesomeIcon, _extends({
|
|
21
|
-
icon: faTimes,
|
|
22
|
-
transform: grow ? `grow-${grow}` : undefined
|
|
23
|
-
}, props));
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
Times.propTypes = {
|
|
28
|
-
// Factor by which to grow the check mark
|
|
29
|
-
grow: PropTypes.number
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
Times.defaultProps = {
|
|
33
|
-
grow: null
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export default Times;
|
package/glyph/WarningTriangle.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 { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
|
|
6
|
-
|
|
7
|
-
class WarningTriangle extends Component {
|
|
8
|
-
render() {
|
|
9
|
-
return React.createElement(FontAwesomeIcon, _extends({ icon: faExclamationTriangle }, this.props));
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default WarningTriangle;
|
package/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
throw new Error('Do not import dce-reactkit directly. Import components individually. View the docs for more information: https://harvard-edtech.github.io/dce-reactkit/');
|