@redocly/theme 0.1.6 → 0.1.9
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/Footer/Footer.d.ts +3 -0
- package/Footer/Footer.js +35 -0
- package/Footer/FooterColumn.d.ts +7 -0
- package/Footer/FooterColumn.js +39 -0
- package/Footer/FooterColumns.d.ts +7 -0
- package/Footer/FooterColumns.js +44 -0
- package/Footer/FooterCopyright.d.ts +5 -0
- package/Footer/FooterCopyright.js +30 -0
- package/Footer/index.d.ts +4 -0
- package/Footer/index.js +20 -0
- package/JsonViewer/JsonViewer.js +1 -1
- package/JsonViewer/index.d.ts +1 -0
- package/JsonViewer/index.js +1 -0
- package/Layout/PageLayout.d.ts +6 -0
- package/Layout/PageLayout.js +31 -0
- package/Layout/RootLayout.d.ts +7 -0
- package/Layout/RootLayout.js +32 -0
- package/Layout/index.d.ts +2 -0
- package/Layout/index.js +18 -0
- package/Logo/Logo.d.ts +1 -6
- package/Logo/index.d.ts +1 -0
- package/Logo/index.js +17 -0
- package/Markdown/Admonition.d.ts +9 -0
- package/Markdown/Admonition.js +39 -0
- package/Markdown/CodeSample/CodeSample.d.ts +8 -0
- package/Markdown/CodeSample/CodeSample.js +30 -0
- package/Markdown/CodeSample/index.d.ts +3 -0
- package/Markdown/CodeSample/index.js +19 -0
- package/Markdown/CodeSample/styled.d.ts +5 -0
- package/Markdown/CodeSample/styled.js +109 -0
- package/Markdown/CodeSample/types.d.ts +9 -0
- package/Markdown/CodeSample/types.js +2 -0
- package/Markdown/ContentWrapper.d.ts +5 -0
- package/Markdown/ContentWrapper.js +21 -0
- package/Markdown/Heading.d.ts +5 -0
- package/Markdown/Heading.js +23 -0
- package/Markdown/MarkdownLayout.d.ts +7 -0
- package/Markdown/MarkdownLayout.js +23 -0
- package/Markdown/Mermaid.d.ts +6 -0
- package/Markdown/Mermaid.js +19 -0
- package/Markdown/PageWrapper.d.ts +3 -0
- package/Markdown/PageWrapper.js +15 -0
- package/Markdown/StyledMarkdown.d.ts +8 -0
- package/Markdown/StyledMarkdown.js +54 -0
- package/Markdown/Tabs/Tab.d.ts +8 -0
- package/Markdown/Tabs/Tab.js +35 -0
- package/Markdown/Tabs/Tabs.d.ts +10 -0
- package/Markdown/Tabs/Tabs.js +43 -0
- 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 +2 -1
- package/Navbar/Navbar.js +9 -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 +8 -4
- package/OperationBadge/OperationBadge.d.ts +5 -0
- package/OperationBadge/OperationBadge.js +15 -0
- package/OperationBadge/index.d.ts +1 -0
- package/OperationBadge/index.js +17 -0
- package/PageNavigation/NextPageLink.d.ts +2 -0
- package/PageNavigation/NextPageLink.js +25 -0
- package/PageNavigation/PageNavigation.d.ts +2 -0
- package/PageNavigation/PageNavigation.js +31 -0
- package/PageNavigation/PreviousPageLink.d.ts +2 -0
- package/PageNavigation/PreviousPageLink.js +25 -0
- package/Panel/CodePanel.js +6 -6
- package/Panel/ContentPanel.js +4 -4
- package/Panel/Panel.d.ts +1 -1
- package/Panel/Panel.js +3 -3
- package/Panel/PanelComponent.d.ts +1 -1
- package/Panel/PanelComponent.js +3 -3
- package/Panel/index.d.ts +1 -0
- package/Panel/index.js +1 -0
- package/Search/Autocomplete.d.ts +13 -0
- package/Search/Autocomplete.js +79 -0
- package/Search/ClearIcon.d.ts +2 -0
- package/Search/ClearIcon.js +29 -0
- package/Search/Input.d.ts +3 -0
- package/Search/Input.js +15 -0
- package/Search/Parameters.d.ts +7 -0
- package/Search/Parameters.js +42 -0
- package/Search/Popover.d.ts +3 -0
- package/Search/Popover.js +15 -0
- package/Search/Search.d.ts +2 -0
- package/Search/Search.js +39 -0
- package/Search/SearchIcon.d.ts +2 -0
- package/Search/SearchIcon.js +29 -0
- package/Search/SearchItem.d.ts +7 -0
- package/Search/SearchItem.js +47 -0
- package/Search/index.d.ts +9 -0
- package/Search/index.js +25 -0
- package/Search/utils.d.ts +2 -0
- package/Search/utils.js +21 -0
- package/Sidebar/ApiCallItem.d.ts +8 -0
- package/Sidebar/ApiCallItem.js +35 -0
- package/Sidebar/ArrowBack.d.ts +4 -0
- package/Sidebar/ArrowBack.js +29 -0
- package/Sidebar/BackButton.d.ts +6 -0
- package/Sidebar/BackButton.js +31 -0
- package/Sidebar/Drilldown.d.ts +8 -0
- package/Sidebar/Drilldown.js +46 -0
- package/Sidebar/DrilldownMenu.d.ts +3 -0
- package/Sidebar/DrilldownMenu.js +55 -0
- package/Sidebar/DrilldownMenuItem.d.ts +3 -0
- package/Sidebar/DrilldownMenuItem.js +32 -0
- package/Sidebar/ExternalIcon.d.ts +4 -0
- package/Sidebar/ExternalIcon.js +29 -0
- package/Sidebar/Menu.d.ts +3 -0
- package/Sidebar/Menu.js +15 -0
- package/Sidebar/MenuContainer.d.ts +1 -0
- package/Sidebar/MenuContainer.js +13 -0
- package/Sidebar/MenuGroup.d.ts +9 -0
- package/Sidebar/MenuGroup.js +37 -0
- package/Sidebar/MenuItem.d.ts +3 -0
- package/Sidebar/MenuItem.js +34 -0
- package/Sidebar/MenuItemLabel.d.ts +5 -0
- package/Sidebar/MenuItemLabel.js +19 -0
- package/Sidebar/MenuLink.d.ts +5 -0
- package/Sidebar/MenuLink.js +16 -0
- package/Sidebar/MenuLinkItem.d.ts +3 -0
- package/Sidebar/MenuLinkItem.js +31 -0
- package/Sidebar/MobileSidebarButton.d.ts +5 -0
- package/Sidebar/MobileSidebarButton.js +21 -0
- package/Sidebar/Separator.d.ts +3 -0
- package/Sidebar/Separator.js +32 -0
- package/Sidebar/SeparatorItem.d.ts +5 -0
- package/Sidebar/SeparatorItem.js +14 -0
- package/Sidebar/SeparatorLine.d.ts +3 -0
- package/Sidebar/SeparatorLine.js +15 -0
- package/Sidebar/Sidebar.d.ts +8 -0
- package/Sidebar/Sidebar.js +24 -0
- package/Sidebar/SidebarLayout.d.ts +7 -0
- package/Sidebar/SidebarLayout.js +36 -0
- package/Sidebar/index.d.ts +19 -0
- package/Sidebar/index.js +35 -0
- package/Sidebar/types/DrilldownMenuProps.d.ts +6 -0
- package/Sidebar/types/DrilldownMenuProps.js +2 -0
- package/Sidebar/types/ItemState.d.ts +8 -0
- package/Sidebar/types/ItemState.js +2 -0
- package/Sidebar/types/MenuItemProps.d.ts +5 -0
- package/Sidebar/types/MenuItemProps.js +2 -0
- package/Sidebar/types/MenuStyle.d.ts +3 -0
- package/Sidebar/types/MenuStyle.js +8 -0
- package/Sidebar/types/NavItem.d.ts +26 -0
- package/Sidebar/types/NavItem.js +2 -0
- package/Sidebar/types/index.d.ts +5 -0
- package/Sidebar/types/index.js +21 -0
- package/SourceCode/SourceCode.js +2 -2
- package/TableOfContent/TableOfContent.d.ts +9 -0
- package/TableOfContent/TableOfContent.js +65 -0
- package/TableOfContent/index.d.ts +1 -0
- package/TableOfContent/index.js +17 -0
- package/globalStyle.js +1 -1
- package/hooks/index.d.ts +4 -0
- package/hooks/index.js +4 -0
- package/hooks/useActiveHeading.d.ts +2 -0
- package/hooks/useActiveHeading.js +34 -0
- package/hooks/useActiveSectionId.d.ts +3 -0
- package/hooks/useActiveSectionId.js +48 -0
- package/hooks/useFullHeight.d.ts +2 -0
- package/hooks/useFullHeight.js +47 -0
- package/hooks/useMobileMenu.d.ts +2 -0
- package/hooks/useMobileMenu.js +13 -0
- package/hooks/useNavbarHeight.d.ts +3 -0
- package/hooks/useNavbarHeight.js +20 -0
- package/icons/ShelfIcon/ShelfIcon.js +2 -2
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/mocks/hooks/usePageData.d.ts +5 -0
- package/mocks/hooks/usePageData.js +7 -0
- package/mocks/models.d.ts +3 -0
- package/mocks/models.js +2 -0
- package/mocks/search.d.ts +22 -0
- package/mocks/search.js +13 -0
- package/mocks/types/index.d.ts +1 -0
- package/mocks/types/index.js +2 -0
- package/mocks/usePreloadHistory.d.ts +3 -0
- package/mocks/usePreloadHistory.js +12 -0
- package/package.json +5 -2
- package/src/Button/Button.stories.tsx +1 -1
- package/src/Button/__tests__/Button.test.tsx +1 -1
- package/src/CodeBlock/__tests__/CodeBlock.test.tsx +1 -1
- package/src/CopyButton/CopyButton.stories.tsx +1 -1
- package/src/CopyButton/CopyButton.tsx +1 -1
- package/src/CopyButton/CopyButtonWrapper.tsx +4 -4
- package/src/CopyButton/__tests__/CopyButton.test.tsx +1 -1
- package/src/CopyButton/__tests__/CopyButtonWrapper.test.tsx +2 -1
- package/src/Footer/Footer.tsx +34 -0
- package/src/Footer/FooterColumn.tsx +62 -0
- package/src/Footer/FooterColumns.tsx +51 -0
- package/src/Footer/FooterCopyright.tsx +26 -0
- package/src/Footer/index.ts +4 -0
- package/src/Headings/Headings.stories.tsx +1 -1
- package/src/Headings/Headings.ts +1 -1
- package/src/Headings/__tests__/Headings.test.tsx +1 -1
- package/src/JsonViewer/JsonViewer.stories.tsx +1 -1
- package/src/JsonViewer/JsonViewer.tsx +6 -7
- package/src/JsonViewer/__tests__/JsonViewer.test.tsx +2 -1
- package/src/JsonViewer/index.ts +1 -0
- package/src/Layout/PageLayout.tsx +34 -0
- package/src/Layout/RootLayout.tsx +24 -0
- package/src/Layout/index.ts +2 -0
- package/src/Logo/Logo.tsx +1 -7
- package/src/Logo/index.ts +1 -0
- package/src/Markdown/Admonition.tsx +64 -0
- package/src/Markdown/CodeSample/CodeSample.tsx +39 -0
- package/src/Markdown/CodeSample/index.ts +3 -0
- package/src/Markdown/CodeSample/styled.ts +289 -0
- package/src/Markdown/CodeSample/types.ts +40 -0
- package/src/Markdown/ContentWrapper.tsx +20 -0
- package/src/Markdown/Heading.tsx +35 -0
- package/src/Markdown/MarkdownLayout.tsx +25 -0
- package/src/Markdown/Mermaid.tsx +23 -0
- package/src/Markdown/PageWrapper.tsx +9 -0
- package/src/Markdown/StyledMarkdown.tsx +312 -0
- package/src/Markdown/Tabs/Tab.tsx +37 -0
- package/src/Markdown/Tabs/Tabs.tsx +45 -0
- package/src/Markdown/Tabs/index.ts +2 -0
- package/src/Markdown/index.ts +9 -0
- package/src/Navbar/Navbar.stories.tsx +3 -13
- package/src/Navbar/Navbar.tsx +20 -26
- package/src/Navbar/NavbarItem.tsx +2 -2
- package/src/Navbar/NavbarMenu.tsx +6 -6
- package/src/OperationBadge/OperationBadge.stories.tsx +35 -0
- package/src/OperationBadge/OperationBadge.ts +59 -0
- package/src/OperationBadge/__tests__/OperationBadge.test.tsx +59 -0
- package/src/OperationBadge/__tests__/__snapshots__/OperationBadge.test.tsx.snap +651 -0
- package/src/OperationBadge/index.ts +1 -0
- package/src/PageNavigation/NextPageLink.tsx +22 -0
- package/src/PageNavigation/PageNavigation.tsx +20 -0
- package/src/PageNavigation/PreviousPageLink.tsx +22 -0
- package/src/Panel/CodePanel.stories.tsx +1 -2
- package/src/Panel/CodePanel.ts +8 -7
- package/src/Panel/ContentPanel.stories.tsx +1 -2
- package/src/Panel/ContentPanel.ts +5 -6
- package/src/Panel/Panel.stories.tsx +1 -3
- package/src/Panel/Panel.ts +3 -3
- package/src/Panel/PanelComponent.tsx +4 -5
- package/src/Panel/__tests__/CodePanel.test.tsx +1 -1
- package/src/Panel/__tests__/ContentPanel.test.tsx +1 -1
- package/src/Panel/__tests__/Panel.test.tsx +1 -2
- package/src/Panel/__tests__/__snapshots__/CodePanel.test.tsx.snap +8 -8
- package/src/Panel/__tests__/__snapshots__/ContentPanel.test.tsx.snap +22 -22
- package/src/Panel/__tests__/__snapshots__/Panel.test.tsx.snap +16 -16
- package/src/Panel/index.ts +1 -0
- package/src/SamplesPanelControls/SamplesControlButton.stories.tsx +1 -1
- package/src/SamplesPanelControls/SamplesPanelControls.ts +1 -1
- package/src/Search/Autocomplete.tsx +128 -0
- package/src/Search/ClearIcon.tsx +31 -0
- package/src/Search/Input.tsx +19 -0
- package/src/Search/Parameters.tsx +62 -0
- package/src/Search/Popover.tsx +20 -0
- package/src/Search/Search.tsx +52 -0
- package/src/Search/SearchIcon.tsx +32 -0
- package/src/Search/SearchItem.tsx +85 -0
- package/src/Search/index.ts +9 -0
- package/src/Search/utils.tsx +19 -0
- package/src/Sidebar/ApiCallItem.tsx +33 -0
- package/src/Sidebar/ArrowBack.tsx +22 -0
- package/src/Sidebar/BackButton.tsx +44 -0
- package/src/Sidebar/Drilldown.tsx +46 -0
- package/src/Sidebar/DrilldownMenu.tsx +58 -0
- package/src/Sidebar/DrilldownMenuItem.tsx +40 -0
- package/src/Sidebar/ExternalIcon.tsx +37 -0
- package/src/Sidebar/Menu.tsx +11 -0
- package/src/Sidebar/MenuContainer.tsx +8 -0
- package/src/Sidebar/MenuGroup.tsx +55 -0
- package/src/Sidebar/MenuItem.tsx +25 -0
- package/src/Sidebar/MenuItemLabel.tsx +41 -0
- package/src/Sidebar/MenuLink.tsx +14 -0
- package/src/Sidebar/MenuLinkItem.tsx +24 -0
- package/src/Sidebar/MobileSidebarButton.tsx +44 -0
- package/src/Sidebar/Separator.tsx +17 -0
- package/src/Sidebar/SeparatorItem.tsx +14 -0
- package/src/Sidebar/SeparatorLine.tsx +9 -0
- package/src/Sidebar/Sidebar.tsx +54 -0
- package/src/Sidebar/SidebarLayout.tsx +30 -0
- package/src/Sidebar/index.ts +19 -0
- package/src/Sidebar/types/DrilldownMenuProps.ts +7 -0
- package/src/Sidebar/types/ItemState.ts +9 -0
- package/src/Sidebar/types/MenuItemProps.ts +6 -0
- package/src/Sidebar/types/MenuStyle.ts +4 -0
- package/src/Sidebar/types/NavItem.ts +27 -0
- package/src/Sidebar/types/index.ts +5 -0
- package/src/SidebarLogo/SidebarLogo.stories.tsx +1 -1
- package/src/SidebarLogo/__tests__/SidebarLogo.test.tsx +1 -1
- package/src/SourceCode/SourceCode.stories.tsx +1 -1
- package/src/SourceCode/SourceCode.tsx +7 -3
- package/src/SourceCode/__tests__/SourceCode.test.tsx +2 -1
- package/src/TableOfContent/TableOfContent.stories.tsx +39 -0
- package/src/TableOfContent/TableOfContent.tsx +112 -0
- package/src/TableOfContent/index.ts +1 -0
- package/src/Tooltip/Tooltip.stories.tsx +1 -1
- package/src/Tooltip/Tooltip.tsx +1 -1
- package/src/Tooltip/__tests__/Tooltip.test.tsx +1 -1
- package/src/globalStyle.ts +10 -73
- package/src/hooks/index.ts +4 -0
- package/src/hooks/useActiveHeading.ts +46 -0
- package/src/hooks/useActiveSectionId.ts +53 -0
- package/src/hooks/useFullHeight.ts +47 -0
- package/src/hooks/useMobileMenu.ts +11 -0
- package/src/hooks/useNavbarHeight.ts +24 -0
- package/src/icons/ShelfIcon/ShelfIcon.stories.tsx +1 -1
- package/src/icons/ShelfIcon/ShelfIcon.tsx +1 -1
- package/src/icons/ShelfIcon/__tests__/ShelfIcon.test.tsx +1 -1
- package/src/index.ts +2 -0
- package/src/mocks/hooks/usePageData.ts +8 -0
- package/src/mocks/models.ts +3 -0
- package/src/mocks/search.ts +31 -0
- package/src/mocks/types/index.ts +1 -0
- package/src/mocks/usePreloadHistory.ts +9 -0
- package/src/types/portal/index.d.ts +6 -0
- package/src/types/portal/src/client/app/Sidebar/types.d.ts +50 -0
- package/src/types/portal/src/client/app/media-css.d.ts +7 -0
- package/src/types/portal/src/client/styling/default.d.ts +407 -0
- package/src/types/portal/src/client/styling/index.d.ts +14 -0
- package/src/types/portal/src/client/styling/resolve.d.ts +1 -0
- package/src/types/portal/src/server/constants.d.ts +11 -0
- package/src/types/portal/src/server/plugins/markdown/types.d.ts +28 -0
- package/src/types/portal/src/server/plugins/nav-utils.d.ts +19 -0
- package/src/types/portal/src/server/plugins/portal-config/types.d.ts +23 -0
- package/src/types/portal/src/server/plugins/sidebars/index.d.ts +16 -0
- package/src/types/portal/src/server/plugins/versions/index.d.ts +15 -0
- package/src/types/portal/src/server/plugins/versions/types.d.ts +23 -0
- package/src/types/portal/src/server/plugins/versions/utils.d.ts +10 -0
- package/src/types/portal/src/server/store.d.ts +101 -0
- package/src/types/portal/src/server/utils/async.d.ts +5 -0
- package/src/types/portal/src/server/utils/crypto.d.ts +3 -0
- package/src/types/portal/src/server/utils/fs.d.ts +3 -0
- package/src/types/portal/src/server/utils/index.d.ts +6 -0
- package/src/types/portal/src/server/utils/paths.d.ts +16 -0
- package/src/types/portal/src/server/utils/reporter/formatter.d.ts +11 -0
- package/src/types/portal/src/server/utils/reporter/reporter.d.ts +17 -0
- package/src/types/portal/src/server/utils/watcher.d.ts +16 -0
- package/src/types/portal/src/server/utils/yaml.d.ts +1 -0
- package/src/types/portal/src/shared/constants.d.ts +8 -0
- package/src/types/portal/src/shared/types.d.ts +77 -0
- package/src/types/portal/src/shared/urls.d.ts +7 -0
- package/src/types/portal/src/shared/utils.d.ts +10 -0
- package/src/ui/AlertIcon.tsx +110 -0
- package/src/ui/Arrow.tsx +36 -0
- package/src/ui/Background.tsx +16 -0
- package/src/ui/Box.tsx +39 -0
- package/src/ui/Button.tsx +19 -0
- package/src/ui/Dropdown.tsx +132 -0
- package/src/ui/Flex.tsx +21 -0
- package/src/ui/Jumbotron.tsx +57 -0
- package/src/ui/Tiles/ThinTile.tsx +151 -0
- package/src/ui/Tiles/TileHeader.ts +13 -0
- package/src/ui/Tiles/TileText.tsx +12 -0
- package/src/ui/Tiles/WideTile.tsx +138 -0
- package/src/ui/Tiles/index.ts +4 -0
- package/src/ui/Typography.tsx +167 -0
- package/src/ui/UniversalLink.tsx +100 -0
- package/src/ui/index.tsx +17 -0
- package/src/utils/__tests__/ClipboardService.test.ts +1 -1
- package/src/utils/__tests__/css-variables.test.ts +1 -1
- package/src/utils/__tests__/highlight.test.ts +1 -1
- package/src/utils/__tests__/jsonToHtml.test.ts +1 -1
- package/src/utils/__tests__/media-css.test.ts +1 -1
- package/src/utils/__tests__/theme-helpers.test.ts +1 -1
- package/src/utils/getNavbarElement.ts +10 -0
- package/src/utils/isUrl.ts +42 -0
- package/src/utils/replaceHashInColor.ts +3 -0
- package/ui/AlertIcon.d.ts +9 -0
- package/ui/AlertIcon.js +45 -0
- package/ui/Arrow.d.ts +7 -0
- package/ui/Arrow.js +42 -0
- package/ui/Background.d.ts +7 -0
- package/ui/Background.js +16 -0
- package/ui/Box.d.ts +6 -0
- package/ui/Box.js +16 -0
- package/ui/Button.d.ts +7 -0
- package/ui/Button.js +27 -0
- package/ui/Dropdown.d.ts +8 -0
- package/ui/Dropdown.js +55 -0
- package/ui/Flex.d.ts +10 -0
- package/ui/Flex.js +31 -0
- package/ui/Jumbotron.d.ts +18 -0
- package/ui/Jumbotron.js +44 -0
- package/ui/Tiles/ThinTile.d.ts +21 -0
- package/ui/Tiles/ThinTile.js +98 -0
- package/ui/Tiles/TileHeader.d.ts +5 -0
- package/ui/Tiles/TileHeader.js +15 -0
- package/ui/Tiles/TileText.d.ts +5 -0
- package/ui/Tiles/TileText.js +15 -0
- package/ui/Tiles/WideTile.d.ts +7 -0
- package/ui/Tiles/WideTile.js +93 -0
- package/ui/Tiles/index.d.ts +4 -0
- package/ui/Tiles/index.js +20 -0
- package/ui/Typography.d.ts +110 -0
- package/ui/Typography.js +137 -0
- package/ui/UniversalLink.d.ts +17 -0
- package/ui/UniversalLink.js +62 -0
- package/ui/index.d.ts +14 -0
- package/ui/index.js +34 -0
- package/utils/getNavbarElement.d.ts +1 -0
- package/utils/getNavbarElement.js +14 -0
- package/utils/isUrl.d.ts +12 -0
- package/utils/isUrl.js +36 -0
- package/utils/replaceHashInColor.d.ts +1 -0
- package/utils/replaceHashInColor.js +7 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __extends = (this && this.__extends) || (function () {
|
|
7
|
+
var extendStatics = function (d, b) {
|
|
8
|
+
extendStatics = Object.setPrototypeOf ||
|
|
9
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
10
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
11
|
+
return extendStatics(d, b);
|
|
12
|
+
};
|
|
13
|
+
return function (d, b) {
|
|
14
|
+
if (typeof b !== "function" && b !== null)
|
|
15
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
16
|
+
extendStatics(d, b);
|
|
17
|
+
function __() { this.constructor = d; }
|
|
18
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
19
|
+
};
|
|
20
|
+
})();
|
|
21
|
+
var __assign = (this && this.__assign) || function () {
|
|
22
|
+
__assign = Object.assign || function(t) {
|
|
23
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
24
|
+
s = arguments[i];
|
|
25
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
26
|
+
t[p] = s[p];
|
|
27
|
+
}
|
|
28
|
+
return t;
|
|
29
|
+
};
|
|
30
|
+
return __assign.apply(this, arguments);
|
|
31
|
+
};
|
|
32
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
33
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
|
+
};
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ThinTile = void 0;
|
|
37
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
var react_1 = require("react");
|
|
39
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
40
|
+
var Link_1 = require("../../mocks/Link");
|
|
41
|
+
var Flex_1 = require("../../ui/Flex");
|
|
42
|
+
var TileText_1 = require("../../ui/Tiles/TileText");
|
|
43
|
+
var TileHeader_1 = require("../../ui/Tiles/TileHeader");
|
|
44
|
+
var ThinTileWrapper = (0, styled_components_1.default)(Link_1.Link)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n box-shadow: 0px 10px 30px 0px rgba(35, 35, 35, 0.1);\n box-sizing: border-box;\n transition: box-shadow 0.25s ease;\n padding: 24px;\n margin-bottom: 20px;\n text-decoration: none;\n width: 100%;\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n\n :hover {\n box-shadow: 0px 10px 100px 0px rgba(35, 35, 35, 0.2);\n }\n\n ", " {\n width: calc(50% - 20px);\n margin-right: 10px;\n margin-left: 10px;\n }\n\n ", " {\n width: 250px;\n }\n\n ", " {\n width: 280px;\n }\n\n &.external-url {\n :after {\n display: none;\n }\n }\n"], ["\n display: flex;\n flex-direction: column;\n border-radius: 10px;\n box-shadow: 0px 10px 30px 0px rgba(35, 35, 35, 0.1);\n box-sizing: border-box;\n transition: box-shadow 0.25s ease;\n padding: 24px;\n margin-bottom: 20px;\n text-decoration: none;\n width: 100%;\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n\n :hover {\n box-shadow: 0px 10px 100px 0px rgba(35, 35, 35, 0.2);\n }\n\n ", " {\n width: calc(50% - 20px);\n margin-right: 10px;\n margin-left: 10px;\n }\n\n ", " {\n width: 250px;\n }\n\n ", " {\n width: 280px;\n }\n\n &.external-url {\n :after {\n display: none;\n }\n }\n"])), function (_a) {
|
|
45
|
+
var bgColor = _a.bgColor;
|
|
46
|
+
return bgColor || '#fff';
|
|
47
|
+
}, function (_a) {
|
|
48
|
+
var bgImage = _a.bgImage;
|
|
49
|
+
return (bgImage ? "url(".concat(bgImage, ")") : 'none');
|
|
50
|
+
}, function (_a) {
|
|
51
|
+
var theme = _a.theme;
|
|
52
|
+
return theme.mediaQueries.small;
|
|
53
|
+
}, function (_a) {
|
|
54
|
+
var theme = _a.theme;
|
|
55
|
+
return theme.mediaQueries.medium;
|
|
56
|
+
}, function (_a) {
|
|
57
|
+
var theme = _a.theme;
|
|
58
|
+
return theme.mediaQueries.large;
|
|
59
|
+
});
|
|
60
|
+
var ThinTileIcon = styled_components_1.default.img(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 90px;\n\n ", " {\n width: 80px;\n }\n"], ["\n width: 90px;\n\n ", " {\n width: 80px;\n }\n"])), function (_a) {
|
|
61
|
+
var theme = _a.theme;
|
|
62
|
+
return theme.mediaQueries.medium;
|
|
63
|
+
});
|
|
64
|
+
var ThinTileHeader = (0, styled_components_1.default)(TileHeader_1.TileHeader)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: 24px;\n text-align: ", ";\n"], ["\n font-size: 24px;\n text-align: ", ";\n"])), function (_a) {
|
|
65
|
+
var align = _a.align;
|
|
66
|
+
return align || 'center';
|
|
67
|
+
});
|
|
68
|
+
var ThinTileText = (0, styled_components_1.default)(TileText_1.TileText)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-size: 18px;\n line-height: 1.5;\n flex-shrink: 0;\n min-height: 3em;\n text-align: ", ";\n ", ";\n ", " {\n min-height: 6em;\n }\n\n ", " {\n min-height: 4.5em;\n }\n"], ["\n font-size: 18px;\n line-height: 1.5;\n flex-shrink: 0;\n min-height: 3em;\n text-align: ", ";\n ", ";\n ", " {\n min-height: 6em;\n }\n\n ", " {\n min-height: 4.5em;\n }\n"])), function (_a) {
|
|
69
|
+
var align = _a.align;
|
|
70
|
+
return align || 'center';
|
|
71
|
+
}, function (_a) {
|
|
72
|
+
var icon = _a.icon;
|
|
73
|
+
return icon
|
|
74
|
+
? "\n display: -webkit-box;\n -webkit-line-clamp: 8;\n -webkit-box-orient: vertical;\n overflow: hidden;\n line-clamp: 8;\n "
|
|
75
|
+
: '';
|
|
76
|
+
}, function (_a) {
|
|
77
|
+
var theme = _a.theme;
|
|
78
|
+
return theme.mediaQueries.small;
|
|
79
|
+
}, function (_a) {
|
|
80
|
+
var theme = _a.theme;
|
|
81
|
+
return theme.mediaQueries.medium;
|
|
82
|
+
});
|
|
83
|
+
var ThinTile = /** @class */ (function (_super) {
|
|
84
|
+
__extends(ThinTile, _super);
|
|
85
|
+
function ThinTile() {
|
|
86
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
87
|
+
}
|
|
88
|
+
ThinTile.prototype.render = function () {
|
|
89
|
+
var _a = this.props, header = _a.header, icon = _a.icon, children = _a.children, to = _a.to, target = _a.target, headerAlign = _a.headerAlign, textAlign = _a.textAlign, color = _a.color, className = _a.className, style = _a.style;
|
|
90
|
+
var Wrapper = to
|
|
91
|
+
? ThinTileWrapper
|
|
92
|
+
: ThinTileWrapper.withComponent('div');
|
|
93
|
+
return ((0, jsx_runtime_1.jsxs)(Wrapper, __assign({ to: to, target: target, color: color, className: className, style: style, "data-component-name": "ui/Tiles/ThinTile" }, { children: [(icon || header) && ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, __assign({ flexDirection: "column" }, { children: [icon && ((0, jsx_runtime_1.jsx)(Flex_1.Flex, __assign({ flexShrink: 0, height: { xs: 'auto', small: '100px', medium: '110px' }, alignItems: "center", justifyContent: "center", mb: "25px" }, { children: (0, jsx_runtime_1.jsx)(ThinTileIcon, { src: icon }) }))), header && ((0, jsx_runtime_1.jsx)(ThinTileHeader, __assign({ align: headerAlign, color: color, "data-cy": "Thin-".concat(header) }, { children: header })))] }))), children && ((0, jsx_runtime_1.jsx)(ThinTileText, __assign({ icon: icon, align: textAlign, color: color }, { children: children })))] })));
|
|
94
|
+
};
|
|
95
|
+
return ThinTile;
|
|
96
|
+
}(react_1.Component));
|
|
97
|
+
exports.ThinTile = ThinTile;
|
|
98
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.TileHeader = void 0;
|
|
11
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
+
exports.TileHeader = styled_components_1.default.h3.attrs(function () { return ({
|
|
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-primary-main)'; });
|
|
15
|
+
var templateObject_1;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.TileText = void 0;
|
|
11
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
+
exports.TileText = styled_components_1.default.span.attrs(function () { return ({
|
|
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-primary);\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-primary);\n"])), function (props) { return props.color || 'var(--color-text-main)'; });
|
|
15
|
+
var templateObject_1;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __extends = (this && this.__extends) || (function () {
|
|
7
|
+
var extendStatics = function (d, b) {
|
|
8
|
+
extendStatics = Object.setPrototypeOf ||
|
|
9
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
10
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
11
|
+
return extendStatics(d, b);
|
|
12
|
+
};
|
|
13
|
+
return function (d, b) {
|
|
14
|
+
if (typeof b !== "function" && b !== null)
|
|
15
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
16
|
+
extendStatics(d, b);
|
|
17
|
+
function __() { this.constructor = d; }
|
|
18
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
19
|
+
};
|
|
20
|
+
})();
|
|
21
|
+
var __assign = (this && this.__assign) || function () {
|
|
22
|
+
__assign = Object.assign || function(t) {
|
|
23
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
24
|
+
s = arguments[i];
|
|
25
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
26
|
+
t[p] = s[p];
|
|
27
|
+
}
|
|
28
|
+
return t;
|
|
29
|
+
};
|
|
30
|
+
return __assign.apply(this, arguments);
|
|
31
|
+
};
|
|
32
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
33
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
|
+
};
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.WideTile = void 0;
|
|
37
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
var react_1 = require("react");
|
|
39
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
40
|
+
var Link_1 = require("../../mocks/Link");
|
|
41
|
+
var TileText_1 = require("../../ui/Tiles/TileText");
|
|
42
|
+
var TileHeader_1 = require("../../ui/Tiles/TileHeader");
|
|
43
|
+
// prettier-ignore
|
|
44
|
+
var WideTileWrapper = (0, styled_components_1.default)(Link_1.Link)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: inline-flex;\n flex-direction: ", ";\n border-radius: 10px;\n box-shadow: 0px 10px 30px 0px rgba(35, 35, 35, 0.1);\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n padding: 24px;\n padding-right: ", ";\n margin-bottom: 32px;\n box-sizing: border-box;\n position: relative;\n text-decoration: none;\n width: 100%;\n transition: box-shadow 0.25s ease;\n :hover {\n box-shadow: 0px 10px 30px 0px rgba(35, 35, 35, 0.2);\n }\n :before {\n content: ", ";\n display: inline-block;\n width: 9px;\n min-height: 18px;\n background-size: 9px 18px;\n background-repeat: no-repeat;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: 30px;\n }\n &.external-url::after {\n content: none;\n }\n \n ", " {\n width: calc(50% - 2em);\n padding: 32px;\n padding-right: ", ";\n flex-direction: row;\n max-width: ", ";\n }\n"], ["\n display: inline-flex;\n flex-direction: ", ";\n border-radius: 10px;\n box-shadow: 0px 10px 30px 0px rgba(35, 35, 35, 0.1);\n background-color: ", ";\n background-image: ", ";\n background-repeat: no-repeat;\n padding: 24px;\n padding-right: ", ";\n margin-bottom: 32px;\n box-sizing: border-box;\n position: relative;\n text-decoration: none;\n width: 100%;\n transition: box-shadow 0.25s ease;\n :hover {\n box-shadow: 0px 10px 30px 0px rgba(35, 35, 35, 0.2);\n }\n :before {\n content: ", ";\n display: inline-block;\n width: 9px;\n min-height: 18px;\n background-size: 9px 18px;\n background-repeat: no-repeat;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n right: 30px;\n }\n &.external-url::after {\n content: none;\n }\n \n ", " {\n width: calc(50% - 2em);\n padding: 32px;\n padding-right: ", ";\n flex-direction: row;\n max-width: ", ";\n }\n"])), function (_a) {
|
|
45
|
+
var withIcon = _a.withIcon;
|
|
46
|
+
return (withIcon ? 'column' : 'row');
|
|
47
|
+
}, function (_a) {
|
|
48
|
+
var bgColor = _a.bgColor;
|
|
49
|
+
return bgColor || '#fff';
|
|
50
|
+
}, function (_a) {
|
|
51
|
+
var bgImage = _a.bgImage;
|
|
52
|
+
return (bgImage ? "url(".concat(bgImage, ")") : 'none');
|
|
53
|
+
}, function (_a) {
|
|
54
|
+
var disableArrow = _a.disableArrow;
|
|
55
|
+
return (disableArrow ? '24px' : '56px');
|
|
56
|
+
}, function (_a) {
|
|
57
|
+
var disableArrow = _a.disableArrow;
|
|
58
|
+
return (disableArrow ? 'none' : '""');
|
|
59
|
+
}, function (_a) {
|
|
60
|
+
var theme = _a.theme;
|
|
61
|
+
return theme.mediaQueries.medium;
|
|
62
|
+
}, function (_a) {
|
|
63
|
+
var disableArrow = _a.disableArrow;
|
|
64
|
+
return (disableArrow ? '32px' : '64px');
|
|
65
|
+
}, function (_a) {
|
|
66
|
+
var maxWidth = _a.maxWidth;
|
|
67
|
+
return maxWidth;
|
|
68
|
+
});
|
|
69
|
+
var WideTileHeader = (0, styled_components_1.default)(TileHeader_1.TileHeader)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-size: 24px;\n text-align: ", ";\n"], ["\n font-size: 24px;\n text-align: ", ";\n"])), function (_a) {
|
|
70
|
+
var align = _a.align;
|
|
71
|
+
return align || 'left';
|
|
72
|
+
});
|
|
73
|
+
var WideTileText = (0, styled_components_1.default)(TileText_1.TileText)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: 18px;\n text-align: ", ";\n"], ["\n font-size: 18px;\n text-align: ", ";\n"])), function (_a) {
|
|
74
|
+
var align = _a.align;
|
|
75
|
+
return align || 'left';
|
|
76
|
+
});
|
|
77
|
+
var WideTileIcon = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-bottom: 24px;\n flex-shrink: 0;\n width: 70px;\n img {\n display: block;\n height: auto;\n max-width: 100%;\n }\n\n ", " {\n margin-right: 24px;\n margin-bottom: 0;\n }\n"], ["\n margin-bottom: 24px;\n flex-shrink: 0;\n width: 70px;\n img {\n display: block;\n height: auto;\n max-width: 100%;\n }\n\n ", " {\n margin-right: 24px;\n margin-bottom: 0;\n }\n"])), function (_a) {
|
|
78
|
+
var theme = _a.theme;
|
|
79
|
+
return theme.mediaQueries.medium;
|
|
80
|
+
});
|
|
81
|
+
var WideTile = /** @class */ (function (_super) {
|
|
82
|
+
__extends(WideTile, _super);
|
|
83
|
+
function WideTile() {
|
|
84
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
85
|
+
}
|
|
86
|
+
WideTile.prototype.render = function () {
|
|
87
|
+
var _a = this.props, to = _a.to, header = _a.header, children = _a.children, target = _a.target, disableArrow = _a.disableArrow, textAlign = _a.textAlign, headerAlign = _a.headerAlign, icon = _a.icon, bgColor = _a.bgColor, bgImage = _a.bgImage, color = _a.color, className = _a.className, style = _a.style, maxWidth = _a.maxWidth;
|
|
88
|
+
return ((0, jsx_runtime_1.jsxs)(WideTileWrapper, __assign({ to: to, target: target, disableArrow: disableArrow, withIcon: !!icon, bgColor: bgColor, bgImage: bgImage, color: color, className: className, style: style, maxWidth: maxWidth, "data-component-name": "ui/Tiles/WideTile" }, { children: [icon && ((0, jsx_runtime_1.jsx)(WideTileIcon, { children: (0, jsx_runtime_1.jsx)("img", { src: icon, alt: "" }) })), (0, jsx_runtime_1.jsxs)("div", { children: [header && ((0, jsx_runtime_1.jsx)(WideTileHeader, __assign({ align: textAlign, color: color, "data-cy": "Wide-".concat(header) }, { children: header }))), children && ((0, jsx_runtime_1.jsx)(WideTileText, __assign({ align: headerAlign, color: color }, { children: children })))] })] })));
|
|
89
|
+
};
|
|
90
|
+
return WideTile;
|
|
91
|
+
}(react_1.Component));
|
|
92
|
+
exports.WideTile = WideTile;
|
|
93
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ThinTile"), exports);
|
|
18
|
+
__exportStar(require("./TileHeader"), exports);
|
|
19
|
+
__exportStar(require("./TileText"), exports);
|
|
20
|
+
__exportStar(require("./WideTile"), exports);
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { SimpleInterpolation } from 'styled-components';
|
|
2
|
+
import { ColorProps, TypographyProps } from 'styled-system';
|
|
3
|
+
export interface ITypography {
|
|
4
|
+
fontSize?: string;
|
|
5
|
+
fontWeight?: string | number;
|
|
6
|
+
fontFamily?: string;
|
|
7
|
+
lineHeight?: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
transform?: string;
|
|
10
|
+
marginTop?: string;
|
|
11
|
+
marginRight?: string;
|
|
12
|
+
marginLeft?: string;
|
|
13
|
+
marginBottom?: string;
|
|
14
|
+
marginVertical?: string;
|
|
15
|
+
marginHorizontal?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const typographyTokens: {
|
|
18
|
+
typography: {
|
|
19
|
+
fontSize: string;
|
|
20
|
+
fontFamily: string;
|
|
21
|
+
lineHeight: string;
|
|
22
|
+
};
|
|
23
|
+
heading1: {
|
|
24
|
+
fontSize: string;
|
|
25
|
+
fontFamily: string;
|
|
26
|
+
fontWeight: string;
|
|
27
|
+
lineHeight: string;
|
|
28
|
+
color: string;
|
|
29
|
+
marginTop: string;
|
|
30
|
+
marginBottom: string;
|
|
31
|
+
};
|
|
32
|
+
heading2: {
|
|
33
|
+
fontSize: string;
|
|
34
|
+
fontFamily: string;
|
|
35
|
+
fontWeight: string;
|
|
36
|
+
lineHeight: string;
|
|
37
|
+
color: string;
|
|
38
|
+
marginTop: string;
|
|
39
|
+
marginBottom: string;
|
|
40
|
+
};
|
|
41
|
+
heading3: {
|
|
42
|
+
fontSize: string;
|
|
43
|
+
fontFamily: string;
|
|
44
|
+
fontWeight: string;
|
|
45
|
+
lineHeight: string;
|
|
46
|
+
color: string;
|
|
47
|
+
marginTop: string;
|
|
48
|
+
marginBottom: string;
|
|
49
|
+
};
|
|
50
|
+
heading4: {};
|
|
51
|
+
heading5: {};
|
|
52
|
+
heading6: {};
|
|
53
|
+
blockquote: {
|
|
54
|
+
color: string;
|
|
55
|
+
};
|
|
56
|
+
alert: {
|
|
57
|
+
fontSize: string;
|
|
58
|
+
fontWeight: string;
|
|
59
|
+
lineHeight: string;
|
|
60
|
+
marginTop: string;
|
|
61
|
+
marginBottom: string;
|
|
62
|
+
heading: {
|
|
63
|
+
fontSize: string;
|
|
64
|
+
fontWeight: string;
|
|
65
|
+
lineHeight: string;
|
|
66
|
+
transform: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
export declare function typography(theme?: ITypography): string | SimpleInterpolation;
|
|
71
|
+
export declare const Emphasis: import("styled-components").StyledComponent<"strong", any, {
|
|
72
|
+
'data-component-name': string;
|
|
73
|
+
}, "data-component-name">;
|
|
74
|
+
export declare const H1: import("styled-components").StyledComponent<"h1", any, {
|
|
75
|
+
'data-component-name': string;
|
|
76
|
+
} & TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & {
|
|
77
|
+
mt?: string | undefined;
|
|
78
|
+
mb?: string | undefined;
|
|
79
|
+
}, "data-component-name">;
|
|
80
|
+
export declare const H2: import("styled-components").StyledComponent<"h1", any, {
|
|
81
|
+
'data-component-name': string;
|
|
82
|
+
} & TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & {
|
|
83
|
+
mt?: string | undefined;
|
|
84
|
+
mb?: string | undefined;
|
|
85
|
+
}, "data-component-name">;
|
|
86
|
+
export declare const H3: import("styled-components").StyledComponent<"h1", any, {
|
|
87
|
+
'data-component-name': string;
|
|
88
|
+
} & TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & {
|
|
89
|
+
mt?: string | undefined;
|
|
90
|
+
mb?: string | undefined;
|
|
91
|
+
}, "data-component-name">;
|
|
92
|
+
export declare const SectionHeader: import("styled-components").StyledComponent<"h2", any, {}, never>;
|
|
93
|
+
export declare const Typography: import("styled-components").StyledComponent<"p", any, {
|
|
94
|
+
'data-component-name': string;
|
|
95
|
+
} & TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
|
|
96
|
+
color?: string | undefined;
|
|
97
|
+
mt?: string | undefined;
|
|
98
|
+
mb?: string | undefined;
|
|
99
|
+
}, "data-component-name">;
|
|
100
|
+
export declare const CompactTypography: import("styled-components").StyledComponent<"p", any, {
|
|
101
|
+
'data-component-name': string;
|
|
102
|
+
} & TypographyProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & {
|
|
103
|
+
color?: string | undefined;
|
|
104
|
+
mt?: string | undefined;
|
|
105
|
+
mb?: string | undefined;
|
|
106
|
+
} & {
|
|
107
|
+
mt: string;
|
|
108
|
+
mb: string;
|
|
109
|
+
'data-component-name': string;
|
|
110
|
+
}, "data-component-name" | "mt" | "mb">;
|
package/ui/Typography.js
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.CompactTypography = exports.Typography = exports.SectionHeader = exports.H3 = exports.H2 = exports.H1 = exports.Emphasis = exports.typography = exports.typographyTokens = void 0;
|
|
31
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
32
|
+
var styled_system_1 = require("styled-system");
|
|
33
|
+
exports.typographyTokens = {
|
|
34
|
+
typography: {
|
|
35
|
+
fontSize: 'var(--font-size-base)',
|
|
36
|
+
fontFamily: 'var(--font-family-h)',
|
|
37
|
+
lineHeight: 'var(--line-height-m)',
|
|
38
|
+
},
|
|
39
|
+
heading1: {
|
|
40
|
+
fontSize: 'var(--h1-font-size)',
|
|
41
|
+
fontFamily: 'var(--font-family-h)',
|
|
42
|
+
fontWeight: 'var(--font-weight-bold)',
|
|
43
|
+
lineHeight: 'var(--h1-line-height)',
|
|
44
|
+
color: 'var(--color-text-main)',
|
|
45
|
+
marginTop: 'var(--h1-margin-top)',
|
|
46
|
+
marginBottom: 'var(--h1-margin-bottom)',
|
|
47
|
+
},
|
|
48
|
+
heading2: {
|
|
49
|
+
fontSize: 'var(--h2-font-size)',
|
|
50
|
+
fontFamily: 'var(--font-family-h)',
|
|
51
|
+
fontWeight: 'var(--font-weight-bold)',
|
|
52
|
+
lineHeight: 'var(--h2-line-height)',
|
|
53
|
+
color: 'var(--color-text-main)',
|
|
54
|
+
marginTop: 'var(--h2-margin-top)',
|
|
55
|
+
marginBottom: 'var(--h2-margin-bottom)',
|
|
56
|
+
},
|
|
57
|
+
heading3: {
|
|
58
|
+
fontSize: 'var(--h3-font-size)',
|
|
59
|
+
fontFamily: 'var(--font-family-h)',
|
|
60
|
+
fontWeight: 'var(--font-weight-bold)',
|
|
61
|
+
lineHeight: 'var(--h3-line-height)',
|
|
62
|
+
color: 'var(--color-text-main)',
|
|
63
|
+
marginTop: 'var(--h3-margin-top)',
|
|
64
|
+
marginBottom: 'var(--h3-margin-bottom)',
|
|
65
|
+
},
|
|
66
|
+
heading4: {},
|
|
67
|
+
heading5: {},
|
|
68
|
+
heading6: {},
|
|
69
|
+
blockquote: {
|
|
70
|
+
color: 'var(--color-text-main)',
|
|
71
|
+
},
|
|
72
|
+
alert: {
|
|
73
|
+
fontSize: 'var(--alert-font-size)',
|
|
74
|
+
fontWeight: 'var(--alert-font-weight)',
|
|
75
|
+
lineHeight: 'var(--alert-line-height)',
|
|
76
|
+
marginTop: 'var(--alert-margin-vertical)',
|
|
77
|
+
marginBottom: 'var(-alert-margin-vartical)',
|
|
78
|
+
heading: {
|
|
79
|
+
fontSize: 'var(--alert-heading-font-size)',
|
|
80
|
+
fontWeight: 'var(--alert-heading-font-weight)',
|
|
81
|
+
lineHeight: 'var(--alert-line-height)',
|
|
82
|
+
transform: 'var(--alert-heading-transform)',
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
function typography(theme) {
|
|
87
|
+
if (!theme)
|
|
88
|
+
return '';
|
|
89
|
+
return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-size: ", ";\n font-weight: ", ";\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n text-transform: ", ";\n "], ["\n font-size: ", ";\n font-weight: ", ";\n font-family: ", ";\n line-height: ", ";\n color: ", ";\n text-transform: ", ";\n "])), theme.fontSize || '', theme.fontWeight || '', theme.fontFamily || '', theme.lineHeight || '', theme.color || '', theme.transform || '');
|
|
90
|
+
}
|
|
91
|
+
exports.typography = typography;
|
|
92
|
+
exports.Emphasis = styled_components_1.default.strong.attrs(function () { return ({
|
|
93
|
+
'data-component-name': 'ui/Typography/Emphasis',
|
|
94
|
+
}); })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-weight: var(--font-weight-bold);\n"], ["\n font-weight: var(--font-weight-bold);\n"])));
|
|
95
|
+
exports.H1 = styled_components_1.default.h1.attrs(function () { return ({
|
|
96
|
+
'data-component-name': 'ui/Typography/H1',
|
|
97
|
+
}); })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n ", ";\n margin: 1.35em 0 0.9em;\n && {\n ", "\n ", "\n ", "\n ", "\n }\n"], ["\n ", ";\n margin: 1.35em 0 0.9em;\n && {\n ", "\n ", "\n ", "\n ", "\n }\n"])), typography(exports.typographyTokens.heading1), function (_a) {
|
|
98
|
+
var mt = _a.mt;
|
|
99
|
+
return mt && "margin-top: ".concat(mt, ";");
|
|
100
|
+
}, function (_a) {
|
|
101
|
+
var mb = _a.mb;
|
|
102
|
+
return mb && "margin-bottom: ".concat(mb, ";");
|
|
103
|
+
}, styled_system_1.color, styled_system_1.typography);
|
|
104
|
+
exports.H2 = styled_components_1.default.h1.attrs(function () { return ({
|
|
105
|
+
'data-component-name': 'ui/Typography/H2',
|
|
106
|
+
}); })(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", ";\n margin: 1.25em 0 0.8em;\n && {\n ", "\n ", "\n ", "\n ", "\n }\n"], ["\n ", ";\n margin: 1.25em 0 0.8em;\n && {\n ", "\n ", "\n ", "\n ", "\n }\n"])), typography(exports.typographyTokens.heading2), function (_a) {
|
|
107
|
+
var mt = _a.mt;
|
|
108
|
+
return mt && "margin-top: ".concat(mt, ";");
|
|
109
|
+
}, function (_a) {
|
|
110
|
+
var mb = _a.mb;
|
|
111
|
+
return mb && "margin-bottom: ".concat(mb, ";");
|
|
112
|
+
}, styled_system_1.color, styled_system_1.typography);
|
|
113
|
+
exports.H3 = styled_components_1.default.h1.attrs(function () { return ({
|
|
114
|
+
'data-component-name': 'ui/Typography/H3',
|
|
115
|
+
}); })(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", ";\n margin: 1.25em 0 0.8em;\n && {\n ", "\n ", "\n ", "\n ", "\n }\n"], ["\n ", ";\n margin: 1.25em 0 0.8em;\n && {\n ", "\n ", "\n ", "\n ", "\n }\n"])), typography(exports.typographyTokens.heading3), function (_a) {
|
|
116
|
+
var mt = _a.mt;
|
|
117
|
+
return mt && "margin-top: ".concat(mt, ";");
|
|
118
|
+
}, function (_a) {
|
|
119
|
+
var mb = _a.mb;
|
|
120
|
+
return mb && "margin-bottom: ".concat(mb, ";");
|
|
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-primary-main);\n font-size: 1.75em;\n font-weight: var(--font-weight-light);\n text-align: center;\n margin: 2.65em 0;\n padding: 0px 20px;\n font-family: var(--font-family-h);\n"], ["\n color: var(--color-primary-main);\n font-size: 1.75em;\n font-weight: var(--font-weight-light);\n text-align: center;\n margin: 2.65em 0;\n padding: 0px 20px;\n font-family: var(--font-family-h);\n"])));
|
|
123
|
+
exports.Typography = styled_components_1.default.p.attrs(function () { return ({
|
|
124
|
+
'data-component-name': 'ui/Typography/Typography',
|
|
125
|
+
}); })(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n ", ";\n color: var(--color-text-main);\n ", "\n margin-top: ", ";\n margin-bottom: ", ";\n ", "\n"], ["\n ", ";\n color: var(--color-text-main);\n ", "\n margin-top: ", ";\n margin-bottom: ", ";\n ", "\n"])), typography(exports.typographyTokens.typography), styled_system_1.color, function (_a) {
|
|
126
|
+
var mt = _a.mt;
|
|
127
|
+
return mt || '1em';
|
|
128
|
+
}, function (_a) {
|
|
129
|
+
var mb = _a.mb;
|
|
130
|
+
return mb || '1em';
|
|
131
|
+
}, styled_system_1.typography);
|
|
132
|
+
exports.CompactTypography = (0, styled_components_1.default)(exports.Typography).attrs(function () { return ({
|
|
133
|
+
mt: '0em',
|
|
134
|
+
mb: '0em',
|
|
135
|
+
'data-component-name': 'ui/Typography/CompactTypography',
|
|
136
|
+
}); })(templateObject_8 || (templateObject_8 = __makeTemplateObject([""], [""])));
|
|
137
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LinkProps } from 'react-router-dom';
|
|
3
|
+
export declare const withPropsFilter: (filterList: string[]) => (WrappedComponent: React.FunctionComponent) => (props: React.PropsWithChildren<object>) => JSX.Element;
|
|
4
|
+
export interface PortalLinkProps<TState> extends LinkProps<TState> {
|
|
5
|
+
activeClassName?: string;
|
|
6
|
+
activeStyle?: object;
|
|
7
|
+
onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
8
|
+
partiallyActive?: boolean;
|
|
9
|
+
replace?: boolean;
|
|
10
|
+
state?: TState;
|
|
11
|
+
to: string;
|
|
12
|
+
}
|
|
13
|
+
export interface UniversalLinkProps extends Partial<PortalLinkProps<object>> {
|
|
14
|
+
external?: boolean;
|
|
15
|
+
ref?: any;
|
|
16
|
+
}
|
|
17
|
+
export declare const UniversalLink: (props: React.PropsWithChildren<object>) => JSX.Element;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.UniversalLink = exports.withPropsFilter = void 0;
|
|
22
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
23
|
+
var react_router_dom_1 = require("react-router-dom");
|
|
24
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
25
|
+
var isUrl_1 = require("../utils/isUrl");
|
|
26
|
+
var replaceHashInColor_1 = require("../utils/replaceHashInColor");
|
|
27
|
+
var Link_1 = require("../mocks/Link");
|
|
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
|
+
var theme = _a.theme;
|
|
30
|
+
return (0, replaceHashInColor_1.replaceHashInColor)(theme.colors.text.primary);
|
|
31
|
+
});
|
|
32
|
+
// TODO: We're using our own Link component so probably filtering is not necessary here.
|
|
33
|
+
// filter out unnecessary props
|
|
34
|
+
var propsList = [
|
|
35
|
+
'color',
|
|
36
|
+
'size',
|
|
37
|
+
'variant',
|
|
38
|
+
'bgColor',
|
|
39
|
+
'bgImage',
|
|
40
|
+
'disableArrow',
|
|
41
|
+
'withIcon',
|
|
42
|
+
'maxWidth',
|
|
43
|
+
'inversed',
|
|
44
|
+
'transparent',
|
|
45
|
+
'large',
|
|
46
|
+
];
|
|
47
|
+
var withPropsFilter = function (filterList) { return function (WrappedComponent) {
|
|
48
|
+
return function WithPropsFilter(props) {
|
|
49
|
+
var filteredProps = Object.fromEntries(Object.entries(props).filter(function (_a) {
|
|
50
|
+
var key = _a[0];
|
|
51
|
+
return !filterList.includes(key);
|
|
52
|
+
}));
|
|
53
|
+
return (0, jsx_runtime_1.jsx)(WrappedComponent, __assign({}, filteredProps));
|
|
54
|
+
};
|
|
55
|
+
}; };
|
|
56
|
+
exports.withPropsFilter = withPropsFilter;
|
|
57
|
+
exports.UniversalLink = (0, exports.withPropsFilter)(propsList)(function (props) {
|
|
58
|
+
var _a;
|
|
59
|
+
return (typeof props.to === 'string' && ((0, isUrl_1.isUrl)(props.to) || props.to.startsWith('mailto:'))) ||
|
|
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
|
+
});
|
|
62
|
+
var templateObject_1;
|
package/ui/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export * from '../ui/Tiles';
|
|
3
|
+
export * from '../ui/AlertIcon';
|
|
4
|
+
export * from '../ui/Arrow';
|
|
5
|
+
export * from '../ui/Background';
|
|
6
|
+
export * from '../ui/Box';
|
|
7
|
+
export * from '../ui/Button';
|
|
8
|
+
export * from '../ui/Dropdown';
|
|
9
|
+
export * from '../ui/Flex';
|
|
10
|
+
export * from '../ui/Jumbotron';
|
|
11
|
+
export * from '../ui/Typography';
|
|
12
|
+
export * from '../ui/UniversalLink';
|
|
13
|
+
export declare const LandingLayout: ({ children }: React.PropsWithChildren<object>) => React.ReactNode;
|
|
14
|
+
export declare const EmptyLayout: ({ children }: React.PropsWithChildren<object>) => React.ReactNode;
|