@redocly/theme 0.18.3-patch.8 → 0.18.4-patch.1
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/Button/Button.js +1 -1
- package/lib/components/Catalog/Catalog.js +6 -1
- package/lib/components/Catalog/CatalogCard.js +2 -0
- package/lib/components/Catalog/styledVariables.js +3 -4
- package/lib/components/CodeBlock/styledVariables.js +5 -5
- package/lib/components/EditPageButton/EditPageButton.d.ts +1 -3
- package/lib/components/EditPageButton/EditPageButton.js +12 -7
- package/lib/components/Filter/Filter.js +1 -1
- package/lib/components/Filter/styledVariables.js +6 -6
- package/lib/components/Footer/FooterColumn.js +3 -1
- package/lib/components/Markdown/MarkdownLayout.d.ts +0 -2
- package/lib/components/Markdown/MarkdownLayout.js +1 -6
- package/lib/components/Menu/MenuItem.js +1 -1
- package/lib/components/Menu/styledVariables.js +1 -1
- package/lib/components/Navbar/Navbar.js +11 -3
- package/lib/components/Navbar/NavbarItem.js +7 -2
- package/lib/components/Navbar/styledVariables.js +2 -3
- package/lib/components/PageNavigation/NextButton.js +1 -1
- package/lib/components/PageNavigation/PreviousButton.js +1 -1
- package/lib/components/Product/ProductPicker.js +5 -4
- package/lib/components/Product/styledVariables.js +1 -0
- package/lib/components/Select/Select.js +0 -1
- package/lib/components/Select/styledVariables.js +1 -1
- package/lib/components/Sidebar/HeaderWrapper.js +1 -1
- package/lib/components/Sidebar/VersionPicker.js +1 -0
- package/lib/components/TableOfContent/TableOfContent.js +2 -0
- package/lib/components/TableOfContent/styledVariables.js +2 -1
- package/lib/components/Tag/Tag.d.ts +1 -1
- package/lib/components/Tag/styledVariables.js +13 -9
- package/lib/config.d.ts +14 -154
- package/lib/config.js +4 -25
- package/lib/globalStyle.js +4 -4
- package/lib/i18n/index.d.ts +2 -0
- package/lib/{I18n → i18n}/index.js +2 -2
- package/lib/icons/EditIcon/EditIcon.d.ts +6 -0
- package/lib/icons/EditIcon/EditIcon.js +18 -0
- package/lib/icons/EditIcon/index.d.ts +1 -0
- package/lib/icons/EditIcon/index.js +18 -0
- package/lib/icons/ExternalIcon/ExternalIcon.js +3 -3
- package/lib/icons/RocketIcon/RocketIcon.d.ts +7 -0
- package/lib/icons/RocketIcon/RocketIcon.js +15 -0
- package/lib/icons/RocketIcon/index.d.ts +1 -0
- package/lib/icons/RocketIcon/index.js +18 -0
- package/lib/icons/index.d.ts +2 -0
- package/lib/icons/index.js +2 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/mocks/hooks/index.js +0 -1
- package/lib/ui/darkColors.js +7 -7
- package/package.json +1 -1
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/Catalog/Catalog.tsx +6 -1
- package/src/components/Catalog/CatalogCard.tsx +2 -0
- package/src/components/Catalog/styledVariables.ts +3 -4
- package/src/components/CodeBlock/styledVariables.ts +5 -5
- package/src/components/EditPageButton/EditPageButton.tsx +19 -9
- package/src/components/Filter/Filter.tsx +1 -1
- package/src/components/Filter/styledVariables.ts +6 -6
- package/src/components/Footer/FooterColumn.tsx +2 -0
- package/src/components/Markdown/MarkdownLayout.tsx +2 -15
- package/src/components/Menu/MenuItem.tsx +1 -1
- package/src/components/Menu/styledVariables.ts +1 -1
- package/src/components/Navbar/Navbar.tsx +11 -3
- package/src/components/Navbar/NavbarItem.tsx +5 -0
- package/src/components/Navbar/styledVariables.ts +2 -3
- package/src/components/PageNavigation/NextButton.tsx +0 -1
- package/src/components/PageNavigation/PreviousButton.tsx +0 -1
- package/src/components/Product/ProductPicker.tsx +5 -4
- package/src/components/Product/styledVariables.ts +1 -0
- package/src/components/Select/Select.tsx +0 -1
- package/src/components/Select/styledVariables.ts +1 -1
- package/src/components/Sidebar/HeaderWrapper.tsx +1 -1
- package/src/components/Sidebar/VersionPicker.tsx +1 -0
- package/src/components/TableOfContent/TableOfContent.tsx +2 -0
- package/src/components/TableOfContent/styledVariables.ts +2 -1
- package/src/components/Tag/Tag.tsx +1 -1
- package/src/components/Tag/styledVariables.ts +13 -9
- package/src/config.ts +6 -28
- package/src/globalStyle.ts +3 -3
- package/src/i18n/index.ts +2 -0
- package/src/icons/EditIcon/EditIcon.tsx +30 -0
- package/src/icons/EditIcon/index.ts +1 -0
- package/src/icons/ExternalIcon/ExternalIcon.tsx +4 -4
- package/src/icons/RocketIcon/RocketIcon.tsx +32 -0
- package/src/icons/RocketIcon/index.tsx +1 -0
- package/src/icons/index.ts +2 -0
- package/src/index.ts +1 -1
- package/src/mocks/hooks/index.ts +0 -1
- package/src/ui/darkColors.tsx +7 -7
- package/lib/I18n/index.d.ts +0 -2
- package/src/I18n/index.ts +0 -2
- /package/lib/{I18n → i18n}/LanguagePicker.d.ts +0 -0
- /package/lib/{I18n → i18n}/LanguagePicker.js +0 -0
- /package/lib/{I18n → i18n}/styledVariables.d.ts +0 -0
- /package/lib/{I18n → i18n}/styledVariables.js +0 -0
- /package/src/{I18n → i18n}/LanguagePicker.tsx +0 -0
- /package/src/{I18n → i18n}/styledVariables.ts +0 -0
|
@@ -3,18 +3,29 @@ import styled from 'styled-components';
|
|
|
3
3
|
|
|
4
4
|
import { Link } from '@portal/Link';
|
|
5
5
|
import { telemetry } from '@portal/telemetry';
|
|
6
|
+
import { EditIcon } from '@theme/icons';
|
|
7
|
+
import { useTranslate } from '@portal/hooks';
|
|
6
8
|
|
|
7
9
|
export interface EditPageButtonProps {
|
|
8
|
-
text: string;
|
|
9
10
|
to: string;
|
|
10
|
-
icon?: string;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
export const EditPageButton = ({
|
|
13
|
+
export const EditPageButton = ({ to }: EditPageButtonProps): JSX.Element => {
|
|
14
|
+
const { translate } = useTranslate();
|
|
15
|
+
const translationKeys = {
|
|
16
|
+
text: 'theme.markdown.editPage.text',
|
|
17
|
+
};
|
|
18
|
+
|
|
14
19
|
return (
|
|
15
|
-
<EditButton
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
<EditButton
|
|
21
|
+
data-component-name="EditPageButton/EditPageButton"
|
|
22
|
+
to={to}
|
|
23
|
+
onClick={() => telemetry.send('edit_page_link_clicked', {})}
|
|
24
|
+
>
|
|
25
|
+
<ButtonIcon />
|
|
26
|
+
<ButtonText data-translation-key={translationKeys.text}>
|
|
27
|
+
{translate(translationKeys.text, 'Edit')}
|
|
28
|
+
</ButtonText>
|
|
18
29
|
</EditButton>
|
|
19
30
|
);
|
|
20
31
|
};
|
|
@@ -37,9 +48,8 @@ const EditButton = styled(Link)`
|
|
|
37
48
|
}
|
|
38
49
|
`;
|
|
39
50
|
|
|
40
|
-
const ButtonIcon = styled
|
|
41
|
-
|
|
42
|
-
padding-right: 3px;
|
|
51
|
+
const ButtonIcon = styled(EditIcon)`
|
|
52
|
+
margin-right: 3px;
|
|
43
53
|
`;
|
|
44
54
|
|
|
45
55
|
const ButtonText = styled.span`
|
|
@@ -175,7 +175,7 @@ const FilterOptionCount = styled.label`
|
|
|
175
175
|
font-weight: var(--filter-option-count-font-weight);
|
|
176
176
|
padding: var(--filter-option-count-padding);
|
|
177
177
|
border-radius: var(--filter-option-count-border-radius);
|
|
178
|
-
border:
|
|
178
|
+
border: var(--filter-option-count-border);
|
|
179
179
|
background-color: var(--filter-option-count-background-color);
|
|
180
180
|
`;
|
|
181
181
|
|
|
@@ -20,14 +20,14 @@ export const filter = css`
|
|
|
20
20
|
--filter-option-label-margin: 0 var(--spacing-xs) 0 0;
|
|
21
21
|
--filter-option-label-color: var(--text-secondary);
|
|
22
22
|
|
|
23
|
-
--filter-option-count-height:
|
|
24
|
-
--filter-option-count-color: var(--text-
|
|
25
|
-
--filter-option-count-font-size: var(--
|
|
23
|
+
--filter-option-count-height: 17px;
|
|
24
|
+
--filter-option-count-color: var(--text-secondary);
|
|
25
|
+
--filter-option-count-font-size: var(--font-size-sm);
|
|
26
26
|
--filter-option-count-font-weight: var(--font-weight-regular);
|
|
27
27
|
--filter-option-count-padding: 0px var(--spacing-xxs);
|
|
28
28
|
--filter-option-count-border-radius: var(--spacing-sm);
|
|
29
|
-
--filter-option-count-border
|
|
30
|
-
--filter-option-count-background-color: var(--bg-
|
|
29
|
+
--filter-option-count-border: 1px solid var(--border-primary);
|
|
30
|
+
--filter-option-count-background-color: var(--bg-overlay);
|
|
31
31
|
|
|
32
32
|
--filter-content-border-color: var(--border-secondary);
|
|
33
33
|
--filter-content-items-padding: 0 var(--spacing-lg);
|
|
@@ -47,7 +47,7 @@ export const filter = css`
|
|
|
47
47
|
--filter-popover-header-button-font-size: var(--font-size-base);
|
|
48
48
|
--filter-popover-header-button-font-weight: var(--font-weight-regular);
|
|
49
49
|
|
|
50
|
-
--filter-tags-wrapper-padding: var(--spacing-xs) 0 var(--spacing-base)
|
|
50
|
+
--filter-tags-wrapper-padding: var(--spacing-xs) 0 var(--spacing-base) 0;
|
|
51
51
|
--filter-tag-color: var(--text-primary);
|
|
52
52
|
--filter-tag-border-radius: var(--spacing-sm);
|
|
53
53
|
--filter-tag-border-color: var(--border-primary);
|
|
@@ -6,6 +6,7 @@ import type { ResolvedNavItem } from '@theme/types/portal';
|
|
|
6
6
|
import { useTranslate } from '@portal/hooks';
|
|
7
7
|
import { Image } from '@theme/components/Image/Image';
|
|
8
8
|
import { telemetry } from '@portal/telemetry';
|
|
9
|
+
import { ExternalIcon } from '@theme/icons';
|
|
9
10
|
|
|
10
11
|
interface FooterColumnProps {
|
|
11
12
|
column: ResolvedNavItem;
|
|
@@ -47,6 +48,7 @@ export function FooterColumn({ column, className }: FooterColumnProps): JSX.Elem
|
|
|
47
48
|
</FooterLinkIcon>
|
|
48
49
|
) : null}
|
|
49
50
|
{!iconsOnly && translate(columnItem.labelTranslationKey, columnItem.label)}
|
|
51
|
+
{columnItem.external ? <ExternalIcon /> : null}
|
|
50
52
|
</FooterLink>
|
|
51
53
|
);
|
|
52
54
|
})}
|
|
@@ -8,7 +8,6 @@ import { EditPageButton } from '@theme/components/EditPageButton';
|
|
|
8
8
|
import { LastUpdated } from '@theme/components/LastUpdated/LastUpdated';
|
|
9
9
|
import { useThemeConfig } from '@theme/hooks';
|
|
10
10
|
import type { ResolvedNavItemWithLink } from '@theme/types/portal';
|
|
11
|
-
import { useTranslate } from '@portal/hooks';
|
|
12
11
|
import { Breadcrumbs as ThemeBreadcrumbs } from '@theme/components/Breadcrumbs';
|
|
13
12
|
|
|
14
13
|
type MarkdownLayoutProps = {
|
|
@@ -17,8 +16,6 @@ type MarkdownLayoutProps = {
|
|
|
17
16
|
feedback: React.ReactNode;
|
|
18
17
|
editPage?: {
|
|
19
18
|
to: string;
|
|
20
|
-
text: string;
|
|
21
|
-
icon?: string;
|
|
22
19
|
};
|
|
23
20
|
/** String in ISO format */
|
|
24
21
|
lastModified?: string | null;
|
|
@@ -38,10 +35,7 @@ export function MarkdownLayout({
|
|
|
38
35
|
className,
|
|
39
36
|
}: MarkdownLayoutProps): JSX.Element {
|
|
40
37
|
const { markdown } = useThemeConfig();
|
|
41
|
-
|
|
42
|
-
const translationKeys = {
|
|
43
|
-
text: 'theme.markdown.editPage.text',
|
|
44
|
-
};
|
|
38
|
+
|
|
45
39
|
const { editPage: themeEditPage } = markdown || {};
|
|
46
40
|
|
|
47
41
|
const mergedConf = editPage ? { ...themeEditPage, ...editPage } : undefined;
|
|
@@ -52,14 +46,7 @@ export function MarkdownLayout({
|
|
|
52
46
|
<Breadcrumbs />
|
|
53
47
|
<LayoutTop>
|
|
54
48
|
{lastModified && <LastUpdated lastModified={new Date(lastModified)} />}
|
|
55
|
-
{mergedConf &&
|
|
56
|
-
<EditPageButton
|
|
57
|
-
text={translate(translationKeys.text, mergedConf.text)}
|
|
58
|
-
to={mergedConf.to}
|
|
59
|
-
icon={mergedConf.icon}
|
|
60
|
-
data-translation-key={translationKeys.text}
|
|
61
|
-
/>
|
|
62
|
-
)}
|
|
49
|
+
{mergedConf && <EditPageButton to={mergedConf.to} />}
|
|
63
50
|
</LayoutTop>
|
|
64
51
|
{markdownWrapper}
|
|
65
52
|
<LayoutBottom>{feedback}</LayoutBottom>
|
|
@@ -17,7 +17,7 @@ export function MenuItem({ item, className }: MenuItemProps): JSX.Element {
|
|
|
17
17
|
<Label active={item.active}>
|
|
18
18
|
{item.icon ? <SidebarItemIcon src={item.icon} /> : null}
|
|
19
19
|
{translate(item.labelTranslationKey, item.label)}
|
|
20
|
-
{item.external ? <ExternalIcon
|
|
20
|
+
{item.external ? <ExternalIcon /> : null}
|
|
21
21
|
</Label>
|
|
22
22
|
</MenuLinkItem>
|
|
23
23
|
|
|
@@ -26,7 +26,7 @@ export const mobileMenu = css`
|
|
|
26
26
|
--mobile-menu-line-height: var(--line-height-base); // @presenter LineHeight
|
|
27
27
|
--mobile-menu-padding-top: var(--spacing-sm); // @presenter Spacing
|
|
28
28
|
--mobile-menu-items-margin-top: var(--spacing-xxs); // @presenter Spacing
|
|
29
|
-
--mobile-menu-burger-button-margin: var(--spacing-xs); // @presenter Spacing
|
|
29
|
+
--mobile-menu-burger-button-margin: var(--spacing-xs) var(--spacing-xs) var(--spacing-xs) 0; // @presenter Spacing
|
|
30
30
|
--mobile-menu-background: var(--bg-base); // @presenter Color
|
|
31
31
|
--mobile-menu-profile-background: var(--bg-base); // @presenter Color
|
|
32
32
|
--mobile-menu-profile-border-color: var(--border-secondary); // @presenter Color
|
|
@@ -12,7 +12,7 @@ import { Search } from '@theme/components/Search/Search';
|
|
|
12
12
|
import { AuthUserProfile } from '@theme/components/Profile/AuthUserProfile';
|
|
13
13
|
import type { LogoConfig, ResolvedConfigLinks } from '@theme/types/portal';
|
|
14
14
|
import { useI18n } from '@portal/hooks';
|
|
15
|
-
import { LanguagePicker } from '@theme/
|
|
15
|
+
import { LanguagePicker } from '@theme/i18n/LanguagePicker';
|
|
16
16
|
import { ProductPicker } from '@theme/components/Product';
|
|
17
17
|
import { BurgerButton } from '@theme/components/Navbar/BurgerButton';
|
|
18
18
|
|
|
@@ -141,7 +141,7 @@ export const NavbarContainer = styled.nav`
|
|
|
141
141
|
position: sticky;
|
|
142
142
|
top: 0;
|
|
143
143
|
z-index: var(--z-index-raised);
|
|
144
|
-
padding:
|
|
144
|
+
padding: 0;
|
|
145
145
|
background: var(--navbar-background-color);
|
|
146
146
|
font-family: var(--navbar-font-family);
|
|
147
147
|
|
|
@@ -156,6 +156,10 @@ export const NavbarContainer = styled.nav`
|
|
|
156
156
|
margin: 0;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
+
|
|
160
|
+
${({ theme }) => theme.mediaQueries.medium} {
|
|
161
|
+
padding: var(--navbar-padding);
|
|
162
|
+
}
|
|
159
163
|
`;
|
|
160
164
|
|
|
161
165
|
export const NavbarRow = styled.div`
|
|
@@ -163,7 +167,11 @@ export const NavbarRow = styled.div`
|
|
|
163
167
|
align-items: center;
|
|
164
168
|
justify-content: space-between;
|
|
165
169
|
margin: 0 auto;
|
|
166
|
-
width:
|
|
170
|
+
width: 90%;
|
|
171
|
+
|
|
172
|
+
${({ theme }) => theme.mediaQueries.medium} {
|
|
173
|
+
width: 100%;
|
|
174
|
+
}
|
|
167
175
|
|
|
168
176
|
gap: var(--navbar-menu-items-gap);
|
|
169
177
|
max-width: var(--navbar-container-max-width);
|
|
@@ -13,6 +13,7 @@ import { useI18nConfig, useTranslate } from '@portal/hooks';
|
|
|
13
13
|
import { withPathPrefix } from '@theme/utils';
|
|
14
14
|
import { telemetry } from '@portal/telemetry';
|
|
15
15
|
import { Dropdown } from '@theme/components/Dropdown';
|
|
16
|
+
import { ExternalIcon } from '@theme/icons';
|
|
16
17
|
|
|
17
18
|
export interface NavbarItemProps {
|
|
18
19
|
navItem: ResolvedNavItem;
|
|
@@ -40,6 +41,7 @@ export function NavbarItem({ navItem, className }: NavbarItemProps): JSX.Element
|
|
|
40
41
|
<NavbarLink to={item.link} external={item.external} target={item.target} active={isActive}>
|
|
41
42
|
{item.icon ? <NavbarIcon url={item.icon} /> : null}
|
|
42
43
|
<NavbarLabel>{translate(item.labelTranslationKey, item.label)}</NavbarLabel>
|
|
44
|
+
{item.external ? <ExternalIcon /> : null}
|
|
43
45
|
</NavbarLink>
|
|
44
46
|
</NavbarMenuItem>
|
|
45
47
|
);
|
|
@@ -64,6 +66,7 @@ export function NavbarItem({ navItem, className }: NavbarItemProps): JSX.Element
|
|
|
64
66
|
>
|
|
65
67
|
<NavbarIcon url={item.icon} />
|
|
66
68
|
<NavbarLabel>{translate(item.labelTranslationKey, item.label)}</NavbarLabel>
|
|
69
|
+
{item.external ? <ExternalIcon /> : null}
|
|
67
70
|
</NavbarMenuItem>
|
|
68
71
|
</NavbarMenuItemDropdown>
|
|
69
72
|
);
|
|
@@ -84,6 +87,8 @@ export const NavbarMenuItemDropdown = styled(Dropdown).attrs(() => ({
|
|
|
84
87
|
`;
|
|
85
88
|
|
|
86
89
|
export const NavbarLink = styled(Link)`
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
87
92
|
color: ${({ active }) =>
|
|
88
93
|
active ? 'var(--navbar-item-active-text-color)' : 'var(--navbar-text-color)'};
|
|
89
94
|
text-decoration: ${({ active }) =>
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { css } from 'styled-components';
|
|
2
2
|
|
|
3
3
|
export const navbar = css`
|
|
4
|
-
--navbar-background-color: var(--bg-
|
|
4
|
+
--navbar-background-color: var(--bg-base); // @presenter Color
|
|
5
5
|
--navbar-border-color: var(--border-secondary);
|
|
6
6
|
--navbar-border: 1px solid var(--navbar-border-color);
|
|
7
7
|
|
|
8
8
|
--navbar-text-color: var(--text-secondary); // @presenter Color
|
|
9
9
|
--navbar-height: 64px; // @presenter Spacing
|
|
10
10
|
--navbar-font-size: var(--font-size-base);
|
|
11
|
-
--navbar-padding
|
|
12
|
-
--navbar-padding-vertical: 0;
|
|
11
|
+
--navbar-padding: 0 var(--spacing-xl); // @presenter Spacing
|
|
13
12
|
--navbar-font-family: var(--font-family-base);
|
|
14
13
|
--navbar-container-max-width: 100%;
|
|
15
14
|
|
|
@@ -47,6 +47,11 @@ const ProductSelect = styled(Select).attrs(() => ({
|
|
|
47
47
|
'data-component-name': 'Product/ProductPicker',
|
|
48
48
|
},
|
|
49
49
|
}))`
|
|
50
|
+
--select-list-item-active-background-color: var(
|
|
51
|
+
--product-picker-list-item-active-background-color
|
|
52
|
+
);
|
|
53
|
+
--select-list-item-hover-background-color: var(--product-picker-list-item-hover-background-color);
|
|
54
|
+
|
|
50
55
|
display: none;
|
|
51
56
|
font-size: var(--product-picker-font-size);
|
|
52
57
|
font-weight: var(--product-picker-font-weight);
|
|
@@ -81,10 +86,6 @@ const ProductSelect = styled(Select).attrs(() => ({
|
|
|
81
86
|
padding: var(--product-picker-list-item-vertical-padding)
|
|
82
87
|
var(--product-picker-list-item-horizontal-padding);
|
|
83
88
|
}
|
|
84
|
-
|
|
85
|
-
:hover {
|
|
86
|
-
background-color: var(--product-picker-list-item-active-background-color);
|
|
87
|
-
}
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
${({ theme }) => theme.mediaQueries.medium} {
|
|
@@ -36,4 +36,5 @@ export const productPicker = css`
|
|
|
36
36
|
--product-picker-list-item-vertical-padding: var(--select-list-item-vertical-padding); // @presenter Spacing
|
|
37
37
|
--product-picker-list-item-border-radius: var(--select-list-item-border-radius); // @presenter BorderRadius
|
|
38
38
|
--product-picker-list-item-active-background-color: var(--select-list-item-active-background-color); // @presenter Color
|
|
39
|
+
--product-picker-list-item-hover-background-color: var(--select-list-item-hover-background-color); // @presenter Color
|
|
39
40
|
`;
|
|
@@ -143,7 +143,6 @@ export const SelectList = styled.ul<{ placement?: string; alignment?: string }>`
|
|
|
143
143
|
right: ${({ alignment }) => (alignment === 'end' ? '0' : 'auto')};
|
|
144
144
|
margin: 0;
|
|
145
145
|
min-width: var(--select-list-min-width);
|
|
146
|
-
width: 100%;
|
|
147
146
|
max-width: var(--select-list-max-width);
|
|
148
147
|
padding: var(--select-list-padding);
|
|
149
148
|
background-color: var(--select-list-background-color);
|
|
@@ -24,7 +24,7 @@ export const select = css`
|
|
|
24
24
|
--select-list-item-horizontal-padding: var(--spacing-base); // @presenter Spacing
|
|
25
25
|
--select-list-item-vertical-padding: var(--spacing-xs); // @presenter Spacing
|
|
26
26
|
--select-list-item-border-radius: var(--border-radius); // @presenter BorderRadius
|
|
27
|
-
--select-list-item-active-background-color: var(--
|
|
27
|
+
--select-list-item-active-background-color: var(--bg-overlay); // @presenter Color
|
|
28
28
|
--select-list-item-hover-background-color: var(--bg-raised); // @presenter Color
|
|
29
29
|
|
|
30
30
|
// @tokens End
|
|
@@ -6,5 +6,5 @@ export const HeaderWrapper = styled.div.attrs<{ className?: string }>(({ classNa
|
|
|
6
6
|
}))`
|
|
7
7
|
margin: var(--sidebar-offset-top) 0 0 0;
|
|
8
8
|
padding: 0 0 var(--sidebar-header-padding-bottom) var(--sidebar-offset-left);
|
|
9
|
-
border-bottom: solid 1px var(--border-
|
|
9
|
+
border-bottom: solid 1px var(--border-primary);
|
|
10
10
|
`;
|
|
@@ -15,7 +15,7 @@ export const toc = css`
|
|
|
15
15
|
* @tokens TOC item typography
|
|
16
16
|
*/
|
|
17
17
|
--toc-item-font-family: var(--font-family-base); // @presenter FontFamily
|
|
18
|
-
--toc-item-font-size: var(--font-size-
|
|
18
|
+
--toc-item-font-size: var(--font-size-sm); // @presenter FontSize
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* @tokens TOC item
|
|
@@ -25,6 +25,7 @@ export const toc = css`
|
|
|
25
25
|
--toc-item-font-weight: var(--font-weight-regular); // @presenter FontWeight
|
|
26
26
|
--toc-item-active-text-color: var(--text-primary); // @presenter Color
|
|
27
27
|
--toc-item-background-color: transparent; // @presenter Color
|
|
28
|
+
--toc-item-active-background-color: var(--bg-overlay); // @presenter Color
|
|
28
29
|
--toc-item-nested-offset: calc(var(--toc-spacing-unit) * 2); // @presenter Spacing
|
|
29
30
|
--toc-item-padding-vertical: var(--toc-spacing-unit); // @presenter Spacing
|
|
30
31
|
--toc-item-padding-horizontal: calc(var(--toc-spacing-unit) * 2); // @presenter Spacing
|
|
@@ -19,6 +19,15 @@ export const tag = css`
|
|
|
19
19
|
--tag-margin: 0 5px 0 0; //@presenter Spacing
|
|
20
20
|
--tag-gap: 5px; //@presenter Spacing
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* @tokens Tag size
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
.tag-size-large {
|
|
27
|
+
--tag-padding: var(--tag-large-padding);
|
|
28
|
+
--tag-font-size: var(--font-size-base);
|
|
29
|
+
}
|
|
30
|
+
|
|
22
31
|
/**
|
|
23
32
|
* @tokens Tag typography
|
|
24
33
|
*/
|
|
@@ -39,11 +48,6 @@ export const tag = css`
|
|
|
39
48
|
* @tokens Tag colors
|
|
40
49
|
*/
|
|
41
50
|
|
|
42
|
-
.tag-size-large {
|
|
43
|
-
--tag-padding: var(--tag-large-padding);
|
|
44
|
-
--tag-font-size: var(--font-size-regular);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
51
|
.tag-grey,
|
|
48
52
|
.tag-draft,
|
|
49
53
|
.tag-schema,
|
|
@@ -116,11 +120,11 @@ export const tag = css`
|
|
|
116
120
|
--tag-border-color: var(--color-geekblue-7); // @presenter Color
|
|
117
121
|
}
|
|
118
122
|
|
|
119
|
-
.tag-
|
|
123
|
+
.tag-magenta,
|
|
120
124
|
.tag-hook {
|
|
121
|
-
--tag-color: var(--color-
|
|
122
|
-
--tag-background-color: var(--color-
|
|
123
|
-
--tag-border-color: var(--color-
|
|
125
|
+
--tag-color: var(--color-magenta-7); // @presenter Color
|
|
126
|
+
--tag-background-color: var(--color-magenta-1); // @presenter Color
|
|
127
|
+
--tag-border-color: var(--color-magenta-7); // @presenter Color
|
|
124
128
|
}
|
|
125
129
|
|
|
126
130
|
.tag-lime {
|
package/src/config.ts
CHANGED
|
@@ -100,8 +100,6 @@ const markdownConfigSchema = {
|
|
|
100
100
|
type: 'object',
|
|
101
101
|
properties: {
|
|
102
102
|
baseUrl: { type: 'string' },
|
|
103
|
-
icon: { type: 'string' },
|
|
104
|
-
text: { type: 'string', default: 'Edit this page' },
|
|
105
103
|
...hideConfigSchema.properties,
|
|
106
104
|
},
|
|
107
105
|
additionalProperties: false,
|
|
@@ -198,37 +196,17 @@ const googleAnalyticsConfigSchema = {
|
|
|
198
196
|
properties: {
|
|
199
197
|
includeInDevelopment: { type: 'boolean' },
|
|
200
198
|
trackingId: { type: 'string' },
|
|
199
|
+
|
|
200
|
+
conversionId: { type: 'string' },
|
|
201
|
+
floodlightId: { type: 'string' },
|
|
202
|
+
|
|
201
203
|
head: { type: 'boolean' },
|
|
202
204
|
respectDNT: { type: 'boolean' },
|
|
203
|
-
anonymize: { type: 'boolean' },
|
|
204
205
|
exclude: { type: 'array', items: { type: 'string' } },
|
|
205
|
-
optimizeId: { type: 'string' },
|
|
206
|
-
experimentId: { type: 'string' },
|
|
207
|
-
variationId: { type: 'string' },
|
|
208
|
-
enableWebVitalsTracking: { type: 'boolean' },
|
|
209
206
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
name: { type: 'string' },
|
|
213
|
-
clientId: { type: 'string' },
|
|
214
|
-
siteSpeedSampleRate: { type: 'number' },
|
|
215
|
-
alwaysSendReferrer: { type: 'boolean' },
|
|
216
|
-
allowAnchor: { type: 'boolean' },
|
|
217
|
-
cookieName: { type: 'string' },
|
|
218
|
-
cookieFlags: { type: 'string' },
|
|
219
|
-
cookieDomain: { type: 'string' },
|
|
207
|
+
optimizeId: { type: 'string' },
|
|
208
|
+
anonymizeIp: { type: 'boolean' },
|
|
220
209
|
cookieExpires: { type: 'number' },
|
|
221
|
-
storeGac: { type: 'boolean' },
|
|
222
|
-
legacyCookieDomain: { type: 'string' },
|
|
223
|
-
legacyHistoryImport: { type: 'boolean' },
|
|
224
|
-
allowLinker: { type: 'boolean' },
|
|
225
|
-
storage: { type: 'string' },
|
|
226
|
-
|
|
227
|
-
allowAdFeatures: { type: 'boolean' },
|
|
228
|
-
dataSource: { type: 'string' },
|
|
229
|
-
queueTime: { type: 'number' },
|
|
230
|
-
forceSSL: { type: 'boolean' },
|
|
231
|
-
transport: { type: 'string' },
|
|
232
210
|
},
|
|
233
211
|
additionalProperties: false,
|
|
234
212
|
required: ['trackingId'],
|
package/src/globalStyle.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { menu, mobileMenu } from "@theme/components/Menu";
|
|
|
16
16
|
import { apiReferencePanels, responsePanelColors } from '@theme/components/Panel';
|
|
17
17
|
import { code } from '@theme/components/CodeBlock';
|
|
18
18
|
import { product, productPicker } from '@theme/components/Product';
|
|
19
|
-
import { languagePicker } from '@theme/
|
|
19
|
+
import { languagePicker } from '@theme/i18n';
|
|
20
20
|
import { select } from '@theme/components/Select';
|
|
21
21
|
import { userProfile, userProfileDropdown } from '@theme/components/Profile';
|
|
22
22
|
import { dropdown } from '@theme/components/Dropdown';
|
|
@@ -351,8 +351,8 @@ const borders = css`
|
|
|
351
351
|
* @presenter Color
|
|
352
352
|
*/
|
|
353
353
|
|
|
354
|
-
--border-primary: #
|
|
355
|
-
--border-secondary: #
|
|
354
|
+
--border-primary: #00000021; // 13% opacity. Raised dividers
|
|
355
|
+
--border-secondary: #00000017; // 9% opacity. Default dividers, borders
|
|
356
356
|
|
|
357
357
|
/**
|
|
358
358
|
* @tokens Border Radius
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
interface IconProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const Icon = ({ className }: IconProps) => (
|
|
9
|
+
<svg
|
|
10
|
+
width="16"
|
|
11
|
+
height="16"
|
|
12
|
+
viewBox="0 0 16 16"
|
|
13
|
+
className={className}
|
|
14
|
+
fill="none"
|
|
15
|
+
data-component-name="icons/EditIcon"
|
|
16
|
+
>
|
|
17
|
+
<rect width="16" height="16" fill="white" style={{ mixBlendMode: 'multiply' }} />
|
|
18
|
+
<path d="M15 13H1V14H15V13Z" fill="currentColor" />
|
|
19
|
+
<path
|
|
20
|
+
d="M12.7 4.5C13.1 4.1 13.1 3.5 12.7 3.1L10.9 1.3C10.5 0.9 9.9 0.9 9.5 1.3L2 8.8V12H5.2L12.7 4.5ZM10.2 2L12 3.8L10.5 5.3L8.7 3.5L10.2 2ZM3 11V9.2L8 4.2L9.8 6L4.8 11H3Z"
|
|
21
|
+
fill="currentColor"
|
|
22
|
+
/>
|
|
23
|
+
</svg>
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export const EditIcon = styled(Icon)`
|
|
27
|
+
width: 1em;
|
|
28
|
+
height: 1em;
|
|
29
|
+
vertical-align: middle;
|
|
30
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@theme/icons/EditIcon/EditIcon';
|
|
@@ -9,14 +9,14 @@ const Icon = ({
|
|
|
9
9
|
className?: string;
|
|
10
10
|
dataComponentName?: string;
|
|
11
11
|
}): JSX.Element => (
|
|
12
|
-
<span data-component-name={dataComponentName}>
|
|
12
|
+
<span data-component-name={dataComponentName ?? 'icons/ExternalIcon'}>
|
|
13
13
|
<svg
|
|
14
14
|
xmlns="http://www.w3.org/2000/svg"
|
|
15
15
|
version="1.1"
|
|
16
16
|
x="0px"
|
|
17
17
|
y="0px"
|
|
18
|
-
viewBox="0 0
|
|
19
|
-
enableBackground="new 0 0
|
|
18
|
+
viewBox="0 0 110 110"
|
|
19
|
+
enableBackground="new 0 0 110 110"
|
|
20
20
|
className={className}
|
|
21
21
|
>
|
|
22
22
|
<path d="M-408.167-318.5" />
|
|
@@ -40,5 +40,5 @@ export const ExternalIcon = styled(Icon)`
|
|
|
40
40
|
width: 10px;
|
|
41
41
|
height: 10px;
|
|
42
42
|
margin-left: 5px;
|
|
43
|
-
fill:
|
|
43
|
+
fill: currentColor;
|
|
44
44
|
`;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
interface IconProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Icon = ({ className }: IconProps) => (
|
|
10
|
+
<svg
|
|
11
|
+
data-component-name="icons/RocketIcon"
|
|
12
|
+
className={className}
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
width="16"
|
|
15
|
+
height="16"
|
|
16
|
+
viewBox="0 0 16 16"
|
|
17
|
+
fill="none"
|
|
18
|
+
>
|
|
19
|
+
<path
|
|
20
|
+
fillRule="evenodd"
|
|
21
|
+
clipRule="evenodd"
|
|
22
|
+
d="M13.7002 1.55068C13.5251 1.49305 13.3388 1.47772 13.1567 1.50596L13.152 1.50671C11.8258 1.7252 9.24768 2.44828 6.43935 4.8604C5.65751 4.58592 4.81217 4.53466 3.99912 4.71587C3.07823 4.92111 2.24649 5.41394 1.62419 6.12309C1.45038 6.32115 1.46012 6.62011 1.64645 6.80644L3.21653 8.37652C3.16682 8.44409 3.11716 8.51231 3.06755 8.5812C2.92429 8.78013 2.94639 9.05359 3.11974 9.22694L3.17618 9.28339L2.5864 9.87317L2.58535 9.87422C2.36806 10.0928 2.24609 10.3885 2.24609 10.6967C2.24609 11.0049 2.36806 11.3006 2.58535 11.5192L2.5864 11.5203L4.47974 13.4136L4.48079 13.4147C4.69938 13.632 4.99507 13.7539 5.30329 13.7539C5.56764 13.7539 5.82278 13.6642 6.02797 13.5016C6.07134 13.4785 6.11147 13.449 6.14684 13.4136L6.72662 12.8338L6.77307 12.8803C6.94695 13.0542 7.22146 13.0758 7.42044 12.9313C7.48845 12.8819 7.55583 12.8324 7.62256 12.783L9.19307 14.3535C9.3794 14.5398 9.67836 14.5495 9.87642 14.3757C10.5856 13.7534 11.0784 12.9217 11.2836 12.0008C11.4657 11.1839 11.4131 10.3345 11.1352 9.54961C13.5373 6.75034 14.273 4.18993 14.4869 2.84653C14.5165 2.66498 14.5027 2.479 14.4467 2.30378C14.3906 2.1282 14.2937 1.96841 14.164 1.83751C14.0342 1.7066 13.8753 1.60831 13.7002 1.55068ZM10.3358 10.4241C9.77433 11.0018 9.13889 11.5852 8.41986 12.166L9.54647 13.2927C9.91995 12.8623 10.1826 12.3441 10.3076 11.7833C10.4077 11.334 10.4163 10.8719 10.3358 10.4241ZM7.40379 11.6944C12.1351 8.03789 13.2477 4.2709 13.4995 2.68816L13.4999 2.68582C13.5041 2.65984 13.5022 2.63321 13.4942 2.60813C13.4862 2.58305 13.4723 2.56022 13.4538 2.54152C13.4352 2.52282 13.4125 2.50878 13.3875 2.50054C13.363 2.49248 13.337 2.49021 13.3115 2.49391C12.1198 2.69072 9.6488 3.36687 6.93487 5.75486C6.90034 5.79743 6.85946 5.8334 6.81428 5.86196C5.99258 6.5985 5.15012 7.49283 4.31544 8.57889C4.29366 8.6174 4.26636 8.65363 4.23355 8.68644C4.23319 8.6868 4.23283 8.68716 4.23247 8.68752C4.19837 8.73243 4.16429 8.77767 4.13023 8.82323L4.18811 8.8811C4.20578 8.89449 4.22276 8.90921 4.23893 8.92526L7.09226 11.7586C7.12536 11.7915 7.15338 11.8285 7.17583 11.8684C7.22546 11.831 7.27471 11.7936 7.32359 11.7562C7.34864 11.7325 7.37553 11.7119 7.40379 11.6944ZM3.83102 7.57679C4.40831 6.85775 4.98895 6.22264 5.56449 5.66166C5.12019 5.58338 4.66217 5.59262 4.21666 5.69192C3.65578 5.81692 3.13757 6.07956 2.70726 6.45303L3.83102 7.57679ZM3.29456 10.5792L3.88329 9.9905L6.01952 12.1267L5.51323 12.633C5.47994 12.6533 5.44888 12.6775 5.42079 12.7055C5.38956 12.7365 5.34732 12.7539 5.30329 12.7539C5.25942 12.7539 5.21732 12.7366 5.18613 12.7058L3.29456 10.8142C3.2637 10.783 3.24609 10.7406 3.24609 10.6967C3.24609 10.6528 3.26371 10.6104 3.29456 10.5792Z"
|
|
23
|
+
fill="currentColor"
|
|
24
|
+
fillOpacity="0.87"
|
|
25
|
+
/>
|
|
26
|
+
</svg>
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export const RocketIcon = styled(Icon)`
|
|
30
|
+
width: 1em;
|
|
31
|
+
height: 1em;
|
|
32
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@theme/icons/RocketIcon/RocketIcon';
|
package/src/icons/index.ts
CHANGED
package/src/index.ts
CHANGED
package/src/mocks/hooks/index.ts
CHANGED