blue-react 6.9.2
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 +36 -0
- package/dist/ActionMenu.js +122 -0
- package/dist/ActionMenuItem.js +110 -0
- package/dist/ActionMenuSwitch.js +98 -0
- package/dist/Actions.js +178 -0
- package/dist/Body.js +89 -0
- package/dist/Caret.js +71 -0
- package/dist/DocumentView.js +138 -0
- package/dist/FluentBtn.js +100 -0
- package/dist/FormSwitch.js +75 -0
- package/dist/Grid.js +341 -0
- package/dist/Header.js +66 -0
- package/dist/HeaderActions.js +75 -0
- package/dist/HeaderTitle.js +137 -0
- package/dist/Intro.js +108 -0
- package/dist/MenuItem.js +204 -0
- package/dist/Page.js +64 -0
- package/dist/Search.js +203 -0
- package/dist/SidebarMenu.js +153 -0
- package/dist/Switch.js +89 -0
- package/dist/SwitchMenuItem.js +65 -0
- package/dist/Utilities.js +173 -0
- package/dist/style/_actions.scss +109 -0
- package/dist/style/_actions_deprecated.scss +58 -0
- package/dist/style/_bootstrap-mixins_overwritten.scss +54 -0
- package/dist/style/_bootstrap-optimizations.scss +28 -0
- package/dist/style/_bootstrap.scss +45 -0
- package/dist/style/_caret.scss +50 -0
- package/dist/style/_document-view.scss +5 -0
- package/dist/style/_fluent.scss +38 -0
- package/dist/style/_form-switch.scss +74 -0
- package/dist/style/_general.scss +154 -0
- package/dist/style/_grid.scss +316 -0
- package/dist/style/_keyframes.scss +68 -0
- package/dist/style/_mixins.scss +7 -0
- package/dist/style/_ripple.scss +26 -0
- package/dist/style/_router.scss +18 -0
- package/dist/style/_search.scss +48 -0
- package/dist/style/_status.scss +138 -0
- package/dist/style/_switch.scss +22 -0
- package/dist/style/_variables.scss +91 -0
- package/dist/style/mixins/_actions.scss +59 -0
- package/dist/style/mixins/_actions_deprecated.scss +54 -0
- package/dist/style/mixins/_custom-property.scss +10 -0
- package/dist/style/mixins/_misc.scss +28 -0
- package/dist/style/mixins/_scroll-shadow.scss +10 -0
- package/dist/style/mixins/_sidebar.scss +114 -0
- package/dist/style/mixins/_switch.scss +77 -0
- package/dist/style.css +8518 -0
- package/dist/style.scss +36 -0
- package/dist/types/ActionMenu.d.ts +15 -0
- package/dist/types/ActionMenuItem.d.ts +33 -0
- package/dist/types/ActionMenuSwitch.d.ts +19 -0
- package/dist/types/Actions.d.ts +35 -0
- package/dist/types/Body.d.ts +24 -0
- package/dist/types/Caret.d.ts +21 -0
- package/dist/types/DocumentView.d.ts +30 -0
- package/dist/types/FluentBtn.d.ts +29 -0
- package/dist/types/Grid.d.ts +49 -0
- package/dist/types/Header.d.ts +6 -0
- package/dist/types/HeaderActions.d.ts +16 -0
- package/dist/types/HeaderTitle.d.ts +25 -0
- package/dist/types/Intro.d.ts +29 -0
- package/dist/types/MenuItem.d.ts +54 -0
- package/dist/types/Page.d.ts +8 -0
- package/dist/types/Search.d.ts +30 -0
- package/dist/types/SidebarMenu.d.ts +39 -0
- package/dist/types/Switch.d.ts +26 -0
- package/dist/types/SwitchMenuItem.d.ts +15 -0
- package/dist/types/Utilities.d.ts +55 -0
- package/dist/types/shared.d.ts +1 -0
- package/index.d.ts +62 -0
- package/index.js +20 -0
- package/package.json +56 -0
package/dist/style.scss
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@import "node_modules/bootstrap/scss/functions";
|
|
2
|
+
@import "node_modules/bootstrap/scss/variables";
|
|
3
|
+
@import "./style/_variables.scss";
|
|
4
|
+
|
|
5
|
+
@import "./style/_mixins.scss";
|
|
6
|
+
@import "./style/_keyframes.scss";
|
|
7
|
+
|
|
8
|
+
// @import "../node_modules/bootstrap/scss/bootstrap.scss";
|
|
9
|
+
|
|
10
|
+
@import "./style/_bootstrap.scss";
|
|
11
|
+
// @import "node_modules/bootstrap/scss/bootstrap.scss";
|
|
12
|
+
|
|
13
|
+
@import "./style/_general";
|
|
14
|
+
@import "./style/_router";
|
|
15
|
+
@import "./style/_status";
|
|
16
|
+
@import "./style/_grid";
|
|
17
|
+
@import "./style/_search";
|
|
18
|
+
@import "./style/_actions_deprecated";
|
|
19
|
+
@import "./style/_actions";
|
|
20
|
+
@import "./style/_fluent";
|
|
21
|
+
@import "./style/_switch";
|
|
22
|
+
@import "./style/_caret";
|
|
23
|
+
|
|
24
|
+
@import "./style/document-view";
|
|
25
|
+
@import "./style/_bootstrap-optimizations.scss";
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
/* fix scroll problem */
|
|
29
|
+
// body {
|
|
30
|
+
// overflow-y: auto;
|
|
31
|
+
// }
|
|
32
|
+
|
|
33
|
+
// .router-page {
|
|
34
|
+
// overflow-y: hidden;
|
|
35
|
+
// height: auto;
|
|
36
|
+
// }
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface IActionMenuProps {
|
|
4
|
+
/**
|
|
5
|
+
* Versteckt die drei Punkte in mobiler Ansicht.
|
|
6
|
+
* Das kann nützlich sein, wenn mehrere ActionMenus genutzt werden, aber nicht überall der Toggle angezeigt werden soll.
|
|
7
|
+
*/
|
|
8
|
+
hideToggleAction?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Das Action-Menü an der oberen rechten Ecke einer Seite. Hier können Aktionen platziert werden, die im Kontext der aktuellen Seite stehen.
|
|
13
|
+
*/
|
|
14
|
+
declare class ActionMenu extends React.Component<IActionMenuProps, any> { }
|
|
15
|
+
export default ActionMenu;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface IActionMenuItemProps {
|
|
4
|
+
/**
|
|
5
|
+
* Extends className of the `.nav-item` element.
|
|
6
|
+
*/
|
|
7
|
+
navItemClassName?: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Extends className of the `.nav-link` element.
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
|
|
14
|
+
href?: string;
|
|
15
|
+
|
|
16
|
+
onClick?: () => void;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* className for the icon.
|
|
20
|
+
*/
|
|
21
|
+
icon?: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Label for the link.
|
|
25
|
+
*/
|
|
26
|
+
label?: any;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* List-Item und Link für das Action-Menü.
|
|
31
|
+
*/
|
|
32
|
+
declare class ActionMenuItem extends React.Component<IActionMenuItemProps, any> { }
|
|
33
|
+
export default ActionMenuItem;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface IActionMenuSwitchProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
onChange?: () => void;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Beschriftung des Controls
|
|
10
|
+
*/
|
|
11
|
+
label?: any;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated(When using Actions, please use SwitchMenuItem instead.)
|
|
16
|
+
* Switch für das Action-Menü.
|
|
17
|
+
*/
|
|
18
|
+
declare class ActionMenuSwitch extends React.Component<IActionMenuSwitchProps, any> { }
|
|
19
|
+
export default ActionMenuSwitch;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { breakOption } from "./shared";
|
|
3
|
+
|
|
4
|
+
export interface IActionsProps {
|
|
5
|
+
/**
|
|
6
|
+
* Content that will appear on the menu when it's expanded.
|
|
7
|
+
*/
|
|
8
|
+
children?: any,
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Extends the `className` of `.blue-actions`.
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Content that will appear when the menu is shrunken.
|
|
17
|
+
*/
|
|
18
|
+
featured?: any;
|
|
19
|
+
open?: boolean;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Will fire when the state of `open` will change inside of the component.
|
|
23
|
+
* **Example:** `onToggle={open => this.setState({ open })}`
|
|
24
|
+
*/
|
|
25
|
+
onToggle?: (open: boolean) => void;
|
|
26
|
+
break?: breakOption;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The new actions menu, better optimized for mobile devices.
|
|
31
|
+
* **Important:** If you use `<Actions />` on a page, make sure also to set **hasActions** prop from
|
|
32
|
+
* **Page** component to `true`.
|
|
33
|
+
*/
|
|
34
|
+
declare class Actions extends React.Component<IActionsProps, any> { }
|
|
35
|
+
export default Actions;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { breakOption } from "./shared";
|
|
3
|
+
|
|
4
|
+
export interface IBodyProps {
|
|
5
|
+
id?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Setzt die Klasse für den Container. Mehr Infos unter https://getbootstrap.com/docs/4.0/layout/overview/#containers
|
|
10
|
+
*/
|
|
11
|
+
containerClass?: string;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Set `true` if this page uses `<Actions />`, so this component will get enough padding to avoid overlapping of the content.
|
|
15
|
+
*/
|
|
16
|
+
hasActions?: boolean;
|
|
17
|
+
break?: breakOption;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Enthält den Inhalt einer Seite.
|
|
22
|
+
*/
|
|
23
|
+
declare class Body extends React.Component<IBodyProps, any> { }
|
|
24
|
+
export default Body;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface ICaretProps {
|
|
4
|
+
/**
|
|
5
|
+
* Indicates if open or not.
|
|
6
|
+
*/
|
|
7
|
+
open?: boolean;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* By default the caret points to the right when closed. Set mirrored and it will point to the left.
|
|
11
|
+
*/
|
|
12
|
+
mirrored?: boolean;
|
|
13
|
+
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Caret icon component.
|
|
19
|
+
*/
|
|
20
|
+
declare class Caret extends React.Component<ICaretProps, any> { }
|
|
21
|
+
export default Caret;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface IDocumentViewProps {
|
|
4
|
+
/**
|
|
5
|
+
* Quelle des Inhalts (URL)
|
|
6
|
+
*/
|
|
7
|
+
src?: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Statt Quelle, kann der Inhalt (HTML) auch direkt übergeben werden.
|
|
11
|
+
*/
|
|
12
|
+
content?: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* MIME-Typ des Inhalts (z.B. "application/pdf")
|
|
16
|
+
*/
|
|
17
|
+
mimeType: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Beschriftung für den Button für das Anzeigen
|
|
21
|
+
*/
|
|
22
|
+
showDocumentLabel: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Zeigt Inhalt anhand einer URL in einem iFrame an.
|
|
27
|
+
* Wenn der Inhalt nicht in einem iFrame angezeigt werden kann, wird stattdessen ein Download-Button angeboten.
|
|
28
|
+
*/
|
|
29
|
+
declare class DocumentView extends React.Component<IDocumentViewProps, any> { }
|
|
30
|
+
export default DocumentView;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface IFluentBtnProps {
|
|
4
|
+
/**
|
|
5
|
+
* Inhalt des Buttons. Es werden auch alle anderen Properties unterstützt.
|
|
6
|
+
*/
|
|
7
|
+
children?: any;
|
|
8
|
+
|
|
9
|
+
className?: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Wenn gesetzt, wird ein `<a>`-Element zurückgegeben. Ansonsten ist es ein `<button>`.
|
|
13
|
+
*/
|
|
14
|
+
href?: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Kann bei Schaltflächen mit weißen Flächen gesetzt werden. Der Schein ist dann etwas dunkler.
|
|
18
|
+
*/
|
|
19
|
+
light?: boolean;
|
|
20
|
+
|
|
21
|
+
type?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Shortcut für `<button class="fluent-btn"><div className="fluent-btn-ball"></div></button>`.
|
|
26
|
+
* Erzeugt Button, mit einem Acrylic-Effekt.
|
|
27
|
+
*/
|
|
28
|
+
declare class FluentBtn extends React.Component<IFluentBtnProps, any> { }
|
|
29
|
+
export default FluentBtn;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface IGridProps {
|
|
4
|
+
/**
|
|
5
|
+
* Die Sidebar ist bei Vollbild automatisch eingeklappt.
|
|
6
|
+
*/
|
|
7
|
+
expandSidebar?: boolean;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Deaktiviert die Sidebar.
|
|
11
|
+
*/
|
|
12
|
+
hideSidebarMenu?: boolean;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Registriert Seiten. Beispiel: [{name: "home", component: <HomePage />}]
|
|
16
|
+
*/
|
|
17
|
+
pages?: { name: string; component: JSX.Element }[];
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Wenn <code>true</code> wird immer die "home"-Route geladen.
|
|
21
|
+
*/
|
|
22
|
+
unrouteable?: boolean;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Erweitert die <code>className</code>-Eigenschaft.
|
|
26
|
+
*/
|
|
27
|
+
className?: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Normalerweise wird der Dokumenten-Titel automatisch gesetzt. Setze diese Property auf <code>true</code> um das zu
|
|
31
|
+
* deaktivieren.
|
|
32
|
+
*/
|
|
33
|
+
disableTitleSet?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Das Grundgerüst. Sobald diese Komponente gemountet wurde, ist sie global über `window.blueGridRef` zugreifbar.
|
|
38
|
+
* Außerdem kann über `window.blueGridRef.addEventListener(eventName, (prevProps, prevState) => { })` ein Event-Listener angefügt werden.
|
|
39
|
+
|
|
40
|
+
* Erlaubte Event-Listener:
|
|
41
|
+
|
|
42
|
+
* |Event name|Description|Beispiel|
|
|
43
|
+
* |--- |--- |--- |
|
|
44
|
+
* |componentDidUpdate|Komponente wurde aktualisiert.|`window.blueGridRef.addEventListener("componentDidUpdate", (prevProps, prevState) => { })`|
|
|
45
|
+
* |pageDidShowAgain|Seite wurde erneut angezeigt, mit altem Stand. Im Callback kann Komponente neu initialisiert werden.|`window.blueGridRef.addEventListener("pageDidShowAgain", "home", (prevProps, prevState) => { })`|
|
|
46
|
+
* |pageDidHide|Seite wurde versteckt (andere Seite wurde angezeigt).|`window.blueGridRef.addEventListener("pageDidHide", "home", (prevProps, prevState) => { })`|
|
|
47
|
+
*/
|
|
48
|
+
declare class Grid extends React.Component<IGridProps, any> { }
|
|
49
|
+
export default Grid;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface IHeaderActionsProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Legt fest, ab welcher Breite umgebrochen wird. Mögliche Werte: <code>"sm"</code> (768px), <code>"md"</code> (992px), <code>"lg"</code> (1200px)
|
|
8
|
+
*/
|
|
9
|
+
breakpoint?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Hier werden z.B. Buttons für die aktuelle Seite platziert.
|
|
14
|
+
*/
|
|
15
|
+
declare class HeaderActions extends React.Component<IHeaderActionsProps, any> { }
|
|
16
|
+
export default HeaderActions;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface IHeaderTitleProps {
|
|
4
|
+
/**
|
|
5
|
+
* Kann ein Bild sein. Wird im src-Attribute implementiert.
|
|
6
|
+
*/
|
|
7
|
+
logo?: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Der Text, der neben dem Logo steht.
|
|
11
|
+
*/
|
|
12
|
+
appTitle?: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Deaktiviert, dass der App-Titel bei bestimmer Bildschirmgröße ausgeblendet wird.
|
|
16
|
+
*/
|
|
17
|
+
keepAppTitle?: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Der Titel-Bereich in der Kopf-Leiste.
|
|
22
|
+
* Anhand dessen wird auch der Dokumenten-Titel gesetzt (was in der Browser Titelzeile gezeigt wird).
|
|
23
|
+
*/
|
|
24
|
+
declare class HeaderTitle extends React.Component<IHeaderTitleProps, any> { }
|
|
25
|
+
export default HeaderTitle;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface IIntroProps {
|
|
4
|
+
/**
|
|
5
|
+
* Kann ein Bild sein. Wird im src-Attribute implementiert.
|
|
6
|
+
*/
|
|
7
|
+
logo?: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Maximale Breite des Logos.
|
|
11
|
+
*/
|
|
12
|
+
logoMaxWidth?: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Der Text, der unter dem Logo erscheint
|
|
16
|
+
*/
|
|
17
|
+
title?: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Inhalt
|
|
21
|
+
*/
|
|
22
|
+
children?: any;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Geeignet als Login-Bildschirm.
|
|
27
|
+
*/
|
|
28
|
+
declare class Intro extends React.Component<IIntroProps, any> { }
|
|
29
|
+
export default Intro;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface IMenuItemProps {
|
|
4
|
+
/**
|
|
5
|
+
* Setzt to-Property der NavLink-Komponente aus React Router.
|
|
6
|
+
*/
|
|
7
|
+
to?: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Kann als Alternative zu to benutzt werden.
|
|
11
|
+
*/
|
|
12
|
+
href?: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* onClick Event
|
|
16
|
+
*/
|
|
17
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Klasse eines Icons oder Element, z.B. von blueicon-colored.
|
|
21
|
+
*/
|
|
22
|
+
icon?: any;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Beschriftung des Links
|
|
26
|
+
*/
|
|
27
|
+
label?: any;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Soll Item als "aktiv" markiert werden? Ist die to-Property gesetzt, wird Item automatisch als "aktiv" markiert, wenn entsprechende Seite aktiv ist.
|
|
31
|
+
*/
|
|
32
|
+
isActive?: boolean;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Als MenuItem für Startseite deklariert.
|
|
36
|
+
*/
|
|
37
|
+
isHome?: boolean;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Ergänzung der Klasse vom Dropdown-Menü.
|
|
41
|
+
*/
|
|
42
|
+
dropdownClassName?: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Werden in einem Dropdown-Menü angezeigt.
|
|
46
|
+
*/
|
|
47
|
+
children?: any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* List-Item und Link für die Sidebar.
|
|
52
|
+
*/
|
|
53
|
+
declare class MenuItem extends React.Component<IMenuItemProps, any> { }
|
|
54
|
+
export default MenuItem;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface ISearchProps {
|
|
4
|
+
/**
|
|
5
|
+
* Wird Komponente in der Sidebar genutzt?
|
|
6
|
+
*/
|
|
7
|
+
sidebar?: boolean;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Wird Komponente im Body genutzt?
|
|
11
|
+
*/
|
|
12
|
+
body?: boolean;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Erlaube Zurücksetzen?
|
|
16
|
+
*/
|
|
17
|
+
reset?: boolean;
|
|
18
|
+
|
|
19
|
+
value?: string;
|
|
20
|
+
onChange?: (event: React.ChangeEvent) => void;
|
|
21
|
+
onSubmit?: (event: React.FormEvent) => void;
|
|
22
|
+
placeholder?: string;
|
|
23
|
+
autoFocus?: boolean;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Eine Suchleiste, die zur Seitenleiste hinzugefügt werden kann.
|
|
28
|
+
*/
|
|
29
|
+
declare class Search extends React.Component<ISearchProps, any> { }
|
|
30
|
+
export default Search;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface ISidebarMenuProps {
|
|
4
|
+
/**
|
|
5
|
+
* Erweiterung der className-Property der Seitenleiste.
|
|
6
|
+
*/
|
|
7
|
+
sidebarClass?: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Setzt die style-Property der Seitenleiste.
|
|
11
|
+
*/
|
|
12
|
+
sidebarStyle?: object;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Erweiterung der className-Property des Menüs.
|
|
16
|
+
*/
|
|
17
|
+
menuClass?: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Setzt die style-Property des Menüs.
|
|
21
|
+
*/
|
|
22
|
+
menuStyle?: object;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Inhalte oberhalb des Sidebar-Menüs
|
|
26
|
+
*/
|
|
27
|
+
topContent?: any;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Inhalte für den Footer der Sidebar
|
|
31
|
+
*/
|
|
32
|
+
bottomContent?: any;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Die Seitenleiste für das Grid.
|
|
37
|
+
*/
|
|
38
|
+
declare class SidebarMenu extends React.Component<ISidebarMenuProps, any> { }
|
|
39
|
+
export default SidebarMenu;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export interface ISwitchProps {
|
|
4
|
+
|
|
5
|
+
className?: string;
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
onChange?: (event: React.ChangeEvent) => void;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Sets label inside of the switch. If you set this, you should also set the className "lg" to make the switch larger.
|
|
11
|
+
*/
|
|
12
|
+
sliderLabel?: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* You can change the type of the wrapper element. If you do, the `onChange` event might not be triggered.
|
|
16
|
+
*/
|
|
17
|
+
elementType?: string;
|
|
18
|
+
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Switch.
|
|
24
|
+
*/
|
|
25
|
+
declare class Switch extends React.Component<ISwitchProps, any> { }
|
|
26
|
+
export default Switch;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Switch from "./Switch";
|
|
3
|
+
|
|
4
|
+
export interface ISwitchMenuItemProps {
|
|
5
|
+
|
|
6
|
+
onClick?: (event: React.ChangeEvent) => void;
|
|
7
|
+
Label?: any;
|
|
8
|
+
Icon?: ImageBitmap;
|
|
9
|
+
SwitchMenuItem?: Switch;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Switch for **Actions**
|
|
13
|
+
*/
|
|
14
|
+
declare class SwitchMenuItem extends React.Component<ISwitchMenuItemProps, any> { }
|
|
15
|
+
export default SwitchMenuItem;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
declare module Utilities {
|
|
2
|
+
/** Checks if element has a specific class name. */
|
|
3
|
+
function hasClass(el: Element, className: string): boolean;
|
|
4
|
+
|
|
5
|
+
/** Adds a class name to an element. */
|
|
6
|
+
function addClass(el: Element, className: string): void;
|
|
7
|
+
|
|
8
|
+
/** Removes a class name from an element. */
|
|
9
|
+
function removeClass(el: Element, className: string): void;
|
|
10
|
+
|
|
11
|
+
/** Adds class name to element, if it doesn't it yet. Otherwise it removes it. */
|
|
12
|
+
function toggleClass(element: Element, className: string): void;
|
|
13
|
+
|
|
14
|
+
/** Shows loading animation. */
|
|
15
|
+
function startLoading(): void;
|
|
16
|
+
|
|
17
|
+
/** Hides loading animation. */
|
|
18
|
+
function finishLoading(): void;
|
|
19
|
+
|
|
20
|
+
/** Shows success symbol. */
|
|
21
|
+
function showSuccess(): void;
|
|
22
|
+
|
|
23
|
+
/** Hides success symbol. */
|
|
24
|
+
function hideSuccess(): void;
|
|
25
|
+
|
|
26
|
+
/** Shows action menu or hides it. */
|
|
27
|
+
function toggleActions(): void;
|
|
28
|
+
|
|
29
|
+
/** Resets alert message and removes it. */
|
|
30
|
+
function resetAlertMessage(alertClassName?: string = "info"): void;
|
|
31
|
+
|
|
32
|
+
/** Shows an alert message. */
|
|
33
|
+
function setAlertMessage(
|
|
34
|
+
message: string,
|
|
35
|
+
alertClassName?: ("loading" | "success" | "info" | "warning" | "danger") = "info",
|
|
36
|
+
close?: boolean,
|
|
37
|
+
detailText?: string
|
|
38
|
+
): void;
|
|
39
|
+
|
|
40
|
+
/** Returns string of random characters. */
|
|
41
|
+
function guid(): string;
|
|
42
|
+
|
|
43
|
+
/** Scrolls to the top of the page. */
|
|
44
|
+
function scrollToTop(): void;
|
|
45
|
+
|
|
46
|
+
/** Disables the effect of Fluent buttons. */
|
|
47
|
+
function unregisterFluentBtns(): void;
|
|
48
|
+
|
|
49
|
+
/** Enables the effect of Fluent buttons. */
|
|
50
|
+
function registerFluentBtns(): void;
|
|
51
|
+
|
|
52
|
+
/** Uses native `fetch` function, but adds error handling and shows error messages if there are any. */
|
|
53
|
+
function fetchData(input: RequestInfo, init?: RequestInit | undefined): Promise<void | Response>;
|
|
54
|
+
}
|
|
55
|
+
export default Utilities;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type breakOption = "sm" | "md" | "lg" | "xl";
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import Grid from "./dist/types/Grid";
|
|
2
|
+
|
|
3
|
+
export { default as Grid } from "./dist/types/Grid";
|
|
4
|
+
export { IGridProps } from "./dist/types/Grid";
|
|
5
|
+
|
|
6
|
+
declare global {
|
|
7
|
+
interface Window { blueGridRef: any; }
|
|
8
|
+
}
|
|
9
|
+
export default global;
|
|
10
|
+
|
|
11
|
+
export { default as ActionMenu } from "./dist/types/ActionMenu";
|
|
12
|
+
export { IActionMenuProps } from "./dist/types/ActionMenu";
|
|
13
|
+
|
|
14
|
+
export { default as ActionMenuItem } from "./dist/types/ActionMenuItem";
|
|
15
|
+
export { IActionMenuItemProps } from "./dist/types/ActionMenuItem";
|
|
16
|
+
|
|
17
|
+
export { default as ActionMenuSwitch } from "./dist/types/ActionMenuSwitch";
|
|
18
|
+
export { IActionMenuSwitchProps } from "./dist/types/ActionMenuSwitch";
|
|
19
|
+
|
|
20
|
+
export { default as Actions } from "./dist/types/Actions";
|
|
21
|
+
export { IActionsProps } from "./dist/types/Actions";
|
|
22
|
+
|
|
23
|
+
export { default as Body } from "./dist/types/Body";
|
|
24
|
+
export { IBodyProps } from "./dist/types/Body";
|
|
25
|
+
|
|
26
|
+
export { default as Caret } from "./dist/types/Caret";
|
|
27
|
+
export { ICaretProps } from "./dist/types/Caret";
|
|
28
|
+
|
|
29
|
+
export { default as DocumentView } from "./dist/types/DocumentView";
|
|
30
|
+
export { IDocumentViewProps } from "./dist/types/DocumentView";
|
|
31
|
+
|
|
32
|
+
export { default as FluentBtn } from "./dist/types/FluentBtn";
|
|
33
|
+
export { IFluentBtnProps } from "./dist/types/FluentBtn";
|
|
34
|
+
|
|
35
|
+
export { default as Header } from "./dist/types/Header";
|
|
36
|
+
export { IHeaderProps } from "./dist/types/Header";
|
|
37
|
+
|
|
38
|
+
export { default as HeaderActions } from "./dist/types/HeaderActions";
|
|
39
|
+
export { IHeaderActionsProps } from "./dist/types/HeaderActions";
|
|
40
|
+
|
|
41
|
+
export { default as HeaderTitle } from "./dist/types/HeaderTitle";
|
|
42
|
+
export { IHeaderTitleProps } from "./dist/types/HeaderTitle";
|
|
43
|
+
|
|
44
|
+
export { default as Intro } from "./dist/types/Intro";
|
|
45
|
+
export { IIntroProps } from "./dist/types/Intro";
|
|
46
|
+
|
|
47
|
+
export { default as MenuItem } from "./dist/types/MenuItem";
|
|
48
|
+
export { IMenuItemProps } from "./dist/types/MenuItem";
|
|
49
|
+
|
|
50
|
+
export { default as Page } from "./dist/types/Page";
|
|
51
|
+
export { IPageProps } from "./dist/types/Page";
|
|
52
|
+
|
|
53
|
+
export { default as Search } from "./dist/types/Search";
|
|
54
|
+
export { ISearchProps } from "./dist/types/Search";
|
|
55
|
+
|
|
56
|
+
export { default as SidebarMenu } from "./dist/types/SidebarMenu";
|
|
57
|
+
export { ISidebarMenuProps } from "./dist/types/SidebarMenu";
|
|
58
|
+
|
|
59
|
+
export { default as Switch } from "./dist/types/Switch";
|
|
60
|
+
export { ISwitchProps } from "./dist/types/Switch";
|
|
61
|
+
|
|
62
|
+
export { default as Utilities } from "./dist/types/Utilities";
|