blue-react 11.3.1 → 12.0.0

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