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,22 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* *
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export default function SidebarMenuItem({ outerClass, children, onClick, ...props }: SidebarMenuItemProps): JSX.Element;
|
|
1
|
+
import { MenuItemProps } from "./MenuItem";
|
|
2
|
+
export interface SidebarMenuItemProps extends MenuItemProps {
|
|
3
|
+
outerClass?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated `MenuItem` now has all the features of `SidebarMenuItem`. Use `MenuItem` instead.
|
|
7
|
+
* Extends `MenuItem` with following features:
|
|
8
|
+
* * Shows provided label as tooltip if sidebar is closed.
|
|
9
|
+
* * Children will be displayed on the right side of the parent item.
|
|
10
|
+
*
|
|
11
|
+
* **Important!** Set the following props to the surrounding `SidebarMenu` to provide problems with tooltips:
|
|
12
|
+
* ```jsx
|
|
13
|
+
* <SidebarMenu
|
|
14
|
+
* sidebarClass="overflow-visible"
|
|
15
|
+
* menuClass="overflow-visible"
|
|
16
|
+
* >
|
|
17
|
+
* ...
|
|
18
|
+
* </SidebarMenu>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export default function SidebarMenuItem({ outerClass, children, onClick, ...props }: SidebarMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MouseEventHandler, ReactNode } from "react";
|
|
2
|
-
export interface SidebarTogglerProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
sidebarToggleIconComponent: ReactNode;
|
|
5
|
-
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Button to toggle sidebar state. Designed for internal use inside of `Layout`.
|
|
9
|
-
*/
|
|
10
|
-
export default function SidebarToggler({ className, sidebarToggleIconComponent, onClick }: SidebarTogglerProps): JSX.Element;
|
|
1
|
+
import { MouseEventHandler, ReactNode } from "react";
|
|
2
|
+
export interface SidebarTogglerProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
sidebarToggleIconComponent: ReactNode;
|
|
5
|
+
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Button to toggle sidebar state. Designed for internal use inside of `Layout`.
|
|
9
|
+
*/
|
|
10
|
+
export default function SidebarToggler({ className, sidebarToggleIconComponent, onClick }: SidebarTogglerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
export interface SlimContainerProps {
|
|
3
|
-
children?: ReactNode;
|
|
4
|
-
className?: string;
|
|
5
|
-
innerClassName?: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Shortcut for a combination using Bootstrap's Grid System to create a slim responsive container.
|
|
9
|
-
*/
|
|
10
|
-
export default function SlimContainer({ children, className, innerClassName }: SlimContainerProps): JSX.Element;
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface SlimContainerProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
innerClassName?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Shortcut for a combination using Bootstrap's Grid System to create a slim responsive container.
|
|
9
|
+
*/
|
|
10
|
+
export default function SlimContainer({ children, className, innerClassName }: SlimContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +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;
|
|
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): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,15 +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 };
|
|
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) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const useStatus: () => {
|
|
12
|
+
setAlert: (alert: StatusAlert | null) => void;
|
|
13
|
+
setStatus: (status: StatusType) => void;
|
|
14
|
+
};
|
|
15
|
+
export { useStatus, StatusProvider };
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import React, { ReactNode } from "react";
|
|
2
|
-
export interface SwitchProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
checked?: boolean;
|
|
5
|
-
onChange?: (event: React.ChangeEvent) => void;
|
|
6
|
-
/**
|
|
7
|
-
* Sets label inside of the switch. If you set this, you should also set the className "lg" to make the switch larger.
|
|
8
|
-
*/
|
|
9
|
-
sliderLabel?: string;
|
|
10
|
-
/**
|
|
11
|
-
* You can change the type of the wrapper element. If you do, the `onChange` event might not be triggered.
|
|
12
|
-
*/
|
|
13
|
-
elementType?: string;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Set prop to use the older look and feel. Will disappear in future releases.
|
|
17
|
-
*/
|
|
18
|
-
legacy?: boolean;
|
|
19
|
-
label?: ReactNode | string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* @deprecated
|
|
23
|
-
* Use Bootstrap's `.form-check.form-switch` instead:
|
|
24
|
-
* https://getbootstrap.com/docs/5.2/forms/checks-radios/#switches
|
|
25
|
-
*
|
|
26
|
-
* For now, this component acts as proxy for Bootstrap's Switch.
|
|
27
|
-
* To place a label next to the switch, use the new `label` prop.
|
|
28
|
-
*
|
|
29
|
-
* Migrate to Blue React 8.4.0 and use legacy support: Set the `label` with a string. Or set the `legacy` prop to use the previous look and behaviour.
|
|
30
|
-
*/
|
|
31
|
-
export default function Switch({ className, checked, onChange, sliderLabel, disabled, elementType, legacy, label }: SwitchProps): React.ReactElement<{
|
|
32
|
-
className: string;
|
|
33
|
-
}, string | React.JSXElementConstructor<any>>;
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
export interface SwitchProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
onChange?: (event: React.ChangeEvent) => void;
|
|
6
|
+
/**
|
|
7
|
+
* Sets label inside of the switch. If you set this, you should also set the className "lg" to make the switch larger.
|
|
8
|
+
*/
|
|
9
|
+
sliderLabel?: string;
|
|
10
|
+
/**
|
|
11
|
+
* You can change the type of the wrapper element. If you do, the `onChange` event might not be triggered.
|
|
12
|
+
*/
|
|
13
|
+
elementType?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Set prop to use the older look and feel. Will disappear in future releases.
|
|
17
|
+
*/
|
|
18
|
+
legacy?: boolean;
|
|
19
|
+
label?: ReactNode | string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated
|
|
23
|
+
* Use Bootstrap's `.form-check.form-switch` instead:
|
|
24
|
+
* https://getbootstrap.com/docs/5.2/forms/checks-radios/#switches
|
|
25
|
+
*
|
|
26
|
+
* For now, this component acts as proxy for Bootstrap's Switch.
|
|
27
|
+
* To place a label next to the switch, use the new `label` prop.
|
|
28
|
+
*
|
|
29
|
+
* Migrate to Blue React 8.4.0 and use legacy support: Set the `label` with a string. Or set the `legacy` prop to use the previous look and behaviour.
|
|
30
|
+
*/
|
|
31
|
+
export default function Switch({ className, checked, onChange, sliderLabel, disabled, elementType, legacy, label }: SwitchProps): React.ReactElement<{
|
|
32
|
+
className: string;
|
|
33
|
+
}, string | React.JSXElementConstructor<any>>;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
export interface ToastProviderProps {
|
|
3
|
-
children?: ReactNode;
|
|
4
|
-
successIcon?: ReactNode;
|
|
5
|
-
infoIcon?: ReactNode;
|
|
6
|
-
warningIcon?: ReactNode;
|
|
7
|
-
dangerIcon?: ReactNode;
|
|
8
|
-
}
|
|
9
|
-
export
|
|
10
|
-
export interface ToastItem {
|
|
11
|
-
type: ToastItemType;
|
|
12
|
-
title?: string;
|
|
13
|
-
message?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Push notifications to your visitors using Bootstrap's toast component.
|
|
17
|
-
*/
|
|
18
|
-
export declare function ToastProvider({ children, successIcon, infoIcon, warningIcon, dangerIcon }: ToastProviderProps): JSX.Element;
|
|
19
|
-
export declare const useToast: () => {
|
|
20
|
-
addToast: (toastItem: ToastItem) => void;
|
|
21
|
-
clearToasts: () => void;
|
|
22
|
-
};
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface ToastProviderProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
successIcon?: ReactNode;
|
|
5
|
+
infoIcon?: ReactNode;
|
|
6
|
+
warningIcon?: ReactNode;
|
|
7
|
+
dangerIcon?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export type ToastItemType = "success" | "danger" | "info" | "warning";
|
|
10
|
+
export interface ToastItem {
|
|
11
|
+
type: ToastItemType;
|
|
12
|
+
title?: string;
|
|
13
|
+
message?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Push notifications to your visitors using Bootstrap's toast component.
|
|
17
|
+
*/
|
|
18
|
+
export declare function ToastProvider({ children, successIcon, infoIcon, warningIcon, dangerIcon }: ToastProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const useToast: () => {
|
|
20
|
+
addToast: (toastItem: ToastItem) => void;
|
|
21
|
+
clearToasts: () => void;
|
|
22
|
+
};
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { startLoading, finishLoading, showSuccess, hideSuccess, resetAlertMessage, setAlertMessage, scrollToTop, fetchData } from "blue-web/dist/js/utils";
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated Use (el as HTMLElement).classList.contains("my-class") instead.
|
|
4
|
-
*/
|
|
5
|
-
export declare function hasClass(el: HTMLElement | null, className: string): boolean;
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated Use (el as HTMLElement).classList.add("my-class") instead.
|
|
8
|
-
*/
|
|
9
|
-
export declare function addClass(el: HTMLElement | null, className: string): void;
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated Use (el as HTMLElement).classList.remove("my-class") instead.
|
|
12
|
-
*/
|
|
13
|
-
export declare function removeClass(el: HTMLElement | null, className: string): void;
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated Use (el as HTMLElement).classList.toggle("my-class") instead.
|
|
16
|
-
*/
|
|
17
|
-
export declare function toggleClass(element: HTMLElement | null, className: string): void;
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated Is handled inside of `ActioMenu` component now
|
|
20
|
-
*/
|
|
21
|
-
export declare function toggleActions(): void;
|
|
22
|
-
/**
|
|
23
|
-
* @deprecated In future versions of Blue React, you will need to use utils of Blue Web directly.
|
|
24
|
-
*/
|
|
25
|
-
declare const _default: {
|
|
26
|
-
hasClass: typeof hasClass;
|
|
27
|
-
addClass: typeof addClass;
|
|
28
|
-
removeClass: typeof removeClass;
|
|
29
|
-
toggleClass: typeof toggleClass;
|
|
30
|
-
startLoading: typeof startLoading;
|
|
31
|
-
finishLoading: typeof finishLoading;
|
|
32
|
-
showSuccess: typeof showSuccess;
|
|
33
|
-
hideSuccess: typeof hideSuccess;
|
|
34
|
-
toggleActions: typeof toggleActions;
|
|
35
|
-
resetAlertMessage: typeof resetAlertMessage;
|
|
36
|
-
setAlertMessage: typeof setAlertMessage;
|
|
37
|
-
guid: () => string;
|
|
38
|
-
scrollToTop: typeof scrollToTop;
|
|
39
|
-
fetchData: typeof fetchData;
|
|
40
|
-
};
|
|
41
|
-
export default _default;
|
|
1
|
+
import { startLoading, finishLoading, showSuccess, hideSuccess, resetAlertMessage, setAlertMessage, scrollToTop, fetchData } from "blue-web/dist/js/utils";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Use (el as HTMLElement).classList.contains("my-class") instead.
|
|
4
|
+
*/
|
|
5
|
+
export declare function hasClass(el: HTMLElement | null, className: string): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Use (el as HTMLElement).classList.add("my-class") instead.
|
|
8
|
+
*/
|
|
9
|
+
export declare function addClass(el: HTMLElement | null, className: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use (el as HTMLElement).classList.remove("my-class") instead.
|
|
12
|
+
*/
|
|
13
|
+
export declare function removeClass(el: HTMLElement | null, className: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use (el as HTMLElement).classList.toggle("my-class") instead.
|
|
16
|
+
*/
|
|
17
|
+
export declare function toggleClass(element: HTMLElement | null, className: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated Is handled inside of `ActioMenu` component now
|
|
20
|
+
*/
|
|
21
|
+
export declare function toggleActions(): void;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated In future versions of Blue React, you will need to use utils of Blue Web directly.
|
|
24
|
+
*/
|
|
25
|
+
declare const _default: {
|
|
26
|
+
hasClass: typeof hasClass;
|
|
27
|
+
addClass: typeof addClass;
|
|
28
|
+
removeClass: typeof removeClass;
|
|
29
|
+
toggleClass: typeof toggleClass;
|
|
30
|
+
startLoading: typeof startLoading;
|
|
31
|
+
finishLoading: typeof finishLoading;
|
|
32
|
+
showSuccess: typeof showSuccess;
|
|
33
|
+
hideSuccess: typeof hideSuccess;
|
|
34
|
+
toggleActions: typeof toggleActions;
|
|
35
|
+
resetAlertMessage: typeof resetAlertMessage;
|
|
36
|
+
setAlertMessage: typeof setAlertMessage;
|
|
37
|
+
guid: () => string;
|
|
38
|
+
scrollToTop: typeof scrollToTop;
|
|
39
|
+
fetchData: typeof fetchData;
|
|
40
|
+
};
|
|
41
|
+
export default _default;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export interface StatusAlert {
|
|
5
|
-
title?: string;
|
|
6
|
-
alertClassName?: string;
|
|
7
|
-
close?: boolean;
|
|
8
|
-
detailText?: string;
|
|
9
|
-
status?: StatusType;
|
|
10
|
-
}
|
|
11
|
-
interface Phrases {
|
|
12
|
-
[key: string]: string[];
|
|
13
|
-
}
|
|
14
|
-
export declare function getPhrase(keyword: string, countryCode?: string | undefined, _phrases?: Phrases | undefined): string;
|
|
15
|
-
export {};
|
|
1
|
+
export type breakOption = "sm" | "md" | "lg" | "xl";
|
|
2
|
+
export type ModalType = "ask" | "tell" | "verify";
|
|
3
|
+
export 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
|
+
}
|
|
11
|
+
interface Phrases {
|
|
12
|
+
[key: string]: string[];
|
|
13
|
+
}
|
|
14
|
+
export declare function getPhrase(keyword: string, countryCode?: string | undefined, _phrases?: Phrases | undefined): string;
|
|
15
|
+
export {};
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
interface Window {
|
|
3
|
-
|
|
4
|
-
toggleSidebarEvent: any
|
|
3
|
+
blueHashRouterRef: any
|
|
5
4
|
}
|
|
6
5
|
}
|
|
7
6
|
export default global
|
|
@@ -15,21 +14,18 @@ export { AProps } from "./dist/types/components/A"
|
|
|
15
14
|
export { default as ActionMenu } from "./dist/types/components/ActionMenu"
|
|
16
15
|
export { ActionMenuProps } from "./dist/types/components/ActionMenu"
|
|
17
16
|
|
|
18
|
-
export { default as ActionMenuSwitch } from "./dist/types/components/ActionMenuSwitch"
|
|
19
|
-
export { ActionMenuSwitchProps } from "./dist/types/components/ActionMenuSwitch"
|
|
20
|
-
|
|
21
17
|
export { default as ActionMenuItem } from "./dist/types/components/ActionMenuItem"
|
|
22
18
|
export { ActionMenuItemProps } from "./dist/types/components/ActionMenuItem"
|
|
23
19
|
|
|
24
20
|
export { default as Body } from "./dist/types/components/Body"
|
|
25
21
|
export { BodyProps } from "./dist/types/components/Body"
|
|
26
22
|
|
|
27
|
-
export { default as Caret } from "./dist/types/components/Caret"
|
|
28
|
-
export { CaretProps } from "./dist/types/components/Caret"
|
|
29
|
-
|
|
30
23
|
export { default as Chevron } from "./dist/types/components/Chevron"
|
|
31
24
|
export { ChevronProps } from "./dist/types/components/Chevron"
|
|
32
25
|
|
|
26
|
+
export { default as HashRouter } from "./dist/types/components/HashRouter"
|
|
27
|
+
export { HashRouterProps } from "./dist/types/components/HashRouter"
|
|
28
|
+
|
|
33
29
|
export { default as Header } from "./dist/types/components/Header"
|
|
34
30
|
export { HeaderProps } from "./dist/types/components/Header"
|
|
35
31
|
|
|
@@ -71,10 +67,10 @@ export { SlimContainerProps } from "./dist/types/components/SlimContainer"
|
|
|
71
67
|
export { default as Status } from "./dist/types/components/Status"
|
|
72
68
|
export { StatusProps } from "./dist/types/components/Status"
|
|
73
69
|
|
|
74
|
-
export {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
70
|
+
export {
|
|
71
|
+
StatusProvider,
|
|
72
|
+
useStatus
|
|
73
|
+
} from "./dist/types/components/StatusProvider"
|
|
78
74
|
|
|
79
75
|
export {
|
|
80
76
|
ToastProvider,
|
package/index.js
CHANGED
|
@@ -1,30 +1,56 @@
|
|
|
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
|
-
|
|
1
|
+
// Import statements
|
|
2
|
+
import A from "./dist/components/A.js"
|
|
3
|
+
import ActionMenu from "./dist/components/ActionMenu.js"
|
|
4
|
+
import ActionMenuItem from "./dist/components/ActionMenuItem.js"
|
|
5
|
+
import Body from "./dist/components/Body.js"
|
|
6
|
+
import Chevron from "./dist/components/Chevron.js"
|
|
7
|
+
import HashRouter from "./dist/components/HashRouter.js"
|
|
8
|
+
import Layout from "./dist/components/Layout.js"
|
|
9
|
+
import Header from "./dist/components/Header.js"
|
|
10
|
+
import HeaderTitle from "./dist/components/HeaderTitle.js"
|
|
11
|
+
import IconMenuItem from "./dist/components/IconMenuItem.js"
|
|
12
|
+
import Intro from "./dist/components/Intro.js"
|
|
13
|
+
import MenuItem from "./dist/components/MenuItem.js"
|
|
14
|
+
import Modal from "./dist/components/Modal.js"
|
|
15
|
+
import { ModalProvider, useModal } from "./dist/components/ModalProvider.js"
|
|
16
|
+
import Outside from "./dist/components/Outside.js"
|
|
17
|
+
import Page from "./dist/components/Page.js"
|
|
18
|
+
import Search from "./dist/components/Search.js"
|
|
19
|
+
import SidebarMenu from "./dist/components/SidebarMenu.js"
|
|
20
|
+
import SidebarMenuItem from "./dist/components/SidebarMenuItem.js"
|
|
21
|
+
import SlimContainer from "./dist/components/SlimContainer.js"
|
|
22
|
+
import Status from "./dist/components/Status.js"
|
|
23
|
+
import { StatusProvider, useStatus } from "./dist/components/StatusProvider.js"
|
|
24
|
+
import { ToastProvider, useToast } from "./dist/components/ToastProvider.js"
|
|
25
|
+
import Utilities from "./dist/components/Utilities.js"
|
|
26
|
+
|
|
27
|
+
// Export statements
|
|
28
|
+
export {
|
|
29
|
+
A,
|
|
30
|
+
ActionMenu,
|
|
31
|
+
ActionMenuItem,
|
|
32
|
+
Body,
|
|
33
|
+
Chevron,
|
|
34
|
+
HashRouter,
|
|
35
|
+
Layout,
|
|
36
|
+
Header,
|
|
37
|
+
HeaderTitle,
|
|
38
|
+
IconMenuItem,
|
|
39
|
+
Intro,
|
|
40
|
+
MenuItem,
|
|
41
|
+
Modal,
|
|
42
|
+
ModalProvider,
|
|
43
|
+
useModal,
|
|
44
|
+
Outside,
|
|
45
|
+
Page,
|
|
46
|
+
Search,
|
|
47
|
+
SidebarMenu,
|
|
48
|
+
SidebarMenuItem,
|
|
49
|
+
SlimContainer,
|
|
50
|
+
Status,
|
|
51
|
+
StatusProvider,
|
|
52
|
+
useStatus,
|
|
53
|
+
ToastProvider,
|
|
54
|
+
useToast,
|
|
55
|
+
Utilities
|
|
56
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blue-react",
|
|
3
|
-
"version": "10.0.0-
|
|
3
|
+
"version": "10.0.0-rc2",
|
|
4
4
|
"description": "Blue React Components",
|
|
5
5
|
"license": "LGPL-3.0-or-later",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"main": "index.js",
|
|
7
8
|
"types": "index.d.ts",
|
|
8
9
|
"homepage": "https://bruegmann.github.io/blue-react/v10",
|
|
@@ -14,17 +15,18 @@
|
|
|
14
15
|
"url": "https://github.com/bruegmann/blue-react/issues"
|
|
15
16
|
},
|
|
16
17
|
"scripts": {
|
|
17
|
-
"start": "
|
|
18
|
-
"build-docs": "
|
|
19
|
-
"
|
|
18
|
+
"start": "vite",
|
|
19
|
+
"build-docs": "tsc -b && vite build --base=/blue-react/v10/ && npm run docgen",
|
|
20
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
21
|
+
"preview": "vite preview",
|
|
22
|
+
"build-types": "tsc -p tsconfig.app.json --declaration --emitDeclarationOnly --declarationDir ./dist/types --noEmit false --composite false",
|
|
20
23
|
"build": "babel ./src/components --out-dir ./dist/components --extensions \".tsx,.js,.ts\"",
|
|
21
|
-
"build-
|
|
22
|
-
"build-release": "npm run build-types && npm run build && npm run build-css && npm run docgen",
|
|
24
|
+
"build-release": "npm run build-types && npm run build && npm run docgen",
|
|
23
25
|
"docgen": "react-docgen ./src/components/ -o ./src/docs/data/docs.json --extension tsx && node followUpDocs && npm run license-report",
|
|
24
26
|
"test": "react-scripts test",
|
|
25
27
|
"eject": "react-scripts eject",
|
|
26
28
|
"predeploy": "npm run build-docs",
|
|
27
|
-
"deploy": "gh-pages --dist
|
|
29
|
+
"deploy": "gh-pages --dist deployment --dest v10",
|
|
28
30
|
"prepublishOnly": "npm i && npm run build-release",
|
|
29
31
|
"release": "npm publish --tag next && npm run deploy",
|
|
30
32
|
"prettier": "npx prettier --write .",
|
|
@@ -37,55 +39,36 @@
|
|
|
37
39
|
"clsx": "^1.1.1"
|
|
38
40
|
},
|
|
39
41
|
"peerDependencies": {
|
|
40
|
-
"react": "^
|
|
42
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
41
43
|
},
|
|
42
44
|
"devDependencies": {
|
|
43
45
|
"@babel/cli": "^7.10.4",
|
|
44
46
|
"@babel/preset-env": "^7.10.4",
|
|
45
47
|
"@babel/preset-react": "^7.10.4",
|
|
46
48
|
"@babel/preset-typescript": "^7.9.0",
|
|
47
|
-
"@testing-library/jest-dom": "^4.2.4",
|
|
48
|
-
"@testing-library/react": "^9.5.0",
|
|
49
|
-
"@testing-library/user-event": "^7.2.1",
|
|
50
49
|
"@types/bootstrap": "^5.0.17",
|
|
51
|
-
"@types/
|
|
52
|
-
"@types/
|
|
53
|
-
"@types/react": "^18.0.9",
|
|
54
|
-
"@types/react-dom": "^18.0.5",
|
|
50
|
+
"@types/react": "^19.0.2",
|
|
51
|
+
"@types/react-dom": "^19.0.2",
|
|
55
52
|
"@types/react-router-dom": "^5.3.3",
|
|
56
53
|
"@types/react-syntax-highlighter": "^13.5.0",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^7.15.0",
|
|
55
|
+
"@typescript-eslint/parser": "^7.15.0",
|
|
56
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
57
|
+
"eslint": "^8.57.0",
|
|
58
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
59
|
+
"eslint-plugin-react-refresh": "^0.4.7",
|
|
60
|
+
"gh-pages": "^6.3.0",
|
|
59
61
|
"license-report": "^6.2.0",
|
|
60
|
-
"lint-staged": "^11.1.2",
|
|
61
|
-
"node-sass": "^9.0.0",
|
|
62
|
-
"postcss-cli": "^9.0.1",
|
|
63
|
-
"postcss-minify": "^1.1.0",
|
|
64
62
|
"prettier": "2.4.1",
|
|
65
|
-
"react": "^
|
|
63
|
+
"react": "^19.0.0",
|
|
66
64
|
"react-bootstrap-icons": "^1.9.1",
|
|
67
65
|
"react-docgen": "^5.4.0",
|
|
68
|
-
"react-dom": "^
|
|
69
|
-
"react-markdown": "^
|
|
66
|
+
"react-dom": "^19.0.0",
|
|
67
|
+
"react-markdown": "^9.0.1",
|
|
70
68
|
"react-router-dom": "^5.3.3",
|
|
71
|
-
"react-scripts": "^5.0.1",
|
|
72
69
|
"react-syntax-highlighter": "^15.4.3",
|
|
73
|
-
"
|
|
74
|
-
"typescript": "^
|
|
75
|
-
|
|
76
|
-
"eslintConfig": {
|
|
77
|
-
"extends": "react-app"
|
|
78
|
-
},
|
|
79
|
-
"browserslist": {
|
|
80
|
-
"production": [
|
|
81
|
-
">0.2%",
|
|
82
|
-
"not dead",
|
|
83
|
-
"not op_mini all"
|
|
84
|
-
],
|
|
85
|
-
"development": [
|
|
86
|
-
"last 1 chrome version",
|
|
87
|
-
"last 1 firefox version",
|
|
88
|
-
"last 1 safari version"
|
|
89
|
-
]
|
|
70
|
+
"sass": "1.77.6",
|
|
71
|
+
"typescript": "^5.2.2",
|
|
72
|
+
"vite": "^5.3.4"
|
|
90
73
|
}
|
|
91
74
|
}
|