blue-react 8.6.2 → 8.7.0
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/Layout.js +11 -1
- package/dist/components/Modal.js +5 -2
- package/dist/components/ModalProvider.js +18 -9
- package/dist/components/Search.js +18 -7
- package/dist/style.css +24 -15
- package/dist/style.min.css +4 -4
- package/dist/style.scss +1 -1
- package/dist/styles/_action-menu.scss +1 -1
- package/dist/styles/_search.scss +1 -0
- package/dist/styles/_variables.scss +1 -1
- package/dist/styles/mixins/_action-menu.scss +2 -2
- package/dist/styles/mixins/_sidebar.scss +5 -1
- package/dist/types/components/Layout.d.ts +9 -1
- package/dist/types/components/Modal.d.ts +3 -2
- package/dist/types/components/ModalProvider.d.ts +3 -3
- package/package.json +1 -1
package/dist/style.scss
CHANGED
package/dist/styles/_search.scss
CHANGED
|
@@ -110,6 +110,6 @@ $scrollbar-size: 10px;
|
|
|
110
110
|
--blue-app-bg: var(--blue-theme, #{$app-bg});
|
|
111
111
|
--blue-sidebar-bg: var(--blue-theme, #{$sidebar-bg});
|
|
112
112
|
--blue-header-bg: var(--blue-theme, #{$header-bg});
|
|
113
|
-
--action-link-bg-color: var(--blue-theme);
|
|
113
|
+
--blue-action-link-bg-color: var(--blue-theme);
|
|
114
114
|
--blue-menu-item-indicator-bg: #{$sidebar-indicator-color};
|
|
115
115
|
}
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
@mixin actions($breakpoint) {
|
|
11
11
|
@media screen and (max-width: $breakpoint + 1px) {
|
|
12
12
|
&.open {
|
|
13
|
-
--action-link-bg-color: #{darken($theme, 30%)};
|
|
13
|
+
--blue-action-link-bg-color: #{darken($theme, 30%)};
|
|
14
14
|
|
|
15
15
|
display: block;
|
|
16
|
-
background-color: var(--action-link-bg-color);
|
|
16
|
+
background-color: var(--blue-action-link-bg-color);
|
|
17
17
|
width: 100%;
|
|
18
18
|
position: absolute;
|
|
19
19
|
z-index: 1;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
@mixin openSidebarMenu() {
|
|
2
|
-
.blue-sidebar-hidden-on-open
|
|
2
|
+
.blue-sidebar-hidden-on-open,
|
|
3
|
+
.blue-sidebar-before-hidden-on-open::before,
|
|
4
|
+
.blue-sidebar-after-hidden-on-open::after,
|
|
5
|
+
.blue-sidebar-pseudo-hidden-on-open::before,
|
|
6
|
+
.blue-sidebar-pseudo-hidden-on-open::after {
|
|
3
7
|
display: none;
|
|
4
8
|
}
|
|
5
9
|
|
|
@@ -7,7 +7,15 @@ declare global {
|
|
|
7
7
|
}
|
|
8
8
|
export interface LayoutProps {
|
|
9
9
|
id?: string;
|
|
10
|
+
/**
|
|
11
|
+
* By default, the side bar is "in".
|
|
12
|
+
* You can control the state from outside, by also using `onChangeSidebarIn`.
|
|
13
|
+
*/
|
|
10
14
|
sidebarIn?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* React to changes of the `sidebarIn` state.
|
|
17
|
+
*/
|
|
18
|
+
onChangeSidebarIn?: (sidebarIn: boolean) => void;
|
|
11
19
|
style?: CSSProperties;
|
|
12
20
|
/**
|
|
13
21
|
* Sidebar is automatically expanded on wider views.
|
|
@@ -62,7 +70,7 @@ export interface LayoutProps {
|
|
|
62
70
|
children?: any;
|
|
63
71
|
}
|
|
64
72
|
export interface LayoutState {
|
|
65
|
-
sidebarIn
|
|
73
|
+
sidebarIn: boolean;
|
|
66
74
|
match: any;
|
|
67
75
|
history: string[];
|
|
68
76
|
hash: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
2
|
import { ModalType } from "./shared";
|
|
3
3
|
export interface ModalProps {
|
|
4
4
|
modalContent?: string;
|
|
5
5
|
modalTitle?: string;
|
|
6
|
+
modalIcon?: ReactNode;
|
|
6
7
|
unSetModalContent: (modalContent?: string) => void;
|
|
7
8
|
/**
|
|
8
9
|
* Type of `input` depends on `type` prop and which action occured.
|
|
@@ -22,4 +23,4 @@ export interface ModalProps {
|
|
|
22
23
|
*
|
|
23
24
|
* For easy use, you should use the hook `useModal` together with `ModalProvider`. See the example there.
|
|
24
25
|
*/
|
|
25
|
-
export default function Modal({ modalContent, modalTitle, unSetModalContent, onSubmit, defaultInput, type }: ModalProps): JSX.Element;
|
|
26
|
+
export default function Modal({ modalContent, modalTitle, modalIcon, unSetModalContent, onSubmit, defaultInput, type }: ModalProps): 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) => Promise<string | boolean>;
|
|
8
|
-
tell: (text: string, title?: string) => Promise<boolean>;
|
|
9
|
-
verify: (text: string, title?: string) => Promise<boolean>;
|
|
7
|
+
ask: (text: string, title?: string, icon?: ReactNode) => Promise<string | boolean>;
|
|
8
|
+
tell: (text: string, title?: string, icon?: ReactNode) => Promise<boolean>;
|
|
9
|
+
verify: (text: string, title?: string, icon?: ReactNode) => Promise<boolean>;
|
|
10
10
|
};
|
|
11
11
|
export { ModalProvider, useModal };
|