blue-react 9.12.0 → 9.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/A.d.ts +9 -0
- package/dist/components/ActionMenu.d.ts +25 -0
- package/dist/components/Body.d.ts +21 -0
- package/dist/components/Chevron.d.ts +17 -0
- package/dist/components/Chevron.js +2 -1
- package/dist/components/HashRouter.d.ts +76 -0
- package/dist/components/HashRouter.js +176 -0
- package/dist/components/Header.d.ts +9 -0
- package/dist/components/HeaderTitle.d.ts +40 -0
- package/dist/components/IconMenuItem.d.ts +18 -0
- package/dist/components/Intro.d.ts +22 -0
- package/dist/components/Layout/LayoutHeader.d.ts +4 -0
- package/dist/components/Layout/LayoutHeader.js +25 -0
- package/dist/components/Layout/LayoutMain.d.ts +5 -0
- package/dist/components/Layout/LayoutMain.js +17 -0
- package/dist/components/Layout.d.ts +11 -0
- package/dist/components/MenuItem.d.ts +149 -0
- package/dist/components/Modal.d.ts +30 -0
- package/dist/components/ModalProvider.d.ts +21 -0
- package/dist/components/Outside.d.ts +17 -0
- package/dist/components/Page.d.ts +13 -0
- package/dist/components/Search.d.ts +42 -0
- package/dist/components/SidebarMenu.d.ts +32 -0
- package/dist/components/SidebarToggler.d.ts +11 -0
- package/dist/components/SimpleLayout.d.ts +10 -0
- package/dist/components/SimpleLayout.js +23 -0
- package/dist/components/SlimContainer.d.ts +10 -0
- package/dist/components/Status.d.ts +12 -0
- package/dist/components/StatusProvider.d.ts +15 -0
- package/dist/components/Tab.d.ts +12 -0
- package/dist/components/Tab.js +36 -0
- package/dist/components/Tabs.d.ts +16 -0
- package/dist/components/Tabs.js +18 -0
- package/dist/components/ToastProvider.d.ts +22 -0
- package/dist/components/Utilities.d.ts +41 -0
- package/dist/components/shared.d.ts +15 -0
- package/dist/docs/App.d.ts +3 -0
- package/dist/docs/Global.d.ts +2 -0
- package/dist/docs/components/ColorModeSwitch.d.ts +1 -0
- package/dist/docs/components/ComponentDocs.d.ts +20 -0
- package/dist/docs/components/DemoApp.d.ts +1 -0
- package/dist/docs/components/Footer.d.ts +5 -0
- package/dist/docs/components/HashLink.d.ts +6 -0
- package/dist/docs/components/IntroductionSections.d.ts +1 -0
- package/dist/docs/components/Markdown.d.ts +4 -0
- package/dist/docs/components/NeumorphismExperiments.d.ts +1 -0
- package/dist/docs/components/ReactIcon.d.ts +1 -0
- package/dist/docs/components/StackblitzEmbed.d.ts +1 -0
- package/dist/docs/components/TestCssVars.d.ts +1 -0
- package/dist/docs/components/VersionToggle.d.ts +1 -0
- package/dist/docs/examples/ActionMenu.d.ts +1 -0
- package/dist/docs/examples/ActionMenuItem/Usage.d.ts +1 -0
- package/dist/docs/examples/Chevron/Basic usage.d.ts +1 -0
- package/dist/docs/examples/HeaderTitle/Breadcrumb.d.ts +1 -0
- package/dist/docs/examples/IconMenuItem.d.ts +1 -0
- package/dist/docs/examples/MenuItem/Draggable.d.ts +1 -0
- package/dist/docs/examples/MenuItem/Horizontal layout in sidebar.d.ts +1 -0
- package/dist/docs/examples/MenuItem/Horizontal layout with dropdown.d.ts +1 -0
- package/dist/docs/examples/MenuItem/Sidebar.d.ts +1 -0
- package/dist/docs/examples/MenuItem/Usage in body.d.ts +1 -0
- package/dist/docs/examples/ModalProvider/Custom button text.d.ts +5 -0
- package/dist/docs/examples/ModalProvider.d.ts +5 -0
- package/dist/docs/examples/Search.d.ts +1 -0
- package/dist/docs/examples/SidebarMenuItem.d.ts +1 -0
- package/dist/docs/examples/SimpleLayout/Usage.d.ts +1 -0
- package/dist/docs/examples/SlimContainer.d.ts +1 -0
- package/dist/docs/examples/StatusProvider.d.ts +1 -0
- package/dist/docs/examples/Tabs/Basic usage.d.ts +1 -0
- package/dist/docs/examples/Tabs/BasicUsage.d.ts +1 -0
- package/dist/docs/examples/Tabs/LongTabTitles.d.ts +1 -0
- package/dist/docs/examples/Tabs/Underline.d.ts +1 -0
- package/dist/docs/examples/ToastProvider/Usage.d.ts +1 -0
- package/dist/docs/examples/ToastProvider/Use of custom icons.d.ts +1 -0
- package/dist/docs/examples/css/ButtonsExample.d.ts +3 -0
- package/dist/docs/gitHubApiTypes.d.ts +38 -0
- package/dist/docs/pages/ActionMenuExamplePage.d.ts +1 -0
- package/dist/docs/pages/ComponentPage.d.ts +1 -0
- package/dist/docs/pages/HomePage.d.ts +1 -0
- package/dist/docs/pages/LicenseReportPage.d.ts +1 -0
- package/dist/docs/types.d.ts +10 -0
- package/dist/main.d.ts +1 -0
- package/dist/style.css +9564 -5847
- package/dist/style.css.map +1 -0
- package/dist/style.min.css +12 -16
- package/dist/style.scss +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,30 @@
|
|
|
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;
|
|
@@ -0,0 +1,21 @@
|
|
|
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 };
|
|
@@ -0,0 +1,17 @@
|
|
|
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;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export interface PageProps {
|
|
3
|
+
/**
|
|
4
|
+
* Will be set to the document's `<title>` tag.
|
|
5
|
+
*/
|
|
6
|
+
title?: string;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated With the new layout design, you don't need this anymore.
|
|
11
|
+
* Main component for each page.
|
|
12
|
+
*/
|
|
13
|
+
export default function Page({ children, title }: PageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
/**
|
|
40
|
+
* A search bar that can be placed to the sidebar or on a page.
|
|
41
|
+
*/
|
|
42
|
+
export default function Search(props: SearchProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MouseEventHandler, ReactNode } from "react";
|
|
2
|
+
export interface SidebarTogglerProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
sidebarToggleIconComponent: ReactNode;
|
|
5
|
+
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated With the new layout design, you don't need this anymore.
|
|
9
|
+
* Button to toggle sidebar state. Designed for internal use inside of `Layout`.
|
|
10
|
+
*/
|
|
11
|
+
export default function SidebarToggler({ className, sidebarToggleIconComponent, onClick }: SidebarTogglerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface SimpleLayoutProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
header?: React.ReactNode;
|
|
5
|
+
noPageBorder?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A simple layout with header and main content area.
|
|
9
|
+
*/
|
|
10
|
+
export default function SimpleLayout({ children, header, noPageBorder }: SimpleLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import LayoutHeader from "./Layout/LayoutHeader.js";
|
|
3
|
+
import LayoutMain from "./Layout/LayoutMain.js";
|
|
4
|
+
/**
|
|
5
|
+
* A simple layout with header and main content area.
|
|
6
|
+
*/
|
|
7
|
+
export default function SimpleLayout(_ref) {
|
|
8
|
+
var children = _ref.children,
|
|
9
|
+
header = _ref.header,
|
|
10
|
+
_ref$noPageBorder = _ref.noPageBorder,
|
|
11
|
+
noPageBorder = _ref$noPageBorder === void 0 ? false : _ref$noPageBorder;
|
|
12
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: "vh-100 d-grid",
|
|
14
|
+
style: {
|
|
15
|
+
gridTemplateRows: "var(--blue-menu-item-height) auto"
|
|
16
|
+
}
|
|
17
|
+
}, /*#__PURE__*/React.createElement(LayoutHeader, {
|
|
18
|
+
slot: "header"
|
|
19
|
+
}, header), /*#__PURE__*/React.createElement(LayoutMain, {
|
|
20
|
+
noPageBorder: noPageBorder,
|
|
21
|
+
className: "overflow-hidden"
|
|
22
|
+
}, children));
|
|
23
|
+
}
|
|
@@ -0,0 +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): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +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): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +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) => 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 };
|
|
@@ -0,0 +1,12 @@
|
|
|
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;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var _excluded = ["label", "children", "className", "contentClassName", "active"];
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
5
|
+
import { useContext, useId } from "react";
|
|
6
|
+
import { TabsNameContext } from "./Tabs.js";
|
|
7
|
+
/**
|
|
8
|
+
* Always use together with `Tabs`.
|
|
9
|
+
*/
|
|
10
|
+
export default function Tab(_ref) {
|
|
11
|
+
var label = _ref.label,
|
|
12
|
+
children = _ref.children,
|
|
13
|
+
className = _ref.className,
|
|
14
|
+
contentClassName = _ref.contentClassName,
|
|
15
|
+
active = _ref.active,
|
|
16
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
var tabsName = useContext(TabsNameContext);
|
|
18
|
+
var tabId = "Tab_" + useId();
|
|
19
|
+
var tabPanelId = "Tab_Panel_" + useId();
|
|
20
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("input", _extends({
|
|
21
|
+
type: "radio",
|
|
22
|
+
name: tabsName,
|
|
23
|
+
role: "tab",
|
|
24
|
+
id: tabId,
|
|
25
|
+
"aria-label": label,
|
|
26
|
+
"aria-controls": tabPanelId,
|
|
27
|
+
className: "blue-tab nav-link ".concat(className),
|
|
28
|
+
defaultChecked: active
|
|
29
|
+
}, rest)), /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
role: "tabpanel",
|
|
31
|
+
id: tabPanelId,
|
|
32
|
+
"aria-labelledby": tabId,
|
|
33
|
+
tabIndex: 0,
|
|
34
|
+
className: "blue-tab-content ".concat(contentClassName)
|
|
35
|
+
}, children));
|
|
36
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useId, createContext } from "react";
|
|
2
|
+
export var TabsNameContext = /*#__PURE__*/createContext("");
|
|
3
|
+
/**
|
|
4
|
+
* Implementation of Blue Web Tabs. Allows to use tabs without JavaScript.
|
|
5
|
+
* Use together with `Tab`.
|
|
6
|
+
*/
|
|
7
|
+
export default function Tabs(_ref) {
|
|
8
|
+
var children = _ref.children,
|
|
9
|
+
className = _ref.className,
|
|
10
|
+
underline = _ref.underline;
|
|
11
|
+
var tabsName = "TabList-" + useId();
|
|
12
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
role: "tablist",
|
|
14
|
+
className: "blue-tabs nav nav-".concat(underline ? "underline" : "tabs", " ").concat(className)
|
|
15
|
+
}, /*#__PURE__*/React.createElement(TabsNameContext.Provider, {
|
|
16
|
+
value: tabsName
|
|
17
|
+
}, children));
|
|
18
|
+
}
|
|
@@ -0,0 +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 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
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
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;
|
|
@@ -0,0 +1,15 @@
|
|
|
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 {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ColorModeSwitch(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component, ComponentClass } from "react";
|
|
2
|
+
import { ComponentDocumentation } from "../types";
|
|
3
|
+
export interface IComponentDocsProps {
|
|
4
|
+
standalone: boolean;
|
|
5
|
+
comp: ComponentDocumentation;
|
|
6
|
+
}
|
|
7
|
+
export declare class ComponentDocs extends Component<IComponentDocsProps, {
|
|
8
|
+
ExampleComponent: ComponentClass;
|
|
9
|
+
exampleComponents: {
|
|
10
|
+
[file: string]: ComponentClass;
|
|
11
|
+
};
|
|
12
|
+
}> {
|
|
13
|
+
state: {
|
|
14
|
+
ExampleComponent: ComponentClass;
|
|
15
|
+
exampleComponents: {};
|
|
16
|
+
};
|
|
17
|
+
componentDidMount(): Promise<void>;
|
|
18
|
+
prepareForMarkdown(text: string): string;
|
|
19
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function DemoApp(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function IntroductionSections(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function NeumorphismExperiments(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ReactIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function StackblitzEmbed(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function TestCssVars(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function VersionToggle(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ActionMenuExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ActionMenuItemExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChevronExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function BreadcrumbExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function IconMenuItemExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function MenuItemExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function MenuItemExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function MenuItemExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function MenuItemExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function MenuItemExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SearchExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SidebarMenuItemExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Usage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SlimContainerExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function StatusExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function BasicUsage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function BasicUsage(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function LongTabTitles(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function UnderlineExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function RootComponent(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function RootComponent(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface GitHubAccess {
|
|
2
|
+
access_token: string;
|
|
3
|
+
token_type: string;
|
|
4
|
+
scope: string;
|
|
5
|
+
}
|
|
6
|
+
export interface GitHubTreeResponse {
|
|
7
|
+
sha: string;
|
|
8
|
+
url: string;
|
|
9
|
+
truncated?: boolean;
|
|
10
|
+
tree: GitHubTree[];
|
|
11
|
+
}
|
|
12
|
+
export interface GitHubTree {
|
|
13
|
+
path: string;
|
|
14
|
+
mode: string;
|
|
15
|
+
type: string;
|
|
16
|
+
sha: string;
|
|
17
|
+
size: number;
|
|
18
|
+
url: string;
|
|
19
|
+
}
|
|
20
|
+
export type GitHubContentResponse = GitHubContent[];
|
|
21
|
+
export interface GitHubContent {
|
|
22
|
+
content?: string;
|
|
23
|
+
download_url?: string;
|
|
24
|
+
git_url: string;
|
|
25
|
+
html_url: string;
|
|
26
|
+
name: string;
|
|
27
|
+
path: string;
|
|
28
|
+
sha: string;
|
|
29
|
+
size: number;
|
|
30
|
+
type: string;
|
|
31
|
+
url: string;
|
|
32
|
+
_links: GitHubLink;
|
|
33
|
+
}
|
|
34
|
+
export interface GitHubLink {
|
|
35
|
+
git: string;
|
|
36
|
+
html: string;
|
|
37
|
+
self: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ActionMenuExamplePage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ComponentPage: () => import("react/jsx-runtime").JSX.Element;
|