dce-reactkit 3.0.0-beta.2 → 3.0.0-beta.6
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/dist/cjs/index.js +138 -35643
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/AppWrapper.d.ts +1 -1
- package/dist/esm/index.js +41 -35528
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/AppWrapper.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +14 -4
- package/rollup.config.js +3 -0
- package/src/components/AppWrapper.tsx +1 -1
- package/src/components/Modal.tsx +35 -32
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dce-reactkit",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.6",
|
|
4
4
|
"description": "Shared components for Harvard DCE apps",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -19,18 +19,28 @@
|
|
|
19
19
|
},
|
|
20
20
|
"homepage": "https://github.com/harvard-edtech/dce-reactkit#readme",
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"react": "^18.0.0",
|
|
23
|
-
"react-bootstrap": "^2.3.0",
|
|
24
22
|
"@fortawesome/free-solid-svg-icons": "^6.1.1",
|
|
25
|
-
"@fortawesome/react-fontawesome": "^0.1.18"
|
|
23
|
+
"@fortawesome/react-fontawesome": "^0.1.18",
|
|
24
|
+
"bootstrap": "^5.1.3",
|
|
25
|
+
"react": "^18.0.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
29
29
|
"@rollup/plugin-node-resolve": "^13.2.1",
|
|
30
30
|
"@rollup/plugin-typescript": "^8.3.2",
|
|
31
31
|
"@types/react": "^18.0.7",
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
|
33
|
+
"@typescript-eslint/parser": "^5.21.0",
|
|
34
|
+
"eslint": "^8.14.0",
|
|
35
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
36
|
+
"eslint-config-airbnb-typescript": "^17.0.0",
|
|
37
|
+
"eslint-plugin-import": "^2.26.0",
|
|
38
|
+
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
39
|
+
"eslint-plugin-react": "^7.29.4",
|
|
40
|
+
"eslint-plugin-react-hooks": "^4.4.0",
|
|
32
41
|
"rollup": "^2.70.2",
|
|
33
42
|
"rollup-plugin-dts": "^4.2.1",
|
|
43
|
+
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
34
44
|
"typescript": "^4.6.3"
|
|
35
45
|
}
|
|
36
46
|
}
|
package/rollup.config.js
CHANGED
|
@@ -2,6 +2,8 @@ import resolve from "@rollup/plugin-node-resolve";
|
|
|
2
2
|
import commonjs from "@rollup/plugin-commonjs";
|
|
3
3
|
import typescript from "@rollup/plugin-typescript";
|
|
4
4
|
import dts from "rollup-plugin-dts";
|
|
5
|
+
import sourcemaps from 'rollup-plugin-sourcemaps';
|
|
6
|
+
|
|
5
7
|
|
|
6
8
|
const packageJson = require("./package.json");
|
|
7
9
|
|
|
@@ -24,6 +26,7 @@ export default [
|
|
|
24
26
|
resolve(),
|
|
25
27
|
commonjs(),
|
|
26
28
|
typescript({ tsconfig: "./tsconfig.json" }),
|
|
29
|
+
sourcemaps(),
|
|
27
30
|
],
|
|
28
31
|
external: [
|
|
29
32
|
...Object.keys(packageJson.dependencies || {}),
|
package/src/components/Modal.tsx
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
import React, { useState, useEffect } from 'react';
|
|
8
8
|
|
|
9
9
|
// Import other components
|
|
10
|
-
import BootstrapModal from 'react-bootstrap/Modal';
|
|
11
10
|
import waitMs from '../helpers/waitMs';
|
|
12
11
|
|
|
13
12
|
// Import types
|
|
@@ -368,14 +367,9 @@ const Modal: React.FC<Props> = (props) => {
|
|
|
368
367
|
|
|
369
368
|
// Render the modal
|
|
370
369
|
return (
|
|
371
|
-
<
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
onHide={() => {
|
|
375
|
-
if (!dontAllowBackdropExit) {
|
|
376
|
-
handleClose(ModalButtonType.Cancel);
|
|
377
|
-
}
|
|
378
|
-
}}
|
|
370
|
+
<div
|
|
371
|
+
className={`modal fade modal-${size}`}
|
|
372
|
+
tabIndex={-1}
|
|
379
373
|
style={{
|
|
380
374
|
zIndex: (
|
|
381
375
|
onTopOfOtherModals
|
|
@@ -383,30 +377,39 @@ const Modal: React.FC<Props> = (props) => {
|
|
|
383
377
|
: 5000000000
|
|
384
378
|
),
|
|
385
379
|
}}
|
|
386
|
-
backdropClassName="Modal-backdrop"
|
|
387
|
-
centered
|
|
388
380
|
>
|
|
389
|
-
<
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
381
|
+
<div className="modal-dialog">
|
|
382
|
+
<div className="modal-content">
|
|
383
|
+
<div className="modal-header">
|
|
384
|
+
<h5 className="modal-title">
|
|
385
|
+
{title}
|
|
386
|
+
</h5>
|
|
387
|
+
|
|
388
|
+
{onClose && (
|
|
389
|
+
<button
|
|
390
|
+
type="button"
|
|
391
|
+
className="btn-close"
|
|
392
|
+
data-bs-dismiss="modal"
|
|
393
|
+
aria-label="Close"
|
|
394
|
+
onClick={() => {
|
|
395
|
+
handleClose(ModalButtonType.Cancel);
|
|
396
|
+
}}
|
|
397
|
+
/>
|
|
398
|
+
)}
|
|
399
|
+
</div>
|
|
400
|
+
{children && (
|
|
401
|
+
<div className="modal-body">
|
|
402
|
+
{children}
|
|
403
|
+
</div>
|
|
404
|
+
)}
|
|
405
|
+
{footer && (
|
|
406
|
+
<div className="modal-footer">
|
|
407
|
+
{footer}
|
|
408
|
+
</div>
|
|
409
|
+
)}
|
|
410
|
+
</div>
|
|
411
|
+
</div>
|
|
412
|
+
</div>
|
|
410
413
|
);
|
|
411
414
|
};
|
|
412
415
|
|