blue-react 8.3.0 → 8.3.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 (74) hide show
  1. package/LICENSE +164 -164
  2. package/README.md +59 -59
  3. package/dist/components/ActionMenu.js +2 -2
  4. package/dist/components/ActionMenuSwitch.js +2 -2
  5. package/dist/components/Body.js +2 -2
  6. package/dist/components/BodyRounded.js +2 -2
  7. package/dist/components/Caret.js +2 -2
  8. package/dist/components/DocumentView.js +2 -2
  9. package/dist/components/Grid.js +287 -287
  10. package/dist/components/Header.js +2 -2
  11. package/dist/components/HeaderTitle.js +3 -3
  12. package/dist/components/Intro.js +2 -2
  13. package/dist/components/Layout.js +19 -19
  14. package/dist/components/MenuItem.js +3 -2
  15. package/dist/components/Modal.js +5 -5
  16. package/dist/components/Outside.js +6 -6
  17. package/dist/components/Page.js +2 -2
  18. package/dist/components/Search.js +2 -2
  19. package/dist/components/SidebarMenu.js +2 -2
  20. package/dist/components/Switch.js +2 -2
  21. package/dist/style.css +8694 -4960
  22. package/dist/style.css.map +1 -0
  23. package/dist/style.min.css +10 -12
  24. package/dist/style.scss +28 -28
  25. package/dist/styles/_action-menu.scss +81 -81
  26. package/dist/styles/_bootstrap-mixins_overwritten.scss +106 -106
  27. package/dist/styles/_bootstrap-optimizations.scss +13 -13
  28. package/dist/styles/_bootstrap-variables.scss +15 -15
  29. package/dist/styles/_bootstrap.scss +56 -56
  30. package/dist/styles/_caret.scss +50 -50
  31. package/dist/styles/_document-view.scss +6 -6
  32. package/dist/styles/_general.scss +177 -177
  33. package/dist/styles/_grid.scss +381 -381
  34. package/dist/styles/_hover.scss +42 -42
  35. package/dist/styles/_keyframes.scss +73 -73
  36. package/dist/styles/_mixins.scss +6 -6
  37. package/dist/styles/_router.scss +18 -18
  38. package/dist/styles/_search.scss +61 -61
  39. package/dist/styles/_status.scss +149 -149
  40. package/dist/styles/_switch.scss +21 -21
  41. package/dist/styles/_tooltips.scss +189 -189
  42. package/dist/styles/_variables.scss +97 -97
  43. package/dist/styles/mixins/_action-menu.scss +68 -68
  44. package/dist/styles/mixins/_custom-property.scss +10 -10
  45. package/dist/styles/mixins/_misc.scss +33 -33
  46. package/dist/styles/mixins/_scroll-shadow.scss +9 -9
  47. package/dist/styles/mixins/_sidebar.scss +156 -156
  48. package/dist/styles/mixins/_switch.scss +85 -85
  49. package/dist/types/components/ActionMenu.d.ts +22 -22
  50. package/dist/types/components/ActionMenuSwitch.d.ts +11 -11
  51. package/dist/types/components/Body.d.ts +21 -21
  52. package/dist/types/components/BodyRounded.d.ts +10 -10
  53. package/dist/types/components/Caret.d.ts +16 -16
  54. package/dist/types/components/DocumentView.d.ts +23 -23
  55. package/dist/types/components/Grid.d.ts +110 -110
  56. package/dist/types/components/Header.d.ts +8 -8
  57. package/dist/types/components/HeaderTitle.d.ts +29 -29
  58. package/dist/types/components/Intro.d.ts +23 -23
  59. package/dist/types/components/Layout.d.ts +120 -120
  60. package/dist/types/components/MenuItem.d.ts +69 -69
  61. package/dist/types/components/Modal.d.ts +25 -25
  62. package/dist/types/components/ModalProvider.d.ts +11 -11
  63. package/dist/types/components/Outside.d.ts +14 -14
  64. package/dist/types/components/Page.d.ts +12 -12
  65. package/dist/types/components/Search.d.ts +30 -30
  66. package/dist/types/components/SidebarMenu.d.ts +32 -32
  67. package/dist/types/components/Status.d.ts +12 -12
  68. package/dist/types/components/StatusProvider.d.ts +15 -15
  69. package/dist/types/components/Switch.d.ts +21 -21
  70. package/dist/types/components/Utilities.d.ts +17 -17
  71. package/dist/types/components/shared.d.ts +15 -15
  72. package/index.d.ts +65 -65
  73. package/index.js +27 -27
  74. package/package.json +88 -88
@@ -39,25 +39,25 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
39
39
 
40
40
  window.toggleSidebarEvent = new CustomEvent("toggleSidebar");
41
41
 
42
- /**
43
- * The main component. As soon this component is mounted, it is globally available under `window.blueLayoutRef`.
44
- * You can also append your own event listeners.
45
- *
46
- * Allowed events:
47
- *
48
- * * **componentDidUpdate** - Component was updated.
49
- * Example: `window.blueLayoutRef.addEventListener("componentDidUpdate", (prevProps, prevState) => { })`
50
- * * **pageDidShowAgain** - Page appeared again with the same old state. In the callback function you can reinitialize things.
51
- * Example: `window.blueLayoutRef.addEventListener("pageDidShowAgain", "home", (prevProps, prevState) => { })`
52
- * * **pageDidHide** - This page disappeared and another page appears instead.
53
- * Example: `window.blueLayoutRef.addEventListener("pageDidHide", "home", (prevProps, prevState) => { })`
54
- *
55
- * Method to add event listeners:
56
- * * `window.blueLayoutRef.`**addEventListener**`(eventName: string, param2: any, param3: any, listenerId?: string)`
57
- *
58
- * Methods to remove event listeners:
59
- * * `window.blueLayoutRef.`**removeEventListener**`(eventName: string, listenerId: string)`
60
- * * `window.blueLayoutRef.`**removeDuplicatedEventListeners**`()` - Will automatically be called when running `addEventListener`
42
+ /**
43
+ * The main component. As soon this component is mounted, it is globally available under `window.blueLayoutRef`.
44
+ * You can also append your own event listeners.
45
+ *
46
+ * Allowed events:
47
+ *
48
+ * * **componentDidUpdate** - Component was updated.
49
+ * Example: `window.blueLayoutRef.addEventListener("componentDidUpdate", (prevProps, prevState) => { })`
50
+ * * **pageDidShowAgain** - Page appeared again with the same old state. In the callback function you can reinitialize things.
51
+ * Example: `window.blueLayoutRef.addEventListener("pageDidShowAgain", "home", (prevProps, prevState) => { })`
52
+ * * **pageDidHide** - This page disappeared and another page appears instead.
53
+ * Example: `window.blueLayoutRef.addEventListener("pageDidHide", "home", (prevProps, prevState) => { })`
54
+ *
55
+ * Method to add event listeners:
56
+ * * `window.blueLayoutRef.`**addEventListener**`(eventName: string, param2: any, param3: any, listenerId?: string)`
57
+ *
58
+ * Methods to remove event listeners:
59
+ * * `window.blueLayoutRef.`**removeEventListener**`(eventName: string, listenerId: string)`
60
+ * * `window.blueLayoutRef.`**removeDuplicatedEventListeners**`()` - Will automatically be called when running `addEventListener`
61
61
  */
62
62
  var Layout = /*#__PURE__*/function (_Component) {
63
63
  _inherits(Layout, _Component);
@@ -35,8 +35,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
35
35
 
36
36
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
37
 
38
- /**
39
- * Link, button or custom component for Sidebar, Actions or ActionMenu
38
+ /**
39
+ * Link, button or custom component for Sidebar, Actions or ActionMenu
40
40
  */
41
41
  function MenuItem(props) {
42
42
  var _useState = (0, _react.useState)(false),
@@ -119,6 +119,7 @@ function MenuItem(props) {
119
119
 
120
120
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/(0, _react.createElement)(props.elementType || (props.href ? "a" : "button"), {
121
121
  to: props.to,
122
+ href: props.href,
122
123
  exact: props.exact,
123
124
  className: className + (props.isActive || active ? " active" : "") + (props.label ? " has-label" : ""),
124
125
  onClick: onClick,
@@ -29,11 +29,11 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
29
29
 
30
30
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
31
31
 
32
- /**
33
- * Simple modal/dialog. Designed to work as an alternative to JavaScript's native `alert()`, `prompt()` and `confirm()` functions.
34
- * It uses Bootstrap's Modal components.
35
- *
36
- * For easy use, you should use the hook `useModal` together with `ModalProvider`. See the example there.
32
+ /**
33
+ * Simple modal/dialog. Designed to work as an alternative to JavaScript's native `alert()`, `prompt()` and `confirm()` functions.
34
+ * It uses Bootstrap's Modal components.
35
+ *
36
+ * For easy use, you should use the hook `useModal` together with `ModalProvider`. See the example there.
37
37
  */
38
38
  function Modal(_ref) {
39
39
  var modalContent = _ref.modalContent,
@@ -14,13 +14,13 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
14
14
 
15
15
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
16
 
17
- /**
18
- * Hook that alerts clicks outside of the passed ref
17
+ /**
18
+ * Hook that alerts clicks outside of the passed ref
19
19
  */
20
20
  function useOutside(ref, callback) {
21
21
  (0, _react.useEffect)(function () {
22
- /**
23
- * Alert if clicked on outside of element
22
+ /**
23
+ * Alert if clicked on outside of element
24
24
  */
25
25
  function handleClickOutside(event) {
26
26
  if (ref.current && !ref.current.contains(event.target) && callback) {
@@ -37,8 +37,8 @@ function useOutside(ref, callback) {
37
37
  }, [ref]);
38
38
  }
39
39
 
40
- /**
41
- * Component that fires an event if you click outside of it
40
+ /**
41
+ * Component that fires an event if you click outside of it
42
42
  */
43
43
  function Outside(_ref) {
44
44
  var children = _ref.children,
@@ -29,8 +29,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
29
29
 
30
30
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
31
31
 
32
- /**
33
- * Main component for each page.
32
+ /**
33
+ * Main component for each page.
34
34
  */
35
35
  function Page(_ref) {
36
36
  var children = _ref.children,
@@ -31,8 +31,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
31
31
 
32
32
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
33
33
 
34
- /**
35
- * A search bar that can be placed to the sidebar or on a page.
34
+ /**
35
+ * A search bar that can be placed to the sidebar or on a page.
36
36
  */
37
37
  function Search(props) {
38
38
  var autoFocus = props.autoFocus,
@@ -25,8 +25,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
25
25
 
26
26
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
27
27
 
28
- /**
29
- * Sidebar for the `Layout` component.
28
+ /**
29
+ * Sidebar for the `Layout` component.
30
30
  */
31
31
  function SidebarMenu(props) {
32
32
  var _useState = (0, _react.useState)(false),
@@ -13,8 +13,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
13
13
 
14
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
15
 
16
- /**
17
- * Switch.
16
+ /**
17
+ * Switch.
18
18
  */
19
19
  function Switch(_ref) {
20
20
  var className = _ref.className,