blue-react 8.4.0 → 8.4.3
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/dist/components/ActionMenu.js +11 -2
- package/dist/components/ActionMenuSwitch.js +15 -4
- package/dist/components/DocumentView.js +1 -1
- package/dist/components/HeaderTitle.js +1 -1
- package/dist/components/Layout.js +5 -5
- package/dist/components/MenuItem.js +1 -1
- package/dist/components/Modal.js +1 -1
- package/dist/components/ModalProvider.js +2 -2
- package/dist/components/Outside.js +2 -2
- package/dist/components/Page.js +1 -1
- package/dist/components/Search.js +1 -1
- package/dist/components/SidebarMenu.js +1 -1
- package/dist/components/StatusProvider.js +3 -3
- package/dist/components/Switch.js +1 -1
- package/dist/components/Utilities.js +114 -71
- package/dist/style.css +16 -3
- package/dist/style.min.css +4 -4
- package/dist/style.scss +1 -1
- package/dist/styles/_variables.scss +12 -1
- package/dist/styles/mixins/_sidebar.scss +10 -2
- package/dist/types/components/ActionMenuSwitch.d.ts +5 -4
- package/dist/types/components/ModalProvider.d.ts +3 -3
- package/dist/types/components/Utilities.d.ts +39 -17
- package/package.json +4 -3
package/dist/style.scss
CHANGED
|
@@ -66,7 +66,11 @@ $sidebar-open-bg: darken($sidebar-bg, 30%) !default;
|
|
|
66
66
|
$sidebar-deep-bg: darken($sidebar-bg, 4%) !default;
|
|
67
67
|
|
|
68
68
|
// Text color of sidebar.
|
|
69
|
-
$sidebar-color:
|
|
69
|
+
$blue-sidebar-color-h: 0 !default;
|
|
70
|
+
$blue-sidebar-color-s: 100% !default;
|
|
71
|
+
$blue-sidebar-color-l: 100% !default;
|
|
72
|
+
$blue-sidebar-color: hsl($blue-sidebar-color-h, $blue-sidebar-color-s, $blue-sidebar-color-l) !default;
|
|
73
|
+
$sidebar-color: $blue-sidebar-color !default;
|
|
70
74
|
|
|
71
75
|
// Color of indicator for active sidebar item.
|
|
72
76
|
$sidebar-indicator-color: $sidebar-color !default;
|
|
@@ -94,4 +98,11 @@ $scrollbar-size: 10px;
|
|
|
94
98
|
|
|
95
99
|
:root {
|
|
96
100
|
--theme: #{$theme};
|
|
101
|
+
|
|
102
|
+
--blue-sidebar-width: #{$bla-sidebar-width};
|
|
103
|
+
--blue-sidebar-color-h: #{$blue-sidebar-color-h};
|
|
104
|
+
--blue-sidebar-color-s: #{$blue-sidebar-color-s};
|
|
105
|
+
--blue-sidebar-color-l: #{$blue-sidebar-color-l};
|
|
106
|
+
--blue-sidebar-color: #{$blue-sidebar-color};
|
|
107
|
+
--blue-theme: #{$theme};
|
|
97
108
|
}
|
|
@@ -11,13 +11,14 @@
|
|
|
11
11
|
.blue-menu-item-label {
|
|
12
12
|
display: inline-block;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
14
|
.blue-sidebar {
|
|
16
15
|
z-index: 42;
|
|
17
16
|
box-shadow: 0.6rem 6rem 6rem rgba(0, 0, 0, 0.4);
|
|
18
17
|
// background-color: darken($theme, 30%);
|
|
19
18
|
}
|
|
20
19
|
|
|
20
|
+
--blue-sidebar-width: #{$bla-sidebar-width};
|
|
21
|
+
|
|
21
22
|
.blue-sidebar,
|
|
22
23
|
.blue-sidebar .blue-menu-item {
|
|
23
24
|
width: $bla-sidebar-width;
|
|
@@ -77,7 +78,10 @@
|
|
|
77
78
|
&::before {
|
|
78
79
|
content: "";
|
|
79
80
|
position: absolute;
|
|
80
|
-
top: 0.25rem;
|
|
81
|
+
top: 0.25rem;
|
|
82
|
+
right: 0.25rem;
|
|
83
|
+
bottom: 0.25rem;
|
|
84
|
+
left: 0.25rem;
|
|
81
85
|
background-color: currentColor;
|
|
82
86
|
border-radius: $border-radius;
|
|
83
87
|
transform: scale(0.9);
|
|
@@ -113,6 +117,10 @@
|
|
|
113
117
|
}
|
|
114
118
|
}
|
|
115
119
|
|
|
120
|
+
:root {
|
|
121
|
+
--blue-sidebar-width: #{$width};
|
|
122
|
+
}
|
|
123
|
+
|
|
116
124
|
.blue-sidebar {
|
|
117
125
|
width: $width;
|
|
118
126
|
color: $sidebar-color;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
checked?: boolean;
|
|
2
|
+
import { SwitchProps } from "./Switch";
|
|
3
|
+
export interface ActionMenuSwitchProps extends SwitchProps {
|
|
5
4
|
onChange?: () => void;
|
|
6
5
|
label?: any;
|
|
7
6
|
}
|
|
8
7
|
/**
|
|
8
|
+
* @deprecated
|
|
9
|
+
* Use a solution with Bootstrap's `.form-check.form-switch` or `MenuItem` with a switch icon.
|
|
9
10
|
* Switch for the Action Menu.
|
|
10
11
|
*/
|
|
11
|
-
export default function ActionMenuSwitch(props: ActionMenuSwitchProps): JSX.Element;
|
|
12
|
+
export default function ActionMenuSwitch({ label, ...props }: ActionMenuSwitchProps): JSX.Element;
|
|
@@ -4,8 +4,8 @@ export interface ModalProviderProps {
|
|
|
4
4
|
}
|
|
5
5
|
declare const ModalProvider: ({ children, ...rest }: ModalProviderProps) => JSX.Element;
|
|
6
6
|
declare const useModal: () => {
|
|
7
|
-
ask: (text: string, title?: string
|
|
8
|
-
tell: (text: string, title?: string
|
|
9
|
-
verify: (text: string, title?: string
|
|
7
|
+
ask: (text: string, title?: string) => Promise<string | boolean>;
|
|
8
|
+
tell: (text: string, title?: string) => Promise<boolean>;
|
|
9
|
+
verify: (text: string, title?: string) => Promise<boolean>;
|
|
10
10
|
};
|
|
11
11
|
export { ModalProvider, useModal };
|
|
@@ -1,17 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { StatusType } from "./shared";
|
|
2
|
+
export declare function hasClass(el: HTMLElement | null, className: string): boolean;
|
|
3
|
+
export declare function addClass(el: HTMLElement | null, className: string): void;
|
|
4
|
+
export declare function removeClass(el: HTMLElement | null, className: string): void;
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use (el as HTMLElement).classList.toggle("my-class") instead.
|
|
7
|
+
*/
|
|
8
|
+
export declare function toggleClass(element: HTMLElement | null, className: string): void;
|
|
9
|
+
export declare function startLoading(): void;
|
|
10
|
+
export declare function finishLoading(): void;
|
|
11
|
+
export declare function showSuccess(): void;
|
|
12
|
+
export declare function hideSuccess(): void;
|
|
13
|
+
export declare function toggleActions(): void;
|
|
14
|
+
/**
|
|
15
|
+
* Resets alert messages that was set with `setAlertMessage`.
|
|
16
|
+
* @param alertClassName Leave empty to reset messages of any status type
|
|
17
|
+
*/
|
|
18
|
+
export declare function resetAlertMessage(alertClassName?: StatusType): void;
|
|
19
|
+
export declare function setAlertMessage(message: string, alertClassName?: StatusType, close?: boolean, detailText?: string): void;
|
|
20
|
+
export declare const guid: () => string;
|
|
21
|
+
export declare function scrollToTop(): void;
|
|
22
|
+
export declare function fetchData(input: RequestInfo | URL, init?: RequestInit | undefined, showErrorDetail?: boolean | undefined, onError?: (errorMessage: string, reason: Response) => void): Promise<Response>;
|
|
23
|
+
declare const _default: {
|
|
24
|
+
hasClass: typeof hasClass;
|
|
25
|
+
addClass: typeof addClass;
|
|
26
|
+
removeClass: typeof removeClass;
|
|
27
|
+
toggleClass: typeof toggleClass;
|
|
28
|
+
startLoading: typeof startLoading;
|
|
29
|
+
finishLoading: typeof finishLoading;
|
|
30
|
+
showSuccess: typeof showSuccess;
|
|
31
|
+
hideSuccess: typeof hideSuccess;
|
|
32
|
+
toggleActions: typeof toggleActions;
|
|
33
|
+
resetAlertMessage: typeof resetAlertMessage;
|
|
34
|
+
setAlertMessage: typeof setAlertMessage;
|
|
35
|
+
guid: () => string;
|
|
36
|
+
scrollToTop: typeof scrollToTop;
|
|
37
|
+
fetchData: typeof fetchData;
|
|
38
|
+
};
|
|
39
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blue-react",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.3",
|
|
4
4
|
"description": "Blue React Components",
|
|
5
5
|
"license": "LGPL-3.0-or-later",
|
|
6
6
|
"main": "index.js",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@popperjs/core": "^2.10.2",
|
|
34
|
+
"blue-web-components": "github:bruegmann/blue-web-components",
|
|
34
35
|
"bootstrap": "^5.1.3",
|
|
35
36
|
"clsx": "^1.1.1"
|
|
36
37
|
},
|
|
@@ -63,9 +64,9 @@
|
|
|
63
64
|
"react-bootstrap-icons": "^1.8.4",
|
|
64
65
|
"react-docgen": "^5.4.0",
|
|
65
66
|
"react-dom": "^18.1.0",
|
|
66
|
-
"react-markdown
|
|
67
|
+
"react-markdown": "^8.0.3",
|
|
67
68
|
"react-router-dom": "^5.3.3",
|
|
68
|
-
"react-scripts": "^
|
|
69
|
+
"react-scripts": "^5.0.1",
|
|
69
70
|
"react-syntax-highlighter": "^15.4.3",
|
|
70
71
|
"reactstrap": "^9.0.0-0",
|
|
71
72
|
"typescript": "^4.3.5"
|