@elastic/eui-docusaurus-theme 2.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.
- package/LICENSE.txt +6 -0
- package/README.md +292 -0
- package/lib/.tsbuildinfo-client +1 -0
- package/lib/components/badge/index.d.ts +1 -0
- package/lib/components/badge/index.js +9 -0
- package/lib/components/codesandbox_icon/codesandbox_icon.d.ts +4 -0
- package/lib/components/codesandbox_icon/codesandbox_icon.js +2 -0
- package/lib/components/codesandbox_icon/index.d.ts +1 -0
- package/lib/components/codesandbox_icon/index.js +8 -0
- package/lib/components/demo/actions_bar/actions_bar.d.ts +10 -0
- package/lib/components/demo/actions_bar/actions_bar.js +34 -0
- package/lib/components/demo/actions_bar/index.d.ts +1 -0
- package/lib/components/demo/actions_bar/index.js +8 -0
- package/lib/components/demo/code_transformer.d.ts +18 -0
- package/lib/components/demo/code_transformer.js +39 -0
- package/lib/components/demo/codesandbox/find_external_dependencies.d.ts +5 -0
- package/lib/components/demo/codesandbox/find_external_dependencies.js +30 -0
- package/lib/components/demo/codesandbox/index.d.ts +1 -0
- package/lib/components/demo/codesandbox/index.js +8 -0
- package/lib/components/demo/codesandbox/open_action.d.ts +16 -0
- package/lib/components/demo/codesandbox/open_action.js +91 -0
- package/lib/components/demo/context.d.ts +14 -0
- package/lib/components/demo/context.js +13 -0
- package/lib/components/demo/create_demo.d.ts +5 -0
- package/lib/components/demo/create_demo.js +13 -0
- package/lib/components/demo/demo.d.ts +23 -0
- package/lib/components/demo/demo.js +61 -0
- package/lib/components/demo/editor/editor.d.ts +1 -0
- package/lib/components/demo/editor/editor.js +39 -0
- package/lib/components/demo/editor/index.d.ts +1 -0
- package/lib/components/demo/editor/index.js +8 -0
- package/lib/components/demo/index.d.ts +3 -0
- package/lib/components/demo/index.js +10 -0
- package/lib/components/demo/preview/index.d.ts +1 -0
- package/lib/components/demo/preview/index.js +8 -0
- package/lib/components/demo/preview/preview.d.ts +7 -0
- package/lib/components/demo/preview/preview.js +36 -0
- package/lib/components/demo/scope.d.ts +1 -0
- package/lib/components/demo/scope.js +12 -0
- package/lib/components/demo/source/get_source_from_children.d.ts +11 -0
- package/lib/components/demo/source/get_source_from_children.js +42 -0
- package/lib/components/demo/source/index.d.ts +1 -0
- package/lib/components/demo/source/index.js +8 -0
- package/lib/components/demo/source/source.d.ts +6 -0
- package/lib/components/demo/source/source.js +25 -0
- package/lib/components/figma_embed/index.d.ts +5 -0
- package/lib/components/figma_embed/index.js +36 -0
- package/lib/components/guideline/guideline.d.ts +10 -0
- package/lib/components/guideline/guideline.js +68 -0
- package/lib/components/guideline/guideline_text.d.ts +6 -0
- package/lib/components/guideline/guideline_text.js +28 -0
- package/lib/components/guideline/index.d.ts +2 -0
- package/lib/components/guideline/index.js +9 -0
- package/lib/components/guideline/types.d.ts +1 -0
- package/lib/components/guideline/types.js +8 -0
- package/lib/components/high_contrast_mode_toggle/index.d.ts +1 -0
- package/lib/components/high_contrast_mode_toggle/index.js +15 -0
- package/lib/components/icon/index.d.ts +1 -0
- package/lib/components/icon/index.js +9 -0
- package/lib/components/index.d.ts +7 -0
- package/lib/components/index.js +14 -0
- package/lib/components/navbar_item/index.d.ts +19 -0
- package/lib/components/navbar_item/index.js +84 -0
- package/lib/components/prop_table/definition_types.d.ts +43 -0
- package/lib/components/prop_table/definition_types.js +8 -0
- package/lib/components/prop_table/extended_types.d.ts +5 -0
- package/lib/components/prop_table/extended_types.js +27 -0
- package/lib/components/prop_table/extended_types_info.d.ts +26 -0
- package/lib/components/prop_table/extended_types_info.js +34 -0
- package/lib/components/prop_table/index.d.ts +1 -0
- package/lib/components/prop_table/index.js +8 -0
- package/lib/components/prop_table/prop_table.d.ts +8 -0
- package/lib/components/prop_table/prop_table.js +115 -0
- package/lib/components/theme_context/index.d.ts +16 -0
- package/lib/components/theme_context/index.js +103 -0
- package/lib/components/theme_context/theme_overrides.d.ts +2 -0
- package/lib/components/theme_context/theme_overrides.js +12 -0
- package/lib/components/version_switcher/index.d.ts +23 -0
- package/lib/components/version_switcher/index.js +51 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +19 -0
- package/lib/index.js.map +1 -0
- package/lib/theme/Admonition/Types.d.ts +3 -0
- package/lib/theme/Admonition/Types.js +51 -0
- package/lib/theme/CodeBlock/index.d.ts +3 -0
- package/lib/theme/CodeBlock/index.js +35 -0
- package/lib/theme/ColorModeToggle/index.d.ts +10 -0
- package/lib/theme/ColorModeToggle/index.js +51 -0
- package/lib/theme/Demo/actions.d.ts +8 -0
- package/lib/theme/Demo/actions.js +8 -0
- package/lib/theme/Demo/default_scope.d.ts +3 -0
- package/lib/theme/Demo/default_scope.js +17 -0
- package/lib/theme/DocBreadcrumbs/Items/Home/index.d.ts +2 -0
- package/lib/theme/DocBreadcrumbs/Items/Home/index.js +15 -0
- package/lib/theme/DocBreadcrumbs/Items/item.styles.d.ts +5 -0
- package/lib/theme/DocBreadcrumbs/Items/item.styles.js +40 -0
- package/lib/theme/DocBreadcrumbs/index.d.ts +2 -0
- package/lib/theme/DocBreadcrumbs/index.js +63 -0
- package/lib/theme/DocItem/Content/index.d.ts +3 -0
- package/lib/theme/DocItem/Content/index.js +44 -0
- package/lib/theme/DocItem/Footer/index.d.ts +2 -0
- package/lib/theme/DocItem/Footer/index.js +17 -0
- package/lib/theme/DocItem/Layout/index.d.ts +3 -0
- package/lib/theme/DocItem/Layout/index.js +71 -0
- package/lib/theme/DocItem/Metadata/index.d.ts +2 -0
- package/lib/theme/DocItem/Metadata/index.js +7 -0
- package/lib/theme/DocItem/Paginator/index.d.ts +6 -0
- package/lib/theme/DocItem/Paginator/index.js +11 -0
- package/lib/theme/DocItem/TOC/Desktop/index.d.ts +2 -0
- package/lib/theme/DocItem/TOC/Desktop/index.js +8 -0
- package/lib/theme/DocItem/TOC/Mobile/index.d.ts +2 -0
- package/lib/theme/DocItem/TOC/Mobile/index.js +17 -0
- package/lib/theme/DocItem/index.d.ts +3 -0
- package/lib/theme/DocItem/index.js +10 -0
- package/lib/theme/DocPaginator/index.d.ts +3 -0
- package/lib/theme/DocPaginator/index.js +19 -0
- package/lib/theme/DocRoot/Layout/Main/index.d.ts +3 -0
- package/lib/theme/DocRoot/Layout/Main/index.js +35 -0
- package/lib/theme/DocRoot/Layout/Sidebar/index.d.ts +3 -0
- package/lib/theme/DocRoot/Layout/Sidebar/index.js +81 -0
- package/lib/theme/DocRoot/Layout/index.d.ts +3 -0
- package/lib/theme/DocRoot/Layout/index.js +47 -0
- package/lib/theme/DocSidebarItem/Category/index.d.ts +3 -0
- package/lib/theme/DocSidebarItem/Category/index.js +146 -0
- package/lib/theme/DocSidebarItem/Link/index.d.ts +3 -0
- package/lib/theme/DocSidebarItem/Link/index.js +39 -0
- package/lib/theme/DocSidebarItem/index.d.ts +3 -0
- package/lib/theme/DocSidebarItem/index.js +15 -0
- package/lib/theme/DocSidebarItems/index.d.ts +5 -0
- package/lib/theme/DocSidebarItems/index.js +17 -0
- package/lib/theme/EditThisPage/index.d.ts +3 -0
- package/lib/theme/EditThisPage/index.js +17 -0
- package/lib/theme/Footer/index.d.ts +2 -0
- package/lib/theme/Footer/index.js +43 -0
- package/lib/theme/Heading/index.d.ts +3 -0
- package/lib/theme/Heading/index.js +49 -0
- package/lib/theme/Logo/index.d.ts +3 -0
- package/lib/theme/Logo/index.js +80 -0
- package/lib/theme/MDXComponents/A.d.ts +6 -0
- package/lib/theme/MDXComponents/A.js +17 -0
- package/lib/theme/MDXComponents/Blockquote.d.ts +2 -0
- package/lib/theme/MDXComponents/Blockquote.js +18 -0
- package/lib/theme/MDXComponents/Code.d.ts +6 -0
- package/lib/theme/MDXComponents/Code.js +35 -0
- package/lib/theme/MDXComponents/Heading.d.ts +4 -0
- package/lib/theme/MDXComponents/Heading.js +4 -0
- package/lib/theme/MDXComponents/ListItem.d.ts +2 -0
- package/lib/theme/MDXComponents/ListItem.js +5 -0
- package/lib/theme/MDXComponents/OrderedList.d.ts +2 -0
- package/lib/theme/MDXComponents/OrderedList.js +11 -0
- package/lib/theme/MDXComponents/Paragraph.d.ts +2 -0
- package/lib/theme/MDXComponents/Paragraph.js +18 -0
- package/lib/theme/MDXComponents/Table.d.ts +2 -0
- package/lib/theme/MDXComponents/Table.js +3 -0
- package/lib/theme/MDXComponents/TableBody.d.ts +2 -0
- package/lib/theme/MDXComponents/TableBody.js +3 -0
- package/lib/theme/MDXComponents/TableDataCell.d.ts +2 -0
- package/lib/theme/MDXComponents/TableDataCell.js +3 -0
- package/lib/theme/MDXComponents/TableHeader.d.ts +2 -0
- package/lib/theme/MDXComponents/TableHeader.js +3 -0
- package/lib/theme/MDXComponents/TableHeaderCell.d.ts +2 -0
- package/lib/theme/MDXComponents/TableHeaderCell.js +3 -0
- package/lib/theme/MDXComponents/TableRow.d.ts +2 -0
- package/lib/theme/MDXComponents/TableRow.js +3 -0
- package/lib/theme/MDXComponents/UnorderedList.d.ts +2 -0
- package/lib/theme/MDXComponents/UnorderedList.js +11 -0
- package/lib/theme/MDXComponents/index.d.ts +2 -0
- package/lib/theme/MDXComponents/index.js +46 -0
- package/lib/theme/MDXContent/index.d.ts +6 -0
- package/lib/theme/MDXContent/index.js +4 -0
- package/lib/theme/Navbar/Content/index.d.ts +7 -0
- package/lib/theme/Navbar/Content/index.js +149 -0
- package/lib/theme/Navbar/Layout/index.d.ts +6 -0
- package/lib/theme/Navbar/Layout/index.js +59 -0
- package/lib/theme/Navbar/MobileSidebar/Header/index.d.ts +7 -0
- package/lib/theme/Navbar/MobileSidebar/Header/index.js +46 -0
- package/lib/theme/Navbar/MobileSidebar/Layout/index.d.ts +6 -0
- package/lib/theme/Navbar/MobileSidebar/Layout/index.js +26 -0
- package/lib/theme/Navbar/MobileSidebar/index.d.ts +7 -0
- package/lib/theme/Navbar/MobileSidebar/index.js +14 -0
- package/lib/theme/NavbarItem/DropdownNavbarItem/index.d.ts +3 -0
- package/lib/theme/NavbarItem/DropdownNavbarItem/index.js +94 -0
- package/lib/theme/NavbarItem/NavbarNavLink.d.ts +7 -0
- package/lib/theme/NavbarItem/NavbarNavLink.js +48 -0
- package/lib/theme/PaginatorNavLink/index.d.ts +3 -0
- package/lib/theme/PaginatorNavLink/index.js +43 -0
- package/lib/theme/Root.d.ts +3 -0
- package/lib/theme/Root.js +66 -0
- package/lib/theme/Root.styles.d.ts +2 -0
- package/lib/theme/Root.styles.js +111 -0
- package/lib/theme/TOCCollapsible/CollapseButton/index.d.ts +3 -0
- package/lib/theme/TOCCollapsible/CollapseButton/index.js +23 -0
- package/lib/theme/TOCItems/Tree.d.ts +5 -0
- package/lib/theme/TOCItems/Tree.js +80 -0
- package/lib/theme/infima.styles.d.ts +1 -0
- package/lib/theme/infima.styles.js +1456 -0
- package/lib/theme/reset.styles.d.ts +2 -0
- package/lib/theme/reset.styles.js +79 -0
- package/package.json +61 -0
- package/src/components/badge/index.ts +11 -0
- package/src/components/codesandbox_icon/codesandbox_icon.tsx +24 -0
- package/src/components/codesandbox_icon/index.ts +9 -0
- package/src/components/demo/actions_bar/actions_bar.tsx +95 -0
- package/src/components/demo/actions_bar/index.ts +9 -0
- package/src/components/demo/code_transformer.ts +44 -0
- package/src/components/demo/codesandbox/find_external_dependencies.ts +34 -0
- package/src/components/demo/codesandbox/index.ts +9 -0
- package/src/components/demo/codesandbox/open_action.tsx +132 -0
- package/src/components/demo/context.ts +30 -0
- package/src/components/demo/create_demo.tsx +17 -0
- package/src/components/demo/demo.tsx +143 -0
- package/src/components/demo/editor/editor.tsx +51 -0
- package/src/components/demo/editor/index.ts +9 -0
- package/src/components/demo/index.ts +11 -0
- package/src/components/demo/preview/index.ts +9 -0
- package/src/components/demo/preview/preview.tsx +77 -0
- package/src/components/demo/scope.ts +14 -0
- package/src/components/demo/source/get_source_from_children.ts +59 -0
- package/src/components/demo/source/index.ts +9 -0
- package/src/components/demo/source/source.tsx +36 -0
- package/src/components/figma_embed/index.tsx +57 -0
- package/src/components/guideline/guideline.tsx +121 -0
- package/src/components/guideline/guideline_text.tsx +51 -0
- package/src/components/guideline/index.ts +10 -0
- package/src/components/guideline/types.ts +9 -0
- package/src/components/high_contrast_mode_toggle/index.tsx +28 -0
- package/src/components/icon/index.ts +11 -0
- package/src/components/index.ts +15 -0
- package/src/components/navbar_item/index.tsx +164 -0
- package/src/components/prop_table/definition_types.ts +53 -0
- package/src/components/prop_table/extended_types.tsx +66 -0
- package/src/components/prop_table/extended_types_info.ts +35 -0
- package/src/components/prop_table/index.ts +9 -0
- package/src/components/prop_table/prop_table.tsx +235 -0
- package/src/components/theme_context/index.tsx +156 -0
- package/src/components/theme_context/theme_overrides.ts +15 -0
- package/src/components/version_switcher/index.tsx +144 -0
- package/src/index.ts +21 -0
- package/src/theme/Admonition/Types.tsx +85 -0
- package/src/theme/CodeBlock/index.tsx +57 -0
- package/src/theme/ColorModeToggle/index.tsx +93 -0
- package/src/theme/Demo/actions.tsx +20 -0
- package/src/theme/Demo/default_scope.ts +19 -0
- package/src/theme/DocBreadcrumbs/Items/Home/index.tsx +38 -0
- package/src/theme/DocBreadcrumbs/Items/item.styles.ts +43 -0
- package/src/theme/DocBreadcrumbs/index.tsx +144 -0
- package/src/theme/DocItem/Content/index.tsx +75 -0
- package/src/theme/DocItem/Footer/index.tsx +59 -0
- package/src/theme/DocItem/Layout/index.tsx +112 -0
- package/src/theme/DocItem/Metadata/index.tsx +23 -0
- package/src/theme/DocItem/Paginator/index.tsx +20 -0
- package/src/theme/DocItem/TOC/Desktop/index.tsx +24 -0
- package/src/theme/DocItem/TOC/Mobile/index.tsx +35 -0
- package/src/theme/DocItem/index.tsx +30 -0
- package/src/theme/DocPaginator/index.tsx +64 -0
- package/src/theme/DocRoot/Layout/Main/index.tsx +61 -0
- package/src/theme/DocRoot/Layout/Sidebar/index.tsx +124 -0
- package/src/theme/DocRoot/Layout/index.tsx +72 -0
- package/src/theme/DocSidebarItem/Category/index.tsx +266 -0
- package/src/theme/DocSidebarItem/Link/index.tsx +86 -0
- package/src/theme/DocSidebarItem/index.tsx +29 -0
- package/src/theme/DocSidebarItems/index.tsx +30 -0
- package/src/theme/EditThisPage/index.tsx +50 -0
- package/src/theme/Footer/index.tsx +67 -0
- package/src/theme/Heading/index.tsx +94 -0
- package/src/theme/Logo/index.tsx +146 -0
- package/src/theme/MDXComponents/A.tsx +33 -0
- package/src/theme/MDXComponents/Blockquote.tsx +35 -0
- package/src/theme/MDXComponents/Code.tsx +60 -0
- package/src/theme/MDXComponents/Heading.tsx +16 -0
- package/src/theme/MDXComponents/ListItem.tsx +20 -0
- package/src/theme/MDXComponents/OrderedList.tsx +26 -0
- package/src/theme/MDXComponents/Paragraph.tsx +33 -0
- package/src/theme/MDXComponents/Table.tsx +16 -0
- package/src/theme/MDXComponents/TableBody.tsx +16 -0
- package/src/theme/MDXComponents/TableDataCell.tsx +20 -0
- package/src/theme/MDXComponents/TableHeader.tsx +16 -0
- package/src/theme/MDXComponents/TableHeaderCell.tsx +20 -0
- package/src/theme/MDXComponents/TableRow.tsx +16 -0
- package/src/theme/MDXComponents/UnorderedList.tsx +26 -0
- package/src/theme/MDXComponents/index.ts +61 -0
- package/src/theme/MDXContent/index.tsx +22 -0
- package/src/theme/Navbar/Content/index.tsx +262 -0
- package/src/theme/Navbar/Layout/index.tsx +100 -0
- package/src/theme/Navbar/MobileSidebar/Header/index.tsx +89 -0
- package/src/theme/Navbar/MobileSidebar/Layout/index.tsx +44 -0
- package/src/theme/Navbar/MobileSidebar/index.tsx +46 -0
- package/src/theme/NavbarItem/DropdownNavbarItem/index.tsx +200 -0
- package/src/theme/NavbarItem/NavbarNavLink.tsx +141 -0
- package/src/theme/PaginatorNavLink/index.tsx +72 -0
- package/src/theme/Root.styles.ts +122 -0
- package/src/theme/Root.tsx +106 -0
- package/src/theme/TOCCollapsible/CollapseButton/index.tsx +53 -0
- package/src/theme/TOCItems/Tree.tsx +114 -0
- package/src/theme/infima.styles.ts +1458 -0
- package/src/theme/reset.styles.ts +82 -0
- package/src/theme/theme.d.ts +598 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { css } from '@emotion/react';
|
|
10
|
+
import {
|
|
11
|
+
EuiText,
|
|
12
|
+
UseEuiTheme,
|
|
13
|
+
EuiThemeProvider,
|
|
14
|
+
useEuiMemoizedStyles,
|
|
15
|
+
} from '@elastic/eui';
|
|
16
|
+
import { useThemeConfig } from '@docusaurus/theme-common';
|
|
17
|
+
import { euiLinkStyles } from '@elastic/eui/es/components/link/link.styles';
|
|
18
|
+
|
|
19
|
+
const getFooterStyles = (euiThemeContext: UseEuiTheme) => {
|
|
20
|
+
const { euiTheme } = euiThemeContext;
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
root: css`
|
|
24
|
+
background: ${euiTheme.colors
|
|
25
|
+
.backgroundBaseSubdued}; // Color not available in EUI
|
|
26
|
+
padding: ${euiTheme.size.l};
|
|
27
|
+
text-align: center;
|
|
28
|
+
`,
|
|
29
|
+
text: css`
|
|
30
|
+
line-height: var(--eui-line-height-s);
|
|
31
|
+
|
|
32
|
+
a {
|
|
33
|
+
${euiLinkStyles(euiThemeContext).euiLink}
|
|
34
|
+
${euiLinkStyles(euiThemeContext).primary}
|
|
35
|
+
}
|
|
36
|
+
`,
|
|
37
|
+
heart: css`
|
|
38
|
+
color: ${euiTheme.colors.accent};
|
|
39
|
+
`,
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const _Footer = () => {
|
|
44
|
+
const styles = useEuiMemoizedStyles(getFooterStyles);
|
|
45
|
+
const { footer } = useThemeConfig();
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<footer css={styles.root}>
|
|
49
|
+
<EuiText
|
|
50
|
+
textAlign="center"
|
|
51
|
+
size="s"
|
|
52
|
+
css={styles.text}
|
|
53
|
+
dangerouslySetInnerHTML={{ __html: footer?.copyright ?? '' }}
|
|
54
|
+
/>
|
|
55
|
+
</footer>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const Footer = () => {
|
|
60
|
+
return (
|
|
61
|
+
<EuiThemeProvider colorMode="dark">
|
|
62
|
+
<_Footer />
|
|
63
|
+
</EuiThemeProvider>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export default Footer;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import useBrokenLinks from '@docusaurus/useBrokenLinks';
|
|
10
|
+
import { Props as HeadingProps } from '@theme/Heading';
|
|
11
|
+
import {
|
|
12
|
+
EuiTitle,
|
|
13
|
+
EuiButtonIcon,
|
|
14
|
+
UseEuiTheme,
|
|
15
|
+
EuiTitleProps,
|
|
16
|
+
useEuiMemoizedStyles,
|
|
17
|
+
} from '@elastic/eui';
|
|
18
|
+
import { css } from '@emotion/react';
|
|
19
|
+
|
|
20
|
+
const TAG_TO_TITLE_SIZE_MAP: Record<string, EuiTitleProps['size']> = {
|
|
21
|
+
h6: 'xxxs',
|
|
22
|
+
h5: 'xxs',
|
|
23
|
+
h4: 'xs',
|
|
24
|
+
h3: 's',
|
|
25
|
+
h2: 'm',
|
|
26
|
+
h1: 'l',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const getHeadingStyles = ({ euiTheme }: UseEuiTheme) => ({
|
|
30
|
+
heading: css`
|
|
31
|
+
margin-block-start: calc(var(--eui-theme-content-vertical-spacing) * 2.5);
|
|
32
|
+
margin-block-end: var(--eui-theme-content-vertical-spacing);
|
|
33
|
+
scroll-margin-block-start: calc(var(--ifm-navbar-height) + 1rem);
|
|
34
|
+
|
|
35
|
+
&:first-child {
|
|
36
|
+
margin-block-start: var(--eui-theme-content-vertical-spacing);
|
|
37
|
+
}
|
|
38
|
+
`,
|
|
39
|
+
|
|
40
|
+
anchor: css`
|
|
41
|
+
margin-inline-start: ${euiTheme.size.s};
|
|
42
|
+
opacity: 0;
|
|
43
|
+
|
|
44
|
+
&:focus,
|
|
45
|
+
.heading:hover & {
|
|
46
|
+
opacity: 1;
|
|
47
|
+
}
|
|
48
|
+
`,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const Heading = ({
|
|
52
|
+
as: Component,
|
|
53
|
+
children,
|
|
54
|
+
id,
|
|
55
|
+
...restProps
|
|
56
|
+
}: HeadingProps) => {
|
|
57
|
+
const brokenLinks = useBrokenLinks();
|
|
58
|
+
const styles = useEuiMemoizedStyles(getHeadingStyles);
|
|
59
|
+
|
|
60
|
+
brokenLinks.collectAnchor(id);
|
|
61
|
+
|
|
62
|
+
const anchorTitle = `Direct link to ${
|
|
63
|
+
typeof children === 'string' ? children : id
|
|
64
|
+
}`;
|
|
65
|
+
|
|
66
|
+
// We don't want to show section links on document title headings
|
|
67
|
+
const shouldShowSectionLink = Component !== 'h1';
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<EuiTitle size={TAG_TO_TITLE_SIZE_MAP[Component]}>
|
|
71
|
+
<Component
|
|
72
|
+
{...restProps}
|
|
73
|
+
className="heading anchor"
|
|
74
|
+
css={styles.heading}
|
|
75
|
+
id={id}
|
|
76
|
+
>
|
|
77
|
+
{children}
|
|
78
|
+
{shouldShowSectionLink && (
|
|
79
|
+
<EuiButtonIcon
|
|
80
|
+
css={styles.anchor}
|
|
81
|
+
href={`#${id}`}
|
|
82
|
+
aria-label={anchorTitle}
|
|
83
|
+
title={anchorTitle}
|
|
84
|
+
iconType="link"
|
|
85
|
+
color="text"
|
|
86
|
+
size="xs"
|
|
87
|
+
/>
|
|
88
|
+
)}
|
|
89
|
+
</Component>
|
|
90
|
+
</EuiTitle>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export default Heading;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { useContext, JSX } from 'react';
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import Link from '@docusaurus/Link';
|
|
12
|
+
import useBaseUrl from '@docusaurus/useBaseUrl';
|
|
13
|
+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
14
|
+
import {
|
|
15
|
+
useColorMode,
|
|
16
|
+
useThemeConfig,
|
|
17
|
+
type NavbarLogo,
|
|
18
|
+
} from '@docusaurus/theme-common';
|
|
19
|
+
import type { Props } from '@theme-original/Logo';
|
|
20
|
+
import {
|
|
21
|
+
EuiImage,
|
|
22
|
+
euiTextTruncate,
|
|
23
|
+
useEuiMemoizedStyles,
|
|
24
|
+
UseEuiTheme,
|
|
25
|
+
} from '@elastic/eui';
|
|
26
|
+
|
|
27
|
+
import { AppThemeContext } from '../../components/theme_context';
|
|
28
|
+
|
|
29
|
+
const getStyles = ({ euiTheme }: UseEuiTheme) => ({
|
|
30
|
+
wrapper: css`
|
|
31
|
+
${euiTextTruncate()}
|
|
32
|
+
// create space to prevent focus outline from being cut off
|
|
33
|
+
padding: ${euiTheme.size.xs};
|
|
34
|
+
|
|
35
|
+
@media (min-width: 997px) {
|
|
36
|
+
border-right: ${euiTheme.border.thin};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.navbar__brand {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
|
|
43
|
+
margin-inline-end: ${euiTheme.size.m};
|
|
44
|
+
|
|
45
|
+
@media (min-width: 997px) {
|
|
46
|
+
margin-inline-end: ${euiTheme.size.l};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.navbar__logo {
|
|
51
|
+
height: 100%;
|
|
52
|
+
}
|
|
53
|
+
`,
|
|
54
|
+
imageWrapper: css`
|
|
55
|
+
margin-inline-end: ${euiTheme.size.m};
|
|
56
|
+
`,
|
|
57
|
+
image: css`
|
|
58
|
+
position: relative;
|
|
59
|
+
block-size: ${euiTheme.size.l};
|
|
60
|
+
inline-size: ${euiTheme.size.l};
|
|
61
|
+
margin: 0;
|
|
62
|
+
`,
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
function LogoThemedImage({
|
|
66
|
+
logo,
|
|
67
|
+
alt,
|
|
68
|
+
imageClassName,
|
|
69
|
+
}: {
|
|
70
|
+
logo: NavbarLogo;
|
|
71
|
+
alt: string;
|
|
72
|
+
imageClassName?: string;
|
|
73
|
+
}) {
|
|
74
|
+
const { colorMode } = useContext(AppThemeContext);
|
|
75
|
+
const isDarkMode = colorMode === 'dark';
|
|
76
|
+
|
|
77
|
+
const styles = useEuiMemoizedStyles(getStyles);
|
|
78
|
+
|
|
79
|
+
const src = isDarkMode
|
|
80
|
+
? useBaseUrl(logo.srcDark || logo.src)
|
|
81
|
+
: useBaseUrl(logo.src);
|
|
82
|
+
|
|
83
|
+
const themedImage = (
|
|
84
|
+
<EuiImage
|
|
85
|
+
src={src}
|
|
86
|
+
size="fullWidth"
|
|
87
|
+
alt={alt}
|
|
88
|
+
className={logo.className}
|
|
89
|
+
wrapperProps={{
|
|
90
|
+
style: logo.style,
|
|
91
|
+
css: styles.image,
|
|
92
|
+
}}
|
|
93
|
+
/>
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
// Is this extra div really necessary?
|
|
97
|
+
// introduced in https://github.com/facebook/docusaurus/pull/5666
|
|
98
|
+
return imageClassName ? (
|
|
99
|
+
<div className={imageClassName} css={styles.imageWrapper}>
|
|
100
|
+
{themedImage}
|
|
101
|
+
</div>
|
|
102
|
+
) : (
|
|
103
|
+
themedImage
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export default function Logo(props: Props): JSX.Element {
|
|
108
|
+
const {
|
|
109
|
+
siteConfig: { title },
|
|
110
|
+
} = useDocusaurusContext();
|
|
111
|
+
const {
|
|
112
|
+
navbar: { title: navbarTitle, logo },
|
|
113
|
+
} = useThemeConfig();
|
|
114
|
+
|
|
115
|
+
const { imageClassName, titleClassName, ...propsRest } = props;
|
|
116
|
+
const logoLink = useBaseUrl(logo?.href || '/');
|
|
117
|
+
|
|
118
|
+
const styles = useEuiMemoizedStyles(getStyles);
|
|
119
|
+
|
|
120
|
+
// If visible title is shown, fallback alt text should be
|
|
121
|
+
// an empty string to mark the logo as decorative.
|
|
122
|
+
const fallbackAlt = navbarTitle ? '' : title;
|
|
123
|
+
|
|
124
|
+
// Use logo alt text if provided (including empty string),
|
|
125
|
+
// and provide a sensible fallback otherwise.
|
|
126
|
+
const alt = logo?.alt ?? fallbackAlt;
|
|
127
|
+
|
|
128
|
+
return (
|
|
129
|
+
<div css={styles.wrapper}>
|
|
130
|
+
<Link
|
|
131
|
+
to={logoLink}
|
|
132
|
+
{...propsRest}
|
|
133
|
+
{...(logo?.target && { target: logo.target })}
|
|
134
|
+
>
|
|
135
|
+
{logo && (
|
|
136
|
+
<LogoThemedImage
|
|
137
|
+
logo={logo}
|
|
138
|
+
alt={alt}
|
|
139
|
+
imageClassName={imageClassName}
|
|
140
|
+
/>
|
|
141
|
+
)}
|
|
142
|
+
{navbarTitle != null && <b className={titleClassName}>{navbarTitle}</b>}
|
|
143
|
+
</Link>
|
|
144
|
+
</div>
|
|
145
|
+
);
|
|
146
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { JSX } from 'react';
|
|
10
|
+
import type AType from '@theme-init/MDXComponents/A';
|
|
11
|
+
import type { WrapperProps } from '@docusaurus/types';
|
|
12
|
+
import { css } from '@emotion/react';
|
|
13
|
+
import { EuiLink, useEuiMemoizedStyles, UseEuiTheme } from '@elastic/eui';
|
|
14
|
+
|
|
15
|
+
type Props = WrapperProps<typeof AType>;
|
|
16
|
+
|
|
17
|
+
const getStyles = ({ euiTheme }: UseEuiTheme) => {
|
|
18
|
+
return {
|
|
19
|
+
link: css`
|
|
20
|
+
font-weight: ${euiTheme.font.weight.bold};
|
|
21
|
+
text-decoration: underline;
|
|
22
|
+
text-decoration-color: currentColor;
|
|
23
|
+
`,
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const A = (props: Props): JSX.Element => {
|
|
28
|
+
const styles = useEuiMemoizedStyles(getStyles);
|
|
29
|
+
|
|
30
|
+
return <EuiLink {...props} css={styles.link} />;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default A;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { HTMLAttributes } from 'react';
|
|
10
|
+
import { EuiText, useEuiMemoizedStyles } from '@elastic/eui';
|
|
11
|
+
import { css } from '@emotion/react';
|
|
12
|
+
|
|
13
|
+
const getBlockquoteStyles = () => css`
|
|
14
|
+
margin-block: var(--eui-theme-content-vertical-spacing);
|
|
15
|
+
|
|
16
|
+
&:first-child {
|
|
17
|
+
margin-block-start: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:last-child {
|
|
21
|
+
margin-block-end: 0;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export const Blockquote = ({ children }: HTMLAttributes<HTMLQuoteElement>) => {
|
|
26
|
+
const styles = useEuiMemoizedStyles(getBlockquoteStyles);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<EuiText size="m" css={styles}>
|
|
30
|
+
<blockquote>
|
|
31
|
+
{children}
|
|
32
|
+
</blockquote>
|
|
33
|
+
</EuiText>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import React, { JSX } from 'react';
|
|
10
|
+
import type CodeType from '@theme-init/MDXComponents/Code';
|
|
11
|
+
import CodeBlock from '@theme/CodeBlock';
|
|
12
|
+
import type { WrapperProps } from '@docusaurus/types';
|
|
13
|
+
import { css } from '@emotion/react';
|
|
14
|
+
import { EuiCode, useEuiMemoizedStyles, UseEuiTheme } from '@elastic/eui';
|
|
15
|
+
|
|
16
|
+
type Props = WrapperProps<typeof CodeType>;
|
|
17
|
+
|
|
18
|
+
const getStyles = ({ euiTheme }: UseEuiTheme) => {
|
|
19
|
+
return {
|
|
20
|
+
code: css`
|
|
21
|
+
// reset docusaurus code styles
|
|
22
|
+
border: none;
|
|
23
|
+
vertical-align: initial;
|
|
24
|
+
`,
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const Code = ({ children, className, ...rest }: Props): JSX.Element => {
|
|
29
|
+
const styles = useEuiMemoizedStyles(getStyles);
|
|
30
|
+
const language = className?.startsWith('language-')
|
|
31
|
+
? className.replace('language-', '')
|
|
32
|
+
: undefined;
|
|
33
|
+
|
|
34
|
+
const isInlineCode = children
|
|
35
|
+
? React.Children.toArray(children).every(
|
|
36
|
+
(el) => typeof el === 'string' && !el.includes('\n')
|
|
37
|
+
)
|
|
38
|
+
: false;
|
|
39
|
+
|
|
40
|
+
if (isInlineCode) {
|
|
41
|
+
return (
|
|
42
|
+
<EuiCode
|
|
43
|
+
{...rest}
|
|
44
|
+
className={className}
|
|
45
|
+
language={language}
|
|
46
|
+
css={styles.code}
|
|
47
|
+
>
|
|
48
|
+
{children}
|
|
49
|
+
</EuiCode>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<CodeBlock className={className} {...rest}>
|
|
55
|
+
{children}
|
|
56
|
+
</CodeBlock>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default Code;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { JSX } from 'react';
|
|
10
|
+
import Heading, { Props as HeadingProps } from '@theme/Heading';
|
|
11
|
+
|
|
12
|
+
const MDXHeading = (props: HeadingProps): JSX.Element => (
|
|
13
|
+
<Heading {...props} />
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export default MDXHeading;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { HTMLAttributes } from 'react';
|
|
10
|
+
import { EuiText } from '@elastic/eui';
|
|
11
|
+
|
|
12
|
+
export const ListItem = ({ children, ...props }: HTMLAttributes<HTMLLIElement>) => {
|
|
13
|
+
return (
|
|
14
|
+
<li>
|
|
15
|
+
<EuiText size="m">
|
|
16
|
+
{children}
|
|
17
|
+
</EuiText>
|
|
18
|
+
</li>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { HTMLAttributes } from 'react';
|
|
10
|
+
import { useEuiMemoizedStyles, UseEuiTheme } from '@elastic/eui';
|
|
11
|
+
import { css } from '@emotion/react';
|
|
12
|
+
|
|
13
|
+
const getOrderedListStyles = ({ euiTheme }: UseEuiTheme) => css`
|
|
14
|
+
margin-inline-start: ${euiTheme.size.l};
|
|
15
|
+
list-style: decimal;
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
export const OrderedList = ({ children, ...restProps }: HTMLAttributes<HTMLUListElement>) => {
|
|
19
|
+
const styles = useEuiMemoizedStyles(getOrderedListStyles);
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<ol {...restProps} css={styles}>
|
|
23
|
+
{children}
|
|
24
|
+
</ol>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { HTMLAttributes } from 'react';
|
|
10
|
+
import { EuiText, useEuiMemoizedStyles } from '@elastic/eui';
|
|
11
|
+
import { css } from '@emotion/react';
|
|
12
|
+
|
|
13
|
+
const getParagraphStyles = () => css`
|
|
14
|
+
margin-block: var(--eui-theme-content-vertical-spacing);
|
|
15
|
+
|
|
16
|
+
&:first-child {
|
|
17
|
+
margin-block-start: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:last-child {
|
|
21
|
+
margin-block-end: 0;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export const Paragraph = ({ children }: HTMLAttributes<HTMLParagraphElement>) => {
|
|
26
|
+
const styles = useEuiMemoizedStyles(getParagraphStyles);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<EuiText size="m" css={styles} component="p">
|
|
30
|
+
{children}
|
|
31
|
+
</EuiText>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { JSX, TableHTMLAttributes } from 'react';
|
|
10
|
+
import { EuiTable } from '@elastic/eui';
|
|
11
|
+
|
|
12
|
+
export const Table = ({
|
|
13
|
+
children,
|
|
14
|
+
}: TableHTMLAttributes<HTMLTableElement>): JSX.Element => (
|
|
15
|
+
<EuiTable>{children}</EuiTable>
|
|
16
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { HTMLAttributes, JSX } from 'react';
|
|
10
|
+
import { EuiTableBody } from '@elastic/eui';
|
|
11
|
+
|
|
12
|
+
export const TableBody = ({
|
|
13
|
+
children,
|
|
14
|
+
}: HTMLAttributes<HTMLTableSectionElement>): JSX.Element => (
|
|
15
|
+
<EuiTableBody>{children}</EuiTableBody>
|
|
16
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { JSX, TdHTMLAttributes } from 'react';
|
|
10
|
+
import { EuiTableRowCell, EuiText } from '@elastic/eui';
|
|
11
|
+
|
|
12
|
+
export const TableDataCell = ({
|
|
13
|
+
children,
|
|
14
|
+
}: TdHTMLAttributes<HTMLTableCellElement>): JSX.Element => (
|
|
15
|
+
<EuiTableRowCell>
|
|
16
|
+
<EuiText size="m" component="span">
|
|
17
|
+
{children}
|
|
18
|
+
</EuiText>
|
|
19
|
+
</EuiTableRowCell>
|
|
20
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { HTMLAttributes, JSX } from 'react';
|
|
10
|
+
import { EuiTableHeader } from '@elastic/eui';
|
|
11
|
+
|
|
12
|
+
export const TableHeader = ({
|
|
13
|
+
children,
|
|
14
|
+
}: HTMLAttributes<HTMLTableSectionElement>): JSX.Element => (
|
|
15
|
+
<EuiTableHeader wrapWithTableRow={false}>{children}</EuiTableHeader>
|
|
16
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { JSX, ThHTMLAttributes } from 'react';
|
|
10
|
+
import { EuiTableHeaderCell, EuiText } from '@elastic/eui';
|
|
11
|
+
|
|
12
|
+
export const TableHeaderCell = ({
|
|
13
|
+
children,
|
|
14
|
+
}: ThHTMLAttributes<HTMLTableCellElement>): JSX.Element => (
|
|
15
|
+
<EuiTableHeaderCell>
|
|
16
|
+
<EuiText size="m" component="span">
|
|
17
|
+
{children}
|
|
18
|
+
</EuiText>
|
|
19
|
+
</EuiTableHeaderCell>
|
|
20
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { HTMLAttributes, JSX } from 'react';
|
|
10
|
+
import { EuiTableRow } from '@elastic/eui';
|
|
11
|
+
|
|
12
|
+
export const TableRow = ({
|
|
13
|
+
children,
|
|
14
|
+
}: HTMLAttributes<HTMLTableRowElement>): JSX.Element => (
|
|
15
|
+
<EuiTableRow>{children}</EuiTableRow>
|
|
16
|
+
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { HTMLAttributes } from 'react';
|
|
10
|
+
import { useEuiMemoizedStyles, UseEuiTheme } from '@elastic/eui';
|
|
11
|
+
import { css } from '@emotion/react';
|
|
12
|
+
|
|
13
|
+
const getUnorderedListStyles = ({ euiTheme }: UseEuiTheme) => css`
|
|
14
|
+
margin-inline-start: ${euiTheme.size.l};
|
|
15
|
+
list-style: disc;
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
export const UnorderedList = ({ children, ...restProps }: HTMLAttributes<HTMLUListElement>) => {
|
|
19
|
+
const styles = useEuiMemoizedStyles(getUnorderedListStyles);
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<ul {...restProps} css={styles}>
|
|
23
|
+
{children}
|
|
24
|
+
</ul>
|
|
25
|
+
);
|
|
26
|
+
};
|