blue-react 7.9.1 → 8.0.0-next.4
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/README.md +22 -3
- package/dist/components/ActionMenu.js +8 -10
- package/dist/components/ActionMenuSwitch.js +2 -2
- package/dist/components/Body.js +1 -1
- package/dist/components/Grid.js +276 -287
- package/dist/components/Header.js +2 -2
- package/dist/components/HeaderTitle.js +6 -6
- package/dist/components/Intro.js +1 -12
- package/dist/components/Layout.js +295 -0
- package/dist/components/MenuItem.js +14 -10
- package/dist/components/Modal.js +16 -9
- package/dist/components/ModalProvider.js +11 -2
- package/dist/components/Outside.js +0 -4
- package/dist/components/Page.js +2 -7
- package/dist/components/Search.js +7 -7
- package/dist/components/SidebarMenu.js +7 -14
- package/dist/components/Status.js +67 -0
- package/dist/components/{DropdownMenuItem.js → StatusProvider.js} +54 -53
- package/dist/components/Utilities.js +11 -29
- package/dist/style.css +688 -621
- package/dist/style.min.css +5 -5
- package/dist/style.scss +1 -2
- package/dist/styles/_action-menu.scss +9 -9
- package/dist/styles/_general.scss +5 -5
- package/dist/styles/_grid.scss +56 -62
- package/dist/styles/_keyframes.scss +1 -1
- package/dist/styles/_mixins.scss +0 -1
- package/dist/styles/_search.scss +9 -9
- package/dist/styles/_status.scss +14 -14
- package/dist/styles/_variables.scss +6 -0
- package/dist/styles/mixins/_action-menu.scss +7 -7
- package/dist/styles/mixins/_sidebar.scss +22 -22
- package/dist/types/components/Grid.d.ts +12 -14
- package/dist/types/components/Layout.d.ts +111 -0
- package/dist/types/components/MenuItem.d.ts +4 -0
- package/dist/types/components/Modal.d.ts +1 -1
- package/dist/types/components/ModalProvider.d.ts +5 -2
- package/dist/types/components/SidebarMenu.d.ts +1 -5
- package/dist/types/components/Status.d.ts +12 -0
- package/dist/types/components/StatusProvider.d.ts +15 -0
- package/dist/types/components/Utilities.d.ts +0 -12
- package/dist/types/components/shared.d.ts +8 -0
- package/index.d.ts +6 -18
- package/index.js +4 -10
- package/package.json +7 -7
- package/dist/components/ActionMenuItem.js +0 -42
- package/dist/components/Actions.js +0 -107
- package/dist/components/BlueModal.js +0 -147
- package/dist/components/BlueModalProvider.js +0 -133
- package/dist/components/FluentBtn.js +0 -31
- package/dist/components/HeaderActions.js +0 -17
- package/dist/styles/_actions.scss +0 -137
- package/dist/styles/_ripple.scss +0 -30
- package/dist/styles/mixins/_actions.scss +0 -55
- package/dist/types/components/ActionMenuItem.d.ts +0 -41
- package/dist/types/components/Actions.d.ts +0 -31
- package/dist/types/components/BlueModal.d.ts +0 -14
- package/dist/types/components/BlueModalProvider.d.ts +0 -8
- package/dist/types/components/DropdownMenuItem.d.ts +0 -13
- package/dist/types/components/FluentBtn.d.ts +0 -26
- package/dist/types/components/HeaderActions.d.ts +0 -15
|
@@ -1,69 +1,69 @@
|
|
|
1
1
|
@mixin openSidebarMenu() {
|
|
2
|
-
.blue-
|
|
2
|
+
.blue-sidebar-hidden-on-open {
|
|
3
3
|
display: none;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.blue-
|
|
6
|
+
.blue-sidebar-visible-on-open {
|
|
7
7
|
animation: fade-in 1s;
|
|
8
8
|
display: flex;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.blue-
|
|
11
|
+
.blue-menu-item-label {
|
|
12
12
|
display: inline-block;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.blue-
|
|
15
|
+
.blue-sidebar {
|
|
16
16
|
z-index: 42;
|
|
17
17
|
box-shadow: 0.6rem 6rem 6rem rgba(0, 0, 0, 0.4);
|
|
18
18
|
// background-color: darken($theme, 30%);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.blue-
|
|
22
|
-
.blue-
|
|
21
|
+
.blue-sidebar,
|
|
22
|
+
.blue-sidebar .blue-menu-item {
|
|
23
23
|
width: $bla-sidebar-width;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.blue-
|
|
26
|
+
.blue-sidebar .blue-menu-item {
|
|
27
27
|
& > * {
|
|
28
28
|
width: auto;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
.blue-
|
|
32
|
+
.blue-sub-sidebar {
|
|
33
33
|
left: $bla-sidebar-width;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
.blue-
|
|
36
|
+
.blue-menu-item-dropdown-caret.caret {
|
|
37
37
|
display: flex;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.blue-
|
|
41
|
-
.blue-
|
|
40
|
+
.blue-menu-item-dropdown {
|
|
41
|
+
.blue-menu-item {
|
|
42
42
|
width: 100%;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/* search */
|
|
47
|
-
.blue-
|
|
47
|
+
.blue-search {
|
|
48
48
|
background-color: $sidebar-search-bg;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
.blue-
|
|
51
|
+
.blue-search-btn {
|
|
52
52
|
display: none;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
.blue-
|
|
55
|
+
.blue-search-input-group {
|
|
56
56
|
display: flex;
|
|
57
57
|
align-items: center;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
.blue-
|
|
60
|
+
.blue-header-logo.sidebar {
|
|
61
61
|
transform: translateX(0);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
@mixin blue-
|
|
66
|
-
.blue-
|
|
65
|
+
@mixin blue-sidebar($width) {
|
|
66
|
+
.blue-menu-item {
|
|
67
67
|
color: $sidebar-color;
|
|
68
68
|
width: $normal-size;
|
|
69
69
|
height: $normal-size;
|
|
@@ -94,12 +94,12 @@
|
|
|
94
94
|
animation: sidebar-menu-item-indicator-in 0.2s ease-in-out;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
& > * + .blue-
|
|
97
|
+
& > * + .blue-menu-item-label {
|
|
98
98
|
margin-left: 0.5rem;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
.blue-
|
|
102
|
+
.blue-sidebar {
|
|
103
103
|
width: $width;
|
|
104
104
|
color: $sidebar-color;
|
|
105
105
|
background: var(--sidebar-bg);
|
|
@@ -112,19 +112,19 @@
|
|
|
112
112
|
flex-direction: column;
|
|
113
113
|
@include slide-transition();
|
|
114
114
|
|
|
115
|
-
.blue-
|
|
115
|
+
.blue-menu {
|
|
116
116
|
overflow-y: auto;
|
|
117
117
|
flex: 1;
|
|
118
118
|
@include scroll-shadow(var(--sidebar-bg), $sidebar-bg);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
&:hover {
|
|
122
|
-
.blue-
|
|
122
|
+
.blue-menu-item {
|
|
123
123
|
background-color: var(--sidebar-bg);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
.blue-
|
|
127
|
+
.blue-menu-item {
|
|
128
128
|
& > * {
|
|
129
129
|
width: 100%;
|
|
130
130
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Component, CSSProperties } from "react";
|
|
2
2
|
declare global {
|
|
3
3
|
interface Window {
|
|
4
|
-
|
|
4
|
+
blueLayoutRef: any;
|
|
5
5
|
toggleSidebarEvent: any;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
export interface
|
|
8
|
+
export interface LayoutProps {
|
|
9
9
|
id?: string;
|
|
10
10
|
sidebarIn?: boolean;
|
|
11
11
|
style?: CSSProperties;
|
|
@@ -56,11 +56,11 @@ export interface GridProps {
|
|
|
56
56
|
disableHeaders?: boolean;
|
|
57
57
|
/**
|
|
58
58
|
* Define a function, that will be fired when switching routes. When your function returns `true`, the default route behaviour will be blocked.
|
|
59
|
-
* You can use something like `window.
|
|
59
|
+
* You can use something like `window.blueLayoutRef.setState({ blockRouting: onHashChange })` globally to set the value from anywhere in your app.
|
|
60
60
|
*/
|
|
61
61
|
blockRouting?: (newMatch: string[], currentMatch: string[]) => void | boolean;
|
|
62
62
|
}
|
|
63
|
-
export interface
|
|
63
|
+
export interface LayoutState {
|
|
64
64
|
sidebarIn?: boolean;
|
|
65
65
|
match: any;
|
|
66
66
|
history: string[];
|
|
@@ -69,23 +69,22 @@ export interface GridState {
|
|
|
69
69
|
blockRouting?: (newMatch: string[], currentMatch: string[]) => void | boolean;
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
|
-
* The main component. As soon this component is mounted, it is globally available under `window.
|
|
73
|
-
* Also you can append your own event listeners with `
|
|
74
|
-
* and remove it with `blueGridRef.removeEventListener(eventName, listener)`.
|
|
72
|
+
* The main component. As soon this component is mounted, it is globally available under `window.blueLayoutRef`.
|
|
73
|
+
* Also you can append your own event listeners with `blueLayoutRef.addEventListener(eventName, (prevProps, prevState) => { })`.
|
|
75
74
|
*
|
|
76
75
|
* Allowed event listeners:
|
|
77
76
|
*
|
|
78
77
|
* * **componentDidUpdate** - Component was updated.
|
|
79
|
-
* Example: `
|
|
78
|
+
* Example: `blueLayoutRef.addEventListener("componentDidUpdate", (prevProps, prevState) => { })`
|
|
80
79
|
* * **pageDidShowAgain** - Page appeared again with the same old state. In the callback function you can reinitialize things.
|
|
81
|
-
* Example: `
|
|
80
|
+
* Example: `blueLayoutRef.addEventListener("pageDidShowAgain", "home", (prevProps, prevState) => { })`
|
|
82
81
|
* * **pageDidHide** - This page disappeared and another page appears instead.
|
|
83
|
-
* Example: `
|
|
82
|
+
* Example: `blueLayoutRef.addEventListener("pageDidHide", "home", (prevProps, prevState) => { })`
|
|
84
83
|
*/
|
|
85
|
-
export default class
|
|
84
|
+
export default class Layout extends Component<LayoutProps, LayoutState> {
|
|
86
85
|
defaultMatch: string[];
|
|
87
86
|
eventListeners: any[];
|
|
88
|
-
constructor(props:
|
|
87
|
+
constructor(props: LayoutProps);
|
|
89
88
|
onHashChange(event: HashChangeEvent): void;
|
|
90
89
|
static get defaultProps(): {
|
|
91
90
|
expandSidebar: boolean;
|
|
@@ -102,11 +101,10 @@ export default class Grid extends Component<GridProps, GridState> {
|
|
|
102
101
|
};
|
|
103
102
|
componentDidMount(): void;
|
|
104
103
|
componentWillUnmount(): void;
|
|
105
|
-
componentDidUpdate(prevProps:
|
|
104
|
+
componentDidUpdate(prevProps: LayoutProps, prevState: LayoutState): void;
|
|
106
105
|
toggleSidebar(event: any): void;
|
|
107
106
|
hideSidebar(e: any): void;
|
|
108
107
|
initMatch(): void;
|
|
109
108
|
addEventListener(param1: any, param2: any, param3: any): void;
|
|
110
|
-
removeEventListener(type: string, listener: any): void;
|
|
111
109
|
render(): JSX.Element;
|
|
112
110
|
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Component, CSSProperties } from "react";
|
|
2
|
+
declare global {
|
|
3
|
+
interface Window {
|
|
4
|
+
blueLayoutRef: any;
|
|
5
|
+
toggleSidebarEvent: any;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export interface LayoutProps {
|
|
9
|
+
id?: string;
|
|
10
|
+
sidebarIn?: boolean;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
/**
|
|
13
|
+
* Sidebar is automatically expanded on wider views.
|
|
14
|
+
*/
|
|
15
|
+
expandSidebar?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Disables sidebar.
|
|
18
|
+
*/
|
|
19
|
+
hideSidebarMenu?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Registers pages for the built-in routing system. Example: `[{name: "home", component: <HomePage />}]`
|
|
22
|
+
*/
|
|
23
|
+
pages?: {
|
|
24
|
+
name: string;
|
|
25
|
+
component: JSX.Element;
|
|
26
|
+
}[];
|
|
27
|
+
/**
|
|
28
|
+
* When `true`, always the "home" route will be rendered.
|
|
29
|
+
*/
|
|
30
|
+
unrouteable?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Extends `className`.
|
|
33
|
+
*/
|
|
34
|
+
className?: string;
|
|
35
|
+
/**
|
|
36
|
+
* By default, the document title will automatically set. Set this prop to `true` to disable this behaviour.
|
|
37
|
+
*/
|
|
38
|
+
disableTitleSet?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* If you don't use blueicon, you can define another icon element for the sidebar toggle button.
|
|
41
|
+
*/
|
|
42
|
+
sidebarToggleIconComponent?: any;
|
|
43
|
+
/**
|
|
44
|
+
* Will replace status icons with custom ones. This will also overwrite the `useBlueicons` option.
|
|
45
|
+
* This can be a SVG component or a normal element component.
|
|
46
|
+
*/
|
|
47
|
+
statusIcons?: {
|
|
48
|
+
danger: any;
|
|
49
|
+
info: any;
|
|
50
|
+
success: any;
|
|
51
|
+
warning: any;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Disables the header bars on pages.
|
|
55
|
+
*/
|
|
56
|
+
disableHeaders?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Define a function, that will be fired when switching routes. When your function returns `true`, the default route behaviour will be blocked.
|
|
59
|
+
* You can use something like `window.blueLayoutRef.setState({ blockRouting: onHashChange })` globally to set the value from anywhere in your app.
|
|
60
|
+
*/
|
|
61
|
+
blockRouting?: (newMatch: string[], currentMatch: string[]) => void | boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface LayoutState {
|
|
64
|
+
sidebarIn?: boolean;
|
|
65
|
+
match: any;
|
|
66
|
+
history: string[];
|
|
67
|
+
hash: string;
|
|
68
|
+
hashHistory: string[];
|
|
69
|
+
blockRouting?: (newMatch: string[], currentMatch: string[]) => void | boolean;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The main component. As soon this component is mounted, it is globally available under `window.blueLayoutRef`.
|
|
73
|
+
* Also you can append your own event listeners with `blueLayoutRef.addEventListener(eventName, (prevProps, prevState) => { })`.
|
|
74
|
+
*
|
|
75
|
+
* Allowed event listeners:
|
|
76
|
+
*
|
|
77
|
+
* * **componentDidUpdate** - Component was updated.
|
|
78
|
+
* Example: `blueLayoutRef.addEventListener("componentDidUpdate", (prevProps, prevState) => { })`
|
|
79
|
+
* * **pageDidShowAgain** - Page appeared again with the same old state. In the callback function you can reinitialize things.
|
|
80
|
+
* Example: `blueLayoutRef.addEventListener("pageDidShowAgain", "home", (prevProps, prevState) => { })`
|
|
81
|
+
* * **pageDidHide** - This page disappeared and another page appears instead.
|
|
82
|
+
* Example: `blueLayoutRef.addEventListener("pageDidHide", "home", (prevProps, prevState) => { })`
|
|
83
|
+
*/
|
|
84
|
+
export default class Layout extends Component<LayoutProps, LayoutState> {
|
|
85
|
+
defaultMatch: string[];
|
|
86
|
+
eventListeners: any[];
|
|
87
|
+
constructor(props: LayoutProps);
|
|
88
|
+
onHashChange(): void;
|
|
89
|
+
static get defaultProps(): {
|
|
90
|
+
expandSidebar: boolean;
|
|
91
|
+
hideSidebarMenu: boolean;
|
|
92
|
+
unrouteable: boolean;
|
|
93
|
+
disableTitleSet: boolean;
|
|
94
|
+
sidebarToggleIconComponent: JSX.Element;
|
|
95
|
+
statusIcons: {
|
|
96
|
+
danger: JSX.Element;
|
|
97
|
+
info: JSX.Element;
|
|
98
|
+
success: JSX.Element;
|
|
99
|
+
warning: JSX.Element;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
componentDidMount(): void;
|
|
103
|
+
componentWillUnmount(): void;
|
|
104
|
+
componentDidUpdate(prevProps: LayoutProps, prevState: LayoutState): void;
|
|
105
|
+
toggleSidebar(event: any): void;
|
|
106
|
+
hideSidebar(e: any): void;
|
|
107
|
+
initMatch(): void;
|
|
108
|
+
addEventListener(param1: any, param2: any, param3: any): void;
|
|
109
|
+
removeEventListener(type: string, listener: any): void;
|
|
110
|
+
render(): JSX.Element;
|
|
111
|
+
}
|
|
@@ -10,6 +10,10 @@ export interface MenuItemProps {
|
|
|
10
10
|
exact?: boolean;
|
|
11
11
|
href?: string;
|
|
12
12
|
onClick?: (event: React.MouseEvent) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Will be fired after `onClick`
|
|
15
|
+
*/
|
|
16
|
+
onClickAttached?: (event: React.MouseEvent) => void;
|
|
13
17
|
/**
|
|
14
18
|
* Icon component or a class name.
|
|
15
19
|
*/
|
|
@@ -19,6 +19,6 @@ export interface ModalProps {
|
|
|
19
19
|
* Simple modal/dialog. Designed to work as an alternative to JavaScript's native `alert()`, `prompt()` and `confirm()` functions.
|
|
20
20
|
* It uses Bootstrap's Modal components.
|
|
21
21
|
*
|
|
22
|
-
* For easy use, you should use the hook `useModal` together with `ModalProvider`. See the example
|
|
22
|
+
* For easy use, you should use the hook `useModal` together with `ModalProvider`. See the example there.
|
|
23
23
|
*/
|
|
24
24
|
export default function Modal({ modalContent, unSetModalContent, onSubmit, defaultInput, type }: ModalProps): JSX.Element;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface ModalProviderProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
declare const ModalProvider: ({ children, ...rest }: ModalProviderProps) => JSX.Element;
|
|
3
6
|
declare const useModal: () => {
|
|
4
7
|
ask: (text: string) => Promise<string | boolean>;
|
|
5
8
|
tell: (text: string) => Promise<boolean>;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export interface SidebarMenuProps {
|
|
3
|
-
/**
|
|
4
|
-
* Should menu items have a Fluent effect. Default: `true`
|
|
5
|
-
*/
|
|
6
|
-
fluent?: boolean;
|
|
7
3
|
/**
|
|
8
4
|
* Extends the class name by the sidebar.
|
|
9
5
|
*/
|
|
@@ -31,6 +27,6 @@ export interface SidebarMenuProps {
|
|
|
31
27
|
children?: any;
|
|
32
28
|
}
|
|
33
29
|
/**
|
|
34
|
-
* Sidebar for the `
|
|
30
|
+
* Sidebar for the `Layout` component.
|
|
35
31
|
*/
|
|
36
32
|
export default function SidebarMenu(props: SidebarMenuProps): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { StatusAlert, StatusType } from "./shared";
|
|
3
|
+
export interface StatusProps {
|
|
4
|
+
alert?: StatusAlert;
|
|
5
|
+
onUnsetAlert?: () => void;
|
|
6
|
+
successIcon?: ReactNode;
|
|
7
|
+
infoIcon?: ReactNode;
|
|
8
|
+
warningIcon?: ReactNode;
|
|
9
|
+
dangerIcon?: ReactNode;
|
|
10
|
+
status?: StatusType;
|
|
11
|
+
}
|
|
12
|
+
export default function Status({ alert, onUnsetAlert, successIcon, infoIcon, warningIcon, dangerIcon, status }: StatusProps): JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { StatusAlert, StatusType } from "./shared";
|
|
3
|
+
export interface StatusProviderProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
successIcon?: ReactNode;
|
|
6
|
+
infoIcon?: ReactNode;
|
|
7
|
+
warningIcon?: ReactNode;
|
|
8
|
+
dangerIcon?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const StatusProvider: ({ children, successIcon, infoIcon, warningIcon, dangerIcon, ...rest }: StatusProviderProps) => JSX.Element;
|
|
11
|
+
declare const useStatus: () => {
|
|
12
|
+
setAlert: (alert: StatusAlert | null) => void;
|
|
13
|
+
setStatus: (status: StatusType) => void;
|
|
14
|
+
};
|
|
15
|
+
export { useStatus, StatusProvider };
|
|
@@ -13,17 +13,5 @@ declare namespace Utilities {
|
|
|
13
13
|
function setAlertMessage(message: any, alertClassName?: string, close?: any, detailText?: any): void;
|
|
14
14
|
function guid(): string;
|
|
15
15
|
function scrollToTop(): void;
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated Fluent buttons got removed from blue-react.
|
|
18
|
-
*/
|
|
19
|
-
function fluentBtnsListener(event: any, btn: any): void;
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated Fluent buttons got removed from blue-react.
|
|
22
|
-
*/
|
|
23
|
-
function unregisterFluentBtns(): void;
|
|
24
|
-
/**
|
|
25
|
-
* @deprecated Fluent buttons got removed from blue-react.
|
|
26
|
-
*/
|
|
27
|
-
function registerFluentBtns(): void;
|
|
28
16
|
function fetchData(input: any, init?: any, showErrorDetail?: boolean, onError?: any): Promise<Response>;
|
|
29
17
|
}
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
export declare type breakOption = "sm" | "md" | "lg" | "xl";
|
|
2
2
|
export declare type ModalType = "ask" | "tell" | "verify";
|
|
3
|
+
export declare type StatusType = null | "loading" | "success" | "info" | "warning" | "danger";
|
|
4
|
+
export interface StatusAlert {
|
|
5
|
+
title?: string;
|
|
6
|
+
alertClassName?: string;
|
|
7
|
+
close?: boolean;
|
|
8
|
+
detailText?: string;
|
|
9
|
+
status?: StatusType;
|
|
10
|
+
}
|
|
3
11
|
interface Phrases {
|
|
4
12
|
[key: string]: string[];
|
|
5
13
|
}
|
package/index.d.ts
CHANGED
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
interface Window {
|
|
3
|
-
|
|
3
|
+
blueLayoutRef: any
|
|
4
4
|
toggleSidebarEvent: any
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
export default global
|
|
8
8
|
|
|
9
|
-
export { default as
|
|
10
|
-
export {
|
|
9
|
+
export { default as Layout } from "./dist/types/components/Layout"
|
|
10
|
+
export { LayoutProps } from "./dist/types/components/Layout"
|
|
11
11
|
|
|
12
12
|
export { default as ActionMenu } from "./dist/types/components/ActionMenu"
|
|
13
13
|
export { ActionMenuProps } from "./dist/types/components/ActionMenu"
|
|
14
14
|
|
|
15
|
-
export { default as ActionMenuItem } from "./dist/types/components/ActionMenuItem"
|
|
16
|
-
export { ActionMenuItemProps } from "./dist/types/components/ActionMenuItem"
|
|
17
|
-
|
|
18
15
|
export { default as ActionMenuSwitch } from "./dist/types/components/ActionMenuSwitch"
|
|
19
16
|
export { ActionMenuSwitchProps } from "./dist/types/components/ActionMenuSwitch"
|
|
20
17
|
|
|
21
|
-
export { default as Actions } from "./dist/types/components/Actions"
|
|
22
|
-
export { ActionsProps } from "./dist/types/components/Actions"
|
|
23
|
-
|
|
24
18
|
export { default as Body } from "./dist/types/components/Body"
|
|
25
19
|
export { BodyProps } from "./dist/types/components/Body"
|
|
26
20
|
|
|
@@ -33,18 +27,9 @@ export { CaretProps } from "./dist/types/components/Caret"
|
|
|
33
27
|
export { default as DocumentView } from "./dist/types/components/DocumentView"
|
|
34
28
|
export { DocumentViewProps } from "./dist/types/components/DocumentView"
|
|
35
29
|
|
|
36
|
-
export { default as DropdownMenuItem } from "./dist/types/components/DropdownMenuItem"
|
|
37
|
-
export { DropdownMenuItemProps } from "./dist/types/components/DropdownMenuItem"
|
|
38
|
-
|
|
39
|
-
export { default as FluentBtn } from "./dist/types/components/FluentBtn"
|
|
40
|
-
export { FluentBtnProps } from "./dist/types/components/FluentBtn"
|
|
41
|
-
|
|
42
30
|
export { default as Header } from "./dist/types/components/Header"
|
|
43
31
|
export { HeaderProps } from "./dist/types/components/Header"
|
|
44
32
|
|
|
45
|
-
export { default as HeaderActions } from "./dist/types/components/HeaderActions"
|
|
46
|
-
export { HeaderActionsProps } from "./dist/types/components/HeaderActions"
|
|
47
|
-
|
|
48
33
|
export { default as HeaderTitle } from "./dist/types/components/HeaderTitle"
|
|
49
34
|
export { HeaderTitleProps } from "./dist/types/components/HeaderTitle"
|
|
50
35
|
|
|
@@ -71,6 +56,9 @@ export { SearchProps } from "./dist/types/components/Search"
|
|
|
71
56
|
export { default as SidebarMenu } from "./dist/types/components/SidebarMenu"
|
|
72
57
|
export { SidebarMenuProps } from "./dist/types/components/SidebarMenu"
|
|
73
58
|
|
|
59
|
+
export { default as Status } from "./dist/types/components/Status"
|
|
60
|
+
export { StatusProps } from "./dist/types/components/Status"
|
|
61
|
+
|
|
74
62
|
export { default as Switch } from "./dist/types/components/Switch"
|
|
75
63
|
export { SwitchProps } from "./dist/types/components/Switch"
|
|
76
64
|
|
package/index.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
exports.Actions = require("./dist/components/Actions.js")["default"]
|
|
2
1
|
exports.ActionMenu = require("./dist/components/ActionMenu.js")["default"]
|
|
3
|
-
exports.ActionMenuItem = require("./dist/components/ActionMenuItem.js")[
|
|
4
|
-
"default"
|
|
5
|
-
]
|
|
6
2
|
exports.ActionMenuSwitch = require("./dist/components/ActionMenuSwitch.js")[
|
|
7
3
|
"default"
|
|
8
4
|
]
|
|
@@ -10,10 +6,8 @@ exports.Body = require("./dist/components/Body.js")["default"]
|
|
|
10
6
|
exports.BodyRounded = require("./dist/components/BodyRounded.js")["default"]
|
|
11
7
|
exports.Caret = require("./dist/components/Caret.js")["default"]
|
|
12
8
|
exports.DocumentView = require("./dist/components/DocumentView.js")["default"]
|
|
13
|
-
exports.
|
|
14
|
-
exports.Grid = require("./dist/components/Grid.js")["default"]
|
|
9
|
+
exports.Layout = require("./dist/components/Layout.js")["default"]
|
|
15
10
|
exports.Header = require("./dist/components/Header.js")["default"]
|
|
16
|
-
exports.HeaderActions = require("./dist/components/HeaderActions.js")["default"]
|
|
17
11
|
exports.HeaderTitle = require("./dist/components/HeaderTitle.js")["default"]
|
|
18
12
|
exports.Intro = require("./dist/components/Intro.js")["default"]
|
|
19
13
|
exports.MenuItem = require("./dist/components/MenuItem.js")["default"]
|
|
@@ -26,8 +20,8 @@ exports.Outside = require("./dist/components/Outside.js")["default"]
|
|
|
26
20
|
exports.Page = require("./dist/components/Page.js")["default"]
|
|
27
21
|
exports.Search = require("./dist/components/Search.js")["default"]
|
|
28
22
|
exports.SidebarMenu = require("./dist/components/SidebarMenu.js")["default"]
|
|
23
|
+
exports.Status = require("./dist/components/Status.js")["default"]
|
|
24
|
+
exports.StatusProvider = require("./dist/components/StatusProvider.js")["StatusProvider"]
|
|
25
|
+
exports.useStatus = require("./dist/components/StatusProvider.js")["useStatus"]
|
|
29
26
|
exports.Switch = require("./dist/components/Switch.js")["default"]
|
|
30
|
-
exports.DropdownMenuItem = require("./dist/components/DropdownMenuItem.js")[
|
|
31
|
-
"default"
|
|
32
|
-
]
|
|
33
27
|
exports.Utilities = require("./dist/components/Utilities.js")["default"]
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blue-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-next.4",
|
|
4
4
|
"description": "Blue React Components",
|
|
5
5
|
"license": "LGPL-3.0-or-later",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"types": "index.d.ts",
|
|
8
|
-
"homepage": "https://bruegmann.github.io/blue-react/
|
|
8
|
+
"homepage": "https://bruegmann.github.io/blue-react/v8",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "https://github.com/bruegmann/blue-react.git"
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
"build": "babel ./src/components --out-dir ./dist/components --extensions \".tsx,.js,.ts\"",
|
|
21
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
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 --
|
|
23
|
+
"docgen": "react-docgen ./src/components/ -o ./src/docs/data/docs.json --exclude Utilities.js --extension tsx && node followUpDocs",
|
|
24
24
|
"test": "react-scripts test",
|
|
25
25
|
"eject": "react-scripts eject",
|
|
26
26
|
"predeploy": "npm run build-docs",
|
|
27
|
-
"deploy": "gh-pages --dist build --dest
|
|
27
|
+
"deploy": "gh-pages --dist build --dest v8",
|
|
28
28
|
"prepublishOnly": "npm i && npm run build-release",
|
|
29
|
-
"release": "npm publish && npm run deploy",
|
|
29
|
+
"release": "npm publish --tag next && npm run deploy",
|
|
30
30
|
"prettier": "npx prettier --write ."
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@popperjs/core": "^2.10.
|
|
34
|
-
"bootstrap": "
|
|
33
|
+
"@popperjs/core": "^2.10.2",
|
|
34
|
+
"bootstrap": "^5.1.3",
|
|
35
35
|
"clsx": "^1.1.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = ActionMenuItem;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _MenuItem = _interopRequireDefault(require("./MenuItem"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @deprecated This is just an alias for `MenuItem`, so you should use that component instead.
|
|
18
|
-
* If you need the older `ActionMenuItem`, make sure to the prop `useDeprecated`.
|
|
19
|
-
* List Item and Link for the current Action Menu.
|
|
20
|
-
*/
|
|
21
|
-
function ActionMenuItem(props) {
|
|
22
|
-
if (props.useDeprecated) {
|
|
23
|
-
var _props = {};
|
|
24
|
-
Object.keys(props).map(function (key) {
|
|
25
|
-
if (key !== "navItemClassName" && key !== "icon" && key !== "label") {
|
|
26
|
-
_props[key] = props[key];
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
return /*#__PURE__*/_react.default.createElement("li", {
|
|
30
|
-
className: "nav-item " + props.navItemClassName
|
|
31
|
-
}, /*#__PURE__*/_react.default.createElement("a", _extends({}, _props, {
|
|
32
|
-
href: props.href,
|
|
33
|
-
className: "nav-link blue-app-actions-menu-item " + props.className
|
|
34
|
-
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
35
|
-
className: props.icon
|
|
36
|
-
}), props.label && /*#__PURE__*/_react.default.createElement("span", {
|
|
37
|
-
className: "blue-app-actions-label"
|
|
38
|
-
}, props.icon && /*#__PURE__*/_react.default.createElement("span", null, "\xA0"), props.label)));
|
|
39
|
-
} else {
|
|
40
|
-
return /*#__PURE__*/_react.default.createElement(_MenuItem.default, props);
|
|
41
|
-
}
|
|
42
|
-
}
|