@redocly/theme 0.44.2 → 0.44.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Admonition/Admonition.js +1 -2
- package/lib/components/ApiOnboarding/AppCustomAttributes.js +1 -2
- package/lib/components/Badge/Badge.js +1 -2
- package/lib/components/Breadcrumbs/Breadcrumb.js +1 -2
- package/lib/components/Breadcrumbs/Breadcrumbs.js +1 -2
- package/lib/components/Button/Button.js +2 -2
- package/lib/components/Buttons/EditPageButton.js +1 -2
- package/lib/components/Buttons/EmailButton.js +1 -2
- package/lib/components/Buttons/NewTabButton.js +1 -2
- package/lib/components/Catalog/Catalog.d.ts +1 -1
- package/lib/components/Catalog/Catalog.js +1 -1
- package/lib/components/Catalog/CatalogActions.js +1 -2
- package/lib/components/Catalog/CatalogCard.js +1 -2
- package/lib/components/Catalog/CatalogHighlight.js +2 -2
- package/lib/components/Catalog/CatalogInfoBlock.js +1 -2
- package/lib/components/CodeBlock/CodeBlock.js +1 -2
- package/lib/components/CodeBlock/CodeBlockContainer.js +1 -2
- package/lib/components/CodeBlock/CodeBlockControls.js +1 -2
- package/lib/components/CodeBlock/CodeBlockTabs.js +1 -2
- package/lib/components/ColorModeSwitcher/ColorModeIcon.js +1 -2
- package/lib/components/ColorModeSwitcher/ColorModeSwitcher.js +1 -2
- package/lib/components/Dropdown/Dropdown.js +1 -2
- package/lib/components/Dropdown/DropdownMenu.js +1 -2
- package/lib/components/Dropdown/DropdownMenuItem.js +1 -2
- package/lib/components/Feedback/Comment.js +1 -2
- package/lib/components/Feedback/Feedback.js +1 -2
- package/lib/components/Feedback/Mood.js +2 -2
- package/lib/components/Feedback/Rating.js +2 -2
- package/lib/components/Feedback/Reasons.js +1 -2
- package/lib/components/Feedback/ReportDialog.js +1 -2
- package/lib/components/Feedback/Scale.js +2 -2
- package/lib/components/Feedback/Sentiment.js +1 -2
- package/lib/components/Feedback/Stars.js +1 -2
- package/lib/components/Filter/Filter.js +1 -2
- package/lib/components/Filter/FilterCheckboxes.js +1 -2
- package/lib/components/Filter/FilterContent.js +1 -2
- package/lib/components/Filter/FilterDateRange.js +1 -2
- package/lib/components/Filter/FilterInput.js +1 -2
- package/lib/components/Filter/FilterOption.js +1 -2
- package/lib/components/Filter/FilterOptionLabel.js +1 -2
- package/lib/components/Filter/FilterOptions.js +1 -2
- package/lib/components/Filter/FilterPopover.js +1 -2
- package/lib/components/Filter/FilterSelect.js +1 -2
- package/lib/components/Filter/FilterTitle.js +1 -2
- package/lib/components/Footer/Footer.js +1 -2
- package/lib/components/Footer/FooterColumn.js +1 -2
- package/lib/components/Footer/FooterCopyright.js +1 -2
- package/lib/components/Footer/FooterItem.js +1 -2
- package/lib/components/Footer/FooterLogo.js +1 -2
- package/lib/components/Image/Image.js +1 -2
- package/lib/components/JsonViewer/helpers.js +1 -2
- package/lib/components/LanguagePicker/LanguagePicker.js +1 -2
- package/lib/components/LastUpdated/LastUpdated.js +1 -2
- package/lib/components/Link/Link.js +1 -2
- package/lib/components/Loaders/Loading.js +1 -2
- package/lib/components/Loaders/SpinnerLoader.js +1 -2
- package/lib/components/Logo/Logo.js +1 -2
- package/lib/components/Markdown/Markdown.d.ts +1 -9
- package/lib/components/Markdown/styles/headingAnchor.js +1 -2
- package/lib/components/Menu/Menu.js +1 -2
- package/lib/components/Menu/MenuContainer.js +1 -2
- package/lib/components/Menu/MenuItem.js +1 -2
- package/lib/components/Menu/MenuMobile.js +1 -2
- package/lib/components/Navbar/Navbar.js +1 -2
- package/lib/components/Navbar/NavbarItem.js +1 -2
- package/lib/components/Navbar/NavbarLogo.js +1 -2
- package/lib/components/Navbar/NavbarMenu.js +1 -2
- package/lib/components/PageNavigation/NextButton.js +1 -2
- package/lib/components/PageNavigation/PageNavigation.js +1 -2
- package/lib/components/PageNavigation/PreviousButton.js +1 -2
- package/lib/components/Panel/Panel.js +1 -2
- package/lib/components/Portal/Portal.js +1 -2
- package/lib/components/Product/Product.js +1 -2
- package/lib/components/Product/ProductPicker.js +1 -2
- package/lib/components/Search/FilterFields/SearchFilterFieldSelect.js +1 -2
- package/lib/components/Search/FilterFields/SearchFilterFieldTags.js +1 -2
- package/lib/components/Search/Search.js +1 -2
- package/lib/components/Search/SearchDialog.js +1 -2
- package/lib/components/Search/SearchFilter.js +1 -2
- package/lib/components/Search/SearchFilterField.js +1 -2
- package/lib/components/Search/SearchGroups.js +1 -2
- package/lib/components/Search/SearchHighlight.js +1 -2
- package/lib/components/Search/SearchInput.js +1 -2
- package/lib/components/Search/SearchItem.js +1 -2
- package/lib/components/Search/SearchRecent.js +1 -2
- package/lib/components/Search/SearchShortcut.js +1 -2
- package/lib/components/Search/SearchSuggestedPages.js +1 -2
- package/lib/components/Search/SearchTrigger.js +1 -2
- package/lib/components/Select/Select.d.ts +1 -1
- package/lib/components/Select/Select.js +3 -3
- package/lib/components/Select/SelectInput.js +2 -2
- package/lib/components/Sidebar/Sidebar.js +1 -2
- package/lib/components/SidebarActions/styled.d.ts +5 -5
- package/lib/components/SidebarLogo/SidebarLogo.js +1 -2
- package/lib/components/Switch/Switch.js +1 -2
- package/lib/components/TableOfContent/TableOfContent.js +1 -2
- package/lib/components/Tag/Tag.js +1 -2
- package/lib/components/Tooltip/Tooltip.js +2 -2
- package/lib/components/UserMenu/LoginButton.js +1 -2
- package/lib/components/UserMenu/LogoutMenuItem.js +1 -2
- package/lib/components/UserMenu/UserAvatar.js +1 -2
- package/lib/components/UserMenu/UserInfoMenuItem.js +1 -2
- package/lib/components/UserMenu/UserMenu.js +1 -2
- package/lib/components/UserMenu/UserMenuMobile.js +1 -2
- package/lib/components/VersionPicker/VersionPicker.js +2 -2
- package/lib/core/contexts/ThemeDataContext.d.ts +0 -1
- package/lib/core/hooks/__mocks__/search/use-recent-searches.d.ts +0 -1
- package/lib/core/hooks/__mocks__/search/use-search-filter.d.ts +0 -1
- package/lib/core/hooks/__mocks__/search/use-suggested-pages.d.ts +0 -1
- package/lib/core/hooks/__mocks__/use-controlled-state.d.ts +0 -1
- package/lib/core/hooks/__mocks__/use-mobile-menu.d.ts +0 -1
- package/lib/core/hooks/__mocks__/use-theme-config.d.ts +0 -1
- package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +0 -1
- package/lib/core/hooks/feedback/use-report-dialog.js +1 -2
- package/lib/core/hooks/menu/__mocks__/use-mobile-menu-items.d.ts +0 -1
- package/lib/core/hooks/menu/use-collapse.d.ts +1 -1
- package/lib/core/hooks/menu/use-collapse.js +6 -7
- package/lib/core/hooks/menu/use-menu-item-expanded.js +1 -2
- package/lib/core/hooks/menu/use-mobile-menu-items.d.ts +2 -2
- package/lib/core/hooks/menu/use-nested-menu.js +1 -2
- package/lib/core/hooks/search/use-search-dialog.js +1 -2
- package/lib/core/hooks/search/use-search-filter.js +1 -2
- package/lib/core/hooks/use-active-heading.js +1 -2
- package/lib/core/hooks/use-active-section-id.js +1 -2
- package/lib/core/hooks/use-codeblock-tabs-controls.js +1 -2
- package/lib/core/hooks/use-controlled-state.js +1 -2
- package/lib/core/hooks/use-dialog-hotkeys.js +1 -2
- package/lib/core/hooks/use-focus-trap.js +1 -2
- package/lib/core/hooks/use-full-height.js +1 -2
- package/lib/core/hooks/use-language-picker.js +1 -2
- package/lib/core/hooks/use-mobile-menu.js +1 -2
- package/lib/core/hooks/use-modal-scroll-lock.js +1 -2
- package/lib/core/hooks/use-navbar-height.js +1 -2
- package/lib/core/hooks/use-outside-click.js +1 -2
- package/lib/core/hooks/use-product-picker.js +1 -2
- package/lib/core/hooks/use-tabs.d.ts +0 -1
- package/lib/core/hooks/use-tabs.js +1 -2
- package/lib/core/hooks/use-theme-config.js +1 -2
- package/lib/core/templates/Markdown.js +1 -1
- package/lib/core/utils/args-typecheck.js +2 -3
- package/lib/core/utils/attribute-parser.js +1 -2
- package/lib/core/utils/change-text-casing.js +1 -2
- package/lib/core/utils/class-names.js +1 -2
- package/lib/core/utils/color.js +1 -2
- package/lib/core/utils/details.js +1 -2
- package/lib/core/utils/dom.js +2 -2
- package/lib/core/utils/format-date-without-timezone.js +1 -2
- package/lib/core/utils/get-navbar-element.js +1 -2
- package/lib/core/utils/highlight.js +3 -4
- package/lib/core/utils/is-url.js +1 -2
- package/lib/core/utils/js-utils.js +3 -4
- package/lib/core/utils/load-and-navigate.js +4 -5
- package/lib/core/utils/markdoc.js +1 -2
- package/lib/core/utils/menu.js +2 -2
- package/lib/core/utils/replace-hash-in-color.js +1 -2
- package/lib/core/utils/text-transform.js +1 -2
- package/lib/core/utils/text-trimmer.js +1 -2
- package/lib/core/utils/theme-helpers.js +3 -4
- package/lib/core/utils/toc.js +3 -4
- package/lib/core/utils/type-guards.js +5 -5
- package/lib/core/utils/urls.js +14 -15
- package/lib/core/utils/with-load-progress.js +1 -2
- package/lib/icons/AddIcon/AddIcon.d.ts +3 -3
- package/lib/icons/ArrowLeftIcon/ArrowLeftIcon.d.ts +3 -3
- package/lib/icons/ArrowRightIcon/ArrowRightIcon.d.ts +3 -3
- package/lib/icons/ArrowUpRightIcon/ArrowUpRightIcon.d.ts +3 -3
- package/lib/icons/BareMetalServerIcon/BareMetalServerIcon.d.ts +3 -3
- package/lib/icons/BookmarkAddIcon/BookmarkAddIcon.d.ts +3 -3
- package/lib/icons/CertificateIcon/CertificateIcon.d.ts +9 -0
- package/lib/icons/CertificateIcon/CertificateIcon.js +26 -0
- package/lib/icons/CharacterIcon/CharacterIcon.d.ts +3 -3
- package/lib/icons/CheckboxIcon/CheckboxIcon.d.ts +3 -3
- package/lib/icons/CheckmarkFilledIcon/CheckmarkFilledIcon.d.ts +3 -3
- package/lib/icons/CheckmarkIcon/CheckmarkIcon.d.ts +3 -3
- package/lib/icons/ChevronDownIcon/ChevronDownIcon.d.ts +3 -3
- package/lib/icons/ChevronLeftIcon/ChevronLeftIcon.d.ts +3 -3
- package/lib/icons/ChevronRightIcon/ChevronRightIcon.d.ts +3 -3
- package/lib/icons/ChevronUpIcon/ChevronUpIcon.d.ts +3 -3
- package/lib/icons/CircleDashIcon/CircleDashIcon.d.ts +3 -3
- package/lib/icons/CleanIcon/CleanIcon.d.ts +3 -3
- package/lib/icons/CloseFilledIcon/CloseFilledIcon.d.ts +3 -3
- package/lib/icons/CloseIcon/CloseIcon.d.ts +3 -3
- package/lib/icons/CloseOutlineIcon/CloseOutlineIcon.d.ts +3 -3
- package/lib/icons/CloudUploadIcon/CloudUploadIcon.d.ts +3 -3
- package/lib/icons/CodeIcon/CodeIcon.d.ts +3 -3
- package/lib/icons/ContrastIcon/ContrastIcon.d.ts +3 -3
- package/lib/icons/CookieIcon/CookieIcon.d.ts +3 -3
- package/lib/icons/CopyIcon/CopyIcon.d.ts +3 -3
- package/lib/icons/CopyLinkIcon/CopyLinkIcon.d.ts +3 -3
- package/lib/icons/DataFormatIcon/DataFormatIcon.d.ts +3 -3
- package/lib/icons/DatabaseIcon/DatabaseIcon.d.ts +3 -3
- package/lib/icons/DocumentAddIcon/DocumentAddIcon.d.ts +3 -3
- package/lib/icons/DocumentBlankIcon/DocumentBlankIcon.d.ts +3 -3
- package/lib/icons/DocumentIcon/DocumentIcon.d.ts +3 -3
- package/lib/icons/DownloadIcon/DownloadIcon.d.ts +3 -3
- package/lib/icons/EditIcon/EditIcon.d.ts +3 -3
- package/lib/icons/EmailIcon/EmailIcon.d.ts +3 -3
- package/lib/icons/ErrorIcon/ErrorIcon.d.ts +3 -3
- package/lib/icons/ExportIcon/ExportIcon.d.ts +3 -3
- package/lib/icons/FaceDissatisfiedIcon/FaceDissatisfiedIcon.d.ts +3 -3
- package/lib/icons/FaceNeutralIcon/FaceNeutralIcon.d.ts +3 -3
- package/lib/icons/FaceSatisfiedIcon/FaceSatisfiedIcon.d.ts +3 -3
- package/lib/icons/FileIcon/FileIcon.d.ts +3 -3
- package/lib/icons/FileStorageIcon/FileStorageIcon.d.ts +3 -3
- package/lib/icons/FilterIcon/FilterIcon.d.ts +3 -3
- package/lib/icons/FolderAddIcon/FolderAddIcon.d.ts +3 -3
- package/lib/icons/FolderIcon/FolderIcon.d.ts +3 -3
- package/lib/icons/FolderMoveToIcon/FolderMoveToIcon.d.ts +3 -3
- package/lib/icons/GlobalOutlinedIcon/GlobalOutlinedIcon.d.ts +3 -3
- package/lib/icons/GridIcon/GridIcon.d.ts +3 -3
- package/lib/icons/HorizontalViewIcon/HorizontalViewIcon.d.ts +3 -3
- package/lib/icons/IBMCloudHyperProtectCryptoServicesIcon/IBMCloudHyperProtectCryptoServicesIcon.d.ts +3 -3
- package/lib/icons/InformationFilledIcon/InformationFilledIcon.d.ts +3 -3
- package/lib/icons/InformationIcon/InformationIcon.d.ts +3 -3
- package/lib/icons/JsonIcon/JsonIcon.d.ts +3 -3
- package/lib/icons/LaunchIcon/LaunchIcon.d.ts +3 -3
- package/lib/icons/LinkIcon/LinkIcon.d.ts +3 -3
- package/lib/icons/LogoutIcon/LogoutIcon.d.ts +3 -3
- package/lib/icons/MaximizeIcon/MaximizeIcon.d.ts +3 -3
- package/lib/icons/MenuIcon/MenuIcon.d.ts +3 -3
- package/lib/icons/MinimizeIcon/MinimizeIcon.d.ts +3 -3
- package/lib/icons/MobileSidebarIcon/MobileSidebarIcon.d.ts +3 -3
- package/lib/icons/MoonIcon/MoonIcon.d.ts +3 -3
- package/lib/icons/OverflowMenuHorizontalIcon/OverflowMenuHorizontalIcon.d.ts +3 -3
- package/lib/icons/OverflowMenuVerticalIcon/OverflowMenuVerticalIcon.d.ts +3 -3
- package/lib/icons/PlusCustomIcon/PlusCustomIcon.d.ts +3 -3
- package/lib/icons/RecentlyViewedIcon/RecentlyViewedIcon.d.ts +3 -3
- package/lib/icons/RenewIcon/RenewIcon.d.ts +3 -3
- package/lib/icons/ResetIcon/ResetIcon.d.ts +3 -3
- package/lib/icons/RestartIcon/RestartIcon.d.ts +3 -3
- package/lib/icons/RocketIcon/RocketIcon.d.ts +3 -3
- package/lib/icons/SaveIcon/SaveIcon.d.ts +3 -3
- package/lib/icons/SearchIcon/SearchIcon.d.ts +3 -3
- package/lib/icons/SecurityIcon/SecurityIcon.d.ts +3 -3
- package/lib/icons/SettingsIcon/SettingsIcon.d.ts +6 -4
- package/lib/icons/SettingsIcon/SettingsIcon.js +19 -3
- package/lib/icons/SidePanelCloseIcon/SidePanelCloseIcon.d.ts +3 -3
- package/lib/icons/SidePanelOpenIcon/SidePanelOpenIcon.d.ts +3 -3
- package/lib/icons/Spinner/Spinner.d.ts +3 -4
- package/lib/icons/StarFilledIcon/StarFilledIcon.d.ts +3 -3
- package/lib/icons/StarIcon/StarIcon.d.ts +3 -3
- package/lib/icons/SubtractIcon/SubtractIcon.d.ts +3 -3
- package/lib/icons/SunIcon/SunIcon.d.ts +3 -3
- package/lib/icons/TableBuiltIcon/TableBuiltIcon.d.ts +3 -3
- package/lib/icons/TimeIcon/TimeIcon.d.ts +3 -3
- package/lib/icons/TrashCanIcon/TrashCanIcon.d.ts +3 -3
- package/lib/icons/UserIcon/UserIcon.d.ts +3 -3
- package/lib/icons/ValueVariableIcon/ValueVariableIcon.d.ts +3 -3
- package/lib/icons/VerticalViewIcon/VerticalViewIcon.d.ts +3 -3
- package/lib/icons/ViewIcon/ViewIcon.d.ts +3 -3
- package/lib/icons/ViewOffIcon/ViewOffIcon.d.ts +3 -3
- package/lib/icons/WarningAltIcon/WarningAltIcon.d.ts +3 -3
- package/lib/icons/WarningFilledIcon/WarningFilledIcon.d.ts +3 -3
- package/lib/icons/WarningSquareIcon/WarningSquareIcon.d.ts +3 -3
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/layouts/DocumentationLayout.js +1 -2
- package/lib/layouts/Forbidden.js +1 -2
- package/lib/layouts/NotFound.js +1 -2
- package/lib/layouts/OIDCForbidden.js +1 -2
- package/lib/layouts/PageLayout.js +1 -2
- package/lib/layouts/RootLayout.js +1 -2
- package/lib/layouts/ThreePanelLayout.js +1 -2
- package/lib/markdoc/components/Admonition/Admonition.js +1 -2
- package/lib/markdoc/components/Cards/Card.js +1 -2
- package/lib/markdoc/components/Cards/CardIcon.js +1 -2
- package/lib/markdoc/components/Cards/CardImage.js +1 -2
- package/lib/markdoc/components/Cards/Cards.js +1 -2
- package/lib/markdoc/components/CodeBlock/CodeBlock.js +1 -2
- package/lib/markdoc/components/Heading/Heading.js +1 -2
- package/lib/markdoc/components/HtmlBlock/HtmlBlock.js +1 -2
- package/lib/markdoc/components/InlineSvg/InlineSvg.js +1 -2
- package/lib/markdoc/components/MarkdocExample/MarkdocExample.d.ts +1 -0
- package/lib/markdoc/components/MarkdocExample/MarkdocExample.js +3 -4
- package/lib/markdoc/components/Mermaid/Mermaid.js +1 -2
- package/lib/markdoc/components/Tabs/Tab.js +2 -2
- package/lib/markdoc/components/Tabs/Tabs.js +2 -2
- package/lib/markdoc/default.d.ts +2 -2
- package/lib/markdoc/tags/markdoc-example.js +8 -1
- package/lib/plugin.js +1 -1
- package/package.json +6 -6
- package/src/components/Select/Select.tsx +1 -1
- package/src/icons/CertificateIcon/CertificateIcon.tsx +33 -0
- package/src/icons/SettingsIcon/SettingsIcon.tsx +30 -12
- package/src/index.ts +1 -0
- package/src/markdoc/components/MarkdocExample/MarkdocExample.tsx +12 -3
- package/src/markdoc/tags/markdoc-example.ts +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.44.
|
|
3
|
+
"version": "0.44.4",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@types/lodash.throttle": "4.1.9",
|
|
58
58
|
"@types/node": "18.19.3",
|
|
59
59
|
"@types/prismjs": "1.26.4",
|
|
60
|
-
"@types/react": "18.
|
|
60
|
+
"@types/react": "18.3.9",
|
|
61
61
|
"@types/react-dom": "18.2.25",
|
|
62
62
|
"@types/styled-components": "5.1.34",
|
|
63
63
|
"@types/styled-system": "5.1.22",
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
"styled-components": "5.3.11",
|
|
83
83
|
"styled-system": "5.1.5",
|
|
84
84
|
"ts-jest": "29.1.2",
|
|
85
|
-
"ts-node": "10.9.
|
|
85
|
+
"ts-node": "10.9.2",
|
|
86
86
|
"ts-node-dev": "2.0.0",
|
|
87
|
-
"tsc-alias": "1.8.
|
|
87
|
+
"tsc-alias": "1.8.10",
|
|
88
88
|
"tsconfig-paths": "4.2.0",
|
|
89
89
|
"tsconfig-paths-webpack-plugin": "3.5.2",
|
|
90
|
-
"typescript": "5.
|
|
90
|
+
"typescript": "5.6.2",
|
|
91
91
|
"webpack": "5.94.0"
|
|
92
92
|
},
|
|
93
93
|
"dependencies": {
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"timeago.js": "4.0.2",
|
|
100
100
|
"i18next": "22.4.15",
|
|
101
101
|
"nprogress": "0.2.0",
|
|
102
|
-
"@redocly/config": "0.
|
|
102
|
+
"@redocly/config": "0.13.0"
|
|
103
103
|
},
|
|
104
104
|
"scripts": {
|
|
105
105
|
"start": "npm-run-all --parallel storybook storybook:tokens:watch",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import type { IconProps } from '@redocly/theme/icons/types';
|
|
5
|
+
|
|
6
|
+
import { getCssColorVariable } from '@redocly/theme/core/utils';
|
|
7
|
+
|
|
8
|
+
const Icon = (props: IconProps) => (
|
|
9
|
+
<svg viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
|
|
10
|
+
<path
|
|
11
|
+
d="M10.5 6.4375L11.3365 8.05756L13.125 8.31744L11.8125 9.5L12.1498 11.25L10.5 10.2656L8.85019 11.25L9.1875 9.5L7.875 8.31744L9.7125 8.05756L10.5 6.4375Z"
|
|
12
|
+
fill="#1A1C21"
|
|
13
|
+
/>
|
|
14
|
+
<path d="M5.25 6H2.625V6.875H5.25V6Z" fill="#1A1C21" />
|
|
15
|
+
<path d="M7 4.25H2.625V5.125H7V4.25Z" fill="#1A1C21" />
|
|
16
|
+
<path d="M7 2.5H2.625V3.375H7V2.5Z" fill="#1A1C21" />
|
|
17
|
+
<path
|
|
18
|
+
d="M7 10.375H1.75V1.625H12.25V6H13.125V1.625C13.125 1.39294 13.0328 1.17038 12.8687 1.00628C12.7046 0.842187 12.4821 0.75 12.25 0.75H1.75C1.51794 0.75 1.29538 0.842187 1.13128 1.00628C0.967187 1.17038 0.875 1.39294 0.875 1.625V10.375C0.875 10.6071 0.967187 10.8296 1.13128 10.9937C1.29538 11.1578 1.51794 11.25 1.75 11.25H7V10.375Z"
|
|
19
|
+
fill="#1A1C21"
|
|
20
|
+
/>
|
|
21
|
+
</svg>
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export const CertificateIcon = styled(Icon).attrs(() => ({
|
|
25
|
+
'data-component-name': 'icons/CertificateIcon/CertificateIcon',
|
|
26
|
+
}))<IconProps>`
|
|
27
|
+
path {
|
|
28
|
+
fill: ${({ color }) => getCssColorVariable(color)};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
height: ${({ size }) => size || '16px'};
|
|
32
|
+
width: ${({ size }) => size || '16px'};
|
|
33
|
+
`;
|
|
@@ -5,18 +5,36 @@ import type { IconProps } from '@redocly/theme/icons/types';
|
|
|
5
5
|
|
|
6
6
|
import { getCssColorVariable } from '@redocly/theme/core/utils';
|
|
7
7
|
|
|
8
|
-
const Icon = (props: IconProps) =>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
const Icon = (props: IconProps & { variant?: 'circle' | 'default' }) => {
|
|
9
|
+
const { variant, ...rest } = props;
|
|
10
|
+
return (
|
|
11
|
+
<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg" {...rest}>
|
|
12
|
+
{variant === 'circle' ? (
|
|
13
|
+
<>
|
|
14
|
+
<path
|
|
15
|
+
d="M10.8116 7.33256C10.8116 7.22318 10.8116 7.11381 10.8116 7.00006C10.8116 6.88631 10.8116 6.77693 10.8116 6.66318L11.6516 5.92818C11.8064 5.7917 11.908 5.60488 11.9384 5.40073C11.9689 5.19658 11.9261 4.98825 11.8178 4.81256L10.7853 3.06256C10.7086 2.92967 10.5983 2.8193 10.4654 2.74251C10.3326 2.66572 10.1819 2.62521 10.0284 2.62506C9.93336 2.62433 9.83878 2.6391 9.74845 2.66881L8.68532 3.02756C8.50177 2.90558 8.31031 2.79597 8.1122 2.69943L7.88907 1.59693C7.84907 1.39551 7.73949 1.21457 7.57952 1.0858C7.41956 0.957028 7.21939 0.888621 7.01407 0.892556H4.96657C4.76125 0.888621 4.56109 0.957028 4.40112 1.0858C4.24116 1.21457 4.13158 1.39551 4.09157 1.59693L3.86845 2.69943C3.66892 2.79594 3.476 2.90556 3.29095 3.02756L2.2497 2.65131C2.15839 2.62752 2.06384 2.61865 1.9697 2.62506C1.81626 2.62521 1.66555 2.66572 1.53271 2.74251C1.39986 2.8193 1.28954 2.92967 1.21282 3.06256L0.180323 4.81256C0.0782047 4.98799 0.040258 5.19347 0.0729819 5.3938C0.105706 5.59414 0.207064 5.77686 0.359698 5.91068L1.18657 6.66756C1.18657 6.77693 1.18657 6.88631 1.18657 7.00006C1.18657 7.11381 1.18657 7.22318 1.18657 7.33693L0.359698 8.07193C0.202753 8.20668 0.0986221 8.39268 0.0657848 8.59691C0.0329474 8.80114 0.0735273 9.0104 0.180323 9.18756L1.21282 10.9376C1.28954 11.0704 1.39986 11.1808 1.53271 11.2576C1.66555 11.3344 1.81626 11.3749 1.9697 11.3751C2.06479 11.3758 2.15936 11.361 2.2497 11.3313L3.31282 10.9726C3.49637 11.0945 3.68784 11.2041 3.88595 11.3007L4.10907 12.4032C4.14908 12.6046 4.25866 12.7855 4.41862 12.9143C4.57859 13.0431 4.77875 13.1115 4.98407 13.1076H7.04907C7.25439 13.1115 7.45456 13.0431 7.61452 12.9143C7.77449 12.7855 7.88407 12.6046 7.92407 12.4032L8.1472 11.3007C8.34673 11.2042 8.53965 11.0946 8.7247 10.9726L9.78345 11.3313C9.87378 11.361 9.96836 11.3758 10.0634 11.3751C10.2169 11.3749 10.3676 11.3344 10.5004 11.2576C10.6333 11.1808 10.7436 11.0704 10.8203 10.9376L11.8178 9.18756C11.9199 9.01212 11.9579 8.80664 11.9252 8.60631C11.8924 8.40597 11.7911 8.22325 11.6384 8.08943L10.8116 7.33256ZM10.0284 10.5001L8.52782 9.99256C8.17654 10.2901 7.77506 10.5227 7.3422 10.6794L7.03157 12.2501H4.96657L4.65595 10.6969C4.22651 10.5357 3.8272 10.3036 3.4747 10.0101L1.9697 10.5001L0.937198 8.75006L2.1272 7.70006C2.0463 7.24718 2.0463 6.78356 2.1272 6.33068L0.937198 5.25006L1.9697 3.50006L3.47032 4.00756C3.82161 3.71001 4.22309 3.47742 4.65595 3.32068L4.96657 1.75006H7.03157L7.3422 3.30318C7.77164 3.46437 8.17095 3.69656 8.52345 3.99006L10.0284 3.50006L11.0609 5.25006L9.87095 6.30006C9.95184 6.75293 9.95184 7.21656 9.87095 7.66943L11.0609 8.75006L10.0284 10.5001Z"
|
|
16
|
+
fill="#22242B"
|
|
17
|
+
/>
|
|
18
|
+
<path
|
|
19
|
+
d="M5.99907 9.62506C5.4799 9.62506 4.97238 9.4711 4.5407 9.18266C4.10902 8.89422 3.77257 8.48426 3.57389 8.0046C3.37521 7.52494 3.32323 6.99714 3.42451 6.48794C3.5258 5.97874 3.7758 5.51101 4.14292 5.1439C4.51003 4.77679 4.97776 4.52678 5.48696 4.42549C5.99616 4.32421 6.52396 4.37619 7.00362 4.57487C7.48327 4.77355 7.89324 5.11 8.18168 5.54168C8.47012 5.97336 8.62407 6.48088 8.62407 7.00006C8.62758 7.34575 8.56208 7.68867 8.43141 8.00874C8.30073 8.3288 8.10751 8.61958 7.86305 8.86403C7.61859 9.10849 7.32782 9.30171 7.00776 9.43239C6.68769 9.56306 6.34477 9.62857 5.99907 9.62506ZM5.99907 5.25006C5.76779 5.24467 5.53781 5.28625 5.32305 5.37229C5.1083 5.45833 4.91323 5.58703 4.74964 5.75062C4.58605 5.91421 4.45734 6.10928 4.37131 6.32404C4.28527 6.53879 4.24369 6.76877 4.24907 7.00006C4.24369 7.23134 4.28527 7.46132 4.37131 7.67607C4.45734 7.89083 4.58605 8.0859 4.74964 8.24949C4.91323 8.41308 5.1083 8.54178 5.32305 8.62782C5.53781 8.71386 5.76779 8.75544 5.99907 8.75006C6.23036 8.75544 6.46034 8.71386 6.67509 8.62782C6.88985 8.54178 7.08492 8.41308 7.24851 8.24949C7.41209 8.0859 7.5408 7.89083 7.62684 7.67607C7.71288 7.46132 7.75446 7.23134 7.74907 7.00006C7.75446 6.76877 7.71288 6.53879 7.62684 6.32404C7.5408 6.10928 7.41209 5.91421 7.24851 5.75062C7.08492 5.58703 6.88985 5.45833 6.67509 5.37229C6.46034 5.28625 6.23036 5.24467 5.99907 5.25006Z"
|
|
20
|
+
fill="#22242B"
|
|
21
|
+
/>
|
|
22
|
+
</>
|
|
23
|
+
) : (
|
|
24
|
+
<>
|
|
25
|
+
<path
|
|
26
|
+
d="M15.875 2.5H13.5687C13.2875 1.20625 12.1625 0.25 10.8125 0.25C9.4625 0.25 8.3375 1.20625 8.05625 2.5H0.125V3.625H8.05625C8.3375 4.91875 9.4625 5.875 10.8125 5.875C12.1625 5.875 13.2875 4.91875 13.5687 3.625H15.875V2.5ZM10.8125 4.75C9.85625 4.75 9.125 4.01875 9.125 3.0625C9.125 2.10625 9.85625 1.375 10.8125 1.375C11.7688 1.375 12.5 2.10625 12.5 3.0625C12.5 4.01875 11.7688 4.75 10.8125 4.75Z"
|
|
27
|
+
fill="#22242B"
|
|
28
|
+
/>
|
|
29
|
+
<path
|
|
30
|
+
d="M0.125 11.5H2.43125C2.7125 12.7937 3.8375 13.75 5.1875 13.75C6.5375 13.75 7.6625 12.7937 7.94375 11.5H15.875V10.375H7.94375C7.6625 9.08125 6.5375 8.125 5.1875 8.125C3.8375 8.125 2.7125 9.08125 2.43125 10.375H0.125V11.5ZM5.1875 9.25C6.14375 9.25 6.875 9.98125 6.875 10.9375C6.875 11.8938 6.14375 12.625 5.1875 12.625C4.23125 12.625 3.5 11.8938 3.5 10.9375C3.5 9.98125 4.23125 9.25 5.1875 9.25Z"
|
|
31
|
+
fill="#22242B"
|
|
32
|
+
/>
|
|
33
|
+
</>
|
|
34
|
+
)}
|
|
35
|
+
</svg>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
20
38
|
|
|
21
39
|
export const SettingsIcon = styled(Icon).attrs(() => ({
|
|
22
40
|
'data-component-name': 'icons/SettingsIcon/SettingsIcon',
|
package/src/index.ts
CHANGED
|
@@ -233,6 +233,7 @@ export * from '@redocly/theme/icons/PlusCustomIcon/PlusCustomIcon';
|
|
|
233
233
|
export * from '@redocly/theme/icons/CharacterIcon/CharacterIcon';
|
|
234
234
|
export * from '@redocly/theme/icons/FileIcon/FileIcon';
|
|
235
235
|
export * from '@redocly/theme/icons/ExportIcon/ExportIcon';
|
|
236
|
+
export * from '@redocly/theme/icons/CertificateIcon/CertificateIcon';
|
|
236
237
|
/* Layouts */
|
|
237
238
|
export * from '@redocly/theme/layouts/RootLayout';
|
|
238
239
|
export * from '@redocly/theme/layouts/PageLayout';
|
|
@@ -11,16 +11,25 @@ export interface MarkdocExampleProps {
|
|
|
11
11
|
withLabels?: boolean;
|
|
12
12
|
codeLabel?: string;
|
|
13
13
|
resultLabel?: string;
|
|
14
|
+
title?: string;
|
|
14
15
|
}
|
|
15
16
|
export function MarkdocExample(props: MarkdocExampleProps) {
|
|
16
|
-
const {
|
|
17
|
-
|
|
17
|
+
const {
|
|
18
|
+
language,
|
|
19
|
+
rawContent,
|
|
20
|
+
renderDemo,
|
|
21
|
+
demoContent,
|
|
22
|
+
withLabels,
|
|
23
|
+
codeLabel,
|
|
24
|
+
resultLabel,
|
|
25
|
+
title,
|
|
26
|
+
} = props;
|
|
18
27
|
|
|
19
28
|
const renderLabels = renderDemo ? (withLabels === undefined ? true : withLabels) : false;
|
|
20
29
|
return (
|
|
21
30
|
<div data-component-name="Markdoc/MarkdocExample/MarkdocExample">
|
|
22
31
|
{renderLabels ? <Label>{codeLabel ? codeLabel : 'Code:'}</Label> : null}
|
|
23
|
-
<CodeBlock lang={language} source={rawContent} header={{ controls: { copy: {} } }} />
|
|
32
|
+
<CodeBlock lang={language} source={rawContent} header={{ title, controls: { copy: {} } }} />
|
|
24
33
|
{renderDemo ? (
|
|
25
34
|
<>
|
|
26
35
|
{renderLabels ? <Label>{resultLabel ? resultLabel : 'Result:'}</Label> : null}
|
|
@@ -22,10 +22,18 @@ export const markdocExample: MarkdocSchemaWrapper = {
|
|
|
22
22
|
|
|
23
23
|
const language = 'markdoc';
|
|
24
24
|
|
|
25
|
+
const annotations = node.children[0].annotations;
|
|
26
|
+
let title = null;
|
|
27
|
+
if (annotations.length > 0) {
|
|
28
|
+
const fenceWithTitle = annotations.find((annotation) => annotation.name === 'title');
|
|
29
|
+
title = fenceWithTitle?.value;
|
|
30
|
+
}
|
|
31
|
+
|
|
25
32
|
return new markdoc.Tag(
|
|
26
33
|
'MarkdocExample',
|
|
27
34
|
{
|
|
28
35
|
...attributes,
|
|
36
|
+
title,
|
|
29
37
|
language,
|
|
30
38
|
demoContent: node.children[0].transformChildren(config),
|
|
31
39
|
rawContent: content,
|