@redocly/theme 0.30.5 → 0.30.7
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/lib/components/Breadcrumbs/Breadcrumb.d.ts +2 -2
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/lib/components/Catalog/Catalog.d.ts +2 -2
- package/lib/components/CodeBlock/CodeBlockControls.js +8 -8
- package/lib/components/Dropdown/Dropdown.d.ts +1 -1
- package/lib/components/Feedback/Emotions.d.ts +4 -4
- package/lib/components/Feedback/Feedback.d.ts +2 -2
- package/lib/components/Feedback/Thumbs.d.ts +3 -3
- package/lib/components/Filter/Filter.d.ts +2 -2
- package/lib/components/Filter/FilterContent.d.ts +2 -2
- package/lib/components/Filter/FilterPopover.d.ts +2 -2
- package/lib/components/Filter/FilterTag.d.ts +2 -2
- package/lib/components/Filter/FilterTags.d.ts +2 -2
- package/lib/components/Footer/FooterColumn.js +12 -1
- package/lib/components/Image/Image.d.ts +2 -2
- package/lib/components/Menu/Menu.d.ts +2 -2
- package/lib/components/Menu/MenuItemSwitch.d.ts +2 -1
- package/lib/components/Navbar/NavbarItem.d.ts +2 -2
- package/lib/components/NavbarLogo/NavbarLogo.js +1 -1
- package/lib/components/OpenApiDocs/DevOnboardingTryItSecurity.d.ts +2 -2
- package/lib/components/OpenApiDocs/ScorecardBadges.d.ts +2 -2
- package/lib/components/OpenApiDocs/TryItSecurityApps.d.ts +2 -2
- package/lib/components/Product/ProductPicker.d.ts +2 -2
- package/lib/components/Profile/AuthUserProfile.d.ts +2 -2
- package/lib/components/Profile/MobileUserProfile.d.ts +2 -2
- package/lib/components/Profile/UserProfileData.d.ts +2 -2
- package/lib/components/Scorecard/Gauge.d.ts +2 -2
- package/lib/components/Scorecard/StatusByLevelWidget.d.ts +2 -2
- package/lib/components/Search/ClearIcon.d.ts +2 -1
- package/lib/components/Search/ClockBackwardsIcon.d.ts +2 -1
- package/lib/components/Search/RecentSearches.d.ts +2 -2
- package/lib/components/Search/SearchIcon.d.ts +2 -1
- package/lib/components/Search/SuggestedPages.d.ts +2 -2
- package/lib/components/Select/Select.d.ts +1 -1
- package/lib/components/Sidebar/VersionPicker.d.ts +2 -2
- package/lib/components/SidebarActions/SidebarActions.d.ts +1 -1
- package/lib/components/SidebarActions/styled.d.ts +7 -7
- package/lib/components/Tabs/Tabs.d.ts +0 -1
- package/lib/components/Tabs/Tabs.js +2 -2
- package/lib/config.d.ts +16 -2
- package/lib/config.js +6 -1
- package/lib/i18n/LanguagePicker.d.ts +2 -2
- package/lib/icons/AlertIcon/AlertIcon.d.ts +2 -2
- package/lib/icons/AnchorIcon/AnchorIcon.d.ts +2 -2
- package/lib/icons/ArrowIcon/ArrowIcon.d.ts +2 -2
- package/lib/icons/BurgerIcon/BurgerIcon.d.ts +3 -3
- package/lib/icons/CheckboxIcon/CheckboxIcon.d.ts +2 -2
- package/lib/icons/CloseIcon/CloseIcon.d.ts +3 -3
- package/lib/icons/CollapseIcon/CollapseIcon.d.ts +2 -2
- package/lib/icons/ColorModeIcon/ColorModeIcon.d.ts +2 -2
- package/lib/icons/CopyIcon/CopyIcon.d.ts +2 -2
- package/lib/icons/CopyIcon/CopyIcon.js +4 -5
- package/lib/icons/DeselectIcon/DeselectIcon.d.ts +2 -2
- package/lib/icons/DissatisfiedIcon/DissatisfiedIcon.d.ts +2 -2
- package/lib/icons/EditIcon/EditIcon.d.ts +2 -2
- package/lib/icons/ErrorIcon/ErrorIcon.d.ts +2 -2
- package/lib/icons/ExpandIcon/ExpandIcon.d.ts +2 -2
- package/lib/icons/FileIcon/FileIcon.d.ts +2 -2
- package/lib/icons/LanguageIcon/LanguageIcon.d.ts +2 -2
- package/lib/icons/LogoutIcon/LogoutIcon.d.ts +3 -3
- package/lib/icons/NeutralIcon/NeutralIcon.d.ts +2 -2
- package/lib/icons/PlusIcon/PlusIcon.d.ts +3 -3
- package/lib/icons/PointingArrowIcon/PointingArrowIcon.d.ts +2 -2
- package/lib/icons/RadioCheckButtonIcon/RadioCheckButtonIcon.d.ts +2 -2
- package/lib/icons/ReportIcon/ReportIcon.d.ts +2 -2
- package/lib/icons/ReportIcon/ReportIcon.js +2 -2
- package/lib/icons/RocketIcon/RocketIcon.d.ts +2 -2
- package/lib/icons/SatisfiedIcon/SatisfiedIcon.d.ts +2 -2
- package/lib/icons/SelectIcon/SelectIcon.d.ts +2 -2
- package/lib/icons/SpinnerIcon/SpinnerIcon.d.ts +3 -3
- package/lib/icons/ThumbDownIcon/ThumbDownIcon.d.ts +2 -2
- package/lib/icons/ThumbUpIcon/ThumbUpIcon.d.ts +2 -2
- package/lib/mocks/Sidebar/useDrilldown.d.ts +2 -2
- package/lib/mocks/Sidebar/useMenuGroup.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/CodeBlock/CodeBlockControls.tsx +26 -26
- package/src/components/Footer/FooterColumn.tsx +20 -1
- package/src/components/NavbarLogo/NavbarLogo.tsx +1 -1
- package/src/components/Tabs/Tabs.tsx +3 -3
- package/src/config.ts +6 -1
- package/src/icons/CopyIcon/CopyIcon.tsx +19 -13
- package/src/icons/ReportIcon/ReportIcon.tsx +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { CatalogConfig } from '../../config';
|
|
3
3
|
export default function Catalog(props: {
|
|
4
4
|
pageProps: {
|
|
5
5
|
catalogId: string;
|
|
6
6
|
catalogConfig: CatalogConfig;
|
|
7
7
|
};
|
|
8
|
-
}): JSX.Element;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
9
|
export declare const FilterControls: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
10
|
export declare const CatalogPageContent: import("styled-components").StyledComponent<"main", any, {}, never>;
|
|
11
11
|
export declare const CatalogTitle: import("styled-components").StyledComponent<"h2", any, {}, never>;
|
|
@@ -14,22 +14,22 @@ const telemetry_1 = require("../../mocks/telemetry");
|
|
|
14
14
|
function CodeBlockControls({ children, className, title, controls, }) {
|
|
15
15
|
var _a, _b, _c, _d, _e, _f;
|
|
16
16
|
const { codeSnippet } = (0, hooks_1.useThemeConfig)();
|
|
17
|
-
const controlsType = (codeSnippet === null || codeSnippet === void 0 ? void 0 : codeSnippet.
|
|
17
|
+
const controlsType = (codeSnippet === null || codeSnippet === void 0 ? void 0 : codeSnippet.elementFormat) || 'icon';
|
|
18
18
|
const { copy, expand, collapse, select, deselect, report } = controls
|
|
19
19
|
? controls
|
|
20
20
|
: { copy: null, expand: null, collapse: null, select: null, deselect: null, report: null };
|
|
21
21
|
const defaultControls = controls ? (react_1.default.createElement(react_1.default.Fragment, null,
|
|
22
22
|
react_1.default.createElement(Title, null, title),
|
|
23
23
|
react_1.default.createElement(ControlsWrapper, null,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} })) : null,
|
|
28
|
-
expand && !((_b = codeSnippet === null || codeSnippet === void 0 ? void 0 : codeSnippet.expand) === null || _b === void 0 ? void 0 : _b.hide) ? (react_1.default.createElement(CodeBlock_1.CodeBlockControlButton, { "data-cy": "expand-all", "data-testid": "expand-all", asIcon: controlsType === 'icon', onClick: expand === null || expand === void 0 ? void 0 : expand.onClick, title: (expand === null || expand === void 0 ? void 0 : expand.tooltipText) || 'Expand all' }, controlsType === 'icon' ? react_1.default.createElement(icons_1.ExpandIcon, null) : (expand === null || expand === void 0 ? void 0 : expand.label) ? expand.label : 'Expand all')) : null,
|
|
29
|
-
collapse && !((_c = codeSnippet === null || codeSnippet === void 0 ? void 0 : codeSnippet.collapse) === null || _c === void 0 ? void 0 : _c.hide) ? (react_1.default.createElement(CodeBlock_1.CodeBlockControlButton, { "data-cy": "collapse-all", "data-testid": "collapse-all", asIcon: controlsType === 'icon', onClick: collapse === null || collapse === void 0 ? void 0 : collapse.onClick, title: (collapse === null || collapse === void 0 ? void 0 : collapse.tooltipText) || 'Collapse all' }, controlsType === 'icon' ? (react_1.default.createElement(icons_1.CollapseIcon, null)) : (collapse === null || collapse === void 0 ? void 0 : collapse.label) ? (collapse.label) : ('Collapse all'))) : null,
|
|
24
|
+
report && ((_a = report === null || report === void 0 ? void 0 : report.props) === null || _a === void 0 ? void 0 : _a.visible) ? (react_1.default.createElement(CodeBlock_1.CodeBlockControlButton, Object.assign({ "data-cy": "report-button", "data-testid": "report-button", asIcon: controlsType === 'icon', title: (_b = report.props) === null || _b === void 0 ? void 0 : _b.tooltip }, report.props), controlsType === 'icon' ? react_1.default.createElement(icons_1.ReportIcon, null) : ((_c = report.props) === null || _c === void 0 ? void 0 : _c.buttonText) || 'Report')) : null,
|
|
25
|
+
expand && !((_d = codeSnippet === null || codeSnippet === void 0 ? void 0 : codeSnippet.expand) === null || _d === void 0 ? void 0 : _d.hide) ? (react_1.default.createElement(CodeBlock_1.CodeBlockControlButton, { "data-cy": "expand-all", "data-testid": "expand-all", asIcon: controlsType === 'icon', onClick: expand === null || expand === void 0 ? void 0 : expand.onClick, title: (expand === null || expand === void 0 ? void 0 : expand.tooltipText) || 'Expand all' }, controlsType === 'icon' ? react_1.default.createElement(icons_1.ExpandIcon, null) : (expand === null || expand === void 0 ? void 0 : expand.label) ? expand.label : 'Expand all')) : null,
|
|
26
|
+
collapse && !((_e = codeSnippet === null || codeSnippet === void 0 ? void 0 : codeSnippet.collapse) === null || _e === void 0 ? void 0 : _e.hide) ? (react_1.default.createElement(CodeBlock_1.CodeBlockControlButton, { "data-cy": "collapse-all", "data-testid": "collapse-all", asIcon: controlsType === 'icon', onClick: collapse === null || collapse === void 0 ? void 0 : collapse.onClick, title: (collapse === null || collapse === void 0 ? void 0 : collapse.tooltipText) || 'Collapse all' }, controlsType === 'icon' ? (react_1.default.createElement(icons_1.CollapseIcon, null)) : (collapse === null || collapse === void 0 ? void 0 : collapse.label) ? (collapse.label) : ('Collapse all'))) : null,
|
|
30
27
|
select ? (react_1.default.createElement(CodeBlock_1.CodeBlockControlButton, { "data-cy": "select-all", "data-testid": "select-all", asIcon: controlsType === 'icon', onClick: select === null || select === void 0 ? void 0 : select.onClick, title: select === null || select === void 0 ? void 0 : select.tooltipText }, controlsType === 'icon' ? react_1.default.createElement(icons_1.SelectIcon, null) : (select === null || select === void 0 ? void 0 : select.label) ? select.label : 'Select all')) : null,
|
|
31
28
|
deselect ? (react_1.default.createElement(CodeBlock_1.CodeBlockControlButton, { "data-cy": "clear-all", "data-testid": "clear-all", asIcon: controlsType === 'icon', onClick: deselect === null || deselect === void 0 ? void 0 : deselect.onClick, title: deselect === null || deselect === void 0 ? void 0 : deselect.tooltipText }, controlsType === 'icon' ? (react_1.default.createElement(icons_1.DeselectIcon, null)) : (deselect === null || deselect === void 0 ? void 0 : deselect.label) ? (deselect.label) : ('Clear all'))) : null,
|
|
32
|
-
|
|
29
|
+
copy && !((_f = codeSnippet === null || codeSnippet === void 0 ? void 0 : codeSnippet.copy) === null || _f === void 0 ? void 0 : _f.hide) ? (react_1.default.createElement(CopyButton_1.CopyButton, { data: copy.data, "data-source": copy.dataSource, "data-hash": copy.dataHash, type: controlsType, toasterPlacement: copy.toasterPlacement, toasterDuration: copy.toasterDuration, buttonText: copy.label, tooltipText: copy.tooltipText, onCopyClick: () => {
|
|
30
|
+
copy === null || copy === void 0 ? void 0 : copy.onClick;
|
|
31
|
+
telemetry_1.telemetry.send('code_snippet_copied', {});
|
|
32
|
+
} })) : null))) : null;
|
|
33
33
|
return children || controls ? (react_1.default.createElement(ContainerWraper, { "data-component-name": "CodeBlock/CodeBlockControls", className: className }, children ? children : defaultControls)) : null;
|
|
34
34
|
}
|
|
35
35
|
exports.CodeBlockControls = CodeBlockControls;
|
|
@@ -11,7 +11,7 @@ export interface DropdownProps {
|
|
|
11
11
|
onChange?: (value: React.ReactNode | string) => void;
|
|
12
12
|
icon?: React.ReactNode;
|
|
13
13
|
}
|
|
14
|
-
export declare const Dropdown: ({ children, className, items, withArrow, triggerEvent, onChange, dataAttributes, placement, alignment, icon, }: DropdownProps) => JSX.Element;
|
|
14
|
+
export declare const Dropdown: ({ children, className, items, withArrow, triggerEvent, onChange, dataAttributes, placement, alignment, icon, }: DropdownProps) => React.JSX.Element;
|
|
15
15
|
export declare const DropdownHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
16
16
|
export declare const DropdownList: import("styled-components").StyledComponent<"ul", any, {
|
|
17
17
|
placement?: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Satisfied: () => JSX.Element;
|
|
3
|
-
export declare const Dissatisfied: () => JSX.Element;
|
|
4
|
-
export declare const Neutral: () => JSX.Element;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const Satisfied: () => React.JSX.Element;
|
|
3
|
+
export declare const Dissatisfied: () => React.JSX.Element;
|
|
4
|
+
export declare const Neutral: () => React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import type { FeedbackProps } from '../../types/portal/src/shared/types/feedback';
|
|
3
3
|
export declare const Feedback: (props: FeedbackProps & {
|
|
4
4
|
path?: string;
|
|
5
|
-
}) => JSX.Element;
|
|
5
|
+
}) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ThumbUp: () => JSX.Element;
|
|
3
|
-
export declare const ThumbDown: () => JSX.Element;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const ThumbUp: () => React.JSX.Element;
|
|
3
|
+
export declare const ThumbDown: () => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { ResolvedFilter } from '../../types/portal/src/shared/types/catalog';
|
|
3
3
|
import type { ThemeConfig } from '../../config';
|
|
4
4
|
export declare function Filter({ filter, filterValuesCasing, }: {
|
|
@@ -6,4 +6,4 @@ export declare function Filter({ filter, filterValuesCasing, }: {
|
|
|
6
6
|
selectedOptions: any;
|
|
7
7
|
};
|
|
8
8
|
filterValuesCasing?: NonNullable<ThemeConfig['catalog']>[string]['filterValuesCasing'];
|
|
9
|
-
}): JSX.Element | null;
|
|
9
|
+
}): React.JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { ThemeConfig } from '../../config';
|
|
3
3
|
import type { ResolvedFilter } from '../../types/portal/src/shared/types/catalog';
|
|
4
4
|
interface FilterContentProps {
|
|
@@ -8,6 +8,6 @@ interface FilterContentProps {
|
|
|
8
8
|
isMobile: boolean;
|
|
9
9
|
filterValuesCasing?: NonNullable<ThemeConfig['catalog']>[string]['filterValuesCasing'];
|
|
10
10
|
}
|
|
11
|
-
export declare function FilterContent({ setFilterTerm, filters, filterTerm, isMobile, filterValuesCasing, }: FilterContentProps): JSX.Element;
|
|
11
|
+
export declare function FilterContent({ setFilterTerm, filters, filterTerm, isMobile, filterValuesCasing, }: FilterContentProps): React.JSX.Element;
|
|
12
12
|
export declare const FilterItems: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
13
13
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { ThemeConfig } from '../../config';
|
|
3
3
|
import type { ResolvedFilter } from '../../types/portal/src/shared/types/catalog';
|
|
4
4
|
interface FilterPopoverProps {
|
|
@@ -6,7 +6,7 @@ interface FilterPopoverProps {
|
|
|
6
6
|
filters: ResolvedFilter[];
|
|
7
7
|
filterValuesCasing?: NonNullable<ThemeConfig['catalog']>[string]['filterValuesCasing'];
|
|
8
8
|
}
|
|
9
|
-
export declare function FilterPopover({ setIsAddingFilter, filters, filterValuesCasing, }: FilterPopoverProps): JSX.Element;
|
|
9
|
+
export declare function FilterPopover({ setIsAddingFilter, filters, filterValuesCasing, }: FilterPopoverProps): React.JSX.Element;
|
|
10
10
|
export declare const StyledInput: import("styled-components").StyledComponent<"input", any, {
|
|
11
11
|
'data-cy': string;
|
|
12
12
|
}, "data-cy">;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface FilterTagProps {
|
|
3
3
|
label: string;
|
|
4
4
|
onClick: () => void;
|
|
5
5
|
}
|
|
6
|
-
export declare function FilterTag({ label, onClick }: FilterTagProps): JSX.Element;
|
|
6
|
+
export declare function FilterTag({ label, onClick }: FilterTagProps): React.JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { ResolvedFilter } from '../../types/portal/src/shared/types/catalog';
|
|
3
3
|
interface FilterTagsProps {
|
|
4
4
|
filters: ResolvedFilter[];
|
|
5
5
|
}
|
|
6
|
-
export declare function FilterTags({ filters }: FilterTagsProps): JSX.Element;
|
|
6
|
+
export declare function FilterTags({ filters }: FilterTagsProps): React.JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -15,8 +15,10 @@ function FooterColumn({ column, className }) {
|
|
|
15
15
|
const { translate } = (0, hooks_1.useTranslate)();
|
|
16
16
|
const { items = [] } = column;
|
|
17
17
|
const iconsOnly = items.every((item) => item.label === item.link && (item.icon || item.srcSet));
|
|
18
|
+
const label = translate(column.labelTranslationKey, column.label);
|
|
19
|
+
const labelOrLink = column.type === 'link' ? (react_1.default.createElement(Link_1.Link, { to: column.link, external: column.external, target: column.target }, label)) : (label);
|
|
18
20
|
return (react_1.default.createElement(FooterColumnContainer, { "data-component-name": "Footer/FooterColumn", className: className },
|
|
19
|
-
react_1.default.createElement(FooterColumnTitle, null,
|
|
21
|
+
react_1.default.createElement(FooterColumnTitle, null, labelOrLink),
|
|
20
22
|
react_1.default.createElement(exports.FooterColumnItems, { iconsOnly: iconsOnly }, items === null || items === void 0 ? void 0 : items.map((columnItem, columnItemIndex) => {
|
|
21
23
|
if (columnItem.type === 'error') {
|
|
22
24
|
return null;
|
|
@@ -40,6 +42,15 @@ const FooterColumnTitle = styled_components_1.default.p `
|
|
|
40
42
|
${({ theme }) => theme.mediaQueries.small} {
|
|
41
43
|
margin-bottom: var(--footer-title-margin-bottom);
|
|
42
44
|
}
|
|
45
|
+
|
|
46
|
+
a {
|
|
47
|
+
text-decoration: none;
|
|
48
|
+
color: var(--footer-title-text-color);
|
|
49
|
+
|
|
50
|
+
&:hover {
|
|
51
|
+
color: var(--footer-title-hover-color);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
43
54
|
`;
|
|
44
55
|
const FooterSeparator = styled_components_1.default.div `
|
|
45
56
|
opacity: 0.75;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
type ImageProps = {
|
|
3
3
|
src?: string;
|
|
4
4
|
srcSet?: string;
|
|
5
5
|
alt?: string;
|
|
6
6
|
className?: string;
|
|
7
7
|
};
|
|
8
|
-
export declare function Image(props: ImageProps): JSX.Element;
|
|
8
|
+
export declare function Image(props: ImageProps): React.JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { ItemState } from '../../mocks/Sidebar/types';
|
|
3
3
|
export interface MenuListProps {
|
|
4
4
|
items: ItemState[];
|
|
@@ -6,7 +6,7 @@ export interface MenuListProps {
|
|
|
6
6
|
isMobile?: boolean;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function Menu({ depth, items, className, isMobile }: MenuListProps): JSX.Element;
|
|
9
|
+
export declare function Menu({ depth, items, className, isMobile }: MenuListProps): React.JSX.Element;
|
|
10
10
|
export declare const ThemeMenu: import("styled-components").StyledComponent<"ul", any, {
|
|
11
11
|
'data-component-name': string;
|
|
12
12
|
}, "data-component-name">;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { PropsWithChildren } from 'react';
|
|
2
3
|
import { type MenuItemProps } from '../../components/Sidebar';
|
|
3
|
-
export declare function MenuItemSwitch(props: PropsWithChildren<MenuItemProps>): JSX.Element;
|
|
4
|
+
export declare function MenuItemSwitch(props: PropsWithChildren<MenuItemProps>): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { Link } from '../../mocks/Link';
|
|
3
3
|
import type { ResolvedNavItem } from '../../types/portal';
|
|
4
4
|
export interface NavbarItemProps {
|
|
@@ -6,7 +6,7 @@ export interface NavbarItemProps {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
}
|
|
8
8
|
export declare function NavbarItem({ navItem, className }: NavbarItemProps): JSX.Element | null;
|
|
9
|
-
export declare const NavbarMenuItemDropdown: import("styled-components").StyledComponent<({ children, className, items, withArrow, triggerEvent, onChange, dataAttributes, placement, alignment, icon, }: import("../../components/Dropdown").DropdownProps) => JSX.Element, any, {
|
|
9
|
+
export declare const NavbarMenuItemDropdown: import("styled-components").StyledComponent<({ children, className, items, withArrow, triggerEvent, onChange, dataAttributes, placement, alignment, icon, }: import("../../components/Dropdown").DropdownProps) => React.JSX.Element, any, {
|
|
10
10
|
dataAttributes: {
|
|
11
11
|
'data-component-name': string;
|
|
12
12
|
};
|
|
@@ -10,7 +10,7 @@ const Link_1 = require("../../mocks/Link");
|
|
|
10
10
|
const Image_1 = require("../../components/Image/Image");
|
|
11
11
|
const telemetry_1 = require("../../mocks/telemetry");
|
|
12
12
|
function NavbarLogo({ logo, className }) {
|
|
13
|
-
if (!logo.image && !logo.srcSet) {
|
|
13
|
+
if (!(logo === null || logo === void 0 ? void 0 : logo.image) && !(logo === null || logo === void 0 ? void 0 : logo.srcSet)) {
|
|
14
14
|
return null;
|
|
15
15
|
}
|
|
16
16
|
const img = (react_1.default.createElement(Image_1.Image, { className: className, src: logo.image, srcSet: logo.srcSet, alt: logo.altText }));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import type { TryItSecurityAppsProps } from '../../components/OpenApiDocs/TryItSecurityApps';
|
|
3
|
-
export declare function DevOnboardingTryItSecurity(props: TryItSecurityAppsProps): JSX.Element | null;
|
|
3
|
+
export declare function DevOnboardingTryItSecurity(props: TryItSecurityAppsProps): React.JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface ScorecardBadgesProps {
|
|
3
3
|
metadata?: {
|
|
4
4
|
scorecardLevel?: string;
|
|
@@ -6,5 +6,5 @@ interface ScorecardBadgesProps {
|
|
|
6
6
|
scoreCardSlug?: string;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
export declare function ScorecardBadges(props: ScorecardBadgesProps): JSX.Element | null;
|
|
9
|
+
export declare function ScorecardBadges(props: ScorecardBadgesProps): React.JSX.Element | null;
|
|
10
10
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export type TryItSecurityAppsProps = {
|
|
3
3
|
apiId?: string;
|
|
4
4
|
value?: string;
|
|
5
5
|
onChange: (newSecretKey: string) => void;
|
|
6
6
|
};
|
|
7
|
-
export declare function TryItSecurityApps(props: TryItSecurityAppsProps): JSX.Element | null;
|
|
7
|
+
export declare function TryItSecurityApps(props: TryItSecurityAppsProps): React.JSX.Element | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ProductPicker: () => JSX.Element | null;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ProductPicker: () => React.JSX.Element | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function AuthUserProfile(): JSX.Element | null;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function AuthUserProfile(): React.JSX.Element | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function MobileUserProfile(): JSX.Element | null;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function MobileUserProfile(): React.JSX.Element | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface UserProfileDataProps {
|
|
3
3
|
userData: {
|
|
4
4
|
name: string;
|
|
5
5
|
picture: string;
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
-
export declare function UserProfileData(props: UserProfileDataProps): JSX.Element;
|
|
8
|
+
export declare function UserProfileData(props: UserProfileDataProps): React.JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
export declare function Gauge({ chunks, }: {
|
|
3
3
|
chunks: {
|
|
4
4
|
share: number;
|
|
5
5
|
color: string;
|
|
6
6
|
}[];
|
|
7
|
-
}): JSX.Element;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
8
|
export declare const GaugeValue: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
export interface StatusByLevelWidgetProps {
|
|
3
3
|
title: string;
|
|
4
4
|
levels: {
|
|
@@ -8,4 +8,4 @@ export interface StatusByLevelWidgetProps {
|
|
|
8
8
|
total: number;
|
|
9
9
|
}[];
|
|
10
10
|
}
|
|
11
|
-
export declare function StatusByLevelWidget(props: StatusByLevelWidgetProps): JSX.Element;
|
|
11
|
+
export declare function StatusByLevelWidget(props: StatusByLevelWidgetProps): React.JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { SVGProps } from 'react';
|
|
2
|
-
export declare const ClearIcon: import("styled-components").StyledComponent<(props: SVGProps<SVGSVGElement>) => JSX.Element, any, {}, never>;
|
|
3
|
+
export declare const ClearIcon: import("styled-components").StyledComponent<(props: SVGProps<SVGSVGElement>) => React.JSX.Element, any, {}, never>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { SVGProps } from 'react';
|
|
2
|
-
export declare const ClockBackwardsIcon: import("styled-components").StyledComponent<(props: SVGProps<SVGSVGElement>) => JSX.Element, any, {}, never>;
|
|
3
|
+
export declare const ClockBackwardsIcon: import("styled-components").StyledComponent<(props: SVGProps<SVGSVGElement>) => React.JSX.Element, any, {}, never>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { SVGProps } from 'react';
|
|
2
|
-
export declare const SearchIcon: import("styled-components").StyledComponent<(props: SVGProps<SVGSVGElement>) => JSX.Element, any, {}, never>;
|
|
3
|
+
export declare const SearchIcon: import("styled-components").StyledComponent<(props: SVGProps<SVGSVGElement>) => React.JSX.Element, any, {}, never>;
|
|
@@ -18,7 +18,7 @@ export interface SelectProps<T = any> {
|
|
|
18
18
|
placeholder?: string;
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
}
|
|
21
|
-
export declare function Select<T>({ className, value, options, dataAttributes, withArrow, triggerEvent, onChange, placement, alignment, icon, onlyIcon, disabled, placeholder, }: SelectProps<T>): JSX.Element;
|
|
21
|
+
export declare function Select<T>({ className, value, options, dataAttributes, withArrow, triggerEvent, onChange, placement, alignment, icon, onlyIcon, disabled, placeholder, }: SelectProps<T>): React.JSX.Element;
|
|
22
22
|
export declare const SelectContainer: import("styled-components").StyledComponent<"div", any, {
|
|
23
23
|
disabled?: boolean | undefined;
|
|
24
24
|
}, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import type { SelectProps } from '../Select';
|
|
3
3
|
import type { Version } from '../../types/portal';
|
|
4
4
|
import { Select } from '../Select';
|
|
@@ -7,5 +7,5 @@ export interface VersionPickerProps extends SelectProps {
|
|
|
7
7
|
export declare function VersionPicker(props: {
|
|
8
8
|
versions?: Version[];
|
|
9
9
|
onChange: (v: Version) => void;
|
|
10
|
-
}): JSX.Element | null;
|
|
10
|
+
}): React.JSX.Element | null;
|
|
11
11
|
export declare const VersionPickerSelect: import("styled-components").StyledComponent<typeof Select, any, SelectProps<any>, never>;
|
|
@@ -17,5 +17,5 @@ interface SidebarActionsProps {
|
|
|
17
17
|
requestAccessButton?: React.ReactElement | null;
|
|
18
18
|
className?: string;
|
|
19
19
|
}
|
|
20
|
-
export declare const SidebarActions: ({ showChangeLayoutButton, showRightPanelToggle, layout, initialShowRightPanelToggle, hideCollapseSidebarButton, collapsedSidebar, isOpenapiDocs, onChangeRightPanelViewClick, onChangeViewClick, onChangeCollapseSidebarClick, requestAccessButton, className, }: SidebarActionsProps) => JSX.Element;
|
|
20
|
+
export declare const SidebarActions: ({ showChangeLayoutButton, showRightPanelToggle, layout, initialShowRightPanelToggle, hideCollapseSidebarButton, collapsedSidebar, isOpenapiDocs, onChangeRightPanelViewClick, onChangeViewClick, onChangeCollapseSidebarClick, requestAccessButton, className, }: SidebarActionsProps) => React.JSX.Element;
|
|
21
21
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ShowLeftPanelSVG: import("styled-components").StyledComponent<() => JSX.Element, any, {}, never>;
|
|
3
|
-
export declare const HideLeftPanelSVG: import("styled-components").StyledComponent<() => JSX.Element, any, {}, never>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ShowLeftPanelSVG: import("styled-components").StyledComponent<() => React.JSX.Element, any, {}, never>;
|
|
3
|
+
export declare const HideLeftPanelSVG: import("styled-components").StyledComponent<() => React.JSX.Element, any, {}, never>;
|
|
4
4
|
export declare const StyledToggleRightPanelButton: import("styled-components").StyledComponent<"a", any, {}, never>;
|
|
5
|
-
export declare const HideRightPanelSVG: import("styled-components").StyledComponent<() => JSX.Element, any, {}, never>;
|
|
6
|
-
export declare const ShowRightPanelSVG: import("styled-components").StyledComponent<() => JSX.Element, any, {}, never>;
|
|
5
|
+
export declare const HideRightPanelSVG: import("styled-components").StyledComponent<() => React.JSX.Element, any, {}, never>;
|
|
6
|
+
export declare const ShowRightPanelSVG: import("styled-components").StyledComponent<() => React.JSX.Element, any, {}, never>;
|
|
7
7
|
export declare const StyledChangeViewButton: import("styled-components").StyledComponent<"a", any, {}, never>;
|
|
8
|
-
export declare const ChangeViewSvgRow: import("styled-components").StyledComponent<() => JSX.Element, any, {}, never>;
|
|
9
|
-
export declare const ChangeViewSvgColumn: import("styled-components").StyledComponent<() => JSX.Element, any, {}, never>;
|
|
8
|
+
export declare const ChangeViewSvgRow: import("styled-components").StyledComponent<() => React.JSX.Element, any, {}, never>;
|
|
9
|
+
export declare const ChangeViewSvgColumn: import("styled-components").StyledComponent<() => React.JSX.Element, any, {}, never>;
|
|
10
10
|
export declare const ControlsWrap: import("styled-components").StyledComponent<"span", any, {
|
|
11
11
|
iconCount?: number | undefined;
|
|
12
12
|
isCollapsed?: boolean | undefined;
|
|
@@ -37,8 +37,8 @@ function Tabs(props) {
|
|
|
37
37
|
const onTabSelect = (label) => setActiveTab(label);
|
|
38
38
|
return (react_1.default.createElement(TabsContainer, { "data-component-name": "Markdown/Tabs/Tabs", className: props.className },
|
|
39
39
|
react_1.default.createElement(TabList, null, children.map((child, idx) => {
|
|
40
|
-
const { label
|
|
41
|
-
return (react_1.default.createElement(Tabs_1.Tab, { activeTab: activeTab, key: `${
|
|
40
|
+
const { label } = child.props;
|
|
41
|
+
return (react_1.default.createElement(Tabs_1.Tab, { activeTab: activeTab, key: `${label}-${idx}`, label: label, onClick: onTabSelect }));
|
|
42
42
|
})),
|
|
43
43
|
react_1.default.createElement(TabContent, null, children.map((child, idx) => {
|
|
44
44
|
if (child.props.label !== activeTab)
|
package/lib/config.d.ts
CHANGED
|
@@ -11,6 +11,13 @@ declare const markdownConfigSchema: {
|
|
|
11
11
|
};
|
|
12
12
|
readonly default: readonly ["image", "links"];
|
|
13
13
|
};
|
|
14
|
+
readonly partialsFolders: {
|
|
15
|
+
readonly type: "array";
|
|
16
|
+
readonly items: {
|
|
17
|
+
readonly type: "string";
|
|
18
|
+
};
|
|
19
|
+
readonly default: readonly ["_partials"];
|
|
20
|
+
};
|
|
14
21
|
readonly lastUpdatedBlock: {
|
|
15
22
|
readonly type: "object";
|
|
16
23
|
readonly properties: {
|
|
@@ -1218,7 +1225,7 @@ export declare const themeConfigSchema: {
|
|
|
1218
1225
|
readonly codeSnippet: {
|
|
1219
1226
|
readonly type: "object";
|
|
1220
1227
|
readonly properties: {
|
|
1221
|
-
readonly
|
|
1228
|
+
readonly elementFormat: {
|
|
1222
1229
|
readonly type: "string";
|
|
1223
1230
|
readonly default: "icon";
|
|
1224
1231
|
};
|
|
@@ -1293,6 +1300,13 @@ export declare const themeConfigSchema: {
|
|
|
1293
1300
|
};
|
|
1294
1301
|
readonly default: readonly ["image", "links"];
|
|
1295
1302
|
};
|
|
1303
|
+
readonly partialsFolders: {
|
|
1304
|
+
readonly type: "array";
|
|
1305
|
+
readonly items: {
|
|
1306
|
+
readonly type: "string";
|
|
1307
|
+
};
|
|
1308
|
+
readonly default: readonly ["_partials"];
|
|
1309
|
+
};
|
|
1296
1310
|
readonly lastUpdatedBlock: {
|
|
1297
1311
|
readonly type: "object";
|
|
1298
1312
|
readonly properties: {
|
|
@@ -2261,7 +2275,7 @@ export declare const productThemeOverrideSchema: {
|
|
|
2261
2275
|
readonly codeSnippet: {
|
|
2262
2276
|
readonly type: "object";
|
|
2263
2277
|
readonly properties: {
|
|
2264
|
-
readonly
|
|
2278
|
+
readonly elementFormat: {
|
|
2265
2279
|
readonly type: "string";
|
|
2266
2280
|
readonly default: "icon";
|
|
2267
2281
|
};
|
package/lib/config.js
CHANGED
|
@@ -67,6 +67,11 @@ const markdownConfigSchema = {
|
|
|
67
67
|
items: { type: 'string' },
|
|
68
68
|
default: ['image', 'links'],
|
|
69
69
|
},
|
|
70
|
+
partialsFolders: {
|
|
71
|
+
type: 'array',
|
|
72
|
+
items: { type: 'string' },
|
|
73
|
+
default: ['_partials'],
|
|
74
|
+
},
|
|
70
75
|
lastUpdatedBlock: {
|
|
71
76
|
type: 'object',
|
|
72
77
|
properties: Object.assign({ format: {
|
|
@@ -490,7 +495,7 @@ exports.themeConfigSchema = {
|
|
|
490
495
|
codeSnippet: {
|
|
491
496
|
type: 'object',
|
|
492
497
|
properties: {
|
|
493
|
-
|
|
498
|
+
elementFormat: { type: 'string', default: 'icon' },
|
|
494
499
|
copy: {
|
|
495
500
|
type: 'object',
|
|
496
501
|
properties: Object.assign({}, hideConfigSchema.properties),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface LanguagePickerProps {
|
|
3
3
|
onChangeLanguage: (newLang: string) => void;
|
|
4
4
|
onlyIcon?: boolean;
|
|
5
5
|
placement?: 'top' | 'bottom';
|
|
6
6
|
alignment?: 'start' | 'end';
|
|
7
7
|
}
|
|
8
|
-
export declare const LanguagePicker: (props: LanguagePickerProps) => JSX.Element | null;
|
|
8
|
+
export declare const LanguagePicker: (props: LanguagePickerProps) => React.JSX.Element | null;
|
|
9
9
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export interface AlertIconProps {
|
|
3
3
|
type: 'warning' | 'success' | 'danger' | 'attention' | 'info';
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
|
-
declare function Icon({ type, className }: AlertIconProps): JSX.Element;
|
|
6
|
+
declare function Icon({ type, className }: AlertIconProps): React.JSX.Element;
|
|
7
7
|
export declare const AlertIcon: import("styled-components").StyledComponent<typeof Icon, any, {
|
|
8
8
|
'data-component-name': string;
|
|
9
9
|
}, "data-component-name">;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export interface AnchorIconProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
}
|
|
5
|
-
export declare const AnchorIcon: import("styled-components").StyledComponent<({ className }: AnchorIconProps) => JSX.Element, any, {
|
|
5
|
+
export declare const AnchorIcon: import("styled-components").StyledComponent<({ className }: AnchorIconProps) => React.JSX.Element, any, {
|
|
6
6
|
'data-component-name': string;
|
|
7
7
|
}, "data-component-name">;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export interface ArrowIconProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
weight?: 'regular' | 'thin';
|
|
5
5
|
direction?: 'up' | 'right' | 'left' | 'down';
|
|
6
6
|
visibility?: 'visible' | 'hidden';
|
|
7
7
|
}
|
|
8
|
-
export declare const ArrowIcon: import("styled-components").StyledComponent<({ className, weight }: ArrowIconProps) => JSX.Element, any, Pick<ArrowIconProps, "weight">, never>;
|
|
8
|
+
export declare const ArrowIcon: import("styled-components").StyledComponent<({ className, weight }: ArrowIconProps) => React.JSX.Element, any, Pick<ArrowIconProps, "weight">, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Icon: () => JSX.Element;
|
|
3
|
-
export declare const BurgerIcon: import("styled-components").StyledComponent<() => JSX.Element, any, {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const Icon: () => React.JSX.Element;
|
|
3
|
+
export declare const BurgerIcon: import("styled-components").StyledComponent<() => React.JSX.Element, any, {
|
|
4
4
|
'data-component-name': string;
|
|
5
5
|
}, "data-component-name">;
|