blue-react 9.12.1 → 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 (65) hide show
  1. package/README.md +37 -4
  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 +176 -0
  9. package/dist/components/Header.js +3 -13
  10. package/dist/components/HeaderTitle.js +24 -43
  11. package/dist/components/IconMenuItem.js +17 -33
  12. package/dist/components/Intro.js +12 -22
  13. package/dist/components/Layout.js +72 -360
  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 -68
  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 -0
  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 -144
  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 -29
  61. package/package.json +28 -45
  62. package/dist/components/ActionMenuSwitch.js +0 -44
  63. package/dist/style.css +0 -12836
  64. package/dist/style.min.css +0 -16
  65. package/dist/types/components/ActionMenuSwitch.d.ts +0 -12
@@ -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 declare 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): 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 declare type breakOption = "sm" | "md" | "lg" | "xl";
2
- export declare type ModalType = "ask" | "tell" | "verify";
3
- export declare type StatusType = null | "loading" | "success" | "info" | "warning" | "danger";
4
- export interface StatusAlert {
5
- title?: string;
6
- alertClassName?: string;
7
- close?: boolean;
8
- detailText?: string;
9
- status?: StatusType;
10
- }
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
- blueLayoutRef: any
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 { StatusProvider, useStatus } from "./dist/types/components/StatusProvider"
75
-
76
- export { default as Switch } from "./dist/types/components/Switch"
77
- export { SwitchProps } from "./dist/types/components/Switch"
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,29 +1,56 @@
1
- exports.A = require("./dist/components/A.js")["default"]
2
- exports.ActionMenu = require("./dist/components/ActionMenu.js")["default"]
3
- exports.ActionMenuSwitch = require("./dist/components/ActionMenuSwitch.js")["default"]
4
- exports.ActionMenuItem = require("./dist/components/ActionMenuItem.js")["default"]
5
- exports.Body = require("./dist/components/Body.js")["default"]
6
- exports.Caret = require("./dist/components/Caret.js")["default"]
7
- exports.Chevron = require("./dist/components/Chevron.js")["default"]
8
- exports.Layout = require("./dist/components/Layout.js")["default"]
9
- exports.Header = require("./dist/components/Header.js")["default"]
10
- exports.HeaderTitle = require("./dist/components/HeaderTitle.js")["default"]
11
- exports.IconMenuItem = require("./dist/components/IconMenuItem.js")["default"]
12
- exports.Intro = require("./dist/components/Intro.js")["default"]
13
- exports.MenuItem = require("./dist/components/MenuItem.js")["default"]
14
- exports.Modal = require("./dist/components/Modal.js")["default"]
15
- exports.ModalProvider = require("./dist/components/ModalProvider.js")["ModalProvider"]
16
- exports.useModal = require("./dist/components/ModalProvider.js")["useModal"]
17
- exports.Outside = require("./dist/components/Outside.js")["default"]
18
- exports.Page = require("./dist/components/Page.js")["default"]
19
- exports.Search = require("./dist/components/Search.js")["default"]
20
- exports.SidebarMenu = require("./dist/components/SidebarMenu.js")["default"]
21
- exports.SidebarMenuItem = require("./dist/components/SidebarMenuItem.js")["default"]
22
- exports.SlimContainer = require("./dist/components/SlimContainer.js")["default"]
23
- exports.Status = require("./dist/components/Status.js")["default"]
24
- exports.StatusProvider = require("./dist/components/StatusProvider.js")["StatusProvider"]
25
- exports.useStatus = require("./dist/components/StatusProvider.js")["useStatus"]
26
- exports.Switch = require("./dist/components/Switch.js")["default"]
27
- exports.ToastProvider = require("./dist/components/ToastProvider.js")["ToastProvider"]
28
- exports.useToast = require("./dist/components/ToastProvider.js")["useToast"]
29
- exports.Utilities = require("./dist/components/Utilities.js")["default"]
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,11 +1,12 @@
1
1
  {
2
2
  "name": "blue-react",
3
- "version": "9.12.1",
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
- "homepage": "https://bruegmann.github.io/blue-react/v9",
9
+ "homepage": "https://bruegmann.github.io/blue-react/v10",
9
10
  "repository": {
10
11
  "type": "git",
11
12
  "url": "https://github.com/bruegmann/blue-react.git"
@@ -14,78 +15,60 @@
14
15
  "url": "https://github.com/bruegmann/blue-react/issues"
15
16
  },
16
17
  "scripts": {
17
- "start": "react-scripts start",
18
- "build-docs": "react-scripts build && npm run docgen",
19
- "build-types": "tsc --declaration --emitDeclarationOnly --declarationDir ./dist/types --noEmit false",
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-css": "node ./setVersionToStyleScss.js && node-sass ./dist/style.scss ./dist/style.css && npx postcss ./dist/style.css --use autoprefixer -r && npx postcss ./dist/style.css --use postcss-minify -o ./dist/style.min.css",
22
- "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 build --dest v9",
29
+ "deploy": "gh-pages --dist deployment --dest v10",
28
30
  "prepublishOnly": "npm i && npm run build-release",
29
- "release": "npm publish && npm run deploy",
31
+ "release": "npm publish --tag next && npm run deploy",
30
32
  "prettier": "npx prettier --write .",
31
33
  "license-report": "npx license-report --prod --output=json > ./src/docs/data/license-report.json"
32
34
  },
33
35
  "dependencies": {
34
36
  "@popperjs/core": "^2.11.5",
35
- "blue-web": "^1.3.2",
37
+ "blue-web": "^1.7.0",
36
38
  "bootstrap": "~5.3.3",
37
39
  "clsx": "^1.1.1"
38
40
  },
39
41
  "peerDependencies": {
40
- "react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
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/jest": "^24.9.1",
52
- "@types/node": "^12.12.47",
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
- "autoprefixer": "^10.3.6",
58
- "gh-pages": "^3.1.0",
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": "^18.1.0",
63
+ "react": "^19.0.0",
66
64
  "react-bootstrap-icons": "^1.9.1",
67
65
  "react-docgen": "^5.4.0",
68
- "react-dom": "^18.1.0",
69
- "react-markdown": "^8.0.3",
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
- "reactstrap": "^9.0.0-0",
74
- "typescript": "^4.3.5"
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
  }
@@ -1,44 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = ActionMenuSwitch;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _Switch = _interopRequireDefault(require("./Switch"));
11
-
12
- var _excluded = ["label"];
13
-
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
-
16
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
-
18
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
19
-
20
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
21
-
22
- /**
23
- * @deprecated
24
- * Use a solution with Bootstrap's `.form-check.form-switch` or `MenuItem` with a switch icon.
25
- * Switch for the Action Menu.
26
- */
27
- function ActionMenuSwitch(_ref) {
28
- var label = _ref.label,
29
- props = _objectWithoutProperties(_ref, _excluded);
30
-
31
- return /*#__PURE__*/_react.default.createElement("li", {
32
- className: "nav-item"
33
- }, /*#__PURE__*/_react.default.createElement("a", {
34
- href: "javascript:void(0)",
35
- className: "nav-link blue-actions-menu-item",
36
- onClick: function onClick() {
37
- if (props.onChange) props.onChange();
38
- }
39
- }, /*#__PURE__*/_react.default.createElement(_Switch.default, _extends({}, props, {
40
- elementType: "span"
41
- })), label && /*#__PURE__*/_react.default.createElement("span", {
42
- className: "blue-actions-label"
43
- }, "\xA0", label)));
44
- }