@cloud-ru/uikit-product-page-layout 0.21.3 → 0.21.4
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/CHANGELOG.md +11 -0
- package/dist/cjs/components/DefaultSubHeader/DefaultSubHeader.d.ts +9 -0
- package/dist/cjs/components/DefaultSubHeader/DefaultSubHeader.js +26 -0
- package/dist/cjs/components/DefaultSubHeader/index.d.ts +1 -0
- package/dist/cjs/components/DefaultSubHeader/index.js +17 -0
- package/dist/cjs/components/DefaultSubHeader/styles.module.css +19 -0
- package/dist/cjs/components/Headline/Headline.d.ts +11 -0
- package/dist/cjs/components/Headline/Headline.js +29 -0
- package/dist/cjs/components/Headline/index.d.ts +1 -0
- package/dist/cjs/components/Headline/index.js +17 -0
- package/dist/cjs/components/Headline/styles.module.css +52 -0
- package/dist/cjs/components/PageCatalog/PageCatalog.d.ts +7 -0
- package/dist/cjs/components/PageCatalog/PageCatalog.js +26 -0
- package/dist/cjs/components/PageCatalog/index.d.ts +1 -0
- package/dist/cjs/components/PageCatalog/index.js +17 -0
- package/dist/cjs/components/PageCatalog/styles.module.css +16 -0
- package/dist/cjs/components/PageForm/PageForm.d.ts +40 -0
- package/dist/cjs/components/PageForm/PageForm.js +39 -0
- package/dist/cjs/components/PageForm/constants.d.ts +13 -0
- package/dist/cjs/components/PageForm/constants.js +16 -0
- package/dist/cjs/components/PageForm/hooks.d.ts +8 -0
- package/dist/cjs/components/PageForm/hooks.js +21 -0
- package/dist/cjs/components/PageForm/index.d.ts +3 -0
- package/dist/cjs/components/PageForm/index.js +19 -0
- package/dist/cjs/components/PageForm/styles.module.css +61 -0
- package/dist/cjs/components/PageForm/types.d.ts +4 -0
- package/dist/cjs/components/PageForm/types.js +2 -0
- package/dist/cjs/components/PageLoading/PageLoading.d.ts +5 -0
- package/dist/cjs/components/PageLoading/PageLoading.js +26 -0
- package/dist/cjs/components/PageLoading/index.d.ts +1 -0
- package/dist/cjs/components/PageLoading/index.js +17 -0
- package/dist/cjs/components/PageLoading/styles.module.css +12 -0
- package/dist/cjs/components/PageServices/PageServices.d.ts +18 -0
- package/dist/cjs/components/PageServices/PageServices.js +45 -0
- package/dist/cjs/components/PageServices/index.d.ts +1 -0
- package/dist/cjs/components/PageServices/index.js +17 -0
- package/dist/cjs/components/PageServices/styles.module.css +44 -0
- package/dist/cjs/components/PageSidebar/PageSidebar.d.ts +19 -0
- package/dist/cjs/components/PageSidebar/PageSidebar.js +55 -0
- package/dist/cjs/components/PageSidebar/contexts.d.ts +13 -0
- package/dist/cjs/components/PageSidebar/contexts.js +21 -0
- package/dist/cjs/components/PageSidebar/helperComponents/SidebarSearch/SidebarSearch.d.ts +1 -0
- package/dist/cjs/components/PageSidebar/helperComponents/SidebarSearch/SidebarSearch.js +26 -0
- package/dist/cjs/components/PageSidebar/helperComponents/SidebarSearch/index.d.ts +1 -0
- package/dist/cjs/components/PageSidebar/helperComponents/SidebarSearch/index.js +5 -0
- package/dist/cjs/components/PageSidebar/helperComponents/SidebarSearch/styles.module.css +23 -0
- package/dist/cjs/components/PageSidebar/helperComponents/SidebarSearchToggle/SidebarSearchToggle.d.ts +1 -0
- package/dist/cjs/components/PageSidebar/helperComponents/SidebarSearchToggle/SidebarSearchToggle.js +18 -0
- package/dist/cjs/components/PageSidebar/helperComponents/SidebarSearchToggle/index.d.ts +1 -0
- package/dist/cjs/components/PageSidebar/helperComponents/SidebarSearchToggle/index.js +5 -0
- package/dist/cjs/components/PageSidebar/helperComponents/SidebarTitle/SidebarTitle.d.ts +9 -0
- package/dist/cjs/components/PageSidebar/helperComponents/SidebarTitle/SidebarTitle.js +15 -0
- package/dist/cjs/components/PageSidebar/helperComponents/SidebarTitle/index.d.ts +1 -0
- package/dist/cjs/components/PageSidebar/helperComponents/SidebarTitle/index.js +17 -0
- package/dist/cjs/components/PageSidebar/helperComponents/SidebarTitle/styles.module.css +18 -0
- package/dist/cjs/components/PageSidebar/hooks/useItemsCreator.d.ts +8 -0
- package/dist/cjs/components/PageSidebar/hooks/useItemsCreator.js +95 -0
- package/dist/cjs/components/PageSidebar/hooks/useSearchFilter.d.ts +10 -0
- package/dist/cjs/components/PageSidebar/hooks/useSearchFilter.js +47 -0
- package/dist/cjs/components/PageSidebar/index.d.ts +2 -0
- package/dist/cjs/components/PageSidebar/index.js +17 -0
- package/dist/cjs/components/PageSidebar/styles.module.css +76 -0
- package/dist/cjs/components/PageSidebar/types.d.ts +40 -0
- package/dist/cjs/components/PageSidebar/types.js +2 -0
- package/dist/cjs/components/index.d.ts +6 -0
- package/dist/cjs/components/index.js +22 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +17 -0
- package/dist/esm/components/DefaultSubHeader/DefaultSubHeader.d.ts +9 -0
- package/dist/esm/components/DefaultSubHeader/DefaultSubHeader.js +20 -0
- package/dist/esm/components/DefaultSubHeader/index.d.ts +1 -0
- package/dist/esm/components/DefaultSubHeader/index.js +1 -0
- package/dist/esm/components/DefaultSubHeader/styles.module.css +19 -0
- package/dist/esm/components/Headline/Headline.d.ts +11 -0
- package/dist/esm/components/Headline/Headline.js +23 -0
- package/dist/esm/components/Headline/index.d.ts +1 -0
- package/dist/esm/components/Headline/index.js +1 -0
- package/dist/esm/components/Headline/styles.module.css +52 -0
- package/dist/esm/components/PageCatalog/PageCatalog.d.ts +7 -0
- package/dist/esm/components/PageCatalog/PageCatalog.js +20 -0
- package/dist/esm/components/PageCatalog/index.d.ts +1 -0
- package/dist/esm/components/PageCatalog/index.js +1 -0
- package/dist/esm/components/PageCatalog/styles.module.css +16 -0
- package/dist/esm/components/PageForm/PageForm.d.ts +40 -0
- package/dist/esm/components/PageForm/PageForm.js +33 -0
- package/dist/esm/components/PageForm/constants.d.ts +13 -0
- package/dist/esm/components/PageForm/constants.js +13 -0
- package/dist/esm/components/PageForm/hooks.d.ts +8 -0
- package/dist/esm/components/PageForm/hooks.js +17 -0
- package/dist/esm/components/PageForm/index.d.ts +3 -0
- package/dist/esm/components/PageForm/index.js +3 -0
- package/dist/esm/components/PageForm/styles.module.css +61 -0
- package/dist/esm/components/PageForm/types.d.ts +4 -0
- package/dist/esm/components/PageForm/types.js +1 -0
- package/dist/esm/components/PageLoading/PageLoading.d.ts +5 -0
- package/dist/esm/components/PageLoading/PageLoading.js +20 -0
- package/dist/esm/components/PageLoading/index.d.ts +1 -0
- package/dist/esm/components/PageLoading/index.js +1 -0
- package/dist/esm/components/PageLoading/styles.module.css +12 -0
- package/dist/esm/components/PageServices/PageServices.d.ts +18 -0
- package/dist/esm/components/PageServices/PageServices.js +39 -0
- package/dist/esm/components/PageServices/index.d.ts +1 -0
- package/dist/esm/components/PageServices/index.js +1 -0
- package/dist/esm/components/PageServices/styles.module.css +44 -0
- package/dist/esm/components/PageSidebar/PageSidebar.d.ts +19 -0
- package/dist/esm/components/PageSidebar/PageSidebar.js +49 -0
- package/dist/esm/components/PageSidebar/contexts.d.ts +13 -0
- package/dist/esm/components/PageSidebar/contexts.js +16 -0
- package/dist/esm/components/PageSidebar/helperComponents/SidebarSearch/SidebarSearch.d.ts +1 -0
- package/dist/esm/components/PageSidebar/helperComponents/SidebarSearch/SidebarSearch.js +20 -0
- package/dist/esm/components/PageSidebar/helperComponents/SidebarSearch/index.d.ts +1 -0
- package/dist/esm/components/PageSidebar/helperComponents/SidebarSearch/index.js +1 -0
- package/dist/esm/components/PageSidebar/helperComponents/SidebarSearch/styles.module.css +23 -0
- package/dist/esm/components/PageSidebar/helperComponents/SidebarSearchToggle/SidebarSearchToggle.d.ts +1 -0
- package/dist/esm/components/PageSidebar/helperComponents/SidebarSearchToggle/SidebarSearchToggle.js +15 -0
- package/dist/esm/components/PageSidebar/helperComponents/SidebarSearchToggle/index.d.ts +1 -0
- package/dist/esm/components/PageSidebar/helperComponents/SidebarSearchToggle/index.js +1 -0
- package/dist/esm/components/PageSidebar/helperComponents/SidebarTitle/SidebarTitle.d.ts +9 -0
- package/dist/esm/components/PageSidebar/helperComponents/SidebarTitle/SidebarTitle.js +9 -0
- package/dist/esm/components/PageSidebar/helperComponents/SidebarTitle/index.d.ts +1 -0
- package/dist/esm/components/PageSidebar/helperComponents/SidebarTitle/index.js +1 -0
- package/dist/esm/components/PageSidebar/helperComponents/SidebarTitle/styles.module.css +18 -0
- package/dist/esm/components/PageSidebar/hooks/useItemsCreator.d.ts +8 -0
- package/dist/esm/components/PageSidebar/hooks/useItemsCreator.js +91 -0
- package/dist/esm/components/PageSidebar/hooks/useSearchFilter.d.ts +10 -0
- package/dist/esm/components/PageSidebar/hooks/useSearchFilter.js +43 -0
- package/dist/esm/components/PageSidebar/index.d.ts +2 -0
- package/dist/esm/components/PageSidebar/index.js +1 -0
- package/dist/esm/components/PageSidebar/styles.module.css +76 -0
- package/dist/esm/components/PageSidebar/types.d.ts +40 -0
- package/dist/esm/components/PageSidebar/types.js +1 -0
- package/dist/esm/components/index.d.ts +6 -0
- package/dist/esm/components/index.js +6 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/package.json +6 -5
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { WithSupportProps } from '@sbercloud/uikit-product-utils';
|
|
3
|
+
import { HeadlineProps } from '../Headline';
|
|
4
|
+
import { PageSidebarProps } from '../PageSidebar';
|
|
5
|
+
export type PageServicesProps = WithSupportProps<PropsWithChildren<Pick<HeadlineProps, 'title' | 'actions' | 'subHeader' | 'afterHeadline' | 'beforeHeadline' | 'truncateTitle'> & {
|
|
6
|
+
className?: string;
|
|
7
|
+
sidebar?: PageSidebarProps;
|
|
8
|
+
autoHeight?: boolean;
|
|
9
|
+
}>>;
|
|
10
|
+
export declare const PageServices: import("react").ForwardRefExoticComponent<{
|
|
11
|
+
'data-test-id'?: string;
|
|
12
|
+
} & import("react").AriaAttributes & Pick<HeadlineProps, "title" | "actions" | "beforeHeadline" | "afterHeadline" | "subHeader" | "truncateTitle"> & {
|
|
13
|
+
className?: string;
|
|
14
|
+
sidebar?: PageSidebarProps;
|
|
15
|
+
autoHeight?: boolean;
|
|
16
|
+
} & {
|
|
17
|
+
children?: import("react").ReactNode | undefined;
|
|
18
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import cn from 'classnames';
|
|
14
|
+
import { forwardRef, useEffect, useState } from 'react';
|
|
15
|
+
import { extractSupportProps } from '@snack-uikit/utils';
|
|
16
|
+
import { Headline } from '../Headline';
|
|
17
|
+
import { PageSidebar } from '../PageSidebar';
|
|
18
|
+
import styles from './styles.module.css';
|
|
19
|
+
const GLOBAL_CONTAINER_ID = 'single-spa-wrapper';
|
|
20
|
+
export const PageServices = forwardRef((_a, ref) => {
|
|
21
|
+
var { children, title, actions, className, sidebar, beforeHeadline, subHeader, afterHeadline, truncateTitle, autoHeight } = _a, rest = __rest(_a, ["children", "title", "actions", "className", "sidebar", "beforeHeadline", "subHeader", "afterHeadline", "truncateTitle", "autoHeight"]);
|
|
22
|
+
const [height, setHeight] = useState(0);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (autoHeight)
|
|
25
|
+
return;
|
|
26
|
+
const container = document.getElementById(GLOBAL_CONTAINER_ID);
|
|
27
|
+
if (container) {
|
|
28
|
+
const observer = new ResizeObserver(entities => entities.forEach(entity => {
|
|
29
|
+
if (entity.target === container) {
|
|
30
|
+
const [{ blockSize }] = entity.contentBoxSize;
|
|
31
|
+
setHeight(Math.floor(blockSize));
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
34
|
+
observer.observe(container);
|
|
35
|
+
return () => observer.disconnect();
|
|
36
|
+
}
|
|
37
|
+
}, [autoHeight]);
|
|
38
|
+
return (_jsxs("div", Object.assign({ className: cn(styles.wrapper, className) }, (!autoHeight && { style: { height } }), extractSupportProps(rest), { children: [_jsx("div", { className: styles.tempContainer, ref: ref, children: _jsxs("div", { className: styles.container, children: [_jsx(Headline, { title: title, actions: actions, beforeHeadline: beforeHeadline, afterHeadline: afterHeadline, subHeader: subHeader, truncateTitle: truncateTitle }), _jsx("div", { className: styles.childWrapper, children: children })] }) }), sidebar && (_jsx("div", { className: styles.sidebar, children: _jsx(PageSidebar, Object.assign({}, sidebar)) }))] })));
|
|
39
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageServices';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageServices';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.wrapper{
|
|
2
|
+
display:flex;
|
|
3
|
+
flex-direction:row-reverse;
|
|
4
|
+
min-width:100%;
|
|
5
|
+
height:100%;
|
|
6
|
+
justify-content:flex-end;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.sidebar{
|
|
10
|
+
flex-shrink:0;
|
|
11
|
+
flex-grow:0;
|
|
12
|
+
max-width:256px;
|
|
13
|
+
width:-moz-fit-content;
|
|
14
|
+
width:fit-content;
|
|
15
|
+
position:relative;
|
|
16
|
+
box-sizing:border-box;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.tempContainer{
|
|
20
|
+
position:relative;
|
|
21
|
+
box-sizing:border-box;
|
|
22
|
+
min-width:992px;
|
|
23
|
+
flex-shrink:1;
|
|
24
|
+
flex-grow:1;
|
|
25
|
+
overflow-y:auto;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.container{
|
|
29
|
+
position:relative;
|
|
30
|
+
min-height:100%;
|
|
31
|
+
display:flex;
|
|
32
|
+
flex-direction:column;
|
|
33
|
+
padding:var(--dimension-3m, 24px);
|
|
34
|
+
gap:var(--dimension-2m, 16px);
|
|
35
|
+
box-sizing:border-box;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.childWrapper{
|
|
39
|
+
flex-shrink:1;
|
|
40
|
+
flex-grow:1;
|
|
41
|
+
display:flex;
|
|
42
|
+
flex-direction:column;
|
|
43
|
+
box-sizing:border-box;
|
|
44
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ListProps } from '@snack-uikit/list';
|
|
2
|
+
import { WithSupportProps } from '@snack-uikit/utils';
|
|
3
|
+
import { Documentation, HeaderProps, SidebarItem } from './types';
|
|
4
|
+
export type PageSidebarProps = WithSupportProps<{
|
|
5
|
+
open?: boolean;
|
|
6
|
+
defaultOpen?: boolean;
|
|
7
|
+
onOpenChanged?(open: boolean): void;
|
|
8
|
+
items: SidebarItem[];
|
|
9
|
+
footerItems?: SidebarItem[];
|
|
10
|
+
header?: HeaderProps;
|
|
11
|
+
selected?: string | number;
|
|
12
|
+
onSelect?(id: string | number): void;
|
|
13
|
+
className?: string;
|
|
14
|
+
documentation?: Documentation;
|
|
15
|
+
pageContainerId?: string;
|
|
16
|
+
hasSearch?: boolean;
|
|
17
|
+
collapse?: ListProps['collapse'];
|
|
18
|
+
}>;
|
|
19
|
+
export declare function PageSidebar(props: PageSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import cn from 'classnames';
|
|
14
|
+
import { useCallback, useState } from 'react';
|
|
15
|
+
import { useUncontrolledProp } from 'uncontrollable';
|
|
16
|
+
import { VerticalMenuCloseSVG, VerticalMenuOpenSVG } from '@sbercloud/uikit-product-icons';
|
|
17
|
+
import { ButtonElevated } from '@snack-uikit/button';
|
|
18
|
+
import { List } from '@snack-uikit/list';
|
|
19
|
+
import { extractSupportProps } from '@snack-uikit/utils';
|
|
20
|
+
import { SearchContextProvider } from './contexts';
|
|
21
|
+
import { SidebarSearch } from './helperComponents/SidebarSearch';
|
|
22
|
+
import { useItemsContent, useTopPinnedContent } from './hooks/useItemsCreator';
|
|
23
|
+
import { useSearchFilter } from './hooks/useSearchFilter';
|
|
24
|
+
import styles from './styles.module.css';
|
|
25
|
+
function PrivateSideBar(_a) {
|
|
26
|
+
var { open: openProp, defaultOpen, onOpenChanged, className, items, footerItems = [], header, selected, onSelect, hasSearch, collapse } = _a, otherProps = __rest(_a, ["open", "defaultOpen", "onOpenChanged", "className", "items", "footerItems", "header", "selected", "onSelect", "hasSearch", "collapse"]);
|
|
27
|
+
const [open, setOpenState] = useUncontrolledProp(openProp, defaultOpen || true, onOpenChanged);
|
|
28
|
+
const [hoverOff, setHoverOff] = useState(false);
|
|
29
|
+
const toggleOpen = useCallback((newValue = !open) => {
|
|
30
|
+
if (newValue === open) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (!newValue) {
|
|
34
|
+
/* кнопка сворачивания находится внутри сайдбара, а он открывается по ховеру на него,
|
|
35
|
+
поэтому после клика на время отключаем ховер, чтоб дать ему закрыться */
|
|
36
|
+
setHoverOff(true);
|
|
37
|
+
setTimeout(() => setHoverOff(false), 300);
|
|
38
|
+
}
|
|
39
|
+
setOpenState(newValue);
|
|
40
|
+
}, [open, setOpenState]);
|
|
41
|
+
const { filteredList, searchOpened, searchValue, searchCollapseState } = useSearchFilter(items);
|
|
42
|
+
const list = useItemsContent(filteredList, onSelect);
|
|
43
|
+
const footerList = useItemsContent(footerItems);
|
|
44
|
+
const { pinTop } = useTopPinnedContent(header, hasSearch);
|
|
45
|
+
return (_jsxs("div", Object.assign({}, extractSupportProps(otherProps), { "data-collapsed": !open || undefined, className: cn(styles.wrapper, className), children: [!open && (_jsx(ButtonElevated, { className: styles.expandButton, icon: _jsx(VerticalMenuOpenSVG, {}), onClick: () => toggleOpen(true) })), _jsx("div", { "data-collapsed": !open || undefined, "data-hover-off": hoverOff || undefined, "data-has-search": hasSearch || undefined, className: styles.body, children: _jsxs("div", { className: styles.content, "data-collapsed": !open || undefined, children: [_jsxs("div", { className: styles.list, children: [_jsx(List, { selection: { mode: 'single', value: selected }, size: 'm', items: list, pinTop: pinTop, pinBottom: footerList, scroll: true, scrollToSelectedItem: true, collapse: searchValue ? searchCollapseState : collapse, barHideStrategy: 'leave' }), hasSearch && searchOpened && (_jsx("div", { className: styles.searchWrapper, children: _jsx(SidebarSearch, {}) }))] }), _jsx("div", { className: styles.toggler, children: _jsx(ButtonElevated, { icon: open ? _jsx(VerticalMenuCloseSVG, {}) : _jsx(VerticalMenuOpenSVG, {}), onClick: () => toggleOpen() }) })] }) })] })));
|
|
46
|
+
}
|
|
47
|
+
export function PageSidebar(props) {
|
|
48
|
+
return (_jsx(SearchContextProvider, { children: _jsx(PrivateSideBar, Object.assign({}, props)) }));
|
|
49
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SetStateAction } from 'react';
|
|
2
|
+
type SearchContextValue = {
|
|
3
|
+
searchValue: string;
|
|
4
|
+
setSearchValue(searchValue: string): void;
|
|
5
|
+
searchOpened: boolean;
|
|
6
|
+
setSearchOpened: React.Dispatch<SetStateAction<boolean>>;
|
|
7
|
+
};
|
|
8
|
+
export declare const SearchContext: import("react").Context<SearchContextValue>;
|
|
9
|
+
export declare function useSearchContext(): SearchContextValue;
|
|
10
|
+
export declare function SearchContextProvider({ children }: {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext, useContext, useState } from 'react';
|
|
3
|
+
export const SearchContext = createContext({
|
|
4
|
+
searchValue: '',
|
|
5
|
+
searchOpened: false,
|
|
6
|
+
setSearchValue: () => { },
|
|
7
|
+
setSearchOpened: () => { },
|
|
8
|
+
});
|
|
9
|
+
export function useSearchContext() {
|
|
10
|
+
return useContext(SearchContext);
|
|
11
|
+
}
|
|
12
|
+
export function SearchContextProvider({ children }) {
|
|
13
|
+
const [searchValue, setSearchValue] = useState('');
|
|
14
|
+
const [searchOpened, setSearchOpened] = useState(false);
|
|
15
|
+
return (_jsx(SearchContext.Provider, { value: { searchValue, setSearchValue, searchOpened, setSearchOpened }, children: children }));
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SidebarSearch(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
import { useLocale } from '@sbercloud/uikit-product-locale';
|
|
4
|
+
import { Search } from '@snack-uikit/search';
|
|
5
|
+
import { useSearchContext } from '../../contexts';
|
|
6
|
+
import styles from './styles.module.css';
|
|
7
|
+
export function SidebarSearch() {
|
|
8
|
+
const { searchValue, setSearchValue, searchOpened } = useSearchContext();
|
|
9
|
+
const ref = useRef(null);
|
|
10
|
+
const { t } = useLocale('PageLayout');
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
var _a;
|
|
13
|
+
if (searchOpened) {
|
|
14
|
+
(_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
15
|
+
}
|
|
16
|
+
}, [searchOpened]);
|
|
17
|
+
if (!searchOpened)
|
|
18
|
+
return null;
|
|
19
|
+
return (_jsx(Search, { ref: ref, className: styles.searchItem, size: 'm', placeholder: t('PageSidebar.searchByServices'), value: searchValue, onChange: setSearchValue }));
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SidebarSearch } from './SidebarSearch';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SidebarSearch } from './SidebarSearch';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.searchItem{
|
|
2
|
+
background-color:var(--sys-neutral-background, #eeeff3);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.button{
|
|
6
|
+
cursor:pointer;
|
|
7
|
+
position:relative;
|
|
8
|
+
box-sizing:border-box;
|
|
9
|
+
margin:0;
|
|
10
|
+
padding:0;
|
|
11
|
+
background:none;
|
|
12
|
+
border:none;
|
|
13
|
+
}
|
|
14
|
+
.button:focus, .button:focus-visible{
|
|
15
|
+
outline-width:var(--border-state-focus-s-border-width, 2px);
|
|
16
|
+
outline-style:var(--border-state-focus-s-border-style, solid);
|
|
17
|
+
outline-color:var(--border-state-focus-s-border-color, );
|
|
18
|
+
border-radius:var(--dimension-050m, 4px);
|
|
19
|
+
outline-color:var(--sys-available-complementary, #15151b);
|
|
20
|
+
}
|
|
21
|
+
.button:active{
|
|
22
|
+
outline:none;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SidebarSearchToggle(): import("react/jsx-runtime").JSX.Element;
|
package/dist/esm/components/PageSidebar/helperComponents/SidebarSearchToggle/SidebarSearchToggle.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SearchSVG, VerticalMenuRightCloseSVG } from '@sbercloud/uikit-product-icons';
|
|
3
|
+
import { useLocale } from '@sbercloud/uikit-product-locale';
|
|
4
|
+
import { ButtonFunction } from '@snack-uikit/button';
|
|
5
|
+
import { Tooltip } from '@snack-uikit/tooltip';
|
|
6
|
+
import { useSearchContext } from '../../contexts';
|
|
7
|
+
export function SidebarSearchToggle() {
|
|
8
|
+
const { searchOpened, setSearchValue, setSearchOpened } = useSearchContext();
|
|
9
|
+
const { t } = useLocale('PageLayout');
|
|
10
|
+
const toggle = () => {
|
|
11
|
+
setSearchValue('');
|
|
12
|
+
setSearchOpened(prev => !prev);
|
|
13
|
+
};
|
|
14
|
+
return (_jsx(Tooltip, { tip: searchOpened ? t('PageSidebar.closeSearch') : t('PageSidebar.openSearch'), children: _jsx(ButtonFunction, { size: 's', onClick: toggle, icon: searchOpened ? _jsx(VerticalMenuRightCloseSVG, {}) : _jsx(SearchSVG, {}) }) }));
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SidebarSearchToggle } from './SidebarSearchToggle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SidebarSearchToggle } from './SidebarSearchToggle';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { Icon } from '../../types';
|
|
3
|
+
export type SidebarTitleProps = {
|
|
4
|
+
title: string;
|
|
5
|
+
icon: Icon;
|
|
6
|
+
className?: string;
|
|
7
|
+
afterContent?: ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export declare function SidebarTitle({ title, className, icon, afterContent }: SidebarTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { IconPredefined } from '@snack-uikit/icon-predefined';
|
|
4
|
+
import { TruncateString } from '@snack-uikit/truncate-string';
|
|
5
|
+
import { Typography } from '@snack-uikit/typography';
|
|
6
|
+
import styles from './styles.module.css';
|
|
7
|
+
export function SidebarTitle({ title, className, icon, afterContent }) {
|
|
8
|
+
return (_jsxs("div", { className: cn(className, styles.wrapper), children: [_jsx("div", { className: styles.icon, children: _jsx(IconPredefined, { appearance: 'neutral', size: 's', shape: 'square', icon: icon }) }), _jsx("div", { className: styles.title, children: _jsx(Typography.SansLabelL, { children: _jsx(TruncateString, { text: title }) }) }), afterContent] }));
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SidebarTitle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './SidebarTitle';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.wrapper{
|
|
2
|
+
display:flex;
|
|
3
|
+
flex-direction:row;
|
|
4
|
+
gap:var(--dimension-1m, 8px);
|
|
5
|
+
align-items:center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.icon{
|
|
9
|
+
flex-grow:0;
|
|
10
|
+
flex-shrink:0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.title{
|
|
14
|
+
overflow:hidden;
|
|
15
|
+
flex-grow:1;
|
|
16
|
+
flex-shrink:1;
|
|
17
|
+
color:var(--sys-neutral-text-main, #41424e);
|
|
18
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ItemProps } from '@snack-uikit/list';
|
|
3
|
+
import { HeaderProps, SidebarItem } from '../types';
|
|
4
|
+
export declare function useTopPinnedContent(header?: HeaderProps, hasSearch?: boolean): {
|
|
5
|
+
title?: ReactNode;
|
|
6
|
+
pinTop: ItemProps[];
|
|
7
|
+
};
|
|
8
|
+
export declare function useItemsContent(items: SidebarItem[], onSelect?: (id: string | number) => void): ItemProps[];
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { useMemo } from 'react';
|
|
14
|
+
import { ChevronLeftSVG } from '@sbercloud/uikit-product-icons';
|
|
15
|
+
import { useLocale } from '@sbercloud/uikit-product-locale';
|
|
16
|
+
import { Tooltip } from '@snack-uikit/tooltip';
|
|
17
|
+
import { SidebarSearchToggle } from '../helperComponents/SidebarSearchToggle';
|
|
18
|
+
import { SidebarTitle } from '../helperComponents/SidebarTitle';
|
|
19
|
+
const EMPTY_LIST = [];
|
|
20
|
+
export function useTopPinnedContent(header, hasSearch) {
|
|
21
|
+
const { t } = useLocale('PageLayout');
|
|
22
|
+
return useMemo(() => {
|
|
23
|
+
switch (header === null || header === void 0 ? void 0 : header.type) {
|
|
24
|
+
case 'title':
|
|
25
|
+
return {
|
|
26
|
+
pinTop: [
|
|
27
|
+
{
|
|
28
|
+
content: _jsx(SidebarTitle, { title: header.label, icon: header.icon, afterContent: header.afterContent }),
|
|
29
|
+
afterContent: hasSearch ? _jsx(SidebarSearchToggle, {}) : null,
|
|
30
|
+
inactive: true,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
};
|
|
34
|
+
case 'back':
|
|
35
|
+
return {
|
|
36
|
+
pinTop: [
|
|
37
|
+
{
|
|
38
|
+
content: { option: `${t('PageSidebar.backTo')} ${header.label}` },
|
|
39
|
+
beforeContent: _jsx(ChevronLeftSVG, {}),
|
|
40
|
+
onClick: header.href ? undefined : header.onClick,
|
|
41
|
+
itemWrapRender: header.href
|
|
42
|
+
? item => (_jsx("a", { href: header.href, onClick: header.onClick, children: item }))
|
|
43
|
+
: undefined,
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
default:
|
|
48
|
+
return { pinTop: EMPTY_LIST };
|
|
49
|
+
}
|
|
50
|
+
}, [header, t, hasSearch]);
|
|
51
|
+
}
|
|
52
|
+
export function useItemsContent(items, onSelect) {
|
|
53
|
+
return useMemo(() => {
|
|
54
|
+
const getItemsContent = (items, onSelect) => items.map((_a) => {
|
|
55
|
+
var { id, label, beforeContent, onClick, afterContent, disabledReason, disabledReasonPlacement } = _a, rest = __rest(_a, ["id", "label", "beforeContent", "onClick", "afterContent", "disabledReason", "disabledReasonPlacement"]);
|
|
56
|
+
const href = 'href' in rest ? rest.href : undefined;
|
|
57
|
+
const newItems = 'items' in rest ? rest.items : undefined;
|
|
58
|
+
const type = 'type' in rest ? rest.type : undefined;
|
|
59
|
+
const clickHandler = (event) => {
|
|
60
|
+
if (href && ((event === null || event === void 0 ? void 0 : event.metaKey) || (event === null || event === void 0 ? void 0 : event.button) === 1)) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
event.preventDefault();
|
|
64
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
65
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(id);
|
|
66
|
+
};
|
|
67
|
+
if (type === 'group') {
|
|
68
|
+
return Object.assign(Object.assign({}, rest), { label, type: 'group', items: getItemsContent(newItems || [], onSelect) });
|
|
69
|
+
}
|
|
70
|
+
const newItem = {
|
|
71
|
+
id,
|
|
72
|
+
content: { option: label },
|
|
73
|
+
itemWrapRender: (item) => {
|
|
74
|
+
if (!disabledReason) {
|
|
75
|
+
return href ? (_jsx("a", { href: href, onClick: clickHandler, children: item })) : (item);
|
|
76
|
+
}
|
|
77
|
+
return (_jsx(Tooltip, { hoverDelayOpen: 500, open: disabledReason ? undefined : false, tip: disabledReason, placement: disabledReasonPlacement, children: item }));
|
|
78
|
+
},
|
|
79
|
+
onClick: href ? undefined : clickHandler,
|
|
80
|
+
beforeContent,
|
|
81
|
+
afterContent,
|
|
82
|
+
disabled: Boolean(disabledReason),
|
|
83
|
+
};
|
|
84
|
+
if (newItems === null || newItems === void 0 ? void 0 : newItems.length) {
|
|
85
|
+
return Object.assign(Object.assign({}, newItem), { type: 'collapse', items: getItemsContent(newItems || [], onSelect) });
|
|
86
|
+
}
|
|
87
|
+
return newItem;
|
|
88
|
+
});
|
|
89
|
+
return getItemsContent(items, onSelect);
|
|
90
|
+
}, [items, onSelect]);
|
|
91
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SidebarItem } from '../types';
|
|
2
|
+
export declare const useSearchFilter: (list: SidebarItem[]) => {
|
|
3
|
+
searchOpened: boolean;
|
|
4
|
+
searchValue: string;
|
|
5
|
+
setSearchValue: (searchValue: string) => void;
|
|
6
|
+
filteredList: SidebarItem[];
|
|
7
|
+
searchCollapseState: {
|
|
8
|
+
value: (string | number)[];
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useSearchContext } from '../contexts';
|
|
3
|
+
const matchString = (value, searchValue) => value.trim().toLowerCase().includes(searchValue.trim().toLowerCase());
|
|
4
|
+
const filterService = (servicesList, searchValue) => {
|
|
5
|
+
if (!searchValue)
|
|
6
|
+
return servicesList;
|
|
7
|
+
return servicesList.reduce((result, service) => {
|
|
8
|
+
var _a;
|
|
9
|
+
if (service.label && matchString(service.label, searchValue)) {
|
|
10
|
+
result.push(service);
|
|
11
|
+
return result;
|
|
12
|
+
}
|
|
13
|
+
if ('items' in service && ((_a = service.items) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
14
|
+
const items = filterService(service.items, searchValue);
|
|
15
|
+
if (items.length) {
|
|
16
|
+
result.push(Object.assign(Object.assign({}, service), { items }));
|
|
17
|
+
}
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
return result;
|
|
21
|
+
}, []);
|
|
22
|
+
};
|
|
23
|
+
const getSidebarItemIds = (list) => list.reduce((result, el) => {
|
|
24
|
+
var _a;
|
|
25
|
+
result.push(el.id);
|
|
26
|
+
if ('items' in el && ((_a = el.items) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
27
|
+
const childItems = getSidebarItemIds(el.items);
|
|
28
|
+
result.push(...childItems);
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
}, []);
|
|
32
|
+
export const useSearchFilter = (list) => {
|
|
33
|
+
const { searchValue, setSearchValue, searchOpened } = useSearchContext();
|
|
34
|
+
const filteredList = useMemo(() => filterService(list, searchValue), [list, searchValue]);
|
|
35
|
+
const searchCollapseState = useMemo(() => ({ value: getSidebarItemIds(filteredList) }), [filteredList]);
|
|
36
|
+
return {
|
|
37
|
+
searchOpened,
|
|
38
|
+
searchValue,
|
|
39
|
+
setSearchValue,
|
|
40
|
+
filteredList,
|
|
41
|
+
searchCollapseState,
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageSidebar';
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
.wrapper{
|
|
2
|
+
width:256px;
|
|
3
|
+
}
|
|
4
|
+
.wrapper[data-collapsed]{
|
|
5
|
+
width:0;
|
|
6
|
+
}
|
|
7
|
+
.wrapper .body{
|
|
8
|
+
position:absolute;
|
|
9
|
+
height:100%;
|
|
10
|
+
width:256px;
|
|
11
|
+
display:flex;
|
|
12
|
+
transition:left 0.15s 0.35s ease-in-out;
|
|
13
|
+
}
|
|
14
|
+
.wrapper .body[data-hover-off]{
|
|
15
|
+
pointer-events:none;
|
|
16
|
+
transition:left 0.15s ease-in-out;
|
|
17
|
+
}
|
|
18
|
+
.wrapper .body[data-collapsed]{
|
|
19
|
+
left:-256px;
|
|
20
|
+
}
|
|
21
|
+
.wrapper .body[data-collapsed]::before{
|
|
22
|
+
position:absolute;
|
|
23
|
+
content:" ";
|
|
24
|
+
height:100%;
|
|
25
|
+
right:calc(-1 * var(--dimension-050m, 4px));
|
|
26
|
+
width:var(--dimension-050m, 4px);
|
|
27
|
+
}
|
|
28
|
+
.wrapper .body[data-collapsed]:hover{
|
|
29
|
+
transition:left 0.15s ease-in-out;
|
|
30
|
+
left:0;
|
|
31
|
+
}
|
|
32
|
+
.wrapper .body[data-collapsed]:hover::before{
|
|
33
|
+
right:calc(-4 * var(--dimension-050m, 4px));
|
|
34
|
+
width:calc(4 * var(--dimension-050m, 4px));
|
|
35
|
+
}
|
|
36
|
+
.wrapper .content{
|
|
37
|
+
flex-grow:1;
|
|
38
|
+
display:flex;
|
|
39
|
+
overflow:hidden;
|
|
40
|
+
box-sizing:border-box;
|
|
41
|
+
padding:4px 0;
|
|
42
|
+
flex-direction:column;
|
|
43
|
+
background-color:var(--sys-neutral-background, #eeeff3);
|
|
44
|
+
border-right:1px solid var(--sys-neutral-decor-default, #dde0ea);
|
|
45
|
+
}
|
|
46
|
+
.wrapper .content[data-collapsed]{
|
|
47
|
+
box-shadow:var(--box-shadow-elevation-level3, 0px 0px 8px 0px rgba(0, 0, 0, 0.0784313725), 0px 8px 16px 0px rgba(0, 0, 0, 0.0784313725));
|
|
48
|
+
border-right:none;
|
|
49
|
+
margin:4px;
|
|
50
|
+
}
|
|
51
|
+
.wrapper .list{
|
|
52
|
+
flex-grow:1;
|
|
53
|
+
flex-shrink:1;
|
|
54
|
+
overflow-y:auto;
|
|
55
|
+
display:flex;
|
|
56
|
+
flex-direction:column-reverse;
|
|
57
|
+
position:relative;
|
|
58
|
+
}
|
|
59
|
+
.wrapper .searchWrapper{
|
|
60
|
+
position:absolute;
|
|
61
|
+
right:42px;
|
|
62
|
+
top:4px;
|
|
63
|
+
width:204px;
|
|
64
|
+
}
|
|
65
|
+
.wrapper .toggler{
|
|
66
|
+
display:flex;
|
|
67
|
+
justify-content:end;
|
|
68
|
+
flex-shrink:0;
|
|
69
|
+
flex-grow:0;
|
|
70
|
+
padding:0 4px;
|
|
71
|
+
}
|
|
72
|
+
.wrapper .expandButton{
|
|
73
|
+
position:fixed;
|
|
74
|
+
bottom:8px;
|
|
75
|
+
left:8px;
|
|
76
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, MouseEvent, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
import { IconPredefinedProps } from '@snack-uikit/icon-predefined';
|
|
3
|
+
import { TooltipProps } from '@snack-uikit/tooltip';
|
|
4
|
+
export type SidebarItemBase = {
|
|
5
|
+
id: string | number;
|
|
6
|
+
label: string;
|
|
7
|
+
'data-test-id'?: string;
|
|
8
|
+
onClick?(e: MouseEvent<HTMLElement>): void;
|
|
9
|
+
afterContent?: ReactNode;
|
|
10
|
+
disabledReason?: ReactNode;
|
|
11
|
+
disabledReasonPlacement?: TooltipProps['placement'];
|
|
12
|
+
beforeContent?: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
export type SidebarItemWithHref = SidebarItemBase & {
|
|
15
|
+
href: string;
|
|
16
|
+
};
|
|
17
|
+
export type SidebarItemWithItems = SidebarItemBase & {
|
|
18
|
+
/** @default collapse */
|
|
19
|
+
type?: 'collapse' | 'group';
|
|
20
|
+
divider?: boolean;
|
|
21
|
+
items?: SidebarItem[];
|
|
22
|
+
};
|
|
23
|
+
export type SidebarItem = SidebarItemWithHref | SidebarItemWithItems;
|
|
24
|
+
export type Icon = IconPredefinedProps['icon'];
|
|
25
|
+
export type HeaderProps = {
|
|
26
|
+
type: 'title';
|
|
27
|
+
label: string;
|
|
28
|
+
icon: Icon;
|
|
29
|
+
afterContent?: ReactNode;
|
|
30
|
+
} | {
|
|
31
|
+
type: 'back';
|
|
32
|
+
label: string;
|
|
33
|
+
href?: string;
|
|
34
|
+
onClick?: MouseEventHandler;
|
|
35
|
+
};
|
|
36
|
+
export type Documentation = {
|
|
37
|
+
href?: string;
|
|
38
|
+
onClick?: MouseEventHandler;
|
|
39
|
+
target?: AnchorHTMLAttributes<HTMLAnchorElement>['target'];
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|