diff --git a/package-lock.json b/package-lock.json
index 033b319..2305e72 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -22,11 +22,11 @@
"@babel/plugin-transform-runtime": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"@babel/preset-react": "^7.9.4",
- "@fortawesome/fontawesome-free": "^5.13.0",
+ "@fortawesome/fontawesome-free": "^6.5.2",
"@testing-library/react": "^8.0.9",
"babel-loader": "^8.1.0",
"babel-polyfill": "^6.26.0",
- "bootstrap": "^4.6.2",
+ "bootstrap": "^5.3.3",
"css-loader": "^5.2.4",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.11.0",
@@ -47,7 +47,7 @@
"webpack": "^5.68.0"
},
"peerDependencies": {
- "bootstrap": "^4.6.2",
+ "bootstrap": "^5.3.3",
"prop-types": "15.8.1",
"react": "16.9.0",
"react-dom": "16.9.0",
@@ -1822,9 +1822,9 @@
}
},
"node_modules/@fortawesome/fontawesome-free": {
- "version": "5.15.3",
- "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.3.tgz",
- "integrity": "sha512-rFnSUN/QOtnOAgqFRooTA3H57JLDm0QEG/jPdk+tLQNL/eWd+Aok8g3qCI+Q1xuDPWpGW/i9JySpJVsq8Q0s9w==",
+ "version": "6.5.2",
+ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.5.2.tgz",
+ "integrity": "sha512-hRILoInAx8GNT5IMkrtIt9blOdrqHOnPBH+k70aWUAqPZPgopb9G5EQJFpaBx/S8zp2fC+mPW349Bziuk1o28Q==",
"dev": true,
"hasInstallScript": true,
"engines": {
@@ -2814,9 +2814,9 @@
}
},
"node_modules/@popperjs/core": {
- "version": "2.11.2",
- "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.2.tgz",
- "integrity": "sha512-92FRmppjjqz29VMJ2dn+xdyXZBrMlE42AV6Kq6BwjWV7CNUW1hs2FtxSNLQE+gJhaZ6AAmYuO9y8dshhcBl7vA==",
+ "version": "2.11.8",
+ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
+ "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
"dev": true,
"funding": {
"type": "opencollective",
@@ -4330,9 +4330,9 @@
}
},
"node_modules/bootstrap": {
- "version": "4.6.2",
- "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.2.tgz",
- "integrity": "sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==",
+ "version": "5.3.3",
+ "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz",
+ "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==",
"dev": true,
"funding": [
{
@@ -4345,8 +4345,7 @@
}
],
"peerDependencies": {
- "jquery": "1.9.1 - 3",
- "popper.js": "^1.16.1"
+ "@popperjs/core": "^2.11.8"
}
},
"node_modules/brace-expansion": {
@@ -11673,13 +11672,6 @@
"node": ">=8"
}
},
- "node_modules/jquery": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
- "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==",
- "dev": true,
- "peer": true
- },
"node_modules/js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -13791,18 +13783,6 @@
"integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==",
"dev": true
},
- "node_modules/popper.js": {
- "version": "1.16.1",
- "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
- "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==",
- "deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1",
- "dev": true,
- "peer": true,
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/popperjs"
- }
- },
"node_modules/portfinder": {
"version": "1.0.28",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",
@@ -20398,9 +20378,9 @@
}
},
"@fortawesome/fontawesome-free": {
- "version": "5.15.3",
- "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.3.tgz",
- "integrity": "sha512-rFnSUN/QOtnOAgqFRooTA3H57JLDm0QEG/jPdk+tLQNL/eWd+Aok8g3qCI+Q1xuDPWpGW/i9JySpJVsq8Q0s9w==",
+ "version": "6.5.2",
+ "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.5.2.tgz",
+ "integrity": "sha512-hRILoInAx8GNT5IMkrtIt9blOdrqHOnPBH+k70aWUAqPZPgopb9G5EQJFpaBx/S8zp2fC+mPW349Bziuk1o28Q==",
"dev": true
},
"@gar/promisify": {
@@ -21165,9 +21145,9 @@
}
},
"@popperjs/core": {
- "version": "2.11.2",
- "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.2.tgz",
- "integrity": "sha512-92FRmppjjqz29VMJ2dn+xdyXZBrMlE42AV6Kq6BwjWV7CNUW1hs2FtxSNLQE+gJhaZ6AAmYuO9y8dshhcBl7vA==",
+ "version": "2.11.8",
+ "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
+ "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
"dev": true
},
"@sheerun/mutationobserver-shim": {
@@ -22452,9 +22432,9 @@
}
},
"bootstrap": {
- "version": "4.6.2",
- "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.2.tgz",
- "integrity": "sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==",
+ "version": "5.3.3",
+ "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz",
+ "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==",
"dev": true,
"requires": {}
},
@@ -28040,13 +28020,6 @@
}
}
},
- "jquery": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz",
- "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==",
- "dev": true,
- "peer": true
- },
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -29672,13 +29645,6 @@
"integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==",
"dev": true
},
- "popper.js": {
- "version": "1.16.1",
- "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
- "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==",
- "dev": true,
- "peer": true
- },
"portfinder": {
"version": "1.0.28",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",
diff --git a/package.json b/package.json
index 2081868..5b603dd 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
"react-uid": "^2.2.0"
},
"peerDependencies": {
- "bootstrap": "^4.6.2",
+ "bootstrap": "^5.3.3",
"prop-types": "15.8.1",
"react": "16.9.0",
"react-dom": "16.9.0",
@@ -34,11 +34,11 @@
"@babel/plugin-transform-runtime": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"@babel/preset-react": "^7.9.4",
- "@fortawesome/fontawesome-free": "^5.13.0",
+ "@fortawesome/fontawesome-free": "^6.5.2",
"@testing-library/react": "^8.0.9",
"babel-loader": "^8.1.0",
"babel-polyfill": "^6.26.0",
- "bootstrap": "^4.6.2",
+ "bootstrap": "^5.3.3",
"css-loader": "^5.2.4",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.11.0",
diff --git a/src/bootstrap/Alert.js b/src/bootstrap/Alert.js
index d0f3acc..b6a4860 100644
--- a/src/bootstrap/Alert.js
+++ b/src/bootstrap/Alert.js
@@ -38,16 +38,17 @@ Alert.defaultProps = {
export function Alert({ type, onDismiss, children }) {
return (
- {onDismiss ? (
-
- ) : (
- false
+ {onDismiss && (
+
)}
{children}
diff --git a/src/bootstrap/Button.js b/src/bootstrap/Button.js
index 84895f5..5817f3a 100644
--- a/src/bootstrap/Button.js
+++ b/src/bootstrap/Button.js
@@ -33,7 +33,7 @@ export function Button({
}) {
let buttonClass = className ? `btn ${className}` : "btn btn-primary";
if (forisFormSize) {
- buttonClass = `${buttonClass} col-sm-12 col-md-3 col-lg-2`;
+ buttonClass = `${buttonClass} col-12 col-md-3 col-lg-2`;
}
return (
@@ -44,7 +44,7 @@ export function Button({
>
{loading && (
diff --git a/src/bootstrap/CheckBox.js b/src/bootstrap/CheckBox.js
index 0e2dbcb..890e8b7 100644
--- a/src/bootstrap/CheckBox.js
+++ b/src/bootstrap/CheckBox.js
@@ -24,25 +24,24 @@ CheckBox.defaultProps = {
export function CheckBox({ label, helpText, disabled, ...props }) {
const uid = useUID();
+
return (
-
-
-
-
-
+
+
+
+ {helpText && (
+
+ {helpText}
+
+ )}
);
}
diff --git a/src/bootstrap/Input.js b/src/bootstrap/Input.js
index 171f312..32adc66 100644
--- a/src/bootstrap/Input.js
+++ b/src/bootstrap/Input.js
@@ -27,18 +27,21 @@ export const Input = forwardRef(
) => {
const uid = useUID();
- const inputClassName = `form-control ${className || ""} ${
+ const inputClassName = `${className || ""} ${
error ? "is-invalid" : ""
}`.trim();
return (
-
-
);
}
diff --git a/src/bootstrap/NumberInput.js b/src/bootstrap/NumberInput.js
index 2b4200d..9ba90da 100644
--- a/src/bootstrap/NumberInput.js
+++ b/src/bootstrap/NumberInput.js
@@ -23,7 +23,7 @@ NumberInput.propTypes = {
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
/** Function called when value changes. */
onChange: PropTypes.func.isRequired,
- /** Additional description dispaled to the right of input value. */
+ /** Additional description displayed to the right of input value. */
inlineText: PropTypes.string,
};
@@ -49,27 +49,27 @@ export function NumberInput({ onChange, inlineText, value, ...props }) {
return (
-
- {inlineText &&
{inlineText}
}
-
-
-
+ {inlineText && (
+
{inlineText}
+ )}
+
+
);
}
diff --git a/src/bootstrap/PasswordInput.js b/src/bootstrap/PasswordInput.js
index 17cfbbd..81525f4 100644
--- a/src/bootstrap/PasswordInput.js
+++ b/src/bootstrap/PasswordInput.js
@@ -34,24 +34,20 @@ export function PasswordInput({ withEye, newPass, ...props }) {
autoComplete={newPass ? "new-password" : "current-password"}
{...props}
>
- {withEye ? (
-
-
-
- ) : null}
+ {withEye && (
+
+ )}
);
}
diff --git a/src/bootstrap/RadioSet.js b/src/bootstrap/RadioSet.js
index dbc5213..e549ebc 100644
--- a/src/bootstrap/RadioSet.js
+++ b/src/bootstrap/RadioSet.js
@@ -17,7 +17,7 @@ RadioSet.propTypes = {
/** Choices . */
choices: PropTypes.arrayOf(
PropTypes.shape({
- /** Choice lable . */
+ /** Choice label . */
label: PropTypes.oneOfType([
PropTypes.string,
PropTypes.element,
@@ -64,7 +64,7 @@ export function RadioSet({
});
return (
-
+
{label && (
{label}
@@ -72,7 +72,9 @@ export function RadioSet({
)}
{radios}
{helpText && (
- {helpText}
+
+ {helpText}
+
)}
);
@@ -94,24 +96,24 @@ export function Radio({ label, id, helpText, inline, ...props }) {
return (
<>
>
);
diff --git a/src/bootstrap/Select.js b/src/bootstrap/Select.js
index 0292a2a..b79297e 100644
--- a/src/bootstrap/Select.js
+++ b/src/bootstrap/Select.js
@@ -30,14 +30,18 @@ export function Select({ label, choices, helpText, ...props }) {
));
return (
-
-
{label}
-