@redocly/theme 0.1.8 → 0.1.11
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 +6 -5
- package/Footer/FooterColumn.d.ts +1 -1
- package/Footer/FooterColumn.js +8 -7
- package/Footer/FooterColumns.d.ts +3 -3
- package/Footer/FooterColumns.js +4 -4
- package/Footer/FooterCopyright.d.ts +3 -3
- package/Footer/FooterCopyright.js +3 -2
- package/Footer/index.d.ts +4 -4
- package/Footer/index.js +17 -11
- 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/PageLayout.d.ts +1 -1
- package/Layout/PageLayout.js +2 -1
- package/Layout/RootLayout.d.ts +1 -1
- package/Layout/RootLayout.js +2 -1
- package/Layout/index.d.ts +2 -2
- package/Layout/index.js +15 -7
- package/Markdown/{Admonition/Admonition.d.ts → Admonition.d.ts} +0 -0
- package/Markdown/{Admonition/Admonition.js → Admonition.js} +5 -5
- package/Markdown/CodeSample/index.d.ts +3 -0
- package/Markdown/CodeSample/index.js +19 -0
- package/Markdown/{Heading/Heading.d.ts → Heading.d.ts} +0 -0
- package/Markdown/{Heading/Heading.js → Heading.js} +1 -1
- package/Markdown/MarkdownLayout.d.ts +2 -2
- package/Markdown/{Mermaid/Mermaid.d.ts → Mermaid.d.ts} +0 -0
- package/Markdown/{Mermaid/Mermaid.js → Mermaid.js} +0 -0
- package/Markdown/StyledMarkdown.js +2 -2
- package/Markdown/Tabs/index.d.ts +2 -0
- package/Markdown/Tabs/index.js +18 -0
- package/Markdown/index.d.ts +9 -0
- package/Markdown/index.js +25 -0
- package/Navbar/Navbar.d.ts +1 -2
- package/Navbar/Navbar.js +3 -3
- package/Navbar/NavbarItem.d.ts +1 -1
- package/Navbar/NavbarItem.js +3 -3
- package/Navbar/NavbarMenu.d.ts +1 -1
- package/Navbar/NavbarMenu.js +5 -4
- 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/NavbarLogo/index.js +17 -0
- 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 +1 -1
- package/Search/Parameters.js +2 -2
- package/Search/SearchIcon.js +1 -1
- package/Search/SearchItem.js +2 -2
- package/Search/index.d.ts +9 -0
- package/Search/index.js +25 -0
- package/Search/utils.js +1 -1
- package/Sidebar/ApiCallItem.d.ts +2 -2
- package/Sidebar/ApiCallItem.js +6 -6
- package/Sidebar/ArrowBack.d.ts +1 -2
- package/Sidebar/ArrowBack.js +2 -1
- package/Sidebar/BackButton.d.ts +1 -1
- package/Sidebar/BackButton.js +5 -4
- package/Sidebar/Drilldown.d.ts +2 -2
- package/Sidebar/Drilldown.js +8 -7
- package/Sidebar/DrilldownMenu.d.ts +2 -2
- package/Sidebar/DrilldownMenu.js +5 -7
- package/Sidebar/DrilldownMenuItem.d.ts +2 -2
- package/Sidebar/DrilldownMenuItem.js +5 -4
- package/Sidebar/ExternalIcon.d.ts +1 -2
- package/Sidebar/ExternalIcon.js +2 -1
- package/Sidebar/Menu.d.ts +1 -2
- package/Sidebar/Menu.js +3 -2
- package/Sidebar/MenuContainer.d.ts +1 -2
- package/Sidebar/MenuContainer.js +2 -1
- package/Sidebar/MenuGroup.d.ts +1 -1
- package/Sidebar/MenuGroup.js +6 -6
- package/Sidebar/MenuItem.d.ts +2 -2
- package/Sidebar/MenuItem.js +7 -6
- package/Sidebar/MenuItemLabel.d.ts +1 -2
- package/Sidebar/MenuItemLabel.js +4 -3
- package/Sidebar/MenuLink.d.ts +1 -2
- package/Sidebar/MenuLink.js +3 -2
- package/Sidebar/MenuLinkItem.d.ts +2 -2
- package/Sidebar/MenuLinkItem.js +4 -3
- package/Sidebar/MobileSidebarButton.d.ts +1 -2
- package/Sidebar/MobileSidebarButton.js +3 -2
- package/Sidebar/Separator.d.ts +2 -2
- package/Sidebar/Separator.js +5 -4
- package/Sidebar/SeparatorItem.d.ts +1 -2
- package/Sidebar/SeparatorItem.js +3 -2
- package/Sidebar/SeparatorLine.d.ts +1 -2
- package/Sidebar/SeparatorLine.js +2 -1
- package/Sidebar/Sidebar.d.ts +2 -2
- package/Sidebar/Sidebar.js +3 -2
- package/Sidebar/SidebarLayout.d.ts +1 -1
- package/Sidebar/SidebarLayout.js +6 -5
- package/Sidebar/index.d.ts +19 -0
- package/Sidebar/index.js +35 -0
- package/Sidebar/types/DrilldownMenuProps.d.ts +2 -2
- package/Sidebar/types/ItemState.d.ts +2 -3
- package/Sidebar/types/MenuItemProps.d.ts +2 -2
- package/Sidebar/types/NavItem.d.ts +1 -1
- package/Sidebar/types/index.d.ts +5 -0
- package/Sidebar/types/index.js +21 -0
- 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.d.ts +1 -1
- package/TableOfContent/TableOfContent.js +9 -9
- package/TableOfContent/index.d.ts +1 -0
- package/TableOfContent/index.js +17 -0
- package/Tooltip/index.d.ts +1 -1
- package/Tooltip/index.js +1 -1
- package/globalStyle.d.ts +1 -0
- package/globalStyle.js +7 -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/index.d.ts +1 -0
- package/index.js +1 -0
- package/mocks/Link.js +4 -1
- package/mocks/hooks/usePageData.js +4 -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/DesignTokens/borders.stories.mdx +20 -0
- package/src/DesignTokens/colors.stories.mdx +24 -0
- package/src/DesignTokens/page-layout.stories.mdx +12 -0
- package/src/DesignTokens/tokens-generated.scss +610 -0
- package/src/DesignTokens/typography.stories.mdx +36 -0
- package/src/Footer/Footer.stories.tsx +57 -0
- package/src/Footer/Footer.tsx +7 -10
- package/src/Footer/FooterColumn.tsx +8 -8
- package/src/Footer/FooterColumns.tsx +5 -3
- package/src/Footer/FooterCopyright.tsx +6 -4
- 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 -0
- 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/PageLayout.tsx +1 -1
- package/src/Layout/RootLayout.tsx +1 -1
- 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 -0
- package/src/Markdown/{Admonition/Admonition.tsx → Admonition.tsx} +15 -15
- package/src/Markdown/CodeSample/index.ts +3 -0
- package/src/Markdown/{Heading/Heading.tsx → Heading.tsx} +4 -1
- package/src/Markdown/MarkdownLayout.tsx +2 -2
- package/src/Markdown/{Mermaid/Mermaid.tsx → Mermaid.tsx} +0 -0
- package/src/Markdown/StyledMarkdown.tsx +27 -27
- package/src/Markdown/Tabs/index.ts +2 -0
- package/src/Markdown/index.ts +9 -0
- package/src/Navbar/Navbar.stories.tsx +10 -6
- package/src/Navbar/Navbar.tsx +3 -4
- package/src/Navbar/NavbarItem.tsx +2 -2
- package/src/Navbar/NavbarMenu.tsx +3 -3
- package/src/Navbar/__tests__/Navbar.test.tsx +55 -0
- package/src/Navbar/__tests__/__snapshots__/Navbar.test.tsx.snap +256 -0
- 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/PageNavigation.stories.tsx +21 -0
- package/src/PageNavigation/__tests__/NextPageLink.test.tsx +29 -0
- package/src/PageNavigation/__tests__/PageNavigation.test.tsx +54 -0
- package/src/PageNavigation/__tests__/PreviousPageLink.test.tsx +29 -0
- package/src/PageNavigation/__tests__/__snapshots__/NextPageLink.test.tsx.snap +67 -0
- package/src/PageNavigation/__tests__/__snapshots__/PageNavigation.test.tsx.snap +275 -0
- package/src/PageNavigation/__tests__/__snapshots__/PreviousPageLink.test.tsx.snap +67 -0
- 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/ClearIcon.tsx +11 -12
- package/src/Search/Parameters.tsx +2 -2
- package/src/Search/SearchIcon.tsx +11 -12
- package/src/Search/SearchItem.tsx +2 -2
- package/src/Search/__tests__/Input.test.tsx +13 -0
- package/src/Search/__tests__/__snapshots__/Input.test.tsx.snap +36 -0
- package/src/Search/index.ts +9 -0
- package/src/Search/utils.tsx +1 -1
- package/src/Sidebar/ApiCallItem.tsx +5 -5
- package/src/Sidebar/ArrowBack.tsx +1 -1
- package/src/Sidebar/BackButton.tsx +4 -4
- package/src/Sidebar/Drilldown.tsx +6 -6
- package/src/Sidebar/DrilldownMenu.tsx +4 -4
- package/src/Sidebar/DrilldownMenuItem.tsx +6 -6
- package/src/Sidebar/ExternalIcon.tsx +1 -1
- package/src/Sidebar/Menu.tsx +2 -2
- package/src/Sidebar/MenuContainer.tsx +1 -1
- package/src/Sidebar/MenuGroup.tsx +5 -5
- package/src/Sidebar/MenuItem.tsx +6 -6
- package/src/Sidebar/MenuItemLabel.tsx +5 -5
- package/src/Sidebar/MenuLink.tsx +2 -2
- package/src/Sidebar/MenuLinkItem.tsx +3 -3
- package/src/Sidebar/MobileSidebarButton.tsx +3 -3
- package/src/Sidebar/Separator.tsx +4 -4
- package/src/Sidebar/SeparatorItem.tsx +2 -2
- package/src/Sidebar/SeparatorLine.tsx +1 -1
- package/src/Sidebar/Sidebar.tsx +2 -2
- package/src/Sidebar/SidebarLayout.tsx +4 -4
- package/src/Sidebar/index.ts +19 -0
- package/src/Sidebar/types/DrilldownMenuProps.ts +2 -2
- package/src/Sidebar/types/ItemState.ts +2 -4
- package/src/Sidebar/types/MenuItemProps.ts +2 -2
- package/src/Sidebar/types/NavItem.ts +1 -1
- package/src/Sidebar/types/index.ts +5 -0
- 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.stories.tsx +37 -0
- package/src/TableOfContent/TableOfContent.tsx +13 -11
- package/src/TableOfContent/__tests__/TableOfContent.test.tsx +61 -0
- package/src/TableOfContent/__tests__/__snapshots__/TableOfContent.test.tsx.snap +153 -0
- package/src/TableOfContent/index.ts +1 -0
- 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 +333 -144
- 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/index.ts +1 -0
- 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/{Arrow/Arrow.tsx → Arrow.tsx} +0 -0
- package/src/ui/Background.tsx +3 -3
- package/src/ui/Dropdown.tsx +5 -5
- 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 -0
- package/src/ui/Typography.tsx +22 -22
- package/src/ui/UniversalLink.tsx +2 -2
- package/src/ui/index.tsx +8 -3
- package/src/utils/isUrl.ts +1 -1
- package/src/utils/replaceHashInColor.ts +1 -1
- package/ui/AlertIcon.d.ts +3 -2
- package/ui/AlertIcon.js +2 -2
- package/ui/{Arrow/Arrow.d.ts → Arrow.d.ts} +0 -0
- package/ui/{Arrow/Arrow.js → Arrow.js} +0 -0
- package/ui/Background.js +1 -1
- package/ui/Dropdown.d.ts +1 -1
- package/ui/Dropdown.js +5 -4
- 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 -0
- package/ui/Tiles/index.js +20 -0
- package/ui/Typography.js +20 -20
- package/ui/UniversalLink.js +4 -4
- package/ui/index.d.ts +7 -3
- package/ui/index.js +7 -3
- package/utils/isUrl.d.ts +1 -1
- package/utils/isUrl.js +2 -1
- package/utils/replaceHashInColor.d.ts +1 -1
- package/utils/replaceHashInColor.js +2 -1
- package/Logo/Logo.d.ts +0 -5
- package/src/Footer/index.tsx +0 -4
- package/src/Introduction.stories.mdx +0 -7
- package/src/Layout/index.tsx +0 -2
- package/src/Logo/Logo.tsx +0 -17
- 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/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) {
|
package/ui/UniversalLink.js
CHANGED
|
@@ -22,12 +22,12 @@ exports.UniversalLink = exports.withPropsFilter = void 0;
|
|
|
22
22
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
23
23
|
var react_router_dom_1 = require("react-router-dom");
|
|
24
24
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
25
|
-
var isUrl_1 =
|
|
26
|
-
var replaceHashInColor_1 =
|
|
25
|
+
var isUrl_1 = require("../utils/isUrl");
|
|
26
|
+
var replaceHashInColor_1 = require("../utils/replaceHashInColor");
|
|
27
27
|
var Link_1 = require("../mocks/Link");
|
|
28
28
|
var StyledExternalLink = styled_components_1.default.a(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n &.external-url {\n position: relative;\n\n :after {\n content: '';\n display: inline-block;\n position: absolute;\n background-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 fill='", "' 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\");\n width: 10px;\n height: 10px;\n background-repeat: no-repeat;\n top: 50%;\n right: -15px;\n transform: translateY(-50%);\n }\n }\n"], ["\n &.external-url {\n position: relative;\n\n :after {\n content: '';\n display: inline-block;\n position: absolute;\n background-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 fill='", "' 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\");\n width: 10px;\n height: 10px;\n background-repeat: no-repeat;\n top: 50%;\n right: -15px;\n transform: translateY(-50%);\n }\n }\n"])), function (_a) {
|
|
29
29
|
var theme = _a.theme;
|
|
30
|
-
return (0, replaceHashInColor_1.
|
|
30
|
+
return (0, replaceHashInColor_1.replaceHashInColor)(theme.colors.text.primary);
|
|
31
31
|
});
|
|
32
32
|
// TODO: We're using our own Link component so probably filtering is not necessary here.
|
|
33
33
|
// filter out unnecessary props
|
|
@@ -56,7 +56,7 @@ var withPropsFilter = function (filterList) { return function (WrappedComponent)
|
|
|
56
56
|
exports.withPropsFilter = withPropsFilter;
|
|
57
57
|
exports.UniversalLink = (0, exports.withPropsFilter)(propsList)(function (props) {
|
|
58
58
|
var _a;
|
|
59
|
-
return (typeof props.to === 'string' && ((0, isUrl_1.
|
|
59
|
+
return (typeof props.to === 'string' && ((0, isUrl_1.isUrl)(props.to) || props.to.startsWith('mailto:'))) ||
|
|
60
60
|
props.external ? ((0, jsx_runtime_1.jsx)(StyledExternalLink, __assign({ style: props.style, href: props.to, target: props.target || (props.external && '_blank') || '_self', className: "".concat(props.external ? 'external-url' : '', " ").concat(props.className), rel: props.rel, "data-cy": "universalLink-".concat(typeof props.children === 'string' ? props.children : 'with-nested-jsx') }, { children: props.children }))) : props.to == null ? ((0, jsx_runtime_1.jsx)("a", __assign({ onClick: props.onClick, className: props.className, style: props.style }, { children: props.children }))) : ((0, jsx_runtime_1.jsx)(Link_1.Link, __assign({}, props, { to: props.to, state: __assign({ previousPath: (_a = (0, react_router_dom_1.useLocation)()) === null || _a === void 0 ? void 0 : _a.pathname }, props.state) })));
|
|
61
61
|
});
|
|
62
62
|
var templateObject_1;
|
package/ui/index.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export * from '../ui/
|
|
2
|
+
export * from '../ui/Tiles';
|
|
3
|
+
export * from '../ui/AlertIcon';
|
|
4
|
+
export * from '../ui/Arrow';
|
|
5
|
+
export * from '../ui/Background';
|
|
3
6
|
export * from '../ui/Box';
|
|
7
|
+
export * from '../ui/Button';
|
|
8
|
+
export * from '../ui/Dropdown';
|
|
4
9
|
export * from '../ui/Flex';
|
|
5
10
|
export * from '../ui/Jumbotron';
|
|
6
11
|
export * from '../ui/Typography';
|
|
7
|
-
export * from '../ui/
|
|
8
|
-
export * from '../ui/Tiles/ThinTile';
|
|
12
|
+
export * from '../ui/UniversalLink';
|
|
9
13
|
export declare const LandingLayout: ({ children }: React.PropsWithChildren<object>) => React.ReactNode;
|
|
10
14
|
export declare const EmptyLayout: ({ children }: React.PropsWithChildren<object>) => React.ReactNode;
|
package/ui/index.js
CHANGED
|
@@ -15,13 +15,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.EmptyLayout = exports.LandingLayout = void 0;
|
|
18
|
-
__exportStar(require("../ui/
|
|
18
|
+
__exportStar(require("../ui/Tiles"), exports);
|
|
19
|
+
__exportStar(require("../ui/AlertIcon"), exports);
|
|
20
|
+
__exportStar(require("../ui/Arrow"), exports);
|
|
21
|
+
__exportStar(require("../ui/Background"), exports);
|
|
19
22
|
__exportStar(require("../ui/Box"), exports);
|
|
23
|
+
__exportStar(require("../ui/Button"), exports);
|
|
24
|
+
__exportStar(require("../ui/Dropdown"), exports);
|
|
20
25
|
__exportStar(require("../ui/Flex"), exports);
|
|
21
26
|
__exportStar(require("../ui/Jumbotron"), exports);
|
|
22
27
|
__exportStar(require("../ui/Typography"), exports);
|
|
23
|
-
__exportStar(require("../ui/
|
|
24
|
-
__exportStar(require("../ui/Tiles/ThinTile"), exports);
|
|
28
|
+
__exportStar(require("../ui/UniversalLink"), exports);
|
|
25
29
|
var LandingLayout = function (_a) {
|
|
26
30
|
var children = _a.children;
|
|
27
31
|
return children;
|
package/utils/isUrl.d.ts
CHANGED
package/utils/isUrl.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Use two levels of REs to avoid REDOS.
|
|
6
6
|
*/
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.isUrl = void 0;
|
|
8
9
|
var protocolAndDomainRE = /^(?:\w+:)?\/\/(\S+)$/;
|
|
9
10
|
var localhostDomainRE = /^localhost[:?\d]*(?:[^:?\d]\S*)?$/;
|
|
10
11
|
var nonLocalhostDomainRE = /^[^\s.]+\.\S{2,}$/;
|
|
@@ -32,4 +33,4 @@ function isUrl(string) {
|
|
|
32
33
|
}
|
|
33
34
|
return false;
|
|
34
35
|
}
|
|
35
|
-
exports.
|
|
36
|
+
exports.isUrl = isUrl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function replaceHashInColor(color: string): string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.replaceHashInColor = void 0;
|
|
3
4
|
function replaceHashInColor(color) {
|
|
4
5
|
return color.replace('#', '%23');
|
|
5
6
|
}
|
|
6
|
-
exports.
|
|
7
|
+
exports.replaceHashInColor = replaceHashInColor;
|
package/Logo/Logo.d.ts
DELETED
package/src/Footer/index.tsx
DELETED
package/src/Layout/index.tsx
DELETED
package/src/Logo/Logo.tsx
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
|
|
4
|
-
import { Link } from '@portal/Link';
|
|
5
|
-
import { LogoConfig } from '@theme/types/portal';
|
|
6
|
-
|
|
7
|
-
export function Logo({ logo }: { logo: LogoConfig }): JSX.Element | null {
|
|
8
|
-
const img = <NavLogo src={logo.image} alt={logo.altText} data-component-name="Logo/Logo" />;
|
|
9
|
-
return logo?.image ? logo.link ? <Link to={logo.link}>{img}</Link> : img : null;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const NavLogo = styled.img`
|
|
13
|
-
max-width: var(--logo-max-width);
|
|
14
|
-
max-height: var(--logo-max-height);
|
|
15
|
-
height: var(--logo-height);
|
|
16
|
-
margin: var(--logo-margin);
|
|
17
|
-
`;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Page, Store } from '../store.js';
|
|
2
|
-
import type { ResolvedNavItem, NavItem, RawNavItem } from '../../shared/types.js';
|
|
3
|
-
export declare function normalizeItems(items: RawNavItem[]): NavItem[];
|
|
4
|
-
export declare function resolveVersionItems(
|
|
5
|
-
items: RawNavItem[],
|
|
6
|
-
store: Store,
|
|
7
|
-
versions?: any,
|
|
8
|
-
): RawNavItem[];
|
|
9
|
-
export declare function resolvePage(pagePath: string, fromFile: string, store: Store): Page;
|
|
10
|
-
export declare function resolveItems(
|
|
11
|
-
items: NavItem[],
|
|
12
|
-
fromFile: string,
|
|
13
|
-
store: Store,
|
|
14
|
-
): Promise<ResolvedNavItem[]>;
|
|
15
|
-
export declare function resolveItem(
|
|
16
|
-
item: NavItem,
|
|
17
|
-
fromFile: string,
|
|
18
|
-
store: Store,
|
|
19
|
-
): Promise<ResolvedNavItem | ResolvedNavItem[]>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { NavItem, RawNavItem, ResolvedNavItem } from '../../../shared/types.js';
|
|
2
|
-
import { Page, Store } from '../../store.js';
|
|
3
|
-
import { Watcher } from '../../utils/index.js';
|
|
4
|
-
export declare function sidebarsPlugin(watcher: Watcher, store: Store): void;
|
|
5
|
-
export declare class Sidebar {
|
|
6
|
-
absolutePath: string;
|
|
7
|
-
id: string;
|
|
8
|
-
store: Store;
|
|
9
|
-
hash: string;
|
|
10
|
-
dirname: string;
|
|
11
|
-
items: NavItem[];
|
|
12
|
-
constructor(absolutePath: string, items: RawNavItem[], id: string, store: Store);
|
|
13
|
-
resolve(): Promise<ResolvedNavItem[]>;
|
|
14
|
-
getDependentPages(): Set<Page>;
|
|
15
|
-
private collectDependentPages;
|
|
16
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { AllFilesType } from './types.js';
|
|
2
|
-
import { Watcher } from '../../utils/index.js';
|
|
3
|
-
import type { Store } from '../../store.js';
|
|
4
|
-
export declare function allFilesPaths(): AllFilesType;
|
|
5
|
-
export declare const existingVersionPages: Set<string>;
|
|
6
|
-
export declare function initVersionPlugin(
|
|
7
|
-
contentDir: string,
|
|
8
|
-
store: Store,
|
|
9
|
-
allFiles: AllFilesType,
|
|
10
|
-
): void;
|
|
11
|
-
export declare function versionsPlugin(
|
|
12
|
-
watcher: Watcher,
|
|
13
|
-
store: Store,
|
|
14
|
-
allFiles: AllFilesType,
|
|
15
|
-
): void;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare type Version = {
|
|
2
|
-
version: string;
|
|
3
|
-
label: string;
|
|
4
|
-
link: string;
|
|
5
|
-
default: boolean;
|
|
6
|
-
active: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare type VersionConfigItem = {
|
|
9
|
-
version: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
};
|
|
12
|
-
export declare type VersionsConfigType = {
|
|
13
|
-
versions: VersionConfigItem[];
|
|
14
|
-
default?: string;
|
|
15
|
-
missingBehavior?: string;
|
|
16
|
-
};
|
|
17
|
-
export declare type AllFilesType = {
|
|
18
|
-
addPath: (path: string) => string[];
|
|
19
|
-
addPaths: (paths: string[]) => void;
|
|
20
|
-
removePath: (path: string) => void;
|
|
21
|
-
getAll: () => string[];
|
|
22
|
-
hasPath: (path: string) => void;
|
|
23
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Version, VersionsConfigType } from './types.js';
|
|
2
|
-
export declare function getVersionConfigByBasePath(
|
|
3
|
-
versionsConfigMap: Map<string, VersionsConfigType>,
|
|
4
|
-
basePath: string,
|
|
5
|
-
): VersionsConfigType | null;
|
|
6
|
-
export declare function getPageVersions(
|
|
7
|
-
pathname: string,
|
|
8
|
-
currentVersion: string,
|
|
9
|
-
versionsConfig: VersionsConfigType,
|
|
10
|
-
): Version[];
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import * as chokidar from 'chokidar';
|
|
3
|
-
import * as fs from 'fs';
|
|
4
|
-
declare type WatchCb = (event: 'add' | 'change' | 'unlink', path: string, stats?: fs.Stats) => void;
|
|
5
|
-
export declare class Watcher {
|
|
6
|
-
cwd: string;
|
|
7
|
-
private _readyPromise;
|
|
8
|
-
private listeners;
|
|
9
|
-
constructor(cwd: string);
|
|
10
|
-
watch(test: RegExp, cb: WatchCb): void;
|
|
11
|
-
emit(event: 'add' | 'change' | 'unlink', path: string, stats?: fs.Stats): void;
|
|
12
|
-
stop(): Promise<void>;
|
|
13
|
-
start(): void;
|
|
14
|
-
ready(): Promise<chokidar.FSWatcher>;
|
|
15
|
-
}
|
|
16
|
-
export {};
|