@redocly/theme 0.1.9 → 0.1.12
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/NavbarMenu.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/ClearIcon.js +2 -2
- package/Search/Input.js +1 -1
- package/Search/Parameters.js +2 -2
- package/Search/Popover.js +1 -1
- package/Search/SearchIcon.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/ApiCallItem.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 +7 -8
- 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.d.ts +1 -0
- package/globalStyle.js +25 -3
- 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/mocks/Link.js +4 -1
- package/mocks/hooks/usePageData.js +4 -1
- package/package.json +1 -1
- package/src/Button/index.ts +1 -1
- package/src/CodeBlock/index.ts +1 -1
- package/src/CopyButton/index.ts +2 -2
- 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/index.ts +4 -4
- package/src/Headings/index.ts +1 -1
- package/src/JsonViewer/index.ts +2 -2
- 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.tsx +2 -3
- package/src/Navbar/NavbarItem.tsx +1 -1
- package/src/Navbar/NavbarMenu.tsx +1 -1
- package/src/Navbar/index.ts +3 -0
- package/src/NavbarLogo/NavbarLogo.tsx +24 -0
- package/src/NavbarLogo/index.ts +1 -0
- package/src/OperationBadge/index.ts +1 -1
- package/src/PageNavigation/index.ts +3 -0
- package/src/Panel/index.ts +8 -8
- package/src/SamplesPanelControls/index.ts +1 -1
- package/src/Search/Autocomplete.tsx +1 -1
- package/src/Search/ClearIcon.tsx +12 -13
- package/src/Search/Input.tsx +7 -7
- package/src/Search/Parameters.tsx +2 -2
- package/src/Search/Popover.tsx +2 -2
- package/src/Search/SearchIcon.tsx +12 -13
- package/src/Search/SearchItem.tsx +2 -2
- package/src/Search/index.ts +9 -9
- package/src/Search/utils.tsx +1 -1
- package/src/Sidebar/ApiCallItem.tsx +1 -2
- 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/index.ts +1 -1
- package/src/SourceCode/index.ts +1 -1
- package/src/TableOfContent/TableOfContent.tsx +12 -10
- package/src/TableOfContent/index.ts +1 -1
- package/src/Tooltip/index.ts +1 -1
- package/src/globalStyle.ts +793 -441
- 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/mocks/Link.tsx +5 -2
- package/src/mocks/hooks/usePageData.ts +4 -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 +27 -27
- package/src/ui/UniversalLink.tsx +3 -8
- package/src/utils/isUrl.ts +4 -4
- 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 +23 -23
- package/ui/UniversalLink.js +1 -5
- package/utils/isUrl.d.ts +2 -2
- package/utils/isUrl.js +4 -4
- package/Logo/Logo.d.ts +0 -5
- package/Logo/index.d.ts +0 -1
- package/src/Button/Button.stories.tsx +0 -74
- package/src/Button/__tests__/Button.test.tsx +0 -42
- package/src/Button/__tests__/__snapshots__/Button.test.tsx.snap +0 -274
- package/src/CodeBlock/__tests__/CodeBlock.test.tsx +0 -12
- package/src/CodeBlock/__tests__/__snapshots__/CodeBlock.test.tsx.snap +0 -140
- package/src/CopyButton/CopyButton.stories.tsx +0 -18
- package/src/CopyButton/__tests__/CopyButton.test.tsx +0 -35
- package/src/CopyButton/__tests__/CopyButtonWrapper.test.tsx +0 -17
- package/src/CopyButton/__tests__/__snapshots__/CopyButton.test.tsx.snap +0 -55
- package/src/CopyButton/__tests__/__snapshots__/CopyButtonWrapper.test.tsx.snap +0 -46
- package/src/Headings/Headings.stories.tsx +0 -36
- package/src/Headings/__tests__/Headings.test.tsx +0 -24
- package/src/Headings/__tests__/__snapshots__/Headings.test.tsx.snap +0 -57
- package/src/Introduction.stories.mdx +0 -7
- package/src/JsonViewer/JsonViewer.stories.tsx +0 -57
- package/src/JsonViewer/__tests__/JsonViewer.test.tsx +0 -83
- package/src/JsonViewer/__tests__/__snapshots__/JsonViewer.test.tsx.snap +0 -2728
- package/src/Logo/Logo.tsx +0 -17
- package/src/Logo/index.ts +0 -1
- package/src/Navbar/Navbar.stories.tsx +0 -28
- package/src/OperationBadge/OperationBadge.stories.tsx +0 -35
- package/src/OperationBadge/__tests__/OperationBadge.test.tsx +0 -59
- package/src/OperationBadge/__tests__/__snapshots__/OperationBadge.test.tsx.snap +0 -651
- package/src/Panel/CodePanel.stories.tsx +0 -26
- package/src/Panel/ContentPanel.stories.tsx +0 -26
- package/src/Panel/Panel.stories.tsx +0 -56
- package/src/Panel/__tests__/CodePanel.test.tsx +0 -26
- package/src/Panel/__tests__/ContentPanel.test.tsx +0 -26
- package/src/Panel/__tests__/Panel.test.tsx +0 -53
- package/src/Panel/__tests__/__snapshots__/CodePanel.test.tsx.snap +0 -258
- package/src/Panel/__tests__/__snapshots__/ContentPanel.test.tsx.snap +0 -278
- package/src/Panel/__tests__/__snapshots__/Panel.test.tsx.snap +0 -398
- package/src/SamplesPanelControls/SamplesControlButton.stories.tsx +0 -18
- package/src/SamplesPanelControls/__tests__/SamplesPanelControls.test.tsx +0 -36
- package/src/SamplesPanelControls/__tests__/__snapshots__/SamplesPanelControls.test.tsx.snap +0 -228
- package/src/SidebarLogo/SidebarLogo.stories.tsx +0 -21
- package/src/SidebarLogo/__tests__/SidebarLogo.test.tsx +0 -32
- package/src/SidebarLogo/__tests__/__snapshots__/SidebarLogo.test.tsx.snap +0 -62
- package/src/SourceCode/SourceCode.stories.tsx +0 -29
- package/src/SourceCode/__tests__/SourceCode.test.tsx +0 -48
- package/src/SourceCode/__tests__/__snapshots__/SourceCode.test.tsx.snap +0 -786
- package/src/TableOfContent/TableOfContent.stories.tsx +0 -39
- package/src/Tooltip/Tooltip.stories.tsx +0 -27
- package/src/Tooltip/__tests__/Tooltip.test.tsx +0 -41
- package/src/Tooltip/__tests__/__snapshots__/Tooltip.test.tsx.snap +0 -83
- package/src/icons/ShelfIcon/ShelfIcon.stories.tsx +0 -36
- package/src/icons/ShelfIcon/__tests__/ShelfIcon.test.tsx +0 -54
- package/src/icons/ShelfIcon/__tests__/__snapshots__/ShelfIcon.test.tsx.snap +0 -235
- 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
- package/src/utils/__tests__/ClipboardService.test.ts +0 -24
- package/src/utils/__tests__/__snapshots__/highlight.test.ts.snap +0 -5
- package/src/utils/__tests__/__snapshots__/jsonToHtml.test.ts.snap +0 -5
- package/src/utils/__tests__/css-variables.test.ts +0 -20
- package/src/utils/__tests__/highlight.test.ts +0 -51
- package/src/utils/__tests__/jsonToHtml.test.ts +0 -40
- package/src/utils/__tests__/media-css.test.ts +0 -20
- package/src/utils/__tests__/theme-helpers.test.ts +0 -25
|
@@ -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
|
|
28
|
-
fontWeight: 'var(--font-weight-
|
|
27
|
+
fontFamily: 'var(--h-font-family)',
|
|
28
|
+
fontWeight: 'var(--h1-font-weight, var(--h-font-weight))',
|
|
29
29
|
lineHeight: 'var(--h1-line-height)',
|
|
30
|
-
color: 'var(--color
|
|
30
|
+
color: 'var(--h-color)',
|
|
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
|
|
37
|
-
fontWeight: 'var(--font-weight-
|
|
36
|
+
fontFamily: 'var(--h-font-family)',
|
|
37
|
+
fontWeight: 'var(--h2-font-weight, var(--h-font-weight))',
|
|
38
38
|
lineHeight: 'var(--h2-line-height)',
|
|
39
|
-
color: 'var(--color
|
|
39
|
+
color: 'var(--h-color)',
|
|
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
|
|
46
|
-
fontWeight: 'var(--font-weight-
|
|
45
|
+
fontFamily: 'var(--h-font-family)',
|
|
46
|
+
fontWeight: 'var(--h3-font-weight, var(--h-font-weight))',
|
|
47
47
|
lineHeight: 'var(--h3-line-height)',
|
|
48
|
-
color: 'var(--color
|
|
48
|
+
color: 'var(--h-color)',
|
|
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
|
-
padding:
|
|
143
|
-
font-family: var(--font-family
|
|
142
|
+
padding: 0 20px;
|
|
143
|
+
font-family: var(--h-font-family);
|
|
144
144
|
`;
|
|
145
145
|
|
|
146
146
|
export const Typography = styled.p.attrs(() => ({
|
|
@@ -153,8 +153,8 @@ export const Typography = styled.p.attrs(() => ({
|
|
|
153
153
|
}
|
|
154
154
|
>`
|
|
155
155
|
${typography(typographyTokens.typography)};
|
|
156
|
-
color: var(--color-
|
|
157
|
-
${color}
|
|
156
|
+
color: var(--color-content);
|
|
157
|
+
${color};
|
|
158
158
|
margin-top: ${({ mt }) => mt || '1em'};
|
|
159
159
|
margin-bottom: ${({ mb }) => mb || '1em'};
|
|
160
160
|
${typographySystem}
|
package/src/ui/UniversalLink.tsx
CHANGED
|
@@ -3,7 +3,6 @@ import { useLocation, LinkProps } from 'react-router-dom';
|
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
|
|
5
5
|
import { isUrl } from '@theme/utils/isUrl';
|
|
6
|
-
import { replaceHashInColor } from '@theme/utils/replaceHashInColor';
|
|
7
6
|
import { Link } from '@portal/Link';
|
|
8
7
|
|
|
9
8
|
const StyledExternalLink = styled.a`
|
|
@@ -14,15 +13,11 @@ const StyledExternalLink = styled.a`
|
|
|
14
13
|
content: '';
|
|
15
14
|
display: inline-block;
|
|
16
15
|
position: absolute;
|
|
17
|
-
background
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
replaceHashInColor(
|
|
21
|
-
theme.colors.text.primary,
|
|
22
|
-
)}' d='M-408.2-318.5 98.6 4.8c0-0.1 0-0.2-0.1-0.3 0-0.1-0.1-0.2-0.1-0.3 0-0.1 0-0.1-0.1-0.2 0 0 0-0.1 0-0.1 0-0.1-0.1-0.2-0.2-0.3 0-0.1-0.1-0.2-0.2-0.3 -0.1-0.1-0.1-0.2-0.2-0.3C97.7 2.9 97.6 2.8 97.5 2.7c-0.1-0.1-0.2-0.2-0.3-0.3 -0.1-0.1-0.1-0.1-0.2-0.2 -0.1-0.1-0.2-0.2-0.3-0.2 -0.1-0.1-0.2-0.1-0.2-0.2 -0.1-0.1-0.2-0.1-0.3-0.2 -0.1 0-0.2-0.1-0.3-0.1 0 0-0.1 0-0.1-0.1 -0.1 0-0.2 0-0.2-0.1 -0.1 0-0.2-0.1-0.3-0.1 -0.1 0-0.2-0.1-0.4-0.1 -0.1 0-0.2 0-0.3 0 -0.1 0-0.3 0-0.4 0 -0.1 0-0.1 0-0.2 0L63.8 1.3c-2.5 0-4.6 2.1-4.6 4.6 0 2.5 2.1 4.6 4.6 4.5l19.3-0.1 -29.8 30.2c-1.1 1.1-1.5 2.7-1.2 4.1 0.2 0.9 0.6 1.7 1.3 2.4 0.9 0.9 2.1 1.3 3.2 1.3 1.2 0 2.3-0.5 3.2-1.4l0 0 29.8-30.2 0.1 19.3c0 2.5 2.1 4.6 4.6 4.5 1.3 0 2.4-0.5 3.2-1.4 0.8-0.8 1.3-2 1.3-3.2L98.7 5.7c0-0.1 0-0.1 0-0.2 0-0.1 0-0.2 0-0.4C98.6 5 98.6 4.9 98.6 4.8zM6.5 83.3c0 5.7 4.6 10.4 10.4 10.4l55.6 0.1c5.7 0 10.4-4.6 10.4-10.4l-0.1-40.8h6.1v40.8c0 9-7.3 16.3-16.3 16.3l-56.4-0.1c-8.6 0-15.6-7-15.6-15.6L0.6 27.8c0-9 7.3-16.3 16.3-16.3l41.1-0.1v6.1L17 17.5c-5.7 0-10.4 4.6-10.4 10.4L6.5 83.3z'/%3E%3C/svg%3E");
|
|
16
|
+
background: var(--color-content);
|
|
17
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' x='0' y='0' viewBox='0 0 100 125' enable-background='new 0 0 100 100' xml:space='preserve'%3E%3Cpath d='M-408.2-318.5 98.6 4.8c0-0.1 0-0.2-0.1-0.3 0-0.1-0.1-0.2-0.1-0.3 0-0.1 0-0.1-0.1-0.2 0 0 0-0.1 0-0.1 0-0.1-0.1-0.2-0.2-0.3 0-0.1-0.1-0.2-0.2-0.3 -0.1-0.1-0.1-0.2-0.2-0.3C97.7 2.9 97.6 2.8 97.5 2.7c-0.1-0.1-0.2-0.2-0.3-0.3 -0.1-0.1-0.1-0.1-0.2-0.2 -0.1-0.1-0.2-0.2-0.3-0.2 -0.1-0.1-0.2-0.1-0.2-0.2 -0.1-0.1-0.2-0.1-0.3-0.2 -0.1 0-0.2-0.1-0.3-0.1 0 0-0.1 0-0.1-0.1 -0.1 0-0.2 0-0.2-0.1 -0.1 0-0.2-0.1-0.3-0.1 -0.1 0-0.2-0.1-0.4-0.1 -0.1 0-0.2 0-0.3 0 -0.1 0-0.3 0-0.4 0 -0.1 0-0.1 0-0.2 0L63.8 1.3c-2.5 0-4.6 2.1-4.6 4.6 0 2.5 2.1 4.6 4.6 4.5l19.3-0.1 -29.8 30.2c-1.1 1.1-1.5 2.7-1.2 4.1 0.2 0.9 0.6 1.7 1.3 2.4 0.9 0.9 2.1 1.3 3.2 1.3 1.2 0 2.3-0.5 3.2-1.4l0 0 29.8-30.2 0.1 19.3c0 2.5 2.1 4.6 4.6 4.5 1.3 0 2.4-0.5 3.2-1.4 0.8-0.8 1.3-2 1.3-3.2L98.7 5.7c0-0.1 0-0.1 0-0.2 0-0.1 0-0.2 0-0.4C98.6 5 98.6 4.9 98.6 4.8zM6.5 83.3c0 5.7 4.6 10.4 10.4 10.4l55.6 0.1c5.7 0 10.4-4.6 10.4-10.4l-0.1-40.8h6.1v40.8c0 9-7.3 16.3-16.3 16.3l-56.4-0.1c-8.6 0-15.6-7-15.6-15.6L0.6 27.8c0-9 7.3-16.3 16.3-16.3l41.1-0.1v6.1L17 17.5c-5.7 0-10.4 4.6-10.4 10.4L6.5 83.3z'/%3E%3C/svg%3E");
|
|
18
|
+
mask-repeat: no-repeat;
|
|
23
19
|
width: 10px;
|
|
24
20
|
height: 10px;
|
|
25
|
-
background-repeat: no-repeat;
|
|
26
21
|
top: 50%;
|
|
27
22
|
right: -15px;
|
|
28
23
|
transform: translateY(-50%);
|
package/src/utils/isUrl.ts
CHANGED
|
@@ -12,16 +12,16 @@ const nonLocalhostDomainRE = /^[^\s.]+\.\S{2,}$/;
|
|
|
12
12
|
/**
|
|
13
13
|
* Loosely validate a URL `string`.
|
|
14
14
|
*
|
|
15
|
-
* @param {String}
|
|
15
|
+
* @param {String} input
|
|
16
16
|
* @return {Boolean}
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
export function isUrl(
|
|
20
|
-
if (typeof
|
|
19
|
+
export function isUrl(input: unknown): boolean {
|
|
20
|
+
if (typeof input !== 'string') {
|
|
21
21
|
return false;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
const match =
|
|
24
|
+
const match = input.match(protocolAndDomainRE);
|
|
25
25
|
if (!match) {
|
|
26
26
|
return false;
|
|
27
27
|
}
|
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);
|