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.
Files changed (106) 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 -39
  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/Bar.js +0 -169
  59. package/Donut.js +0 -145
  60. package/DownloadButton.js +0 -81
  61. package/Histogram.js +0 -193
  62. package/Scatter.js +0 -162
  63. package/common/chart/Holder/index.js +0 -182
  64. package/common/chart/Holder/style.css +0 -41
  65. package/common/chart/colors.js +0 -12
  66. package/common/csvToString.js +0 -23
  67. package/common/isFloat.js +0 -14
  68. package/common/isInteger.js +0 -24
  69. package/common/math.js +0 -21
  70. package/common/validators.js +0 -18
  71. package/glyph/Adjust.js +0 -13
  72. package/glyph/Angle.js +0 -44
  73. package/glyph/Archive.js +0 -13
  74. package/glyph/Arrow.js +0 -49
  75. package/glyph/ArrowsHorizontal.js +0 -13
  76. package/glyph/ArrowsVertical.js +0 -13
  77. package/glyph/Award.js +0 -13
  78. package/glyph/Ban.js +0 -13
  79. package/glyph/Barcode.js +0 -13
  80. package/glyph/Bed.js +0 -13
  81. package/glyph/Bell.js +0 -35
  82. package/glyph/Bolt.js +0 -13
  83. package/glyph/Bookmark.js +0 -37
  84. package/glyph/Bug.js +0 -13
  85. package/glyph/Calendar.js +0 -13
  86. package/glyph/Check.js +0 -36
  87. package/glyph/Checkbox.js +0 -40
  88. package/glyph/Chevron.js +0 -63
  89. package/glyph/Circle.js +0 -15
  90. package/glyph/Cog.js +0 -13
  91. package/glyph/DoubleAngle.js +0 -45
  92. package/glyph/Download.js +0 -13
  93. package/glyph/Ellipsis.js +0 -36
  94. package/glyph/Envelope.js +0 -13
  95. package/glyph/File.js +0 -37
  96. package/glyph/IdCard.js +0 -13
  97. package/glyph/Menu.js +0 -13
  98. package/glyph/Minus.js +0 -13
  99. package/glyph/Move.js +0 -13
  100. package/glyph/Plus.js +0 -13
  101. package/glyph/Square.js +0 -47
  102. package/glyph/Teacher.js +0 -13
  103. package/glyph/TextAlign.js +0 -53
  104. package/glyph/Times.js +0 -36
  105. package/glyph/WarningTriangle.js +0 -13
  106. package/index.js +0 -1
@@ -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;
@@ -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/');