@redocly/theme 0.1.9 → 0.1.10
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/Button/index.d.ts +1 -1
- package/Button/index.js +1 -1
- package/CodeBlock/index.d.ts +1 -1
- package/CodeBlock/index.js +1 -1
- package/CopyButton/index.d.ts +2 -2
- package/CopyButton/index.js +2 -2
- package/Footer/Footer.d.ts +2 -2
- package/Footer/Footer.js +1 -1
- package/Footer/FooterColumn.js +6 -6
- package/Footer/FooterColumns.d.ts +3 -3
- package/Footer/FooterCopyright.d.ts +3 -3
- package/Footer/FooterCopyright.js +1 -1
- package/Footer/index.d.ts +4 -4
- package/Footer/index.js +4 -4
- package/Headings/index.d.ts +1 -1
- package/Headings/index.js +1 -1
- package/JsonViewer/index.d.ts +2 -2
- package/JsonViewer/index.js +2 -2
- package/Layout/index.d.ts +2 -2
- package/Layout/index.js +2 -2
- package/Markdown/Admonition.js +4 -4
- package/Markdown/CodeSample/index.d.ts +3 -3
- package/Markdown/CodeSample/index.js +3 -3
- package/Markdown/Heading.js +1 -1
- package/Markdown/MarkdownLayout.d.ts +2 -2
- package/Markdown/StyledMarkdown.js +2 -2
- package/Markdown/Tabs/index.d.ts +2 -2
- package/Markdown/Tabs/index.js +2 -2
- package/Markdown/index.d.ts +9 -9
- package/Markdown/index.js +9 -9
- package/Navbar/Navbar.d.ts +0 -1
- package/Navbar/Navbar.js +1 -1
- package/Navbar/NavbarItem.js +1 -1
- package/Navbar/index.d.ts +3 -0
- package/Navbar/index.js +19 -0
- package/NavbarLogo/NavbarLogo.d.ts +6 -0
- package/{Logo/Logo.js → NavbarLogo/NavbarLogo.js} +8 -5
- package/NavbarLogo/index.d.ts +1 -0
- package/{Logo → NavbarLogo}/index.js +1 -1
- package/OperationBadge/index.d.ts +1 -1
- package/OperationBadge/index.js +1 -1
- package/PageNavigation/index.d.ts +3 -0
- package/PageNavigation/index.js +19 -0
- package/Panel/index.d.ts +8 -8
- package/Panel/index.js +8 -8
- package/REAMDE.md +1 -0
- package/SamplesPanelControls/index.d.ts +1 -1
- package/SamplesPanelControls/index.js +1 -1
- package/Search/Autocomplete.js +1 -1
- package/Search/Parameters.js +2 -2
- package/Search/SearchItem.js +2 -2
- package/Search/index.d.ts +9 -9
- package/Search/index.js +9 -9
- package/Search/utils.js +1 -1
- package/Sidebar/BackButton.js +1 -1
- package/Sidebar/DrilldownMenuItem.js +3 -3
- package/Sidebar/Menu.js +1 -1
- package/Sidebar/MenuItemLabel.js +2 -2
- package/Sidebar/MenuLink.js +1 -1
- package/Sidebar/MobileSidebarButton.js +1 -1
- package/Sidebar/Sidebar.js +1 -1
- package/Sidebar/index.d.ts +19 -19
- package/Sidebar/index.js +19 -19
- package/Sidebar/types/index.d.ts +5 -5
- package/Sidebar/types/index.js +5 -5
- package/SidebarLogo/index.d.ts +1 -1
- package/SidebarLogo/index.js +1 -1
- package/SourceCode/index.d.ts +1 -1
- package/SourceCode/index.js +1 -1
- package/TableOfContent/TableOfContent.js +3 -3
- package/TableOfContent/index.d.ts +1 -1
- package/TableOfContent/index.js +1 -1
- package/Tooltip/index.d.ts +1 -1
- package/Tooltip/index.js +1 -1
- package/globalStyle.js +1 -1
- package/hooks/index.d.ts +7 -7
- package/hooks/index.js +7 -7
- package/hooks/useActiveSectionId.d.ts +2 -2
- package/hooks/useActiveSectionId.js +1 -0
- package/icons/ShelfIcon/index.d.ts +2 -2
- package/icons/ShelfIcon/index.js +1 -1
- package/icons/index.d.ts +1 -1
- package/icons/index.js +1 -1
- package/package.json +1 -1
- package/src/Button/Button.stories.tsx +1 -1
- package/src/Button/index.ts +1 -1
- package/src/CodeBlock/index.ts +1 -1
- package/src/CopyButton/CopyButton.stories.tsx +1 -1
- package/src/CopyButton/index.ts +2 -2
- package/src/Footer/Footer.stories.tsx +57 -0
- package/src/Footer/Footer.tsx +5 -8
- package/src/Footer/FooterColumn.tsx +7 -7
- package/src/Footer/FooterColumns.tsx +3 -1
- package/src/Footer/FooterCopyright.tsx +5 -3
- package/src/Footer/__tests__/Footer.test.tsx +55 -0
- package/src/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +253 -0
- package/src/Footer/index.ts +4 -4
- package/src/Headings/index.ts +1 -1
- package/src/JsonViewer/JsonViewer.stories.tsx +1 -1
- package/src/JsonViewer/index.ts +2 -2
- package/src/Layout/__tests__/PageLayout.test.tsx +17 -0
- package/src/Layout/__tests__/RootLayout.test.tsx +17 -0
- package/src/Layout/__tests__/__snapshots__/PageLayout.test.tsx.snap +38 -0
- package/src/Layout/__tests__/__snapshots__/RootLayout.test.tsx.snap +18 -0
- package/src/Layout/index.ts +2 -2
- package/src/Markdown/Admonition.tsx +15 -15
- package/src/Markdown/CodeSample/index.ts +3 -3
- package/src/Markdown/Heading.tsx +4 -1
- package/src/Markdown/MarkdownLayout.tsx +2 -2
- package/src/Markdown/StyledMarkdown.tsx +27 -27
- package/src/Markdown/Tabs/index.ts +2 -2
- package/src/Markdown/index.ts +9 -9
- package/src/Navbar/Navbar.stories.tsx +7 -3
- package/src/Navbar/Navbar.tsx +2 -3
- package/src/Navbar/NavbarItem.tsx +1 -1
- package/src/Navbar/index.ts +3 -0
- package/src/NavbarLogo/NavbarLogo.stories.tsx +20 -0
- package/src/NavbarLogo/NavbarLogo.tsx +24 -0
- package/src/NavbarLogo/__tests__/NavbarLogo.test.tsx +47 -0
- package/src/NavbarLogo/__tests__/__snapshots__/NavbarLogo.test.tsx.snap +38 -0
- package/src/NavbarLogo/index.ts +1 -0
- package/src/OperationBadge/OperationBadge.stories.tsx +1 -1
- package/src/OperationBadge/index.ts +1 -1
- package/src/PageNavigation/index.ts +3 -0
- package/src/Panel/index.ts +8 -8
- package/src/SamplesPanelControls/SamplesControlButton.stories.tsx +1 -1
- package/src/SamplesPanelControls/index.ts +1 -1
- package/src/Search/Autocomplete.tsx +1 -1
- package/src/Search/Parameters.tsx +2 -2
- package/src/Search/SearchItem.tsx +2 -2
- package/src/Search/index.ts +9 -9
- package/src/Search/utils.tsx +1 -1
- package/src/Sidebar/BackButton.tsx +2 -2
- package/src/Sidebar/DrilldownMenuItem.tsx +4 -4
- package/src/Sidebar/Menu.tsx +1 -1
- package/src/Sidebar/MenuItemLabel.tsx +4 -4
- package/src/Sidebar/MenuLink.tsx +1 -1
- package/src/Sidebar/MobileSidebarButton.tsx +2 -2
- package/src/Sidebar/Sidebar.tsx +1 -1
- package/src/Sidebar/index.ts +19 -19
- package/src/Sidebar/types/index.ts +5 -5
- package/src/SidebarLogo/SidebarLogo.stories.tsx +1 -1
- package/src/SidebarLogo/index.ts +1 -1
- package/src/SourceCode/SourceCode.stories.tsx +1 -1
- package/src/SourceCode/index.ts +1 -1
- package/src/TableOfContent/TableOfContent.tsx +6 -6
- package/src/TableOfContent/index.ts +1 -1
- package/src/Tooltip/Tooltip.stories.tsx +1 -1
- package/src/Tooltip/index.ts +1 -1
- package/src/Welcome.stories.mdx +7 -0
- package/src/globalStyle.ts +102 -7
- package/src/hooks/index.ts +7 -7
- package/src/hooks/useActiveSectionId.ts +3 -3
- package/src/icons/ShelfIcon/index.ts +2 -2
- package/src/icons/index.ts +1 -1
- package/src/types/portal/index.d.ts +0 -1
- package/src/types/portal/src/client/app/Sidebar/types.d.ts +32 -41
- package/src/types/portal/src/client/app/media-css.d.ts +4 -4
- package/src/types/portal/src/client/styling/default.d.ts +585 -391
- package/src/types/portal/src/client/styling/index.d.ts +2 -6
- package/src/types/portal/src/server/constants.d.ts +5 -9
- package/src/types/portal/src/server/plugins/markdown/types.d.ts +14 -19
- package/src/types/portal/src/server/plugins/portal-config/types.d.ts +12 -12
- package/src/types/portal/src/server/plugins/types.d.ts +55 -0
- package/src/types/portal/src/server/store.d.ts +49 -97
- package/src/types/portal/src/server/utils/async.d.ts +1 -5
- package/src/types/portal/src/server/utils/content-provider.d.ts +51 -0
- package/src/types/portal/src/server/utils/index.d.ts +1 -1
- package/src/types/portal/src/server/utils/paths.d.ts +10 -13
- package/src/types/portal/src/server/utils/reporter/formatter.d.ts +8 -8
- package/src/types/portal/src/server/utils/reporter/reporter.d.ts +15 -15
- package/src/types/portal/src/server/version-store.d.ts +35 -0
- package/src/types/portal/src/shared/constants.d.ts +6 -6
- package/src/types/portal/src/shared/types.d.ts +97 -58
- package/src/types/portal/src/shared/urls.d.ts +2 -1
- package/src/ui/AlertIcon.tsx +8 -7
- package/src/ui/Background.tsx +3 -3
- package/src/ui/Dropdown.tsx +4 -4
- package/src/ui/Jumbotron.tsx +3 -3
- package/src/ui/Tiles/TileHeader.ts +1 -1
- package/src/ui/Tiles/TileText.tsx +2 -2
- package/src/ui/Tiles/index.ts +4 -4
- package/src/ui/Typography.tsx +22 -22
- package/ui/AlertIcon.d.ts +3 -2
- package/ui/AlertIcon.js +2 -2
- package/ui/Background.js +1 -1
- package/ui/Dropdown.js +3 -3
- package/ui/Jumbotron.js +3 -3
- package/ui/Tiles/TileHeader.js +1 -1
- package/ui/Tiles/TileText.js +1 -1
- package/ui/Tiles/index.d.ts +4 -4
- package/ui/Tiles/index.js +4 -4
- package/ui/Typography.js +20 -20
- package/Logo/Logo.d.ts +0 -5
- package/Logo/index.d.ts +0 -1
- package/src/Introduction.stories.mdx +0 -7
- package/src/Logo/Logo.tsx +0 -17
- package/src/Logo/index.ts +0 -1
- package/src/types/portal/src/server/plugins/nav-utils.d.ts +0 -19
- package/src/types/portal/src/server/plugins/sidebars/index.d.ts +0 -16
- package/src/types/portal/src/server/plugins/versions/index.d.ts +0 -15
- package/src/types/portal/src/server/plugins/versions/types.d.ts +0 -23
- package/src/types/portal/src/server/plugins/versions/utils.d.ts +0 -10
- package/src/types/portal/src/server/utils/watcher.d.ts +0 -16
|
@@ -1,77 +1,116 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { PageProps } from '../server/store';
|
|
3
2
|
export declare type ResolvedNavLinkItem = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
type: 'link';
|
|
4
|
+
link: string;
|
|
5
|
+
label: string;
|
|
6
|
+
items?: ResolvedNavItem[];
|
|
7
|
+
external?: boolean;
|
|
8
|
+
version?: string;
|
|
9
|
+
isDefault?: boolean;
|
|
10
|
+
versionFolderId?: string;
|
|
11
|
+
httpVerb?: string;
|
|
12
|
+
separatorLine?: boolean;
|
|
13
|
+
routeSlug?: string;
|
|
14
|
+
active?: boolean;
|
|
14
15
|
};
|
|
15
16
|
export declare type ResolvedNavGroupItem = {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
type: 'group';
|
|
18
|
+
link?: string;
|
|
19
|
+
label: string;
|
|
20
|
+
items: ResolvedNavItem[];
|
|
21
|
+
version?: string;
|
|
22
|
+
isDefault?: boolean;
|
|
23
|
+
versionFolderId?: string;
|
|
24
|
+
menuStyle?: MenuStyle;
|
|
25
|
+
separatorLine?: boolean;
|
|
26
|
+
routeSlug?: string;
|
|
27
|
+
active?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export declare type ResolvedNavItem = ResolvedNavLinkItem | ResolvedNavGroupItem | {
|
|
30
|
+
type: 'separator';
|
|
31
|
+
label?: string;
|
|
32
|
+
version?: string;
|
|
33
|
+
isDefault?: boolean;
|
|
34
|
+
versionFolderId?: string;
|
|
35
|
+
separatorLine?: boolean;
|
|
36
|
+
link?: undefined;
|
|
37
|
+
items?: ResolvedNavItem[];
|
|
38
|
+
} | {
|
|
39
|
+
type: 'error';
|
|
40
|
+
version?: string;
|
|
41
|
+
isDefault?: boolean;
|
|
42
|
+
versionFolderId?: string;
|
|
43
|
+
label: string;
|
|
44
|
+
link?: undefined;
|
|
45
|
+
items?: ResolvedNavItem[];
|
|
46
|
+
};
|
|
47
|
+
export declare type ResolvedNavItemWithLink = (ResolvedNavLinkItem | ResolvedNavGroupItem) & {
|
|
48
|
+
link: string;
|
|
25
49
|
};
|
|
26
|
-
export declare type ResolvedNavItem =
|
|
27
|
-
| ResolvedNavLinkItem
|
|
28
|
-
| ResolvedNavGroupItem
|
|
29
|
-
| {
|
|
30
|
-
type: 'separator';
|
|
31
|
-
label?: string;
|
|
32
|
-
separatorLine?: boolean;
|
|
33
|
-
}
|
|
34
|
-
| {
|
|
35
|
-
type: 'error';
|
|
36
|
-
label: string;
|
|
37
|
-
};
|
|
38
50
|
export declare type ResolvedSidebar = ResolvedNavItem[];
|
|
51
|
+
export interface PageProps {
|
|
52
|
+
seo: {
|
|
53
|
+
title: string;
|
|
54
|
+
};
|
|
55
|
+
versions?: Version[];
|
|
56
|
+
[k: string]: unknown;
|
|
57
|
+
}
|
|
39
58
|
export interface PageData {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
props: PageProps;
|
|
59
|
+
templateId: string;
|
|
60
|
+
sharedDataIds: Record<string, string>;
|
|
61
|
+
props: PageProps;
|
|
44
62
|
}
|
|
45
63
|
export interface CachedPageData extends PageData {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}>;
|
|
64
|
+
Template: React.ComponentType<{
|
|
65
|
+
pageProps: PageProps;
|
|
66
|
+
}>;
|
|
50
67
|
}
|
|
51
68
|
export interface ResolvedPageData extends CachedPageData {
|
|
52
|
-
|
|
53
|
-
resolvedDataDependencies?: Record<string, unknown>[];
|
|
69
|
+
sharedData: Record<string, unknown>;
|
|
54
70
|
}
|
|
55
71
|
export declare enum MenuStyle {
|
|
56
|
-
|
|
72
|
+
Drilldown = "drilldown"
|
|
57
73
|
}
|
|
58
74
|
export declare type NavItem = {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
75
|
+
page?: string;
|
|
76
|
+
directory?: string;
|
|
77
|
+
group?: string;
|
|
78
|
+
label?: string;
|
|
79
|
+
href?: never;
|
|
80
|
+
items?: NavItem[];
|
|
81
|
+
separator?: string;
|
|
82
|
+
separatorLine?: boolean;
|
|
83
|
+
version?: string;
|
|
84
|
+
menuStyle?: MenuStyle;
|
|
85
|
+
external?: boolean;
|
|
70
86
|
};
|
|
71
87
|
export declare type RawNavItem = string | NavItem;
|
|
72
88
|
export interface LogoConfig {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
image?: string;
|
|
90
|
+
altText?: string;
|
|
91
|
+
link?: string;
|
|
92
|
+
favicon?: string;
|
|
77
93
|
}
|
|
94
|
+
export declare type Version = {
|
|
95
|
+
version: string;
|
|
96
|
+
label: string;
|
|
97
|
+
link: string;
|
|
98
|
+
default: boolean;
|
|
99
|
+
active: boolean;
|
|
100
|
+
notExists?: boolean;
|
|
101
|
+
folderId: string;
|
|
102
|
+
};
|
|
103
|
+
export declare type VersionConfigItem = {
|
|
104
|
+
version: string;
|
|
105
|
+
name?: string;
|
|
106
|
+
};
|
|
107
|
+
export declare type VersionsConfigType = {
|
|
108
|
+
versions: VersionConfigItem[];
|
|
109
|
+
default?: string;
|
|
110
|
+
};
|
|
111
|
+
export declare type VersionedFolderConfig = {
|
|
112
|
+
versionedFiles: Map<string, Set<string>>;
|
|
113
|
+
defaultVersion?: string;
|
|
114
|
+
versions: VersionConfigItem[];
|
|
115
|
+
hasVersionsConfig?: boolean;
|
|
116
|
+
};
|
|
@@ -2,6 +2,7 @@ export declare function getPageDataUrl(normalizedRoute: string): string;
|
|
|
2
2
|
export declare function getClientPageDataUrl(normalizedRoute: string): string;
|
|
3
3
|
export declare function getSidebarUrl(id: string): string;
|
|
4
4
|
export declare function getSharedDataUrl(id: string): string;
|
|
5
|
-
export declare const GLOBAL_DATA_URL =
|
|
5
|
+
export declare const GLOBAL_DATA_URL = "/app-data.json";
|
|
6
6
|
export declare function combineUrls(baseURL: string, ...relativeURLs: string[]): string;
|
|
7
7
|
export declare function withPathPrefix(url: string): string;
|
|
8
|
+
export declare function withoutHash(url: string): string;
|
package/src/ui/AlertIcon.tsx
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
interface IconProps
|
|
4
|
+
interface IconProps {
|
|
5
5
|
type: 'warning' | 'success' | 'danger' | 'attention' | 'info';
|
|
6
|
+
className?: string;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
function Icon({ type, className }: IconProps) {
|
|
@@ -98,13 +99,13 @@ export const AlertIcon = styled(Icon).attrs(() => ({
|
|
|
98
99
|
'data-component-name': 'ui/AlertIcon',
|
|
99
100
|
}))`
|
|
100
101
|
position: absolute;
|
|
101
|
-
left: var(--
|
|
102
|
+
left: var(--admonition-padding-horizontal);
|
|
102
103
|
top: 50%;
|
|
103
104
|
transform: translateY(-50%);
|
|
104
|
-
width: var(--
|
|
105
|
-
height: var(--
|
|
106
|
-
margin-right: var(--
|
|
105
|
+
width: var(--admonition-icon-size);
|
|
106
|
+
height: var(--admonition-icon-size);
|
|
107
|
+
margin-right: var(--admonition-padding-horizontal);
|
|
107
108
|
flex-shrink: 0;
|
|
108
109
|
|
|
109
|
-
fill: ${({ type }) => `var(--
|
|
110
|
+
fill: ${({ type }) => `var(--admonition-${type}-icon-color)`};
|
|
110
111
|
`;
|
package/src/ui/Background.tsx
CHANGED
|
@@ -5,12 +5,12 @@ import { Flex } from '@theme/ui/Flex';
|
|
|
5
5
|
export const Background = styled(Flex).attrs(() => ({
|
|
6
6
|
'data-component-name': 'ui/Background',
|
|
7
7
|
}))`
|
|
8
|
-
background: var(--navbar-color
|
|
9
|
-
color: var(--
|
|
8
|
+
background: var(--navbar-background-color);
|
|
9
|
+
color: var(--navbar-text-color);
|
|
10
10
|
font-family: var(--h-font-family);
|
|
11
11
|
|
|
12
12
|
a:not([role='button']),
|
|
13
13
|
a:not([role='button']):hover {
|
|
14
|
-
color: var(--
|
|
14
|
+
color: var(--navbar-text-color);
|
|
15
15
|
}
|
|
16
16
|
`;
|
package/src/ui/Dropdown.tsx
CHANGED
|
@@ -39,7 +39,7 @@ const DropDownHeader = styled.div`
|
|
|
39
39
|
border-radius: 4px;
|
|
40
40
|
border: 1px solid #e4e7eb;
|
|
41
41
|
font-weight: 600;
|
|
42
|
-
color: var(--color-
|
|
42
|
+
color: var(--color-content);
|
|
43
43
|
background: var(--color-secondary-300);
|
|
44
44
|
`;
|
|
45
45
|
|
|
@@ -65,10 +65,10 @@ const IconWrapper = styled.span`
|
|
|
65
65
|
`;
|
|
66
66
|
|
|
67
67
|
const ListItem = styled.div`
|
|
68
|
-
background-color:
|
|
68
|
+
background-color: #fff;
|
|
69
69
|
padding: 0.4em 10px;
|
|
70
70
|
font-size: 1em;
|
|
71
|
-
color: var(--color-
|
|
71
|
+
color: var(--color-content);
|
|
72
72
|
cursor: pointer;
|
|
73
73
|
&:hover {
|
|
74
74
|
background-color: rgba(38, 50, 56, 0.12);
|
|
@@ -81,7 +81,7 @@ const ListItem = styled.div`
|
|
|
81
81
|
const DropDownLink = styled(Link)`
|
|
82
82
|
display: block;
|
|
83
83
|
text-decoration: none;
|
|
84
|
-
color: var(--color-
|
|
84
|
+
color: var(--color-content);
|
|
85
85
|
`;
|
|
86
86
|
|
|
87
87
|
export function Dropdown({ items, activeItem }: DropdownProps): JSX.Element {
|
package/src/ui/Jumbotron.tsx
CHANGED
|
@@ -25,7 +25,7 @@ export const Jumbotron = styled(Background).attrs(() => ({
|
|
|
25
25
|
${({ bgImage, bgColor }) =>
|
|
26
26
|
bgImage &&
|
|
27
27
|
`
|
|
28
|
-
background: ${bgColor || 'var(--color-
|
|
28
|
+
background: ${bgColor || 'var(--color-content)'} url(${bgImage});
|
|
29
29
|
background-repeat: no-repeat;
|
|
30
30
|
background-size: cover;
|
|
31
31
|
background-position: center;
|
|
@@ -37,7 +37,7 @@ export const Jumbotron = styled(Background).attrs(() => ({
|
|
|
37
37
|
`};
|
|
38
38
|
${space}
|
|
39
39
|
${H1}, ${H2} {
|
|
40
|
-
color: ${({ textColor }) => textColor || 'var(--navbar-color
|
|
40
|
+
color: ${({ textColor }) => textColor || 'var(--navbar-text-color)'};
|
|
41
41
|
text-align: center;
|
|
42
42
|
padding: 0;
|
|
43
43
|
}
|
|
@@ -50,7 +50,7 @@ export const Jumbotron = styled(Background).attrs(() => ({
|
|
|
50
50
|
h2 {
|
|
51
51
|
font-size: 1.875em;
|
|
52
52
|
line-height: 1;
|
|
53
|
-
font-weight: var(--font-weight-
|
|
53
|
+
font-weight: var(--font-weight-regular);
|
|
54
54
|
margin: 0;
|
|
55
55
|
margin-bottom: 2em;
|
|
56
56
|
}
|
|
@@ -5,7 +5,7 @@ export const TileHeader = styled.h3.attrs(() => ({
|
|
|
5
5
|
}))<{ color?: string }>`
|
|
6
6
|
font-weight: var(--font-weight-bold);
|
|
7
7
|
line-height: 1.25;
|
|
8
|
-
color: ${(props) => props.color || 'var(--color-
|
|
8
|
+
color: ${(props) => props.color || 'var(--color-content)'};
|
|
9
9
|
font-family: var(--h-font-family);
|
|
10
10
|
&& {
|
|
11
11
|
margin: 0 0 0.5em;
|
|
@@ -6,7 +6,7 @@ export const TileText = styled.span.attrs(() => ({
|
|
|
6
6
|
display: inline-block;
|
|
7
7
|
font-weight: var(--font-weight-regular);
|
|
8
8
|
overflow: hidden;
|
|
9
|
-
color: ${(props) => props.color || 'var(--color-
|
|
9
|
+
color: ${(props) => props.color || 'var(--color-content)'};
|
|
10
10
|
line-height: 1.25;
|
|
11
|
-
font-family: var(--font-family-
|
|
11
|
+
font-family: var(--font-family-base);
|
|
12
12
|
`;
|
package/src/ui/Tiles/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
export * from '
|
|
4
|
-
export * from '
|
|
1
|
+
export * from '@theme/ui/Tiles/ThinTile';
|
|
2
|
+
export * from '@theme/ui/Tiles/TileHeader';
|
|
3
|
+
export * from '@theme/ui/Tiles/TileText';
|
|
4
|
+
export * from '@theme/ui/Tiles/WideTile';
|
package/src/ui/Typography.tsx
CHANGED
|
@@ -19,33 +19,33 @@ export interface ITypography {
|
|
|
19
19
|
export const typographyTokens = {
|
|
20
20
|
typography: {
|
|
21
21
|
fontSize: 'var(--font-size-base)',
|
|
22
|
-
fontFamily: 'var(--font-family
|
|
23
|
-
lineHeight: 'var(--line-height-
|
|
22
|
+
fontFamily: 'var(--h-font-family)',
|
|
23
|
+
lineHeight: 'var(--line-height-base)',
|
|
24
24
|
},
|
|
25
25
|
heading1: {
|
|
26
26
|
fontSize: 'var(--h1-font-size)',
|
|
27
|
-
fontFamily: 'var(--font-family
|
|
27
|
+
fontFamily: 'var(--h-font-family)',
|
|
28
28
|
fontWeight: 'var(--font-weight-bold)',
|
|
29
29
|
lineHeight: 'var(--h1-line-height)',
|
|
30
|
-
color: 'var(--color-
|
|
30
|
+
color: 'var(--color-content)',
|
|
31
31
|
marginTop: 'var(--h1-margin-top)',
|
|
32
32
|
marginBottom: 'var(--h1-margin-bottom)',
|
|
33
33
|
},
|
|
34
34
|
heading2: {
|
|
35
35
|
fontSize: 'var(--h2-font-size)',
|
|
36
|
-
fontFamily: 'var(--font-family
|
|
36
|
+
fontFamily: 'var(--h-font-family)',
|
|
37
37
|
fontWeight: 'var(--font-weight-bold)',
|
|
38
38
|
lineHeight: 'var(--h2-line-height)',
|
|
39
|
-
color: 'var(--color-
|
|
39
|
+
color: 'var(--color-content)',
|
|
40
40
|
marginTop: 'var(--h2-margin-top)',
|
|
41
41
|
marginBottom: 'var(--h2-margin-bottom)',
|
|
42
42
|
},
|
|
43
43
|
heading3: {
|
|
44
44
|
fontSize: 'var(--h3-font-size)',
|
|
45
|
-
fontFamily: 'var(--font-family
|
|
45
|
+
fontFamily: 'var(--h-font-family)',
|
|
46
46
|
fontWeight: 'var(--font-weight-bold)',
|
|
47
47
|
lineHeight: 'var(--h3-line-height)',
|
|
48
|
-
color: 'var(--color-
|
|
48
|
+
color: 'var(--color-content)',
|
|
49
49
|
marginTop: 'var(--h3-margin-top)',
|
|
50
50
|
marginBottom: 'var(--h3-margin-bottom)',
|
|
51
51
|
},
|
|
@@ -53,19 +53,19 @@ export const typographyTokens = {
|
|
|
53
53
|
heading5: {},
|
|
54
54
|
heading6: {},
|
|
55
55
|
blockquote: {
|
|
56
|
-
color: 'var(--color-
|
|
56
|
+
color: 'var(--color-content)',
|
|
57
57
|
},
|
|
58
58
|
alert: {
|
|
59
|
-
fontSize: 'var(--
|
|
60
|
-
fontWeight: 'var(--
|
|
61
|
-
lineHeight: 'var(--
|
|
62
|
-
marginTop: 'var(--
|
|
63
|
-
marginBottom: 'var(-
|
|
59
|
+
fontSize: 'var(--admonition-font-size)',
|
|
60
|
+
fontWeight: 'var(--admonition-font-weight)',
|
|
61
|
+
lineHeight: 'var(--admonition-line-height)',
|
|
62
|
+
marginTop: 'var(--admonition-margin-vertical)',
|
|
63
|
+
marginBottom: 'var(--admonition-margin-vertical)',
|
|
64
64
|
heading: {
|
|
65
|
-
fontSize: 'var(--
|
|
66
|
-
fontWeight: 'var(--
|
|
67
|
-
lineHeight: 'var(--
|
|
68
|
-
transform: 'var(--
|
|
65
|
+
fontSize: 'var(--admonition-heading-font-size)',
|
|
66
|
+
fontWeight: 'var(--admonition-heading-font-weight)',
|
|
67
|
+
lineHeight: 'var(--admonition-line-height)',
|
|
68
|
+
transform: 'var(--admonition-heading-transform)',
|
|
69
69
|
},
|
|
70
70
|
},
|
|
71
71
|
};
|
|
@@ -134,13 +134,13 @@ export const H3 = styled.h1.attrs(() => ({
|
|
|
134
134
|
`;
|
|
135
135
|
|
|
136
136
|
export const SectionHeader = styled.h2`
|
|
137
|
-
color: var(--color
|
|
137
|
+
color: var(--h-color);
|
|
138
138
|
font-size: 1.75em;
|
|
139
|
-
font-weight: var(--font-weight-
|
|
139
|
+
font-weight: var(--font-weight-regular);
|
|
140
140
|
text-align: center;
|
|
141
141
|
margin: 2.65em 0;
|
|
142
142
|
padding: 0px 20px;
|
|
143
|
-
font-family: var(--font-family
|
|
143
|
+
font-family: var(--h-font-family);
|
|
144
144
|
`;
|
|
145
145
|
|
|
146
146
|
export const Typography = styled.p.attrs(() => ({
|
|
@@ -153,7 +153,7 @@ export const Typography = styled.p.attrs(() => ({
|
|
|
153
153
|
}
|
|
154
154
|
>`
|
|
155
155
|
${typography(typographyTokens.typography)};
|
|
156
|
-
color: var(--color-
|
|
156
|
+
color: var(--color-content);
|
|
157
157
|
${color}
|
|
158
158
|
margin-top: ${({ mt }) => mt || '1em'};
|
|
159
159
|
margin-bottom: ${({ mb }) => mb || '1em'};
|
package/ui/AlertIcon.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
interface IconProps
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface IconProps {
|
|
3
3
|
type: 'warning' | 'success' | 'danger' | 'attention' | 'info';
|
|
4
|
+
className?: string;
|
|
4
5
|
}
|
|
5
6
|
declare function Icon({ type, className }: IconProps): JSX.Element;
|
|
6
7
|
export declare const AlertIcon: import("styled-components").StyledComponent<typeof Icon, any, {
|
package/ui/AlertIcon.js
CHANGED
|
@@ -38,8 +38,8 @@ function Icon(_a) {
|
|
|
38
38
|
}
|
|
39
39
|
exports.AlertIcon = (0, styled_components_1.default)(Icon).attrs(function () { return ({
|
|
40
40
|
'data-component-name': 'ui/AlertIcon',
|
|
41
|
-
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n left: var(--
|
|
41
|
+
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n left: var(--admonition-padding-horizontal);\n top: 50%;\n transform: translateY(-50%);\n width: var(--admonition-icon-size);\n height: var(--admonition-icon-size);\n margin-right: var(--admonition-padding-horizontal);\n flex-shrink: 0;\n\n fill: ", ";\n"], ["\n position: absolute;\n left: var(--admonition-padding-horizontal);\n top: 50%;\n transform: translateY(-50%);\n width: var(--admonition-icon-size);\n height: var(--admonition-icon-size);\n margin-right: var(--admonition-padding-horizontal);\n flex-shrink: 0;\n\n fill: ", ";\n"])), function (_a) {
|
|
42
42
|
var type = _a.type;
|
|
43
|
-
return "var(--
|
|
43
|
+
return "var(--admonition-".concat(type, "-icon-color)");
|
|
44
44
|
});
|
|
45
45
|
var templateObject_1;
|
package/ui/Background.js
CHANGED
|
@@ -12,5 +12,5 @@ var styled_components_1 = __importDefault(require("styled-components"));
|
|
|
12
12
|
var Flex_1 = require("../ui/Flex");
|
|
13
13
|
exports.Background = (0, styled_components_1.default)(Flex_1.Flex).attrs(function () { return ({
|
|
14
14
|
'data-component-name': 'ui/Background',
|
|
15
|
-
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: var(--navbar-color
|
|
15
|
+
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: var(--navbar-background-color);\n color: var(--navbar-text-color);\n font-family: var(--h-font-family);\n\n a:not([role='button']),\n a:not([role='button']):hover {\n color: var(--navbar-text-color);\n }\n"], ["\n background: var(--navbar-background-color);\n color: var(--navbar-text-color);\n font-family: var(--h-font-family);\n\n a:not([role='button']),\n a:not([role='button']):hover {\n color: var(--navbar-text-color);\n }\n"])));
|
|
16
16
|
var templateObject_1;
|
package/ui/Dropdown.js
CHANGED
|
@@ -25,11 +25,11 @@ var styled_components_1 = __importDefault(require("styled-components"));
|
|
|
25
25
|
var Link_1 = require("../mocks/Link");
|
|
26
26
|
var Icon = function () { return ((0, jsx_runtime_1.jsx)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, { children: (0, jsx_runtime_1.jsx)("polyline", { points: "6 9 12 15 18 9" }) }))); };
|
|
27
27
|
var DropDownContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);\n"], ["\n position: relative;\n padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);\n"])));
|
|
28
|
-
var DropDownHeader = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: #fff;\n padding: 8px 10px;\n border-radius: 4px;\n border: 1px solid #e4e7eb;\n font-weight: 600;\n color: var(--color-
|
|
28
|
+
var DropDownHeader = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: #fff;\n padding: 8px 10px;\n border-radius: 4px;\n border: 1px solid #e4e7eb;\n font-weight: 600;\n color: var(--color-content);\n background: var(--color-secondary-300);\n"], ["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: #fff;\n padding: 8px 10px;\n border-radius: 4px;\n border: 1px solid #e4e7eb;\n font-weight: 600;\n color: var(--color-content);\n background: var(--color-secondary-300);\n"])));
|
|
29
29
|
var DropDownList = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n background: var(--color-secondary-300);\n margin: 2px 20px 0 20px;\n padding: 0;\n border-radius: 4px;\n border: 1px solid rgba(38, 50, 56, 0.2);\n z-index: 9999;\n left: 0;\n right: 0;\n"], ["\n position: absolute;\n background: var(--color-secondary-300);\n margin: 2px 20px 0 20px;\n padding: 0;\n border-radius: 4px;\n border: 1px solid rgba(38, 50, 56, 0.2);\n z-index: 9999;\n left: 0;\n right: 0;\n"])));
|
|
30
30
|
var IconWrapper = styled_components_1.default.span(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n transition: transform 0.2s;\n display: inline-block;\n font-size: 0;\n &.active {\n transform: rotate(-180deg);\n }\n"], ["\n transition: transform 0.2s;\n display: inline-block;\n font-size: 0;\n &.active {\n transform: rotate(-180deg);\n }\n"])));
|
|
31
|
-
var ListItem = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color:
|
|
32
|
-
var DropDownLink = (0, styled_components_1.default)(Link_1.Link)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: block;\n text-decoration: none;\n color: var(--color-
|
|
31
|
+
var ListItem = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: #fff;\n padding: 0.4em 10px;\n font-size: 1em;\n color: var(--color-content);\n cursor: pointer;\n &:hover {\n background-color: rgba(38, 50, 56, 0.12);\n }\n &.active {\n background-color: rgba(0, 0, 0, 0.05);\n }\n"], ["\n background-color: #fff;\n padding: 0.4em 10px;\n font-size: 1em;\n color: var(--color-content);\n cursor: pointer;\n &:hover {\n background-color: rgba(38, 50, 56, 0.12);\n }\n &.active {\n background-color: rgba(0, 0, 0, 0.05);\n }\n"])));
|
|
32
|
+
var DropDownLink = (0, styled_components_1.default)(Link_1.Link)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: block;\n text-decoration: none;\n color: var(--color-content);\n"], ["\n display: block;\n text-decoration: none;\n color: var(--color-content);\n"])));
|
|
33
33
|
function Dropdown(_a) {
|
|
34
34
|
var items = _a.items, activeItem = _a.activeItem;
|
|
35
35
|
var ref = (0, react_1.useRef)(null);
|
package/ui/Jumbotron.js
CHANGED
|
@@ -14,7 +14,7 @@ var Typography_1 = require("../ui/Typography");
|
|
|
14
14
|
var Background_1 = require("../ui/Background");
|
|
15
15
|
exports.Jumbotron = (0, styled_components_1.default)(Background_1.Background).attrs(function () { return ({
|
|
16
16
|
'data-component-name': 'ui/Jumbotron',
|
|
17
|
-
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: column;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n ", ";\n ", ";\n ", ";\n ", "\n ", ", ", " {\n color: ", ";\n text-align: center;\n padding: 0;\n }\n h1 {\n font-size: 3.5em;\n line-height: 1.2;\n font-weight: var(--font-weight-bold);\n margin: 1.75em 0 0.5em 0;\n }\n h2 {\n font-size: 1.875em;\n line-height: 1;\n font-weight: var(--font-weight-
|
|
17
|
+
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: column;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n ", ";\n ", ";\n ", ";\n ", "\n ", ", ", " {\n color: ", ";\n text-align: center;\n padding: 0;\n }\n h1 {\n font-size: 3.5em;\n line-height: 1.2;\n font-weight: var(--font-weight-bold);\n margin: 1.75em 0 0.5em 0;\n }\n h2 {\n font-size: 1.875em;\n line-height: 1;\n font-weight: var(--font-weight-regular);\n margin: 0;\n margin-bottom: 2em;\n }\n"], ["\n flex-direction: column;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n ", ";\n ", ";\n ", ";\n ", "\n ", ", ", " {\n color: ", ";\n text-align: center;\n padding: 0;\n }\n h1 {\n font-size: 3.5em;\n line-height: 1.2;\n font-weight: var(--font-weight-bold);\n margin: 1.75em 0 0.5em 0;\n }\n h2 {\n font-size: 1.875em;\n line-height: 1;\n font-weight: var(--font-weight-regular);\n margin: 0;\n margin-bottom: 2em;\n }\n"])), function (_a) {
|
|
18
18
|
var pt = _a.pt;
|
|
19
19
|
return pt || '0';
|
|
20
20
|
}, function (_a) {
|
|
@@ -32,13 +32,13 @@ exports.Jumbotron = (0, styled_components_1.default)(Background_1.Background).at
|
|
|
32
32
|
}, function (_a) {
|
|
33
33
|
var bgImage = _a.bgImage, bgColor = _a.bgColor;
|
|
34
34
|
return bgImage &&
|
|
35
|
-
"\n background: ".concat(bgColor || 'var(--color-
|
|
35
|
+
"\n background: ".concat(bgColor || 'var(--color-content)', " url(").concat(bgImage, ");\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n ");
|
|
36
36
|
}, function (_a) {
|
|
37
37
|
var parallaxEffect = _a.parallaxEffect;
|
|
38
38
|
return parallaxEffect &&
|
|
39
39
|
"\n background-attachment: scroll, fixed;\n ";
|
|
40
40
|
}, styled_system_1.space, Typography_1.H1, Typography_1.H2, function (_a) {
|
|
41
41
|
var textColor = _a.textColor;
|
|
42
|
-
return textColor || 'var(--navbar-color
|
|
42
|
+
return textColor || 'var(--navbar-text-color)';
|
|
43
43
|
});
|
|
44
44
|
var templateObject_1;
|
package/ui/Tiles/TileHeader.js
CHANGED
|
@@ -11,5 +11,5 @@ exports.TileHeader = void 0;
|
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
12
|
exports.TileHeader = styled_components_1.default.h3.attrs(function () { return ({
|
|
13
13
|
'data-component-name': 'ui/Tiles/TileHeader',
|
|
14
|
-
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-weight: var(--font-weight-bold);\n line-height: 1.25;\n color: ", ";\n font-family: var(--h-font-family);\n && {\n margin: 0 0 0.5em;\n }\n"], ["\n font-weight: var(--font-weight-bold);\n line-height: 1.25;\n color: ", ";\n font-family: var(--h-font-family);\n && {\n margin: 0 0 0.5em;\n }\n"])), function (props) { return props.color || 'var(--color-
|
|
14
|
+
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-weight: var(--font-weight-bold);\n line-height: 1.25;\n color: ", ";\n font-family: var(--h-font-family);\n && {\n margin: 0 0 0.5em;\n }\n"], ["\n font-weight: var(--font-weight-bold);\n line-height: 1.25;\n color: ", ";\n font-family: var(--h-font-family);\n && {\n margin: 0 0 0.5em;\n }\n"])), function (props) { return props.color || 'var(--color-content)'; });
|
|
15
15
|
var templateObject_1;
|
package/ui/Tiles/TileText.js
CHANGED
|
@@ -11,5 +11,5 @@ exports.TileText = void 0;
|
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
12
|
exports.TileText = styled_components_1.default.span.attrs(function () { return ({
|
|
13
13
|
'data-component-name': 'ui/Tiles/TileText',
|
|
14
|
-
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-block;\n font-weight: var(--font-weight-regular);\n overflow: hidden;\n color: ", ";\n line-height: 1.25;\n font-family: var(--font-family-
|
|
14
|
+
}); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-block;\n font-weight: var(--font-weight-regular);\n overflow: hidden;\n color: ", ";\n line-height: 1.25;\n font-family: var(--font-family-base);\n"], ["\n display: inline-block;\n font-weight: var(--font-weight-regular);\n overflow: hidden;\n color: ", ";\n line-height: 1.25;\n font-family: var(--font-family-base);\n"])), function (props) { return props.color || 'var(--color-content)'; });
|
|
15
15
|
var templateObject_1;
|
package/ui/Tiles/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
export * from '
|
|
4
|
-
export * from '
|
|
1
|
+
export * from '../../ui/Tiles/ThinTile';
|
|
2
|
+
export * from '../../ui/Tiles/TileHeader';
|
|
3
|
+
export * from '../../ui/Tiles/TileText';
|
|
4
|
+
export * from '../../ui/Tiles/WideTile';
|
package/ui/Tiles/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("
|
|
18
|
-
__exportStar(require("
|
|
19
|
-
__exportStar(require("
|
|
20
|
-
__exportStar(require("
|
|
17
|
+
__exportStar(require("../../ui/Tiles/ThinTile"), exports);
|
|
18
|
+
__exportStar(require("../../ui/Tiles/TileHeader"), exports);
|
|
19
|
+
__exportStar(require("../../ui/Tiles/TileText"), exports);
|
|
20
|
+
__exportStar(require("../../ui/Tiles/WideTile"), exports);
|
package/ui/Typography.js
CHANGED
|
@@ -33,33 +33,33 @@ var styled_system_1 = require("styled-system");
|
|
|
33
33
|
exports.typographyTokens = {
|
|
34
34
|
typography: {
|
|
35
35
|
fontSize: 'var(--font-size-base)',
|
|
36
|
-
fontFamily: 'var(--font-family
|
|
37
|
-
lineHeight: 'var(--line-height-
|
|
36
|
+
fontFamily: 'var(--h-font-family)',
|
|
37
|
+
lineHeight: 'var(--line-height-base)',
|
|
38
38
|
},
|
|
39
39
|
heading1: {
|
|
40
40
|
fontSize: 'var(--h1-font-size)',
|
|
41
|
-
fontFamily: 'var(--font-family
|
|
41
|
+
fontFamily: 'var(--h-font-family)',
|
|
42
42
|
fontWeight: 'var(--font-weight-bold)',
|
|
43
43
|
lineHeight: 'var(--h1-line-height)',
|
|
44
|
-
color: 'var(--color-
|
|
44
|
+
color: 'var(--color-content)',
|
|
45
45
|
marginTop: 'var(--h1-margin-top)',
|
|
46
46
|
marginBottom: 'var(--h1-margin-bottom)',
|
|
47
47
|
},
|
|
48
48
|
heading2: {
|
|
49
49
|
fontSize: 'var(--h2-font-size)',
|
|
50
|
-
fontFamily: 'var(--font-family
|
|
50
|
+
fontFamily: 'var(--h-font-family)',
|
|
51
51
|
fontWeight: 'var(--font-weight-bold)',
|
|
52
52
|
lineHeight: 'var(--h2-line-height)',
|
|
53
|
-
color: 'var(--color-
|
|
53
|
+
color: 'var(--color-content)',
|
|
54
54
|
marginTop: 'var(--h2-margin-top)',
|
|
55
55
|
marginBottom: 'var(--h2-margin-bottom)',
|
|
56
56
|
},
|
|
57
57
|
heading3: {
|
|
58
58
|
fontSize: 'var(--h3-font-size)',
|
|
59
|
-
fontFamily: 'var(--font-family
|
|
59
|
+
fontFamily: 'var(--h-font-family)',
|
|
60
60
|
fontWeight: 'var(--font-weight-bold)',
|
|
61
61
|
lineHeight: 'var(--h3-line-height)',
|
|
62
|
-
color: 'var(--color-
|
|
62
|
+
color: 'var(--color-content)',
|
|
63
63
|
marginTop: 'var(--h3-margin-top)',
|
|
64
64
|
marginBottom: 'var(--h3-margin-bottom)',
|
|
65
65
|
},
|
|
@@ -67,19 +67,19 @@ exports.typographyTokens = {
|
|
|
67
67
|
heading5: {},
|
|
68
68
|
heading6: {},
|
|
69
69
|
blockquote: {
|
|
70
|
-
color: 'var(--color-
|
|
70
|
+
color: 'var(--color-content)',
|
|
71
71
|
},
|
|
72
72
|
alert: {
|
|
73
|
-
fontSize: 'var(--
|
|
74
|
-
fontWeight: 'var(--
|
|
75
|
-
lineHeight: 'var(--
|
|
76
|
-
marginTop: 'var(--
|
|
77
|
-
marginBottom: 'var(-
|
|
73
|
+
fontSize: 'var(--admonition-font-size)',
|
|
74
|
+
fontWeight: 'var(--admonition-font-weight)',
|
|
75
|
+
lineHeight: 'var(--admonition-line-height)',
|
|
76
|
+
marginTop: 'var(--admonition-margin-vertical)',
|
|
77
|
+
marginBottom: 'var(--admonition-margin-vertical)',
|
|
78
78
|
heading: {
|
|
79
|
-
fontSize: 'var(--
|
|
80
|
-
fontWeight: 'var(--
|
|
81
|
-
lineHeight: 'var(--
|
|
82
|
-
transform: 'var(--
|
|
79
|
+
fontSize: 'var(--admonition-heading-font-size)',
|
|
80
|
+
fontWeight: 'var(--admonition-heading-font-weight)',
|
|
81
|
+
lineHeight: 'var(--admonition-line-height)',
|
|
82
|
+
transform: 'var(--admonition-heading-transform)',
|
|
83
83
|
},
|
|
84
84
|
},
|
|
85
85
|
};
|
|
@@ -119,10 +119,10 @@ exports.H3 = styled_components_1.default.h1.attrs(function () { return ({
|
|
|
119
119
|
var mb = _a.mb;
|
|
120
120
|
return mb && "margin-bottom: ".concat(mb, ";");
|
|
121
121
|
}, styled_system_1.color, styled_system_1.typography);
|
|
122
|
-
exports.SectionHeader = styled_components_1.default.h2(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: var(--color
|
|
122
|
+
exports.SectionHeader = styled_components_1.default.h2(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: var(--h-color);\n font-size: 1.75em;\n font-weight: var(--font-weight-regular);\n text-align: center;\n margin: 2.65em 0;\n padding: 0px 20px;\n font-family: var(--h-font-family);\n"], ["\n color: var(--h-color);\n font-size: 1.75em;\n font-weight: var(--font-weight-regular);\n text-align: center;\n margin: 2.65em 0;\n padding: 0px 20px;\n font-family: var(--h-font-family);\n"])));
|
|
123
123
|
exports.Typography = styled_components_1.default.p.attrs(function () { return ({
|
|
124
124
|
'data-component-name': 'ui/Typography/Typography',
|
|
125
|
-
}); })(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", ";\n color: var(--color-
|
|
125
|
+
}); })(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", ";\n color: var(--color-content);\n ", "\n margin-top: ", ";\n margin-bottom: ", ";\n ", "\n"], ["\n ", ";\n color: var(--color-content);\n ", "\n margin-top: ", ";\n margin-bottom: ", ";\n ", "\n"])), typography(exports.typographyTokens.typography), styled_system_1.color, function (_a) {
|
|
126
126
|
var mt = _a.mt;
|
|
127
127
|
return mt || '1em';
|
|
128
128
|
}, function (_a) {
|