diff --git a/Makefile b/Makefile index c8aacdd..77e51c1 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ MSGID_BUGS_ADDRESS="tech.support@turris.cz" DEV_PYTHON=python3 VENV_NAME?=venv +JS_DIR=js VENV_BIN=$(shell pwd)/$(VENV_NAME)/bin .PHONY: all 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 && ( +
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 && (