blue-react 10.0.0-rc1 → 10.0.0-rc2
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 +4 -0
- package/dist/components/A.js +8 -23
- package/dist/components/ActionMenu.js +33 -65
- package/dist/components/ActionMenuItem.js +12 -36
- package/dist/components/Body.js +13 -27
- package/dist/components/Caret.js +6 -9
- package/dist/components/Chevron.js +14 -24
- package/dist/components/HashRouter.js +23 -66
- package/dist/components/Header.js +3 -13
- package/dist/components/HeaderTitle.js +23 -42
- package/dist/components/IconMenuItem.js +17 -33
- package/dist/components/Intro.js +12 -22
- package/dist/components/Layout.js +27 -35
- package/dist/components/MenuItem.js +41 -83
- package/dist/components/Modal.js +53 -86
- package/dist/components/ModalProvider.js +70 -125
- package/dist/components/Outside.js +13 -29
- package/dist/components/Page.js +18 -44
- package/dist/components/Search.js +47 -85
- package/dist/components/SidebarMenu.js +8 -22
- package/dist/components/SidebarMenuItem.js +34 -65
- package/dist/components/SidebarToggler.js +12 -22
- package/dist/components/SlimContainer.js +6 -16
- package/dist/components/Status.js +33 -44
- package/dist/components/StatusProvider.js +28 -65
- package/dist/components/Switch.js +17 -23
- package/dist/components/ToastProvider.js +43 -83
- package/dist/components/Utilities.js +23 -45
- package/dist/components/shared.js +1 -11
- package/dist/style.scss +1 -1
- package/dist/types/components/A.d.ts +9 -9
- package/dist/types/components/ActionMenu.d.ts +25 -25
- package/dist/types/components/ActionMenuItem.d.ts +34 -35
- package/dist/types/components/Body.d.ts +20 -21
- package/dist/types/components/Caret.d.ts +18 -18
- package/dist/types/components/Chevron.d.ts +17 -17
- package/dist/types/components/HashRouter.d.ts +76 -77
- package/dist/types/components/Header.d.ts +8 -8
- package/dist/types/components/HeaderTitle.d.ts +39 -40
- package/dist/types/components/IconMenuItem.d.ts +18 -19
- package/dist/types/components/Intro.d.ts +22 -23
- package/dist/types/components/Layout.d.ts +9 -16
- package/dist/types/components/MenuItem.d.ts +149 -149
- package/dist/types/components/Modal.d.ts +30 -30
- package/dist/types/components/ModalProvider.d.ts +21 -21
- package/dist/types/components/Outside.d.ts +17 -17
- package/dist/types/components/Page.d.ts +11 -12
- package/dist/types/components/Search.d.ts +36 -36
- package/dist/types/components/SidebarMenu.d.ts +31 -32
- package/dist/types/components/SidebarMenuItem.d.ts +21 -22
- package/dist/types/components/SidebarToggler.d.ts +10 -10
- package/dist/types/components/SlimContainer.d.ts +10 -10
- package/dist/types/components/Status.d.ts +12 -12
- package/dist/types/components/StatusProvider.d.ts +15 -15
- package/dist/types/components/Switch.d.ts +33 -33
- package/dist/types/components/ToastProvider.d.ts +22 -22
- package/dist/types/components/Utilities.d.ts +41 -41
- package/dist/types/components/shared.d.ts +15 -15
- package/index.d.ts +8 -12
- package/index.js +56 -30
- package/package.json +25 -42
- package/dist/components/ActionMenuSwitch.js +0 -44
- package/dist/components/LegacyLayout.js +0 -367
- package/dist/components/LegacySidebarMenu.js +0 -74
- package/dist/style.css +0 -11944
- package/dist/style.min.css +0 -16
- package/dist/types/components/ActionMenuSwitch.d.ts +0 -12
- package/dist/types/components/LegacyLayout.d.ts +0 -145
- package/dist/types/components/LegacySidebarMenu.d.ts +0 -33
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import "blue-web/dist/js/side-layout";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
export interface LayoutProps {
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
header?: React.ReactNode;
|
|
13
|
-
side?: React.ReactNode;
|
|
14
|
-
pageBorder?: boolean;
|
|
15
|
-
}
|
|
16
|
-
export default function Layout({ children, header, side, pageBorder }: LayoutProps): JSX.Element;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "blue-web/dist/js/side-layout";
|
|
3
|
+
export interface LayoutProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
header?: React.ReactNode;
|
|
6
|
+
side?: React.ReactNode;
|
|
7
|
+
noPageBorder?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export default function Layout({ children, header, side, noPageBorder }: LayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,149 +1,149 @@
|
|
|
1
|
-
import React, { CSSProperties } from "react";
|
|
2
|
-
export interface MenuItemProps {
|
|
3
|
-
/**
|
|
4
|
-
* Sets `to` prop, e.g. when you use the `NavLink` component from React Router.
|
|
5
|
-
*/
|
|
6
|
-
to?: string;
|
|
7
|
-
/**
|
|
8
|
-
* Prop for components by React Router.
|
|
9
|
-
*/
|
|
10
|
-
exact?: boolean;
|
|
11
|
-
href?: string;
|
|
12
|
-
onClick?: (event: React.MouseEvent) => void;
|
|
13
|
-
/**
|
|
14
|
-
* Will be fired after `onClick`
|
|
15
|
-
*/
|
|
16
|
-
onClickAttached?: (event: React.MouseEvent) => void;
|
|
17
|
-
/**
|
|
18
|
-
* Icon component or a class name.
|
|
19
|
-
*/
|
|
20
|
-
icon?: any;
|
|
21
|
-
/**
|
|
22
|
-
* Addition to class name of icon wrapper element
|
|
23
|
-
*/
|
|
24
|
-
iconClassName?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Icon component or a class name when the MenuItem is active.
|
|
27
|
-
*/
|
|
28
|
-
iconForActive?: any;
|
|
29
|
-
/**
|
|
30
|
-
* Label of the link.
|
|
31
|
-
*/
|
|
32
|
-
label?: any;
|
|
33
|
-
/**
|
|
34
|
-
* Addition to class name of label wrapper element
|
|
35
|
-
*/
|
|
36
|
-
labelClassName?: string;
|
|
37
|
-
/**
|
|
38
|
-
* Addition to class name of caret
|
|
39
|
-
*/
|
|
40
|
-
caretClassName?: string;
|
|
41
|
-
/**
|
|
42
|
-
* Addition to style of caret
|
|
43
|
-
*/
|
|
44
|
-
caretStyle?: CSSProperties;
|
|
45
|
-
/**
|
|
46
|
-
* Should be set as active.
|
|
47
|
-
*/
|
|
48
|
-
isActive?: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Set true to highlight the current menu item.
|
|
51
|
-
*/
|
|
52
|
-
highlighted?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* When using Blue React's routing system: define this link as home page link.
|
|
55
|
-
*/
|
|
56
|
-
isHome?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Extends class name of the dropdown menu.
|
|
59
|
-
*/
|
|
60
|
-
dropdownClassName?: string;
|
|
61
|
-
/**
|
|
62
|
-
* Extends style of the dropdown menu.
|
|
63
|
-
*/
|
|
64
|
-
dropdownStyle?: CSSProperties;
|
|
65
|
-
/**
|
|
66
|
-
* Set children to create a nested `MenuItem` as a dropdown.
|
|
67
|
-
*/
|
|
68
|
-
children?: any;
|
|
69
|
-
/**
|
|
70
|
-
* Defines class name.
|
|
71
|
-
*/
|
|
72
|
-
className?: any;
|
|
73
|
-
/**
|
|
74
|
-
* Defines dropdown status from outside.
|
|
75
|
-
*/
|
|
76
|
-
showDropdown?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Callback when `showDropdown` changes.
|
|
79
|
-
*/
|
|
80
|
-
onShowDropdown?: (showDropdown: boolean) => void;
|
|
81
|
-
/**
|
|
82
|
-
* Close on click outside.
|
|
83
|
-
*/
|
|
84
|
-
supportOutside?: boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Overrides default class list to be ignored on click outside.
|
|
87
|
-
* Hint: If you want this menu item to stay open when others will open, set:
|
|
88
|
-
* `outsideIgnoreClasses={["blue-menu-item-wrapper"]}`.
|
|
89
|
-
*/
|
|
90
|
-
outsideIgnoreClasses?: string[];
|
|
91
|
-
/**
|
|
92
|
-
* By default, MenuItem is a `"button"`. If you set a `href`, it's a `"a"`.
|
|
93
|
-
* If you want to have it another type, you can pass a component reference with this prop (e.g. `Link`).
|
|
94
|
-
*/
|
|
95
|
-
elementType?: any;
|
|
96
|
-
target?: string;
|
|
97
|
-
rel?: string;
|
|
98
|
-
title?: string;
|
|
99
|
-
type?: string;
|
|
100
|
-
/**
|
|
101
|
-
* Fired on the draggable target (the source element): occurs when the user starts to drag an element
|
|
102
|
-
*/
|
|
103
|
-
onDragStart?: (event: React.DragEvent) => void | React.DragEventHandler;
|
|
104
|
-
/**
|
|
105
|
-
* Fired on the draggable target (the source element): occurs when an element is being dragged
|
|
106
|
-
*/
|
|
107
|
-
onDrag?: (event: React.DragEvent) => void | React.DragEventHandler;
|
|
108
|
-
/**
|
|
109
|
-
* Fired on the draggable target (the source element): occurs when the user has finished dragging the element
|
|
110
|
-
*/
|
|
111
|
-
onDragEnd?: (event: React.DragEvent) => void | React.DragEventHandler;
|
|
112
|
-
/**
|
|
113
|
-
* Fired on the drop target: occurs when the dragged element enters the drop target
|
|
114
|
-
*/
|
|
115
|
-
onDragEnter?: (event: React.DragEvent) => void | React.DragEventHandler;
|
|
116
|
-
/**
|
|
117
|
-
* Fired on the drop target: occurs when the dragged element is over the drop target
|
|
118
|
-
*/
|
|
119
|
-
onDragOver?: (event: React.DragEvent) => void | React.DragEventHandler;
|
|
120
|
-
/**
|
|
121
|
-
* Fired on the drop target: occurs when the dragged element leaves the drop target
|
|
122
|
-
*/
|
|
123
|
-
onDragLeave?: (event: React.DragEvent) => void | React.DragEventHandler;
|
|
124
|
-
/**
|
|
125
|
-
* Fired on the drop target: occurs when the dragged element is dropped on the drop target
|
|
126
|
-
*/
|
|
127
|
-
onDrop?: (event: React.DragEvent) => void | React.DragEventHandler;
|
|
128
|
-
/**
|
|
129
|
-
* Specifies whether an element is draggable or not.
|
|
130
|
-
*
|
|
131
|
-
* **Important:** To make draggable menu items work in Firefox, the elementType must not be `"button"`. Set it to something else, like `"div"`.
|
|
132
|
-
*/
|
|
133
|
-
draggable?: boolean;
|
|
134
|
-
hideDraggableIcon?: boolean;
|
|
135
|
-
"data-tooltip"?: string;
|
|
136
|
-
/**
|
|
137
|
-
* Specifies whether an element is disabled or not.
|
|
138
|
-
*/
|
|
139
|
-
disabled?: boolean;
|
|
140
|
-
/**
|
|
141
|
-
* Specifies style of an element.
|
|
142
|
-
*/
|
|
143
|
-
style?: React.CSSProperties;
|
|
144
|
-
id?: string;
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Link, button or custom component for Sidebar, Actions or ActionMenu
|
|
148
|
-
*/
|
|
149
|
-
export default function MenuItem(props: MenuItemProps): JSX.Element;
|
|
1
|
+
import React, { CSSProperties } from "react";
|
|
2
|
+
export interface MenuItemProps {
|
|
3
|
+
/**
|
|
4
|
+
* Sets `to` prop, e.g. when you use the `NavLink` component from React Router.
|
|
5
|
+
*/
|
|
6
|
+
to?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Prop for components by React Router.
|
|
9
|
+
*/
|
|
10
|
+
exact?: boolean;
|
|
11
|
+
href?: string;
|
|
12
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Will be fired after `onClick`
|
|
15
|
+
*/
|
|
16
|
+
onClickAttached?: (event: React.MouseEvent) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Icon component or a class name.
|
|
19
|
+
*/
|
|
20
|
+
icon?: any;
|
|
21
|
+
/**
|
|
22
|
+
* Addition to class name of icon wrapper element
|
|
23
|
+
*/
|
|
24
|
+
iconClassName?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Icon component or a class name when the MenuItem is active.
|
|
27
|
+
*/
|
|
28
|
+
iconForActive?: any;
|
|
29
|
+
/**
|
|
30
|
+
* Label of the link.
|
|
31
|
+
*/
|
|
32
|
+
label?: any;
|
|
33
|
+
/**
|
|
34
|
+
* Addition to class name of label wrapper element
|
|
35
|
+
*/
|
|
36
|
+
labelClassName?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Addition to class name of caret
|
|
39
|
+
*/
|
|
40
|
+
caretClassName?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Addition to style of caret
|
|
43
|
+
*/
|
|
44
|
+
caretStyle?: CSSProperties;
|
|
45
|
+
/**
|
|
46
|
+
* Should be set as active.
|
|
47
|
+
*/
|
|
48
|
+
isActive?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Set true to highlight the current menu item.
|
|
51
|
+
*/
|
|
52
|
+
highlighted?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* When using Blue React's routing system: define this link as home page link.
|
|
55
|
+
*/
|
|
56
|
+
isHome?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Extends class name of the dropdown menu.
|
|
59
|
+
*/
|
|
60
|
+
dropdownClassName?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Extends style of the dropdown menu.
|
|
63
|
+
*/
|
|
64
|
+
dropdownStyle?: CSSProperties;
|
|
65
|
+
/**
|
|
66
|
+
* Set children to create a nested `MenuItem` as a dropdown.
|
|
67
|
+
*/
|
|
68
|
+
children?: any;
|
|
69
|
+
/**
|
|
70
|
+
* Defines class name.
|
|
71
|
+
*/
|
|
72
|
+
className?: any;
|
|
73
|
+
/**
|
|
74
|
+
* Defines dropdown status from outside.
|
|
75
|
+
*/
|
|
76
|
+
showDropdown?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Callback when `showDropdown` changes.
|
|
79
|
+
*/
|
|
80
|
+
onShowDropdown?: (showDropdown: boolean) => void;
|
|
81
|
+
/**
|
|
82
|
+
* Close on click outside.
|
|
83
|
+
*/
|
|
84
|
+
supportOutside?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Overrides default class list to be ignored on click outside.
|
|
87
|
+
* Hint: If you want this menu item to stay open when others will open, set:
|
|
88
|
+
* `outsideIgnoreClasses={["blue-menu-item-wrapper"]}`.
|
|
89
|
+
*/
|
|
90
|
+
outsideIgnoreClasses?: string[];
|
|
91
|
+
/**
|
|
92
|
+
* By default, MenuItem is a `"button"`. If you set a `href`, it's a `"a"`.
|
|
93
|
+
* If you want to have it another type, you can pass a component reference with this prop (e.g. `Link`).
|
|
94
|
+
*/
|
|
95
|
+
elementType?: any;
|
|
96
|
+
target?: string;
|
|
97
|
+
rel?: string;
|
|
98
|
+
title?: string;
|
|
99
|
+
type?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Fired on the draggable target (the source element): occurs when the user starts to drag an element
|
|
102
|
+
*/
|
|
103
|
+
onDragStart?: (event: React.DragEvent) => void | React.DragEventHandler;
|
|
104
|
+
/**
|
|
105
|
+
* Fired on the draggable target (the source element): occurs when an element is being dragged
|
|
106
|
+
*/
|
|
107
|
+
onDrag?: (event: React.DragEvent) => void | React.DragEventHandler;
|
|
108
|
+
/**
|
|
109
|
+
* Fired on the draggable target (the source element): occurs when the user has finished dragging the element
|
|
110
|
+
*/
|
|
111
|
+
onDragEnd?: (event: React.DragEvent) => void | React.DragEventHandler;
|
|
112
|
+
/**
|
|
113
|
+
* Fired on the drop target: occurs when the dragged element enters the drop target
|
|
114
|
+
*/
|
|
115
|
+
onDragEnter?: (event: React.DragEvent) => void | React.DragEventHandler;
|
|
116
|
+
/**
|
|
117
|
+
* Fired on the drop target: occurs when the dragged element is over the drop target
|
|
118
|
+
*/
|
|
119
|
+
onDragOver?: (event: React.DragEvent) => void | React.DragEventHandler;
|
|
120
|
+
/**
|
|
121
|
+
* Fired on the drop target: occurs when the dragged element leaves the drop target
|
|
122
|
+
*/
|
|
123
|
+
onDragLeave?: (event: React.DragEvent) => void | React.DragEventHandler;
|
|
124
|
+
/**
|
|
125
|
+
* Fired on the drop target: occurs when the dragged element is dropped on the drop target
|
|
126
|
+
*/
|
|
127
|
+
onDrop?: (event: React.DragEvent) => void | React.DragEventHandler;
|
|
128
|
+
/**
|
|
129
|
+
* Specifies whether an element is draggable or not.
|
|
130
|
+
*
|
|
131
|
+
* **Important:** To make draggable menu items work in Firefox, the elementType must not be `"button"`. Set it to something else, like `"div"`.
|
|
132
|
+
*/
|
|
133
|
+
draggable?: boolean;
|
|
134
|
+
hideDraggableIcon?: boolean;
|
|
135
|
+
"data-tooltip"?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Specifies whether an element is disabled or not.
|
|
138
|
+
*/
|
|
139
|
+
disabled?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Specifies style of an element.
|
|
142
|
+
*/
|
|
143
|
+
style?: React.CSSProperties;
|
|
144
|
+
id?: string;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Link, button or custom component for Sidebar, Actions or ActionMenu
|
|
148
|
+
*/
|
|
149
|
+
export default function MenuItem(props: MenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { ModalType } from "./shared";
|
|
3
|
-
export interface ModalProps {
|
|
4
|
-
modalContent?: string;
|
|
5
|
-
modalTitle?: string;
|
|
6
|
-
modalIcon?: ReactNode;
|
|
7
|
-
unSetModalContent: (modalContent?: string) => void;
|
|
8
|
-
/**
|
|
9
|
-
* Type of `input` depends on `type` prop and which action occured.
|
|
10
|
-
* When it's a string, the user entered something. When it's a boolean, the user clicked "Yes" or "No".
|
|
11
|
-
* When it's `null`, the user cancelled the modal.
|
|
12
|
-
*/
|
|
13
|
-
onSubmit?: (input: string | boolean | null) => void;
|
|
14
|
-
defaultInput?: string;
|
|
15
|
-
/**
|
|
16
|
-
* `"ask"` | `"tell"` | `"verify"`
|
|
17
|
-
*/
|
|
18
|
-
type: ModalType;
|
|
19
|
-
inputType?: string;
|
|
20
|
-
switchPrimaryBtn?: boolean;
|
|
21
|
-
acceptBtnText?: string;
|
|
22
|
-
cancelBtnText?: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Simple modal/dialog. Designed to work as an alternative to JavaScript's native `alert()`, `prompt()` and `confirm()` functions.
|
|
26
|
-
* It uses Bootstrap's Modal components.
|
|
27
|
-
*
|
|
28
|
-
* For easy use, you should use the hook `useModal` together with `ModalProvider`. See the example there.
|
|
29
|
-
*/
|
|
30
|
-
export default function Modal({ modalContent, modalTitle, modalIcon, unSetModalContent, onSubmit, defaultInput, type, inputType, switchPrimaryBtn, acceptBtnText, cancelBtnText }: ModalProps): JSX.Element;
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { ModalType } from "./shared";
|
|
3
|
+
export interface ModalProps {
|
|
4
|
+
modalContent?: string;
|
|
5
|
+
modalTitle?: string;
|
|
6
|
+
modalIcon?: ReactNode;
|
|
7
|
+
unSetModalContent: (modalContent?: string) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Type of `input` depends on `type` prop and which action occured.
|
|
10
|
+
* When it's a string, the user entered something. When it's a boolean, the user clicked "Yes" or "No".
|
|
11
|
+
* When it's `null`, the user cancelled the modal.
|
|
12
|
+
*/
|
|
13
|
+
onSubmit?: (input: string | boolean | null) => void;
|
|
14
|
+
defaultInput?: string;
|
|
15
|
+
/**
|
|
16
|
+
* `"ask"` | `"tell"` | `"verify"`
|
|
17
|
+
*/
|
|
18
|
+
type: ModalType;
|
|
19
|
+
inputType?: string;
|
|
20
|
+
switchPrimaryBtn?: boolean;
|
|
21
|
+
acceptBtnText?: string;
|
|
22
|
+
cancelBtnText?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Simple modal/dialog. Designed to work as an alternative to JavaScript's native `alert()`, `prompt()` and `confirm()` functions.
|
|
26
|
+
* It uses Bootstrap's Modal components.
|
|
27
|
+
*
|
|
28
|
+
* For easy use, you should use the hook `useModal` together with `ModalProvider`. See the example there.
|
|
29
|
+
*/
|
|
30
|
+
export default function Modal({ modalContent, modalTitle, modalIcon, unSetModalContent, onSubmit, defaultInput, type, inputType, switchPrimaryBtn, acceptBtnText, cancelBtnText }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
interface ModelAlertOptions {
|
|
3
|
-
title?: string;
|
|
4
|
-
icon?: ReactNode;
|
|
5
|
-
switchPrimaryBtn?: boolean;
|
|
6
|
-
acceptBtnText?: string;
|
|
7
|
-
cancelBtnText?: string;
|
|
8
|
-
}
|
|
9
|
-
interface ModelAskOptions extends ModelAlertOptions {
|
|
10
|
-
inputType?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface ModalProviderProps {
|
|
13
|
-
children?: ReactNode;
|
|
14
|
-
}
|
|
15
|
-
declare const ModalProvider: ({ children, ...rest }: ModalProviderProps) => JSX.Element;
|
|
16
|
-
declare const useModal: () => {
|
|
17
|
-
ask: (text: string, options?: ModelAskOptions) => Promise<string | boolean>;
|
|
18
|
-
tell: (text: string, options?: ModelAlertOptions) => Promise<boolean>;
|
|
19
|
-
verify: (text: string, options?: ModelAlertOptions) => Promise<boolean>;
|
|
20
|
-
};
|
|
21
|
-
export { ModalProvider, useModal };
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
interface ModelAlertOptions {
|
|
3
|
+
title?: string;
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
switchPrimaryBtn?: boolean;
|
|
6
|
+
acceptBtnText?: string;
|
|
7
|
+
cancelBtnText?: string;
|
|
8
|
+
}
|
|
9
|
+
interface ModelAskOptions extends ModelAlertOptions {
|
|
10
|
+
inputType?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ModalProviderProps {
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
declare const ModalProvider: ({ children, ...rest }: ModalProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare const useModal: () => {
|
|
17
|
+
ask: (text: string, options?: ModelAskOptions) => Promise<string | boolean>;
|
|
18
|
+
tell: (text: string, options?: ModelAlertOptions) => Promise<boolean>;
|
|
19
|
+
verify: (text: string, options?: ModelAlertOptions) => Promise<boolean>;
|
|
20
|
+
};
|
|
21
|
+
export { ModalProvider, useModal };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { CSSProperties, MouseEventHandler, MutableRefObject, RefObject } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Hook that alerts clicks outside of the passed ref
|
|
4
|
-
*/
|
|
5
|
-
export declare function useOutside(ref: MutableRefObject<any>, callback?: (event: MouseEvent) => void): void;
|
|
6
|
-
export interface OutsideProps {
|
|
7
|
-
children: any;
|
|
8
|
-
className?: string;
|
|
9
|
-
onClickOutside?: (event: MouseEvent) => void;
|
|
10
|
-
onClick?: MouseEventHandler<HTMLDivElement> | undefined;
|
|
11
|
-
style?: CSSProperties;
|
|
12
|
-
wrapperRef?: RefObject<HTMLDivElement>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Component that fires an event if you click outside of it
|
|
16
|
-
*/
|
|
17
|
-
export default function Outside({ children, className, onClickOutside, onClick, style, wrapperRef }: OutsideProps): JSX.Element;
|
|
1
|
+
import { CSSProperties, MouseEventHandler, MutableRefObject, RefObject } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Hook that alerts clicks outside of the passed ref
|
|
4
|
+
*/
|
|
5
|
+
export declare function useOutside(ref: MutableRefObject<any>, callback?: (event: MouseEvent) => void): void;
|
|
6
|
+
export interface OutsideProps {
|
|
7
|
+
children: any;
|
|
8
|
+
className?: string;
|
|
9
|
+
onClickOutside?: (event: MouseEvent) => void;
|
|
10
|
+
onClick?: MouseEventHandler<HTMLDivElement> | undefined;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
wrapperRef?: RefObject<HTMLDivElement | null>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Component that fires an event if you click outside of it
|
|
16
|
+
*/
|
|
17
|
+
export default function Outside({ children, className, onClickOutside, onClick, style, wrapperRef }: OutsideProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export default function Page({ children, title }: PageProps): JSX.Element;
|
|
1
|
+
export interface PageProps {
|
|
2
|
+
/**
|
|
3
|
+
* Will be set to the document's `<title>` tag.
|
|
4
|
+
*/
|
|
5
|
+
title?: string;
|
|
6
|
+
children?: any;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Main component for each page.
|
|
10
|
+
*/
|
|
11
|
+
export default function Page({ children, title }: PageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import React, { ReactNode, RefObject } from "react";
|
|
2
|
-
export interface SearchProps {
|
|
3
|
-
autoFocus?: boolean;
|
|
4
|
-
/**
|
|
5
|
-
* Is component inside of a page?
|
|
6
|
-
*/
|
|
7
|
-
body?: boolean;
|
|
8
|
-
className?: string;
|
|
9
|
-
icon?: any;
|
|
10
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
11
|
-
onSubmit?: (event: React.FormEvent<HTMLFormElement>) => void;
|
|
12
|
-
placeholder?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Allow reset?
|
|
15
|
-
*/
|
|
16
|
-
reset?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Define custom icon for the reset button.
|
|
19
|
-
*/
|
|
20
|
-
resetIcon?: any;
|
|
21
|
-
/**
|
|
22
|
-
* Is component inside of the sidebar?
|
|
23
|
-
*/
|
|
24
|
-
sidebar?: boolean;
|
|
25
|
-
value?: string;
|
|
26
|
-
children?: ReactNode;
|
|
27
|
-
id?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Set `ref` prop of the input element. Let's you take control of it from the outside, e.g. to set focus.
|
|
30
|
-
*/
|
|
31
|
-
inputRef?: RefObject<HTMLInputElement>;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* A search bar that can be placed to the sidebar or on a page.
|
|
35
|
-
*/
|
|
36
|
-
export default function Search(props: SearchProps): JSX.Element;
|
|
1
|
+
import React, { ReactNode, RefObject } from "react";
|
|
2
|
+
export interface SearchProps {
|
|
3
|
+
autoFocus?: boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Is component inside of a page?
|
|
6
|
+
*/
|
|
7
|
+
body?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
icon?: any;
|
|
10
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
11
|
+
onSubmit?: (event: React.FormEvent<HTMLFormElement>) => void;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Allow reset?
|
|
15
|
+
*/
|
|
16
|
+
reset?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Define custom icon for the reset button.
|
|
19
|
+
*/
|
|
20
|
+
resetIcon?: any;
|
|
21
|
+
/**
|
|
22
|
+
* Is component inside of the sidebar?
|
|
23
|
+
*/
|
|
24
|
+
sidebar?: boolean;
|
|
25
|
+
value?: string;
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
id?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Set `ref` prop of the input element. Let's you take control of it from the outside, e.g. to set focus.
|
|
30
|
+
*/
|
|
31
|
+
inputRef?: RefObject<HTMLInputElement | null>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A search bar that can be placed to the sidebar or on a page.
|
|
35
|
+
*/
|
|
36
|
+
export default function Search(props: SearchProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export default function SidebarMenu(props: SidebarMenuProps): JSX.Element;
|
|
1
|
+
export interface SidebarMenuProps {
|
|
2
|
+
/**
|
|
3
|
+
* Extends the class name by the sidebar.
|
|
4
|
+
*/
|
|
5
|
+
sidebarClass?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Sets the `style` prop by the sidebar.
|
|
8
|
+
*/
|
|
9
|
+
sidebarStyle?: object;
|
|
10
|
+
/**
|
|
11
|
+
* Extends the class name by the menu.
|
|
12
|
+
*/
|
|
13
|
+
menuClass?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Sets the `style` prop by the menu.
|
|
16
|
+
*/
|
|
17
|
+
menuStyle?: object;
|
|
18
|
+
/**
|
|
19
|
+
* Content on top of the menu.
|
|
20
|
+
*/
|
|
21
|
+
topContent?: any;
|
|
22
|
+
/**
|
|
23
|
+
* Content for the bottom part of the sidebar.
|
|
24
|
+
*/
|
|
25
|
+
bottomContent?: any;
|
|
26
|
+
children?: any;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Sidebar for the `Layout` component.
|
|
30
|
+
*/
|
|
31
|
+
export default function SidebarMenu(props: SidebarMenuProps): import("react/jsx-runtime").JSX.Element;
|