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.
Files changed (69) hide show
  1. package/README.md +4 -0
  2. package/dist/components/A.js +8 -23
  3. package/dist/components/ActionMenu.js +33 -65
  4. package/dist/components/ActionMenuItem.js +12 -36
  5. package/dist/components/Body.js +13 -27
  6. package/dist/components/Caret.js +6 -9
  7. package/dist/components/Chevron.js +14 -24
  8. package/dist/components/HashRouter.js +23 -66
  9. package/dist/components/Header.js +3 -13
  10. package/dist/components/HeaderTitle.js +23 -42
  11. package/dist/components/IconMenuItem.js +17 -33
  12. package/dist/components/Intro.js +12 -22
  13. package/dist/components/Layout.js +27 -35
  14. package/dist/components/MenuItem.js +41 -83
  15. package/dist/components/Modal.js +53 -86
  16. package/dist/components/ModalProvider.js +70 -125
  17. package/dist/components/Outside.js +13 -29
  18. package/dist/components/Page.js +18 -44
  19. package/dist/components/Search.js +47 -85
  20. package/dist/components/SidebarMenu.js +8 -22
  21. package/dist/components/SidebarMenuItem.js +34 -65
  22. package/dist/components/SidebarToggler.js +12 -22
  23. package/dist/components/SlimContainer.js +6 -16
  24. package/dist/components/Status.js +33 -44
  25. package/dist/components/StatusProvider.js +28 -65
  26. package/dist/components/Switch.js +17 -23
  27. package/dist/components/ToastProvider.js +43 -83
  28. package/dist/components/Utilities.js +23 -45
  29. package/dist/components/shared.js +1 -11
  30. package/dist/style.scss +1 -1
  31. package/dist/types/components/A.d.ts +9 -9
  32. package/dist/types/components/ActionMenu.d.ts +25 -25
  33. package/dist/types/components/ActionMenuItem.d.ts +34 -35
  34. package/dist/types/components/Body.d.ts +20 -21
  35. package/dist/types/components/Caret.d.ts +18 -18
  36. package/dist/types/components/Chevron.d.ts +17 -17
  37. package/dist/types/components/HashRouter.d.ts +76 -77
  38. package/dist/types/components/Header.d.ts +8 -8
  39. package/dist/types/components/HeaderTitle.d.ts +39 -40
  40. package/dist/types/components/IconMenuItem.d.ts +18 -19
  41. package/dist/types/components/Intro.d.ts +22 -23
  42. package/dist/types/components/Layout.d.ts +9 -16
  43. package/dist/types/components/MenuItem.d.ts +149 -149
  44. package/dist/types/components/Modal.d.ts +30 -30
  45. package/dist/types/components/ModalProvider.d.ts +21 -21
  46. package/dist/types/components/Outside.d.ts +17 -17
  47. package/dist/types/components/Page.d.ts +11 -12
  48. package/dist/types/components/Search.d.ts +36 -36
  49. package/dist/types/components/SidebarMenu.d.ts +31 -32
  50. package/dist/types/components/SidebarMenuItem.d.ts +21 -22
  51. package/dist/types/components/SidebarToggler.d.ts +10 -10
  52. package/dist/types/components/SlimContainer.d.ts +10 -10
  53. package/dist/types/components/Status.d.ts +12 -12
  54. package/dist/types/components/StatusProvider.d.ts +15 -15
  55. package/dist/types/components/Switch.d.ts +33 -33
  56. package/dist/types/components/ToastProvider.d.ts +22 -22
  57. package/dist/types/components/Utilities.d.ts +41 -41
  58. package/dist/types/components/shared.d.ts +15 -15
  59. package/index.d.ts +8 -12
  60. package/index.js +56 -30
  61. package/package.json +25 -42
  62. package/dist/components/ActionMenuSwitch.js +0 -44
  63. package/dist/components/LegacyLayout.js +0 -367
  64. package/dist/components/LegacySidebarMenu.js +0 -74
  65. package/dist/style.css +0 -11944
  66. package/dist/style.min.css +0 -16
  67. package/dist/types/components/ActionMenuSwitch.d.ts +0 -12
  68. package/dist/types/components/LegacyLayout.d.ts +0 -145
  69. package/dist/types/components/LegacySidebarMenu.d.ts +0 -33
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getPhrase = getPhrase;
7
1
  var phrases = {
8
2
  Cancel: ["Cancel", "Abbrechen"],
9
3
  Yes: ["Yes", "Ja"],
@@ -14,15 +8,11 @@ var phrases = {
14
8
  Error: ["Error", "Fehler"],
15
9
  Information: ["Information", "Information"]
16
10
  };
17
-
18
- function getPhrase(keyword) {
11
+ export function getPhrase(keyword) {
19
12
  var countryCode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
20
-
21
13
  var _phrases = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
22
-
23
14
  countryCode = countryCode || navigator.language.toLowerCase().indexOf("de") > -1 ? "de-DE" : "en-US";
24
15
  _phrases = _phrases || phrases;
25
-
26
16
  if (_phrases[keyword]) {
27
17
  if (countryCode.indexOf("de-") > -1) {
28
18
  return _phrases[keyword][1];
package/dist/style.scss CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Blue React v10.0.0-rc1 (https://bruegmann.github.io/blue-react)
2
+ * Blue React v10.0.0-rc1-rc1 (https://bruegmann.github.io/blue-react)
3
3
  * Licensed under GNU General Public License v3.0 (https://github.com/bruegmann/blue-react/blob/master/LICENSE).
4
4
  */
5
5
 
@@ -1,9 +1,9 @@
1
- import React from "react";
2
- export interface AProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
3
- }
4
- /**
5
- * The `<a>` element automatically sets `rel="noreferrer"` for external links with `target="_blank"`.\
6
- * `A` allows all props of the `<a>` element.\
7
- * `<A href="https://example.com" target="_blank">Example</A>` ➡️ `<a href="https://example.com" target="_blank" rel="noreferrer">Example</a>`
8
- */
9
- export default function A({ children, rel, ...rest }: AProps): JSX.Element;
1
+ import React from "react";
2
+ export interface AProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
3
+ }
4
+ /**
5
+ * The `<a>` element automatically sets `rel="noreferrer"` for external links with `target="_blank"`.\
6
+ * `A` allows all props of the `<a>` element.\
7
+ * `<A href="https://example.com" target="_blank">Example</A>` ➡️ `<a href="https://example.com" target="_blank" rel="noreferrer">Example</a>`
8
+ */
9
+ export default function A({ children, rel, ...rest }: AProps): import("react/jsx-runtime").JSX.Element;
@@ -1,25 +1,25 @@
1
- import React from "react";
2
- import { breakOption } from "./shared";
3
- export declare const ActionMenuContext: React.Context<{
4
- breakOption: breakOption | "none";
5
- }>;
6
- export interface ActionMenuProps {
7
- /**
8
- * Hides the toggle button in mobile view. Can be useful when using multiple ActionMenus and not show the toggle button for each menu.
9
- */
10
- hideToggleAction?: boolean;
11
- children?: any;
12
- /**
13
- * Icon component for the toggle icon.
14
- */
15
- toggleIcon?: any;
16
- className?: string;
17
- /**
18
- * "sm" | "md" | "lg" | "xl" | "none". Default is "lg". The responsive breakpoint at which the menu will be shown as a dropdown.
19
- */
20
- break?: breakOption | "none";
21
- }
22
- /**
23
- * The Action Menu on the top right of a page. You can place Actions here which are in context of the current page.
24
- */
25
- export default function ActionMenu(props: ActionMenuProps): JSX.Element;
1
+ import React from "react";
2
+ import { breakOption } from "./shared";
3
+ export declare const ActionMenuContext: React.Context<{
4
+ breakOption: breakOption | "none";
5
+ }>;
6
+ export interface ActionMenuProps {
7
+ /**
8
+ * Hides the toggle button in mobile view. Can be useful when using multiple ActionMenus and not show the toggle button for each menu.
9
+ */
10
+ hideToggleAction?: boolean;
11
+ children?: any;
12
+ /**
13
+ * Icon component for the toggle icon.
14
+ */
15
+ toggleIcon?: any;
16
+ className?: string;
17
+ /**
18
+ * "sm" | "md" | "lg" | "xl" | "none". Default is "lg". The responsive breakpoint at which the menu will be shown as a dropdown.
19
+ */
20
+ break?: breakOption | "none";
21
+ }
22
+ /**
23
+ * The Action Menu on the top right of a page. You can place Actions here which are in context of the current page.
24
+ */
25
+ export default function ActionMenu(props: ActionMenuProps): import("react/jsx-runtime").JSX.Element;
@@ -1,35 +1,34 @@
1
- /// <reference types="react" />
2
- import { MenuItemProps } from "./MenuItem";
3
- export interface ActionMenuItemProps extends MenuItemProps {
4
- }
5
- /**
6
- * Use this instead of `MenuItem` when you want to use it inside an `ActionMenu` to make it appear as a dropdown.
7
- *
8
- * It basically is a shortcut. Instead of writing:
9
- *
10
- * ```tsx
11
- * <ActionMenu>
12
- * <div className="position-relative z-1">
13
- * <MenuItem
14
- * label="Parent"
15
- * supportOutside
16
- * dropdownClassName={`position-md-absolute end-0 d-flex flex-column`}
17
- * >
18
- * <MenuItem label="Item 1" />
19
- * </MenuItem>
20
- * </div>
21
- * </ActionMenu>
22
- * ```
23
- *
24
- * you can write:
25
- * ```tsx
26
- * <ActionMenu>
27
- * <ActionMenuItem label="Parent">
28
- * <MenuItem label="Item 1" />
29
- * </MenuItem>
30
- * </ActionMenu>
31
- * ```
32
- *
33
- * The responsive utility class for absolute position (`position-md-absolute` in this example) is automatically added based on the `break` param of the parent `ActionMenu`.
34
- */
35
- export default function ActionMenuItem({ children, ...props }: ActionMenuItemProps): JSX.Element;
1
+ import { MenuItemProps } from "./MenuItem";
2
+ export interface ActionMenuItemProps extends MenuItemProps {
3
+ }
4
+ /**
5
+ * Use this instead of `MenuItem` when you want to use it inside an `ActionMenu` to make it appear as a dropdown.
6
+ *
7
+ * It basically is a shortcut. Instead of writing:
8
+ *
9
+ * ```tsx
10
+ * <ActionMenu>
11
+ * <div className="position-relative z-1">
12
+ * <MenuItem
13
+ * label="Parent"
14
+ * supportOutside
15
+ * dropdownClassName={`position-md-absolute end-0 d-flex flex-column`}
16
+ * >
17
+ * <MenuItem label="Item 1" />
18
+ * </MenuItem>
19
+ * </div>
20
+ * </ActionMenu>
21
+ * ```
22
+ *
23
+ * you can write:
24
+ * ```tsx
25
+ * <ActionMenu>
26
+ * <ActionMenuItem label="Parent">
27
+ * <MenuItem label="Item 1" />
28
+ * </MenuItem>
29
+ * </ActionMenu>
30
+ * ```
31
+ *
32
+ * The responsive utility class for absolute position (`position-md-absolute` in this example) is automatically added based on the `break` param of the parent `ActionMenu`.
33
+ */
34
+ export default function ActionMenuItem({ children, ...props }: ActionMenuItemProps): import("react/jsx-runtime").JSX.Element;
@@ -1,21 +1,20 @@
1
- /// <reference types="react" />
2
- import { breakOption } from "./shared";
3
- export interface BodyProps {
4
- id?: string;
5
- className?: string;
6
- /**
7
- * Class name for the container. More info: https://getbootstrap.com/docs/4.0/layout/overview/#containers
8
- */
9
- containerClass?: string;
10
- /**
11
- * Set `true` if this page uses `<Actions />`, so this component will get enough padding to avoid overlapping of the content.
12
- */
13
- hasActions?: boolean;
14
- break?: breakOption;
15
- onClick?: (event: any) => void;
16
- children?: any;
17
- }
18
- /**
19
- * Contains the content of the page.
20
- */
21
- export default function Body({ id, className, containerClass, hasActions, onClick, children, ...rest }: BodyProps): JSX.Element;
1
+ import { breakOption } from "./shared";
2
+ export interface BodyProps {
3
+ id?: string;
4
+ className?: string;
5
+ /**
6
+ * Class name for the container. More info: https://getbootstrap.com/docs/4.0/layout/overview/#containers
7
+ */
8
+ containerClass?: string;
9
+ /**
10
+ * Set `true` if this page uses `<Actions />`, so this component will get enough padding to avoid overlapping of the content.
11
+ */
12
+ hasActions?: boolean;
13
+ break?: breakOption;
14
+ onClick?: (event: any) => void;
15
+ children?: any;
16
+ }
17
+ /**
18
+ * Contains the content of the page.
19
+ */
20
+ export default function Body({ id, className, containerClass, hasActions, onClick, children, ...rest }: BodyProps): import("react/jsx-runtime").JSX.Element;
@@ -1,18 +1,18 @@
1
- import { CSSProperties } from "react";
2
- export interface CaretProps {
3
- /**
4
- * Indicates if open or not.
5
- */
6
- open?: boolean;
7
- /**
8
- * By default the caret points to the right when closed. Set mirrored and it will point to the left.
9
- */
10
- mirrored?: boolean;
11
- className?: string;
12
- style?: CSSProperties;
13
- }
14
- /**
15
- * @deprecated Will be replaced by the `Chevron` component in the next major version.
16
- * Caret icon component.
17
- */
18
- export default function Caret({ open, mirrored, className, style }: CaretProps): JSX.Element;
1
+ import { CSSProperties } from "react";
2
+ export interface CaretProps {
3
+ /**
4
+ * Indicates if open or not.
5
+ */
6
+ open?: boolean;
7
+ /**
8
+ * By default the caret points to the right when closed. Set mirrored and it will point to the left.
9
+ */
10
+ mirrored?: boolean;
11
+ className?: string;
12
+ style?: CSSProperties;
13
+ }
14
+ /**
15
+ * @deprecated Will be replaced by the `Chevron` component in the next major version.
16
+ * Caret icon component.
17
+ */
18
+ export default function Caret({ open, mirrored, className, style }: CaretProps): import("react/jsx-runtime").JSX.Element;
@@ -1,17 +1,17 @@
1
- import { CSSProperties } from "react";
2
- export interface ChevronProps {
3
- /**
4
- * Indicates if open or not.
5
- */
6
- open?: boolean;
7
- /**
8
- * By default the chevron points to the right when closed. Set mirrored and it will point to the left.
9
- */
10
- mirrored?: boolean;
11
- className?: string;
12
- style?: CSSProperties;
13
- }
14
- /**
15
- * Chevron icon component with open state.
16
- */
17
- export default function Chevron({ open, mirrored, className, style }: ChevronProps): JSX.Element;
1
+ import { CSSProperties } from "react";
2
+ export interface ChevronProps {
3
+ /**
4
+ * Indicates if open or not.
5
+ */
6
+ open?: boolean;
7
+ /**
8
+ * By default the chevron points to the right when closed. Set mirrored and it will point to the left.
9
+ */
10
+ mirrored?: boolean;
11
+ className?: string;
12
+ style?: CSSProperties;
13
+ }
14
+ /**
15
+ * Chevron icon component with open state.
16
+ */
17
+ export default function Chevron({ open, mirrored, className, style }: ChevronProps): import("react/jsx-runtime").JSX.Element;
@@ -1,77 +1,76 @@
1
- import { Component } from "react";
2
- declare global {
3
- interface Window {
4
- blueHashRouterRef: any;
5
- toggleSidebarEvent: any;
6
- }
7
- }
8
- export interface HashRouterProps {
9
- /**
10
- * Registers pages for the built-in routing system. Example: `[{name: "home", component: <HomePage />}]`
11
- */
12
- pages?: {
13
- name: string;
14
- component: JSX.Element;
15
- }[];
16
- /**
17
- * When `true`, always the "home" route will be rendered.
18
- */
19
- unrouteable?: boolean;
20
- /**
21
- * By default, the document title will automatically set. Set this prop to `true` to disable this behaviour.
22
- */
23
- disableTitleSet?: boolean;
24
- /**
25
- * Define a function, that will be fired when switching routes. When your function returns `true`, the default route behaviour will be blocked.
26
- * You can use something like `window.blueHashRouterRef.setState({ blockRouting: onHashChange })` globally to set the value from anywhere in your app.
27
- */
28
- blockRouting?: (newMatch: string[], currentMatch: string[]) => void | boolean;
29
- children?: any;
30
- }
31
- export interface HashRouterState {
32
- match: any;
33
- history: string[];
34
- hash: string;
35
- hashHistory: string[];
36
- blockRouting?: (newMatch: string[], currentMatch: string[]) => void | boolean;
37
- }
38
- /**
39
- * Component for simple hash routing. It's recommended to use solutions like `react-router-dom` for more complex routing.
40
- *
41
- * As soon this component is mounted, it is globally available under `window.blueHashRouterRef`.
42
- * You can also append your own event listeners.
43
- *
44
- * Allowed events:
45
- *
46
- * * **componentDidUpdate** - Component was updated.
47
- * Example: `window.blueHashRouterRef.addEventListener("componentDidUpdate", (prevProps, prevState) => { })`
48
- * * **pageDidShowAgain** - Page appeared again with the same old state. In the callback function you can reinitialize things.
49
- * Example: `window.blueHashRouterRef.addEventListener("pageDidShowAgain", "home", (prevProps, prevState) => { })`
50
- * * **pageDidHide** - This page disappeared and another page appears instead.
51
- * Example: `window.blueHashRouterRef.addEventListener("pageDidHide", "home", (prevProps, prevState) => { })`
52
- *
53
- * Method to add event listeners:
54
- * * `window.blueHashRouterRef.`**addEventListener**`(eventName: string, param2: any, param3: any, listenerId?: string)`
55
- *
56
- * Methods to remove event listeners:
57
- * * `window.blueHashRouterRef.`**removeEventListener**`(eventName: string, listenerId: string)`
58
- * * `window.blueHashRouterRef.`**removeDuplicatedEventListeners**`()` - Will automatically be called when running `addEventListener`
59
- */
60
- export default class HashRouter extends Component<HashRouterProps, HashRouterState> {
61
- defaultMatch: string[];
62
- eventListeners: any[];
63
- constructor(props: HashRouterProps);
64
- onHashChange(): void;
65
- static get defaultProps(): {
66
- unrouteable: boolean;
67
- disableTitleSet: boolean;
68
- };
69
- componentDidMount(): void;
70
- componentWillUnmount(): void;
71
- componentDidUpdate(prevProps: HashRouterProps, prevState: HashRouterState): void;
72
- initMatch(): void;
73
- addEventListener(param1: any, param2: any, param3: any, listenerId?: string): void;
74
- removeEventListener(type: string, listenerId: string): void;
75
- removeDuplicatedEventListeners(): void;
76
- render(): JSX.Element;
77
- }
1
+ import { Component, ReactNode } from "react";
2
+ declare global {
3
+ interface Window {
4
+ blueHashRouterRef: any;
5
+ }
6
+ }
7
+ export interface HashRouterProps {
8
+ /**
9
+ * Registers pages for the built-in routing system. Example: `[{name: "home", component: <HomePage />}]`
10
+ */
11
+ pages?: {
12
+ name: string;
13
+ component: ReactNode;
14
+ }[];
15
+ /**
16
+ * When `true`, always the "home" route will be rendered.
17
+ */
18
+ unrouteable?: boolean;
19
+ /**
20
+ * By default, the document title will automatically set. Set this prop to `true` to disable this behaviour.
21
+ */
22
+ disableTitleSet?: boolean;
23
+ /**
24
+ * Define a function, that will be fired when switching routes. When your function returns `true`, the default route behaviour will be blocked.
25
+ * You can use something like `window.blueHashRouterRef.setState({ blockRouting: onHashChange })` globally to set the value from anywhere in your app.
26
+ */
27
+ blockRouting?: (newMatch: string[], currentMatch: string[]) => void | boolean;
28
+ children?: any;
29
+ }
30
+ export interface HashRouterState {
31
+ match: any;
32
+ history: string[];
33
+ hash: string;
34
+ hashHistory: string[];
35
+ blockRouting?: (newMatch: string[], currentMatch: string[]) => void | boolean;
36
+ }
37
+ /**
38
+ * Component for simple hash routing. It's recommended to use solutions like `react-router-dom` for more complex routing.
39
+ *
40
+ * As soon this component is mounted, it is globally available under `window.blueHashRouterRef`.
41
+ * You can also append your own event listeners.
42
+ *
43
+ * Allowed events:
44
+ *
45
+ * * **componentDidUpdate** - Component was updated.
46
+ * Example: `window.blueHashRouterRef.addEventListener("componentDidUpdate", (prevProps, prevState) => { })`
47
+ * * **pageDidShowAgain** - Page appeared again with the same old state. In the callback function you can reinitialize things.
48
+ * Example: `window.blueHashRouterRef.addEventListener("pageDidShowAgain", "home", (prevProps, prevState) => { })`
49
+ * * **pageDidHide** - This page disappeared and another page appears instead.
50
+ * Example: `window.blueHashRouterRef.addEventListener("pageDidHide", "home", (prevProps, prevState) => { })`
51
+ *
52
+ * Method to add event listeners:
53
+ * * `window.blueHashRouterRef.`**addEventListener**`(eventName: string, param2: any, param3: any, listenerId?: string)`
54
+ *
55
+ * Methods to remove event listeners:
56
+ * * `window.blueHashRouterRef.`**removeEventListener**`(eventName: string, listenerId: string)`
57
+ * * `window.blueHashRouterRef.`**removeDuplicatedEventListeners**`()` - Will automatically be called when running `addEventListener`
58
+ */
59
+ export default class HashRouter extends Component<HashRouterProps, HashRouterState> {
60
+ defaultMatch: string[];
61
+ eventListeners: any[];
62
+ constructor(props: HashRouterProps);
63
+ onHashChange(): void;
64
+ static get defaultProps(): {
65
+ unrouteable: boolean;
66
+ disableTitleSet: boolean;
67
+ };
68
+ componentDidMount(): void;
69
+ componentWillUnmount(): void;
70
+ componentDidUpdate(prevProps: HashRouterProps, prevState: HashRouterState): void;
71
+ initMatch(): void;
72
+ addEventListener(param1: any, param2: any, param3: any, listenerId?: string): void;
73
+ removeEventListener(type: string, listenerId: string): void;
74
+ removeDuplicatedEventListeners(): void;
75
+ render(): import("react/jsx-runtime").JSX.Element;
76
+ }
@@ -1,8 +1,8 @@
1
- import { ReactNode } from "react";
2
- export interface HeaderProps {
3
- children?: ReactNode;
4
- }
5
- /**
6
- * The top of a page.
7
- */
8
- export default function Header({ children }: HeaderProps): JSX.Element;
1
+ import { ReactNode } from "react";
2
+ export interface HeaderProps {
3
+ children?: ReactNode;
4
+ }
5
+ /**
6
+ * The top of a page.
7
+ */
8
+ export default function Header({ children }: HeaderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,40 +1,39 @@
1
- /// <reference types="react" />
2
- export interface HeaderTitleProps {
3
- /**
4
- * Can be an image. Will be placed inside of the `src` attribute.
5
- */
6
- logo?: string;
7
- logoAlt?: string;
8
- /**
9
- * Text next to the logo.
10
- */
11
- appTitle?: string;
12
- /**
13
- * Disables that the app title will disappear at a specific view width.
14
- */
15
- keepAppTitle?: boolean;
16
- children?: any;
17
- /**
18
- * Extends `className` from parent element.
19
- */
20
- className?: string;
21
- /**
22
- * Is the component used on the sidebar?
23
- */
24
- sidebar?: boolean;
25
- /**
26
- * By default, MenuItem is a `"a"`.
27
- * If you want to have it another type, you can pass a component reference with this prop (e.g. `Link`).
28
- */
29
- elementType?: any;
30
- /**
31
- * Sets `to` prop, e.g. when you use the `Link` component from React Router.
32
- */
33
- to?: string;
34
- href?: string;
35
- }
36
- /**
37
- * The title area at the header bar.
38
- * Depending on its content, the document's title will be set aswell (what will be shown in the browser title bar).
39
- */
40
- export default function HeaderTitle({ logo, logoAlt, appTitle, keepAppTitle, children, className, sidebar, elementType, to, href }: HeaderTitleProps): JSX.Element;
1
+ export interface HeaderTitleProps {
2
+ /**
3
+ * Can be an image. Will be placed inside of the `src` attribute.
4
+ */
5
+ logo?: string;
6
+ logoAlt?: string;
7
+ /**
8
+ * Text next to the logo.
9
+ */
10
+ appTitle?: string;
11
+ /**
12
+ * Disables that the app title will disappear at a specific view width.
13
+ */
14
+ keepAppTitle?: boolean;
15
+ children?: any;
16
+ /**
17
+ * Extends `className` from parent element.
18
+ */
19
+ className?: string;
20
+ /**
21
+ * Is the component used on the sidebar?
22
+ */
23
+ sidebar?: boolean;
24
+ /**
25
+ * By default, MenuItem is a `"a"`.
26
+ * If you want to have it another type, you can pass a component reference with this prop (e.g. `Link`).
27
+ */
28
+ elementType?: any;
29
+ /**
30
+ * Sets `to` prop, e.g. when you use the `Link` component from React Router.
31
+ */
32
+ to?: string;
33
+ href?: string;
34
+ }
35
+ /**
36
+ * The title area at the header bar.
37
+ * Depending on its content, the document's title will be set aswell (what will be shown in the browser title bar).
38
+ */
39
+ export default function HeaderTitle({ logo, logoAlt, appTitle, keepAppTitle, children, className, sidebar, elementType, to, href }: HeaderTitleProps): import("react/jsx-runtime").JSX.Element;
@@ -1,19 +1,18 @@
1
- /// <reference types="react" />
2
- import { MenuItemProps } from "./MenuItem";
3
- export interface IconMenuItemProps extends MenuItemProps {
4
- outerClass?: string;
5
- /**
6
- * Tooltip will be placed to the end/right by default. You can change the direction with this prop.
7
- */
8
- tooltipClass?: string;
9
- /**
10
- * When used inside of the sidebar: active indicator will be displayed underneath instead of before.
11
- * The prop to `false` to disable this behavior.
12
- */
13
- horizontalOnOpenSidebar?: boolean;
14
- }
15
- /**
16
- * Variant of `MenuItem` to primarily display an icon without a label.
17
- * The label prop will be displayed as a tooltip.
18
- */
19
- export default function IconMenuItem({ label, outerClass, tooltipClass, horizontalOnOpenSidebar, className, ...props }: IconMenuItemProps): JSX.Element;
1
+ import { MenuItemProps } from "./MenuItem";
2
+ export interface IconMenuItemProps extends MenuItemProps {
3
+ outerClass?: string;
4
+ /**
5
+ * Tooltip will be placed to the end/right by default. You can change the direction with this prop.
6
+ */
7
+ tooltipClass?: string;
8
+ /**
9
+ * When used inside of the sidebar: active indicator will be displayed underneath instead of before.
10
+ * The prop to `false` to disable this behavior.
11
+ */
12
+ horizontalOnOpenSidebar?: boolean;
13
+ }
14
+ /**
15
+ * Variant of `MenuItem` to primarily display an icon without a label.
16
+ * The label prop will be displayed as a tooltip.
17
+ */
18
+ export default function IconMenuItem({ label, outerClass, tooltipClass, horizontalOnOpenSidebar, className, ...props }: IconMenuItemProps): import("react/jsx-runtime").JSX.Element;
@@ -1,23 +1,22 @@
1
- /// <reference types="react" />
2
- export interface IntroProps {
3
- /**
4
- * Can be an image. Will be placed inside of the `src` attribute.
5
- */
6
- logo?: string;
7
- /**
8
- * Max width from the logo.
9
- */
10
- logoMaxWidth?: string;
11
- /**
12
- * Text which will be placed under the logo.
13
- */
14
- title?: string;
15
- /**
16
- * Content
17
- */
18
- children?: any;
19
- }
20
- /**
21
- * Can be used for a sign-in page.
22
- */
23
- export default function Intro({ logo, logoMaxWidth, title, children }: IntroProps): JSX.Element;
1
+ export interface IntroProps {
2
+ /**
3
+ * Can be an image. Will be placed inside of the `src` attribute.
4
+ */
5
+ logo?: string;
6
+ /**
7
+ * Max width from the logo.
8
+ */
9
+ logoMaxWidth?: string;
10
+ /**
11
+ * Text which will be placed under the logo.
12
+ */
13
+ title?: string;
14
+ /**
15
+ * Content
16
+ */
17
+ children?: any;
18
+ }
19
+ /**
20
+ * Can be used for a sign-in page.
21
+ */
22
+ export default function Intro({ logo, logoMaxWidth, title, children }: IntroProps): import("react/jsx-runtime").JSX.Element;