blue-react 7.8.1 → 7.9.1

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 (40) hide show
  1. package/README.md +40 -40
  2. package/dist/components/ActionMenuItem.js +4 -4
  3. package/dist/components/ActionMenuSwitch.js +2 -2
  4. package/dist/components/Caret.js +2 -2
  5. package/dist/components/DocumentView.js +3 -3
  6. package/dist/components/Grid.js +10 -2
  7. package/dist/components/Header.js +2 -2
  8. package/dist/components/HeaderActions.js +2 -2
  9. package/dist/components/HeaderTitle.js +3 -3
  10. package/dist/components/Intro.js +2 -2
  11. package/dist/components/Outside.js +6 -6
  12. package/dist/components/Page.js +2 -2
  13. package/dist/components/SidebarMenu.js +2 -2
  14. package/dist/components/Switch.js +2 -2
  15. package/dist/style.css +9 -9
  16. package/dist/style.min.css +7 -7
  17. package/dist/style.scss +1 -1
  18. package/dist/styles/_action-menu.scss +81 -81
  19. package/dist/styles/_actions.scss +137 -137
  20. package/dist/styles/_bootstrap-mixins_overwritten.scss +106 -106
  21. package/dist/styles/_bootstrap-optimizations.scss +13 -13
  22. package/dist/styles/_bootstrap-variables.scss +13 -13
  23. package/dist/styles/_bootstrap.scss +56 -56
  24. package/dist/styles/_caret.scss +50 -50
  25. package/dist/styles/_document-view.scss +6 -6
  26. package/dist/styles/_hover.scss +42 -42
  27. package/dist/styles/_keyframes.scss +73 -73
  28. package/dist/styles/_mixins.scss +7 -7
  29. package/dist/styles/_ripple.scss +30 -30
  30. package/dist/styles/_router.scss +18 -18
  31. package/dist/styles/_switch.scss +21 -21
  32. package/dist/styles/mixins/_action-menu.scss +68 -68
  33. package/dist/styles/mixins/_actions.scss +55 -55
  34. package/dist/styles/mixins/_custom-property.scss +10 -10
  35. package/dist/styles/mixins/_misc.scss +33 -33
  36. package/dist/styles/mixins/_scroll-shadow.scss +9 -9
  37. package/dist/styles/mixins/_sidebar.scss +142 -142
  38. package/dist/styles/mixins/_switch.scss +85 -85
  39. package/dist/types/components/Grid.d.ts +3 -1
  40. package/package.json +88 -88
@@ -1,85 +1,85 @@
1
- @mixin switch(
2
- $width: 35px,
3
- $height: 20px,
4
- $padding: 3px,
5
- $color: $body-color,
6
- $color-active: $success
7
- ) {
8
- $slider-size: $height - ($padding * 2);
9
-
10
- & {
11
- position: relative;
12
- display: inline-block;
13
- width: $width;
14
- height: $height;
15
-
16
- input {
17
- display: none;
18
- }
19
-
20
- &.disabled {
21
- opacity: 0.8;
22
- }
23
-
24
- &:not(.disabled) {
25
- .slider {
26
- cursor: pointer;
27
- }
28
- }
29
-
30
- .slider {
31
- position: absolute;
32
- top: 0;
33
- left: 0;
34
- right: 0;
35
- bottom: 0;
36
- background-color: $input-group-addon-bg;
37
- transition: 0.4s;
38
- box-shadow: inset 0 0 0 1px rgba($color, 0.5);
39
-
40
- &::before {
41
- content: "";
42
- position: absolute;
43
- height: $slider-size;
44
- width: $slider-size;
45
- left: $padding;
46
- bottom: $padding;
47
- background-color: $color;
48
- transition: 0.4s;
49
- }
50
-
51
- &::after {
52
- content: attr(data-label);
53
- position: absolute;
54
- top: 50%;
55
- left: 50%;
56
- transform: translate(-50%, -50%);
57
- margin-left: ($slider-size / 2);
58
- transition: margin-left 0.4s;
59
- color: $color;
60
- }
61
- }
62
-
63
- input:checked {
64
- & + .slider {
65
- background-color: $color-active;
66
- box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.3);
67
-
68
- &::before {
69
- transform: translateX(
70
- $width - $slider-size - ($padding * 2)
71
- );
72
- background-color: white;
73
- }
74
-
75
- &::after {
76
- color: white;
77
- margin-left: ($slider-size / 2) * -1;
78
- }
79
- }
80
- }
81
- input:focus + .slider {
82
- box-shadow: 0 0 1px $color-active;
83
- }
84
- }
85
- }
1
+ @mixin switch(
2
+ $width: 35px,
3
+ $height: 20px,
4
+ $padding: 3px,
5
+ $color: $body-color,
6
+ $color-active: $success
7
+ ) {
8
+ $slider-size: $height - ($padding * 2);
9
+
10
+ & {
11
+ position: relative;
12
+ display: inline-block;
13
+ width: $width;
14
+ height: $height;
15
+
16
+ input {
17
+ display: none;
18
+ }
19
+
20
+ &.disabled {
21
+ opacity: 0.8;
22
+ }
23
+
24
+ &:not(.disabled) {
25
+ .slider {
26
+ cursor: pointer;
27
+ }
28
+ }
29
+
30
+ .slider {
31
+ position: absolute;
32
+ top: 0;
33
+ left: 0;
34
+ right: 0;
35
+ bottom: 0;
36
+ background-color: $input-group-addon-bg;
37
+ transition: 0.4s;
38
+ box-shadow: inset 0 0 0 1px rgba($color, 0.5);
39
+
40
+ &::before {
41
+ content: "";
42
+ position: absolute;
43
+ height: $slider-size;
44
+ width: $slider-size;
45
+ left: $padding;
46
+ bottom: $padding;
47
+ background-color: $color;
48
+ transition: 0.4s;
49
+ }
50
+
51
+ &::after {
52
+ content: attr(data-label);
53
+ position: absolute;
54
+ top: 50%;
55
+ left: 50%;
56
+ transform: translate(-50%, -50%);
57
+ margin-left: ($slider-size * 0.5);
58
+ transition: margin-left 0.4s;
59
+ color: $color;
60
+ }
61
+ }
62
+
63
+ input:checked {
64
+ & + .slider {
65
+ background-color: $color-active;
66
+ box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.3);
67
+
68
+ &::before {
69
+ transform: translateX(
70
+ $width - $slider-size - ($padding * 2)
71
+ );
72
+ background-color: white;
73
+ }
74
+
75
+ &::after {
76
+ color: white;
77
+ margin-left: ($slider-size * 0.5) * -1;
78
+ }
79
+ }
80
+ }
81
+ input:focus + .slider {
82
+ box-shadow: 0 0 1px $color-active;
83
+ }
84
+ }
85
+ }
@@ -70,7 +70,8 @@ export interface GridState {
70
70
  }
71
71
  /**
72
72
  * The main component. As soon this component is mounted, it is globally available under `window.blueGridRef`.
73
- * Also you can append your own event listeners with `blueGridRef.addEventListener(eventName, (prevProps, prevState) => { })`.
73
+ * Also you can append your own event listeners with `blueGridRef.addEventListener(eventName, (prevProps, prevState) => { })`
74
+ * and remove it with `blueGridRef.removeEventListener(eventName, listener)`.
74
75
  *
75
76
  * Allowed event listeners:
76
77
  *
@@ -106,5 +107,6 @@ export default class Grid extends Component<GridProps, GridState> {
106
107
  hideSidebar(e: any): void;
107
108
  initMatch(): void;
108
109
  addEventListener(param1: any, param2: any, param3: any): void;
110
+ removeEventListener(type: string, listener: any): void;
109
111
  render(): JSX.Element;
110
112
  }
package/package.json CHANGED
@@ -1,88 +1,88 @@
1
- {
2
- "name": "blue-react",
3
- "version": "7.8.1",
4
- "description": "Blue React Components",
5
- "license": "LGPL-3.0-or-later",
6
- "main": "index.js",
7
- "types": "index.d.ts",
8
- "homepage": "https://bruegmann.github.io/blue-react/v7",
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/bruegmann/blue-react.git"
12
- },
13
- "bugs": {
14
- "url": "https://github.com/bruegmann/blue-react/issues"
15
- },
16
- "scripts": {
17
- "start": "react-scripts start",
18
- "build-docs": "react-scripts build && npm run docgen",
19
- "build-types": "tsc --declaration --emitDeclarationOnly --declarationDir ./dist/types --noEmit false",
20
- "build": "babel ./src/components --out-dir ./dist/components --extensions \".tsx,.js,.ts\"",
21
- "build-css": "node ./setVersionToStyleScss.js && node-sass ./dist/style.scss ./dist/style.css && npx postcss ./dist/style.css --use autoprefixer -r && npx postcss ./dist/style.css --use postcss-minify -o ./dist/style.min.css",
22
- "build-release": "npm run build-types && npm run build && npm run build-css && npm run docgen",
23
- "docgen": "react-docgen ./src/components/ -o ./src/docs/data/docs.json --exclude Utilities.js --exclude ModalProvider.tsx --extension tsx && node followUpDocs",
24
- "test": "react-scripts test",
25
- "eject": "react-scripts eject",
26
- "predeploy": "npm run build-docs",
27
- "deploy": "gh-pages --dist build --dest v7",
28
- "prepublishOnly": "npm i && npm run build-release",
29
- "release": "npm publish && npm run deploy",
30
- "prettier": "npx prettier --write ."
31
- },
32
- "dependencies": {
33
- "@popperjs/core": "^2.10.1",
34
- "bootstrap": "~5.0.2",
35
- "clsx": "^1.1.1"
36
- },
37
- "peerDependencies": {
38
- "react": "^16.0.0 || ^17.0.0"
39
- },
40
- "devDependencies": {
41
- "@babel/cli": "^7.10.4",
42
- "@babel/preset-env": "^7.10.4",
43
- "@babel/preset-react": "^7.10.4",
44
- "@babel/preset-typescript": "^7.9.0",
45
- "@testing-library/jest-dom": "^4.2.4",
46
- "@testing-library/react": "^9.5.0",
47
- "@testing-library/user-event": "^7.2.1",
48
- "@types/bootstrap": "^5.0.17",
49
- "@types/jest": "^24.9.1",
50
- "@types/node": "^12.12.47",
51
- "@types/react": "^17.0.3",
52
- "@types/react-dom": "^17.0.3",
53
- "@types/react-router-dom": "^5.1.5",
54
- "@types/react-syntax-highlighter": "^13.5.0",
55
- "autoprefixer": "^10.3.6",
56
- "gh-pages": "^3.1.0",
57
- "lint-staged": "^11.1.2",
58
- "node-sass": "^4.14.1",
59
- "postcss-cli": "^9.0.1",
60
- "postcss-minify": "^1.1.0",
61
- "prettier": "2.4.1",
62
- "react": "^17.0.2",
63
- "react-bootstrap-icons": "^1.5.0",
64
- "react-docgen": "^5.4.0",
65
- "react-dom": "^17.0.2",
66
- "react-markdown-github": "^3.3.1",
67
- "react-router-dom": "^5.2.0",
68
- "react-scripts": "^4.0.3",
69
- "react-syntax-highlighter": "^15.4.3",
70
- "reactstrap": "^9.0.0-0",
71
- "typescript": "^4.3.5"
72
- },
73
- "eslintConfig": {
74
- "extends": "react-app"
75
- },
76
- "browserslist": {
77
- "production": [
78
- ">0.2%",
79
- "not dead",
80
- "not op_mini all"
81
- ],
82
- "development": [
83
- "last 1 chrome version",
84
- "last 1 firefox version",
85
- "last 1 safari version"
86
- ]
87
- }
88
- }
1
+ {
2
+ "name": "blue-react",
3
+ "version": "7.9.1",
4
+ "description": "Blue React Components",
5
+ "license": "LGPL-3.0-or-later",
6
+ "main": "index.js",
7
+ "types": "index.d.ts",
8
+ "homepage": "https://bruegmann.github.io/blue-react/v7",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/bruegmann/blue-react.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/bruegmann/blue-react/issues"
15
+ },
16
+ "scripts": {
17
+ "start": "react-scripts start",
18
+ "build-docs": "react-scripts build && npm run docgen",
19
+ "build-types": "tsc --declaration --emitDeclarationOnly --declarationDir ./dist/types --noEmit false",
20
+ "build": "babel ./src/components --out-dir ./dist/components --extensions \".tsx,.js,.ts\"",
21
+ "build-css": "node ./setVersionToStyleScss.js && node-sass ./dist/style.scss ./dist/style.css && npx postcss ./dist/style.css --use autoprefixer -r && npx postcss ./dist/style.css --use postcss-minify -o ./dist/style.min.css",
22
+ "build-release": "npm run build-types && npm run build && npm run build-css && npm run docgen",
23
+ "docgen": "react-docgen ./src/components/ -o ./src/docs/data/docs.json --exclude Utilities.js --exclude ModalProvider.tsx --extension tsx && node followUpDocs",
24
+ "test": "react-scripts test",
25
+ "eject": "react-scripts eject",
26
+ "predeploy": "npm run build-docs",
27
+ "deploy": "gh-pages --dist build --dest v7",
28
+ "prepublishOnly": "npm i && npm run build-release",
29
+ "release": "npm publish && npm run deploy",
30
+ "prettier": "npx prettier --write ."
31
+ },
32
+ "dependencies": {
33
+ "@popperjs/core": "^2.10.1",
34
+ "bootstrap": "~5.0.2",
35
+ "clsx": "^1.1.1"
36
+ },
37
+ "peerDependencies": {
38
+ "react": "^16.0.0 || ^17.0.0"
39
+ },
40
+ "devDependencies": {
41
+ "@babel/cli": "^7.10.4",
42
+ "@babel/preset-env": "^7.10.4",
43
+ "@babel/preset-react": "^7.10.4",
44
+ "@babel/preset-typescript": "^7.9.0",
45
+ "@testing-library/jest-dom": "^4.2.4",
46
+ "@testing-library/react": "^9.5.0",
47
+ "@testing-library/user-event": "^7.2.1",
48
+ "@types/bootstrap": "^5.0.17",
49
+ "@types/jest": "^24.9.1",
50
+ "@types/node": "^12.12.47",
51
+ "@types/react": "^17.0.3",
52
+ "@types/react-dom": "^17.0.3",
53
+ "@types/react-router-dom": "^5.1.5",
54
+ "@types/react-syntax-highlighter": "^13.5.0",
55
+ "autoprefixer": "^10.3.6",
56
+ "gh-pages": "^3.1.0",
57
+ "lint-staged": "^11.1.2",
58
+ "node-sass": "^4.14.1",
59
+ "postcss-cli": "^9.0.1",
60
+ "postcss-minify": "^1.1.0",
61
+ "prettier": "2.4.1",
62
+ "react": "^17.0.2",
63
+ "react-bootstrap-icons": "^1.5.0",
64
+ "react-docgen": "^5.4.0",
65
+ "react-dom": "^17.0.2",
66
+ "react-markdown-github": "^3.3.1",
67
+ "react-router-dom": "^5.2.0",
68
+ "react-scripts": "^4.0.3",
69
+ "react-syntax-highlighter": "^15.4.3",
70
+ "reactstrap": "^9.0.0-0",
71
+ "typescript": "^4.3.5"
72
+ },
73
+ "eslintConfig": {
74
+ "extends": "react-app"
75
+ },
76
+ "browserslist": {
77
+ "production": [
78
+ ">0.2%",
79
+ "not dead",
80
+ "not op_mini all"
81
+ ],
82
+ "development": [
83
+ "last 1 chrome version",
84
+ "last 1 firefox version",
85
+ "last 1 safari version"
86
+ ]
87
+ }
88
+ }