@redocly/theme 0.70.0-next.3 → 0.70.0-next.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/Catalog/Catalog.js +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.js +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +1 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.js +1 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.js +2 -2
- package/lib/components/Dropdown/Dropdown.js +3 -1
- package/lib/components/Markdown/Markdown.js +3 -2
- package/lib/components/Menu/Menu.js +4 -0
- package/lib/components/Menu/MenuSelect.d.ts +7 -0
- package/lib/components/Menu/MenuSelect.js +129 -0
- package/lib/components/Menu/variables.js +43 -4
- package/lib/components/Navbar/Navbar.js +44 -5
- package/lib/components/Navbar/variables.js +3 -0
- package/lib/components/NavigationTabs/NavigationTab.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTab.js +93 -0
- package/lib/components/NavigationTabs/NavigationTabContent.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTabContent.js +50 -0
- package/lib/components/NavigationTabs/NavigationTabMenu.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTabMenu.js +18 -0
- package/lib/components/NavigationTabs/NavigationTabs.d.ts +7 -0
- package/lib/components/NavigationTabs/NavigationTabs.js +97 -0
- package/lib/components/NavigationTabs/variables.d.ts +1 -0
- package/lib/components/NavigationTabs/variables.js +37 -0
- package/lib/components/Search/SearchTrigger.js +8 -2
- package/lib/components/Sidebar/Sidebar.js +2 -2
- package/lib/components/TableOfContent/TableOfContent.js +2 -2
- package/lib/core/constants/common.d.ts +1 -0
- package/lib/core/constants/common.js +1 -0
- package/lib/core/hooks/index.d.ts +1 -0
- package/lib/core/hooks/index.js +1 -0
- package/lib/core/hooks/menu/use-mobile-menu-items.js +75 -51
- package/lib/core/hooks/menu/use-mobile-menu-levels.js +12 -7
- package/lib/core/hooks/use-scroll-item-into-view.d.ts +2 -0
- package/lib/core/hooks/use-scroll-item-into-view.js +16 -0
- package/lib/core/hooks/use-theme-hooks.js +2 -0
- package/lib/core/styles/global.js +12 -2
- package/lib/core/types/hooks.d.ts +5 -0
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/navigation-tabs.d.ts +49 -0
- package/lib/core/types/navigation-tabs.js +3 -0
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/core/utils/menu.d.ts +4 -0
- package/lib/core/utils/menu.js +42 -3
- package/lib/core/utils/navigation-tabs.d.ts +8 -0
- package/lib/core/utils/navigation-tabs.js +71 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +7 -1
- package/lib/layouts/PageLayout.js +1 -1
- package/lib/layouts/RootLayout.js +2 -2
- package/lib/markdoc/components/CodeWalkthrough/CodeFilters.js +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanel.js +3 -3
- package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.js +1 -1
- package/package.json +3 -3
- package/src/components/Catalog/Catalog.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx +2 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +1 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.tsx +1 -1
- package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.tsx +2 -2
- package/src/components/Dropdown/Dropdown.tsx +4 -1
- package/src/components/Markdown/Markdown.tsx +3 -2
- package/src/components/Menu/Menu.tsx +5 -0
- package/src/components/Menu/MenuSelect.tsx +198 -0
- package/src/components/Menu/variables.ts +43 -4
- package/src/components/Navbar/Navbar.tsx +22 -5
- package/src/components/Navbar/variables.ts +3 -0
- package/src/components/NavigationTabs/NavigationTab.tsx +148 -0
- package/src/components/NavigationTabs/NavigationTabContent.tsx +66 -0
- package/src/components/NavigationTabs/NavigationTabMenu.tsx +40 -0
- package/src/components/NavigationTabs/NavigationTabs.tsx +83 -0
- package/src/components/NavigationTabs/variables.ts +34 -0
- package/src/components/Search/SearchTrigger.tsx +11 -2
- package/src/components/Sidebar/Sidebar.tsx +2 -2
- package/src/components/TableOfContent/TableOfContent.tsx +2 -2
- package/src/core/constants/common.ts +1 -0
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +2 -0
- package/src/core/hooks/index.ts +1 -0
- package/src/core/hooks/menu/use-mobile-menu-items.ts +91 -56
- package/src/core/hooks/menu/use-mobile-menu-levels.ts +14 -6
- package/src/core/hooks/use-scroll-item-into-view.ts +18 -0
- package/src/core/hooks/use-theme-hooks.ts +2 -0
- package/src/core/styles/global.ts +12 -2
- package/src/core/types/hooks.ts +5 -0
- package/src/core/types/index.ts +1 -0
- package/src/core/types/l10n.ts +3 -0
- package/src/core/types/navigation-tabs.ts +54 -0
- package/src/core/utils/index.ts +1 -0
- package/src/core/utils/menu.ts +49 -3
- package/src/core/utils/navigation-tabs.ts +99 -0
- package/src/index.ts +6 -0
- package/src/layouts/PageLayout.tsx +1 -1
- package/src/layouts/RootLayout.tsx +2 -2
- package/src/markdoc/components/CodeWalkthrough/CodeFilters.tsx +1 -1
- package/src/markdoc/components/CodeWalkthrough/CodePanel.tsx +3 -3
- package/src/markdoc/components/CodeWalkthrough/CodeWalkthrough.tsx +1 -1
package/lib/core/types/l10n.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TOptions } from 'i18next';
|
|
2
|
-
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.create.app.dialog.callbackUrls' | 'dev.create.app.dialog.callbackUrls.placeholder' | 'dev.create.app.dialog.callbackUrls.hint' | 'dev.app.callbackUrls.title' | 'dev.edit.callbackUrls.dialog.title' | 'dev.edit.callbackUrls.dialog.placeholder' | 'dev.edit.callbackUrls.dialog.hint' | 'dev.edit.callbackUrls.dialog.save' | 'dev.edit.callbackUrls.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.error.title' | 'search.error.button' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.assistant' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.send' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.toolCall.executed' | 'search.ai.toolCall.executing' | 'search.ai.toolCall.withArgs' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.searchItem.enum' | 'search.searchItem.example' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.forbidden.description' | 'page.notFound.title' | 'page.notFound.description' | 'page.apiNotFound.title' | 'page.apiNotFound.description' | 'page.apiNotFound.hint' | 'page.apiNotFound.backButton' | 'page.mcpNotAllowed.title' | 'page.mcpNotAllowed.description' | 'page.mcpNotAllowed.publicNote' | 'page.mcpNotAllowed.publicEndpointHint' | 'page.mcpNotAllowed.mainEndpointHint' | 'page.mcpNotAllowed.snippets.terminal.hint' | 'page.mcpNotAllowed.snippets.claudeCode.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.instruction' | 'page.mcpNotAllowed.snippets.chatgptApp.headline' | 'page.mcpNotAllowed.snippets.chatgptApp.instruction' | 'page.mcpNotAllowed.snippets.codexCli.headline' | 'page.mcpNotAllowed.snippets.prompt.headline' | 'page.mcpNotAllowed.snippets.prompt.hint' | 'page.mcpNotAllowed.snippets.json.hint' | 'page.mcpNotAllowed.tabs.claude' | 'page.mcpNotAllowed.tabs.chatgpt' | 'page.mcpNotAllowed.tabs.json' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'catalog.backToAllLabel' | 'catalog.notConnected' | 'catalog.tags.label' | 'catalog.sort' | 'catalog.catalogs.label' | 'catalog.owners.label' | 'catalog.repositories.label' | 'catalog.email.label' | 'catalog.format.label' | 'catalog.entityType.label' | 'catalog.domains.label' | 'catalog.contact.label' | 'catalog.methodAndPath.label' | 'catalog.links.label' | 'catalog.metadata.domains' | 'catalog.metadata.owners' | 'catalog.history.button.label' | 'catalog.history.sidebar.title' | 'catalog.history.sidebar.close' | 'catalog.history.version.label' | 'catalog.filters.close' | 'catalog.history.version.notSpecified' | 'catalog.history.version.default' | 'catalog.history.revisions.limitMessage' | 'catalog.history.revision.current' | 'catalog.history.revisions.showLess' | 'catalog.history.revisions.showMore' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.maxLength' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'jsonViewer.showMore' | 'jsonViewer.showLess' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.claudeCode' | 'page.actions.connectMcp.claudeCodeDescription' | 'page.actions.connectMcp.codex' | 'page.actions.connectMcp.codexDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | 'page.actions.connectMcp.moreOptions' | 'page.actions.moreActions' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'graphql.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.languages.moreButton.tooltipText' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.schemas' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.querystring' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.property' | 'openapi.properties' | 'openapi.details' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.noRequestData' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'openapi.schemaCatalogLink.title' | 'openapi.schemaCatalogLink.copyButtonTooltip' | 'openapi.schemaCatalogLink.copiedTooltip' | 'openapi.mcp.title' | 'openapi.mcp.endpoint' | 'openapi.mcp.tools' | 'openapi.mcp.protocolVersion' | 'openapi.mcp.capabilities' | 'openapi.mcp.experimentalCapabilities' | 'openapi.mcp.inputSchema' | 'openapi.mcp.inputExample' | 'openapi.mcp.outputSchema' | 'openapi.mcp.outputExample' | 'openapi.mcp.exampleTitle' | 'openapi.mcp.argumentsExample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'asyncapi.info.contact.url' | 'asyncapi.info.contact.name' | 'asyncapi.info.license' | 'asyncapi.info.termsOfService' | 'asyncapi.key' | 'asyncapi.value' | 'asyncapi.variables' | 'asyncapi.required' | 'asyncapi.requiredScopes' | 'asyncapi.viewSecurityDetails' | 'graphql.download.description.title' | 'graphql.info.title' | 'graphql.info.contact.url' | 'graphql.info.contact.name' | 'graphql.info.license' | 'graphql.info.termsOfService' | 'graphql.overview' | 'graphql.metadata' | 'graphql.key' | 'graphql.value' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.actions.show' | 'graphql.actions.hide' | 'graphql.actions.more' | 'graphql.fields' | 'graphql.inputFields' | 'graphql.values' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | 'graphql.implementedInterfaces' | 'graphql.implementedBy' | 'graphql.nonNull' | 'graphql.required' | 'asyncapi.badges.deprecated' | 'graphql.badges.deprecated' | 'asyncapi.actions.show' | 'asyncapi.actions.hide' | 'asyncapi.actions.more' | 'asyncapi.payload' | 'asyncapi.parameters' | 'asyncapi.messages' | 'asyncapi.contentType' | 'asyncapi.moreDetails' | 'asyncapi.property' | 'asyncapi.properties' | 'asyncapi.details' | 'asyncapi.reply' | 'asyncapi.servers.title' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'button.download.tooltipText' | 'button.externalLink.tooltipText' | 'button.email.tooltipText' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label' | 'select.noResults' | 'loaders.loading' | 'filter.dateRange.from' | 'filter.dateRange.to' | 'diagram.openFullscreen' | 'diagram.zoomIn' | 'diagram.zoomOut' | 'diagram.reset' | 'diagram.close' | 'diagram.viewer' | 'consent.title' | 'consent.message' | 'consent.privacyPolicy' | 'consent.customize' | 'consent.rejectAll' | 'consent.acceptAll' | 'consent.acceptAllCookies' | 'consent.savePreferences' | 'consent.dialog.title' | 'consent.dialog.description' | 'consent.dialog.close' | 'consent.alwaysOn' | 'consent.alwaysOff' | 'consent.gpcNotice' | 'consent.category.necessary.title' | 'consent.category.necessary.description' | 'consent.category.analytics.title' | 'consent.category.analytics.description' | 'consent.category.marketing.title' | 'consent.category.marketing.description' | 'consent.settingsLink';
|
|
2
|
+
export type TranslationKey = 'dev.newApp' | 'dev.newApp.text' | 'dev.sidebar.header' | 'dev.sidebar.footer.text' | 'dev.create.app.dialog.appName.placeholder' | 'dev.create.app.dialog.appName.error' | 'dev.create.app.dialog.selectAPIs' | 'dev.create.app.dialog.description' | 'dev.create.app.dialog.description.placeholder' | 'dev.create.app.dialog.create' | 'dev.create.app.dialog.cancel' | 'dev.main.tab.appKeys' | 'dev.main.tab.logs' | 'dev.app.description.title' | 'dev.edit.description.dialog.title' | 'dev.edit.description.dialog.save' | 'dev.edit.description.dialog.cancel' | 'dev.create.app.dialog.callbackUrls' | 'dev.create.app.dialog.callbackUrls.placeholder' | 'dev.create.app.dialog.callbackUrls.hint' | 'dev.app.callbackUrls.title' | 'dev.edit.callbackUrls.dialog.title' | 'dev.edit.callbackUrls.dialog.placeholder' | 'dev.edit.callbackUrls.dialog.hint' | 'dev.edit.callbackUrls.dialog.save' | 'dev.edit.callbackUrls.dialog.cancel' | 'dev.edit.apis.dialog.selectedAPIs' | 'dev.app.key.create' | 'dev.create.key.dialog.title' | 'dev.create.key.dialog.create' | 'dev.create.key.dialog.cancel' | 'dev.app.edit' | 'dev.app.delete' | 'dev.edit.app.dialog.title' | 'dev.edit.app.dialog.save' | 'dev.edit.app.dialog.cancel' | 'dev.delete.app.dialog.title' | 'dev.delete.app.dialog.confirmation' | 'dev.delete.app.dialog.delete' | 'dev.delete.app.dialog.cancel' | 'dev.app.key.roll' | 'dev.roll.key.dialog.title' | 'dev.roll.key.dialog.apiKey' | 'dev.roll.key.dialog.expires' | 'dev.roll.key.dialog.confirmation' | 'dev.roll.key.dialog.cancel' | 'dev.roll.key.dialog.roll' | 'dev.update.key.dialog.title' | 'dev.update.key.dialog.update' | 'dev.update.key.dialog.cancel' | 'dev.app.key.api.name' | 'dev.app.key.api.status' | 'dev.app.key.api.edit' | 'dev.edit.apis.dialog.title' | 'dev.edit.apis.dialog.apiKey' | 'dev.edit.apis.dialog.save' | 'dev.edit.apis.dialog.cancel' | 'dev.select.placeholder' | 'dev.app.overview.status.pending' | 'dev.app.overview.status.approved' | 'dev.app.overview.status.revoked' | 'dev.app.overview.status' | 'dev.app.overview.non-production' | 'dev.app.overview.production' | 'dev.app.overview.clientId' | 'dev.app.overview.apiKey' | 'dev.app.key.revoke' | 'dev.revoke.key.dialog.title' | 'dev.revoke.key.dialog.apiKey' | 'dev.revoke.key.dialog.expires' | 'dev.revoke.key.dialog.confirmation' | 'dev.revoke.key.dialog.revoke' | 'dev.revoke.key.dialog.cancel' | 'dev.app.overview.expires' | 'dev.app.overview.created' | 'dev.app.overview.visibilityToggle.hide' | 'dev.app.overview.visibilityToggle.show' | 'search.loading' | 'search.noResults.title' | 'search.keys.navigate' | 'search.keys.select' | 'search.keys.exit' | 'search.label' | 'search.cancel' | 'search.recent' | 'search.navbar.label' | 'search.suggested' | 'search.showMore' | 'search.error.title' | 'search.error.button' | 'search.filter.title' | 'search.filter.reset' | 'search.filter.field.reset' | 'search.ai.welcomeText' | 'search.ai.newConversation' | 'search.ai.backToSearch' | 'search.ai.back' | 'search.ai.assistant' | 'search.ai.placeholder' | 'search.ai.generatingResponse' | 'search.ai.followUpQuestion' | 'search.ai.send' | 'search.ai.suggestionsTitle' | 'search.ai.thinkingText' | 'search.ai.resourcesFound' | 'search.ai.resourcesFound.basedOn' | 'search.ai.resourcesFound.resources' | 'search.ai.feedback.title' | 'search.ai.feedback.detailsPlaceholder' | 'search.ai.feedback.thanks' | 'search.ai.toolCall.executed' | 'search.ai.toolCall.executing' | 'search.ai.toolCall.withArgs' | 'search.ai.button' | 'search.ai.label' | 'search.ai.disclaimer' | 'search.ai.error.description' | 'search.ai.error.description.forbidden' | 'search.ai.error.description.unauthorized' | 'search.ai.error.header' | 'search.ai.error.header.forbidden' | 'search.ai.error.header.unauthorized' | 'search.ai.feedback.more' | 'search.searchItem.deprecated' | 'search.searchItem.enum' | 'search.searchItem.example' | 'search.groups.all' | 'search.filter.field.footer' | 'aiAssistant.trigger' | 'toc.header' | 'footer.copyrightText' | 'page.homeButton' | 'page.forbidden.title' | 'page.forbidden.description' | 'page.notFound.title' | 'page.notFound.description' | 'page.apiNotFound.title' | 'page.apiNotFound.description' | 'page.apiNotFound.hint' | 'page.apiNotFound.backButton' | 'page.mcpNotAllowed.title' | 'page.mcpNotAllowed.description' | 'page.mcpNotAllowed.publicNote' | 'page.mcpNotAllowed.publicEndpointHint' | 'page.mcpNotAllowed.mainEndpointHint' | 'page.mcpNotAllowed.snippets.terminal.hint' | 'page.mcpNotAllowed.snippets.claudeCode.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.headline' | 'page.mcpNotAllowed.snippets.claudeDesktop.instruction' | 'page.mcpNotAllowed.snippets.chatgptApp.headline' | 'page.mcpNotAllowed.snippets.chatgptApp.instruction' | 'page.mcpNotAllowed.snippets.codexCli.headline' | 'page.mcpNotAllowed.snippets.prompt.headline' | 'page.mcpNotAllowed.snippets.prompt.hint' | 'page.mcpNotAllowed.snippets.json.hint' | 'page.mcpNotAllowed.tabs.claude' | 'page.mcpNotAllowed.tabs.chatgpt' | 'page.mcpNotAllowed.tabs.json' | 'page.lastUpdated.timeago' | 'page.lastUpdated.on' | 'catalog.filters.placeholder' | 'catalog.filters.title' | 'catalog.filters.add' | 'catalog.filters.clearAll' | 'catalog.filters.select.addFilter' | 'catalog.filters.select.all' | 'catalog.filters.done' | 'catalog.catalogs.all.title' | 'catalog.catalogs.all.description' | 'catalog.catalogs.all.switcherLabel' | 'catalog.catalogs.service.title' | 'catalog.catalogs.service.description' | 'catalog.catalogs.service.switcherLabel' | 'catalog.catalogs.user.title' | 'catalog.catalogs.user.description' | 'catalog.catalogs.user.switcherLabel' | 'catalog.catalogs.team.title' | 'catalog.catalogs.team.description' | 'catalog.catalogs.team.switcherLabel' | 'catalog.catalogs.domain.title' | 'catalog.catalogs.domain.description' | 'catalog.catalogs.domain.switcherLabel' | 'catalog.catalogs.apiDescription.title' | 'catalog.catalogs.apiDescription.description' | 'catalog.catalogs.apiDescription.switcherLabel' | 'catalog.catalogs.dataSchema.title' | 'catalog.catalogs.dataSchema.description' | 'catalog.catalogs.dataSchema.switcherLabel' | 'catalog.catalogs.apiOperation.title' | 'catalog.catalogs.apiOperation.description' | 'catalog.catalogs.apiOperation.switcherLabel' | 'catalog.entity.metadata.title' | 'catalog.entity.schema.title' | 'catalog.entity.properties.apiDescription.title' | 'catalog.backToAllLabel' | 'catalog.notConnected' | 'catalog.tags.label' | 'catalog.sort' | 'catalog.catalogs.label' | 'catalog.owners.label' | 'catalog.repositories.label' | 'catalog.email.label' | 'catalog.format.label' | 'catalog.entityType.label' | 'catalog.domains.label' | 'catalog.contact.label' | 'catalog.methodAndPath.label' | 'catalog.links.label' | 'catalog.metadata.domains' | 'catalog.metadata.owners' | 'catalog.history.button.label' | 'catalog.history.sidebar.title' | 'catalog.history.sidebar.close' | 'catalog.history.version.label' | 'catalog.filters.close' | 'catalog.history.version.notSpecified' | 'catalog.history.version.default' | 'catalog.history.revisions.limitMessage' | 'catalog.history.revision.current' | 'catalog.history.revisions.showLess' | 'catalog.history.revisions.showMore' | 'navigationTabs.label' | 'sidebar.menu.backLabel' | 'sidebar.menu.backToLabel' | 'sidebar.actions.show' | 'sidebar.actions.hide' | 'sidebar.actions.changeToSingleColumn' | 'sidebar.actions.changeToTwoColumns' | 'sidebar.actions.singleColumn' | 'sidebar.actions.twoColumns' | 'versionPicker.label' | 'versionPicker.unversioned' | 'codeSnippet.copy.buttonText' | 'codeSnippet.copy.tooltipText' | 'codeSnippet.copy.toasterText' | 'markdown.editPage.text' | 'feedback.settings.comment.submitText' | 'feedback.settings.comment.label' | 'feedback.settings.comment.send' | 'feedback.settings.comment.cancel' | 'feedback.settings.comment.maxLength' | 'feedback.settings.comment.satisfiedLabel' | 'feedback.settings.comment.neutralLabel' | 'feedback.settings.comment.dissatisfiedLabel' | 'feedback.settings.submitText' | 'feedback.settings.label' | 'feedback.settings.reasons.label' | 'feedback.submit' | 'feedback.cancel' | 'feedback.settings.comment.likeLabel' | 'feedback.settings.comment.dislikeLabel' | 'feedback.sentiment.thumbUp' | 'feedback.sentiment.thumbDown' | 'feedback.settings.leftScaleLabel' | 'feedback.settings.rightScaleLabel' | 'feedback.settings.optionalEmail.placeholder' | 'feedback.settings.optionalEmail.label' | 'codeSnippet.report.buttonText' | 'codeSnippet.report.tooltipText' | 'codeSnippet.report.label' | 'codeSnippet.expand.tooltipText' | 'codeSnippet.collapse.tooltipText' | 'jsonViewer.showMore' | 'jsonViewer.showLess' | 'userMenu.login' | 'userMenu.logout' | 'userMenu.devOnboardingLabel' | 'mobileMenu.mainMenu' | 'mobileMenu.previous' | 'mobileMenu.products' | 'mobileMenu.version' | 'navbar.label' | 'navbar.products' | 'page.nextButton' | 'page.previousButton' | 'page.actions.copyButtonText' | 'page.actions.copyTitle' | 'page.actions.copyDescription' | 'page.actions.viewAsMdTitle' | 'page.actions.viewAsMdButtonText' | 'page.actions.viewAsMdDescription' | 'page.actions.chatGptTitle' | 'page.actions.chatGptButtonText' | 'page.actions.chatGptDescription' | 'page.actions.claudeTitle' | 'page.actions.claudeButtonText' | 'page.actions.claudeDescription' | 'page.actions.cursorMcpButtonText' | 'page.actions.cursorMcpTitle' | 'page.actions.cursorMcpDescription' | 'page.actions.connectMcp' | 'page.actions.connectMcp.cursor' | 'page.actions.connectMcp.cursorDescription' | 'page.actions.connectMcp.vscode' | 'page.actions.connectMcp.vscodeDescription' | 'page.actions.connectMcp.claudeCode' | 'page.actions.connectMcp.claudeCodeDescription' | 'page.actions.connectMcp.codex' | 'page.actions.connectMcp.codexDescription' | 'page.actions.connectMcp.copyConfig' | 'page.actions.connectMcp.copyConfigDescription' | 'page.actions.connectMcp.moreOptions' | 'page.actions.moreActions' | 'openapi.download.description.title' | 'openapi.info.title' | 'openapi.info.contact.url' | 'openapi.info.contact.name' | 'openapi.info.license' | 'openapi.info.termsOfService' | 'openapi.info.metadata.title' | 'graphql.info.metadata.title' | 'openapi.key' | 'openapi.value' | 'openapi.enum' | 'openapi.items' | 'openapi.default' | 'openapi.variable' | 'openapi.variables' | 'openapi.actions.show' | 'openapi.actions.hide' | 'openapi.actions.more' | 'openapi.languages.title' | 'openapi.languages.moreButton.tooltipText' | 'openapi.servers.title' | 'openapi.operations' | 'openapi.schemas' | 'openapi.webhooks' | 'openapi.description' | 'openapi.badges.deprecated' | 'openapi.badges.required' | 'openapi.badges.webhook' | 'openapi.request' | 'openapi.path' | 'openapi.query' | 'openapi.querystring' | 'openapi.cookie' | 'openapi.header' | 'openapi.body' | 'openapi.responses' | 'openapi.response' | 'openapi.callbacks' | 'openapi.callbackRequest' | 'openapi.callbackResponse' | 'openapi.payload' | 'openapi.discriminator' | 'openapi.contentType' | 'openapi.tryIt' | 'openapi.loading' | 'openapi.example' | 'openapi.examples' | 'openapi.additionalProperties' | 'openapi.patternProperties' | 'openapi.required' | 'openapi.recursive' | 'openapi.complex' | 'openapi.property' | 'openapi.properties' | 'openapi.details' | 'openapi.hideExample' | 'openapi.showExample' | 'openapi.expandAll' | 'openapi.deepLink.tooltip' | 'openapi.collapseAll' | 'openapi.viewSecurityDetails' | 'openapi.noResponseExample' | 'openapi.discriminator.searchPlaceholder' | 'openapi.discriminator.searchNoResults' | 'openapi.discriminator.defaultMapping' | 'openapi.discriminator.defaultMappingTooltip' | 'openapi.noResponseContent' | 'openapi.noRequestPayload' | 'openapi.noRequestData' | 'openapi.hidePattern' | 'openapi.showPattern' | 'openapi.authorizationUrl' | 'openapi.tokenUrl' | 'openapi.refreshUrl' | 'openapi.showOptionalScopes' | 'openapi.hideOptionalScopes' | 'openapi.security' | 'openapi.httpAuthorizationScheme' | 'openapi.bearerFormat' | 'openapi.parameterName' | 'openapi.flowType' | 'openapi.connectUrl' | 'openapi.requiredScopes' | 'openapi.unsupportedLanguage' | 'openapi.failedToGenerateCodeSample' | 'openapi.schemaCatalogLink.title' | 'openapi.schemaCatalogLink.copyButtonTooltip' | 'openapi.schemaCatalogLink.copiedTooltip' | 'openapi.mcp.title' | 'openapi.mcp.endpoint' | 'openapi.mcp.tools' | 'openapi.mcp.protocolVersion' | 'openapi.mcp.capabilities' | 'openapi.mcp.experimentalCapabilities' | 'openapi.mcp.inputSchema' | 'openapi.mcp.inputExample' | 'openapi.mcp.outputSchema' | 'openapi.mcp.outputExample' | 'openapi.mcp.exampleTitle' | 'openapi.mcp.argumentsExample' | 'asyncapi.download.description.title' | 'asyncapi.info.title' | 'asyncapi.info.contact.url' | 'asyncapi.info.contact.name' | 'asyncapi.info.license' | 'asyncapi.info.termsOfService' | 'asyncapi.key' | 'asyncapi.value' | 'asyncapi.variables' | 'asyncapi.required' | 'asyncapi.requiredScopes' | 'asyncapi.viewSecurityDetails' | 'graphql.download.description.title' | 'graphql.info.title' | 'graphql.info.contact.url' | 'graphql.info.contact.name' | 'graphql.info.license' | 'graphql.info.termsOfService' | 'graphql.overview' | 'graphql.metadata' | 'graphql.key' | 'graphql.value' | 'graphql.queries' | 'graphql.mutations' | 'graphql.subscriptions' | 'graphql.directives' | 'graphql.objects' | 'graphql.interfaces' | 'graphql.unions' | 'graphql.enums' | 'graphql.inputs' | 'graphql.scalars' | 'graphql.actions.show' | 'graphql.actions.hide' | 'graphql.actions.more' | 'graphql.fields' | 'graphql.inputFields' | 'graphql.values' | 'graphql.arguments.label' | 'graphql.arguments.show' | 'graphql.arguments.hide' | 'graphql.arguments.here' | 'graphql.returnTypes.label' | 'graphql.returnTypes.show' | 'graphql.returnTypes.hide' | 'graphql.possibleTypes' | 'graphql.defaultValue' | 'graphql.deprecationReason' | 'graphql.requiredScopes' | 'graphql.viewSecurityDetails' | 'graphql.objectScopes' | 'graphql.fieldScopes' | 'graphql.implementedInterfaces' | 'graphql.implementedBy' | 'graphql.nonNull' | 'graphql.required' | 'asyncapi.badges.deprecated' | 'graphql.badges.deprecated' | 'asyncapi.actions.show' | 'asyncapi.actions.hide' | 'asyncapi.actions.more' | 'asyncapi.payload' | 'asyncapi.parameters' | 'asyncapi.messages' | 'asyncapi.contentType' | 'asyncapi.moreDetails' | 'asyncapi.property' | 'asyncapi.properties' | 'asyncapi.details' | 'asyncapi.reply' | 'asyncapi.servers.title' | 'graphql.variables' | 'graphql.querySample' | 'graphql.mutationSample' | 'graphql.subscriptionSample' | 'graphql.responseSample' | 'graphql.locations' | 'graphql.sample' | 'graphql.referenced' | 'graphql.content.fragment' | 'button.download.tooltipText' | 'button.externalLink.tooltipText' | 'button.email.tooltipText' | 'codeWalkthrough.download' | 'codeWalkthrough.preview' | 'time.justNow' | 'time.past.second' | 'time.past.seconds' | 'time.past.minute' | 'time.past.minutes' | 'time.past.hour' | 'time.past.hours' | 'time.past.day' | 'time.past.days' | 'time.past.week' | 'time.past.weeks' | 'time.past.month' | 'time.past.months' | 'time.past.year' | 'time.past.years' | 'page.internalServerError.title' | 'page.internalServerError.description' | 'page.skipToContent.label' | 'select.noResults' | 'loaders.loading' | 'filter.dateRange.from' | 'filter.dateRange.to' | 'diagram.openFullscreen' | 'diagram.zoomIn' | 'diagram.zoomOut' | 'diagram.reset' | 'diagram.close' | 'diagram.viewer' | 'consent.title' | 'consent.message' | 'consent.privacyPolicy' | 'consent.customize' | 'consent.rejectAll' | 'consent.acceptAll' | 'consent.acceptAllCookies' | 'consent.savePreferences' | 'consent.dialog.title' | 'consent.dialog.description' | 'consent.dialog.close' | 'consent.alwaysOn' | 'consent.alwaysOff' | 'consent.gpcNotice' | 'consent.category.necessary.title' | 'consent.category.necessary.description' | 'consent.category.analytics.title' | 'consent.category.analytics.description' | 'consent.category.marketing.title' | 'consent.category.marketing.description' | 'consent.settingsLink';
|
|
3
3
|
export type Locale = {
|
|
4
4
|
code: string;
|
|
5
5
|
name: string;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type NavigationTabMenuEntry = {
|
|
2
|
+
tabId: string;
|
|
3
|
+
label: string;
|
|
4
|
+
labelTranslationKey?: string;
|
|
5
|
+
link: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
srcSet?: string;
|
|
8
|
+
external?: boolean;
|
|
9
|
+
target?: '_self' | '_blank';
|
|
10
|
+
};
|
|
11
|
+
export type NavigationTab = {
|
|
12
|
+
tabId: string;
|
|
13
|
+
label: string;
|
|
14
|
+
labelTranslationKey?: string;
|
|
15
|
+
link?: string;
|
|
16
|
+
icon?: string;
|
|
17
|
+
srcSet?: string;
|
|
18
|
+
menu?: NavigationTabMenuEntry[];
|
|
19
|
+
};
|
|
20
|
+
export type NavigationTabsState = {
|
|
21
|
+
tabs: NavigationTab[];
|
|
22
|
+
activeTab?: NavigationTab;
|
|
23
|
+
activeMenuEntry?: NavigationTabMenuEntry;
|
|
24
|
+
};
|
|
25
|
+
export type NavigationTabItem = {
|
|
26
|
+
type: 'link';
|
|
27
|
+
label: string;
|
|
28
|
+
labelTranslationKey?: string;
|
|
29
|
+
link: string;
|
|
30
|
+
icon?: string;
|
|
31
|
+
srcSet?: string;
|
|
32
|
+
external?: boolean;
|
|
33
|
+
target?: '_self' | '_blank';
|
|
34
|
+
active?: boolean;
|
|
35
|
+
};
|
|
36
|
+
type NavigationTabGroupItem = {
|
|
37
|
+
type: 'group';
|
|
38
|
+
label: string;
|
|
39
|
+
labelTranslationKey?: string;
|
|
40
|
+
icon?: string;
|
|
41
|
+
srcSet?: string;
|
|
42
|
+
items: NavigationTabItem[];
|
|
43
|
+
active?: boolean;
|
|
44
|
+
};
|
|
45
|
+
export type NavigationTabRowItem = NavigationTabItem | NavigationTabGroupItem;
|
|
46
|
+
export type NavigationTabsConfig = {
|
|
47
|
+
items: NavigationTabRowItem[];
|
|
48
|
+
};
|
|
49
|
+
export {};
|
|
@@ -17,6 +17,7 @@ export * from './type-guards';
|
|
|
17
17
|
export * from './dom';
|
|
18
18
|
export * from './toc';
|
|
19
19
|
export * from './menu';
|
|
20
|
+
export * from './navigation-tabs';
|
|
20
21
|
export * from './load-and-navigate';
|
|
21
22
|
export * from './get-scorecard-color-variable';
|
|
22
23
|
export * from './change-text-casing';
|
package/lib/core/utils/index.js
CHANGED
|
@@ -33,6 +33,7 @@ __exportStar(require("./type-guards"), exports);
|
|
|
33
33
|
__exportStar(require("./dom"), exports);
|
|
34
34
|
__exportStar(require("./toc"), exports);
|
|
35
35
|
__exportStar(require("./menu"), exports);
|
|
36
|
+
__exportStar(require("./navigation-tabs"), exports);
|
|
36
37
|
__exportStar(require("./load-and-navigate"), exports);
|
|
37
38
|
__exportStar(require("./get-scorecard-color-variable"), exports);
|
|
38
39
|
__exportStar(require("./change-text-casing"), exports);
|
package/lib/core/utils/menu.d.ts
CHANGED
|
@@ -2,9 +2,13 @@ import type { ResolvedNavItem, Version } from '@redocly/config';
|
|
|
2
2
|
import type { Location } from 'react-router';
|
|
3
3
|
import type { Locale, TFunction } from '../types/l10n';
|
|
4
4
|
import type { ItemState } from '../types/sidebar';
|
|
5
|
+
import type { NavigationTabsState } from '../types/navigation-tabs';
|
|
5
6
|
import { MenuItemType } from '../constants/common';
|
|
6
7
|
export declare const mapNavbarItems: (items: ResolvedNavItem[], defaultLocale: string, currentLocale: string, locales: Locale[], location: Location) => ItemState[];
|
|
7
8
|
export declare const isItemActive: (item: ResolvedNavItem, defaultLocale: string, currentLocale: string, locales: Locale[], location: Location) => boolean;
|
|
8
9
|
export declare const buildLanguagesGroup: (locales: Locale[], defaultLocale: string, currentLocale: string) => ResolvedNavItem | undefined;
|
|
9
10
|
export declare const buildVersionSection: (translate: TFunction, versions: Version[], activeVersion?: Version) => ResolvedNavItem[];
|
|
11
|
+
export declare const buildNavigationTabsSelect: ({ navigationTabs, }: {
|
|
12
|
+
navigationTabs: NavigationTabsState | undefined;
|
|
13
|
+
}) => ItemState | undefined;
|
|
10
14
|
export declare function getMenuItemType(item: ItemState): MenuItemType;
|
package/lib/core/utils/menu.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildVersionSection = exports.buildLanguagesGroup = exports.isItemActive = exports.mapNavbarItems = void 0;
|
|
3
|
+
exports.buildNavigationTabsSelect = exports.buildVersionSection = exports.buildLanguagesGroup = exports.isItemActive = exports.mapNavbarItems = void 0;
|
|
4
4
|
exports.getMenuItemType = getMenuItemType;
|
|
5
5
|
const common_1 = require("../constants/common");
|
|
6
6
|
const urls_1 = require("./urls");
|
|
7
|
+
const navigation_tabs_1 = require("./navigation-tabs");
|
|
7
8
|
const TRANSLATION_KEYS = {
|
|
8
9
|
version: 'mobileMenu.version',
|
|
9
10
|
};
|
|
@@ -35,7 +36,7 @@ const buildLanguagesGroup = (locales, defaultLocale, currentLocale) => {
|
|
|
35
36
|
.filter((locale) => locale.code !== currentLocale)
|
|
36
37
|
.map((locale) => {
|
|
37
38
|
const newLangPathname = (0, urls_1.getPathnameForLocale)((0, urls_1.withoutPathPrefix)(location.pathname), defaultLocale, locale.code, locales);
|
|
38
|
-
const newUrlWithLanguage = `${newLangPathname}${location.search}${location.hash}`;
|
|
39
|
+
const newUrlWithLanguage = `${(0, urls_1.addLeadingSlash)(newLangPathname)}${location.search}${location.hash}`;
|
|
39
40
|
return {
|
|
40
41
|
type: 'link',
|
|
41
42
|
label: locale.name || locale.code || '',
|
|
@@ -72,9 +73,30 @@ const buildVersionSection = (translate, versions, activeVersion) => {
|
|
|
72
73
|
];
|
|
73
74
|
};
|
|
74
75
|
exports.buildVersionSection = buildVersionSection;
|
|
76
|
+
const buildNavigationTabsSelect = ({ navigationTabs, }) => {
|
|
77
|
+
var _a;
|
|
78
|
+
var _b;
|
|
79
|
+
const tabs = (_a = (0, navigation_tabs_1.toNavigationTabsConfig)({ state: navigationTabs })) === null || _a === void 0 ? void 0 : _a.items;
|
|
80
|
+
if (!tabs) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const activeTab = tabs.find((tab) => tab.active);
|
|
84
|
+
return {
|
|
85
|
+
type: common_1.MenuItemType.Select,
|
|
86
|
+
label: (_b = activeTab === null || activeTab === void 0 ? void 0 : activeTab.label) !== null && _b !== void 0 ? _b : 'Navigation tabs',
|
|
87
|
+
labelTranslationKey: activeTab ? activeTab.labelTranslationKey : 'navigationTabs.label',
|
|
88
|
+
items: tabs.map(toNavigationTabOption),
|
|
89
|
+
active: false,
|
|
90
|
+
hasActiveSubItem: !!activeTab,
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
exports.buildNavigationTabsSelect = buildNavigationTabsSelect;
|
|
75
94
|
function getMenuItemType(item) {
|
|
76
95
|
var _a, _b;
|
|
77
|
-
if (item.type === common_1.MenuItemType.
|
|
96
|
+
if (item.type === common_1.MenuItemType.Select) {
|
|
97
|
+
return common_1.MenuItemType.Select;
|
|
98
|
+
}
|
|
99
|
+
else if (item.type === common_1.MenuItemType.Separator) {
|
|
78
100
|
return common_1.MenuItemType.Separator;
|
|
79
101
|
}
|
|
80
102
|
else if (item.menuStyle === 'drilldown') {
|
|
@@ -89,4 +111,21 @@ function getMenuItemType(item) {
|
|
|
89
111
|
else
|
|
90
112
|
return common_1.MenuItemType.Default;
|
|
91
113
|
}
|
|
114
|
+
function toNavigationTabOption(tab) {
|
|
115
|
+
var _a;
|
|
116
|
+
const landing = tab.type === 'group' ? ((_a = tab.items.find((entry) => entry.active)) !== null && _a !== void 0 ? _a : tab.items[0]) : tab;
|
|
117
|
+
return {
|
|
118
|
+
type: tab.type,
|
|
119
|
+
label: tab.label,
|
|
120
|
+
labelTranslationKey: tab.labelTranslationKey,
|
|
121
|
+
icon: tab.icon,
|
|
122
|
+
srcSet: tab.srcSet,
|
|
123
|
+
link: landing === null || landing === void 0 ? void 0 : landing.link,
|
|
124
|
+
external: landing === null || landing === void 0 ? void 0 : landing.external,
|
|
125
|
+
target: landing === null || landing === void 0 ? void 0 : landing.target,
|
|
126
|
+
items: [],
|
|
127
|
+
active: !!tab.active,
|
|
128
|
+
hasActiveSubItem: false,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
92
131
|
//# sourceMappingURL=menu.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ThemeHooks } from '../types/hooks';
|
|
2
|
+
import type { NavigationTabsConfig, NavigationTabsState } from '../types/navigation-tabs';
|
|
3
|
+
type NavbarItemClickedPayload = Parameters<ReturnType<ThemeHooks['useTelemetry']>['sendNavbarMenuItemClickedMessage']>[0];
|
|
4
|
+
export declare function toNavigationTabsConfig({ state, }: {
|
|
5
|
+
state: NavigationTabsState | undefined;
|
|
6
|
+
}): NavigationTabsConfig | undefined;
|
|
7
|
+
export declare function getNavbarItemClickedPayload(type: 'link' | 'group'): NavbarItemClickedPayload;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.toNavigationTabsConfig = toNavigationTabsConfig;
|
|
15
|
+
exports.getNavbarItemClickedPayload = getNavbarItemClickedPayload;
|
|
16
|
+
const get_base_data_attributes_1 = require("./telemetry/get-base-data-attributes");
|
|
17
|
+
function toNavigationTabsConfig({ state, }) {
|
|
18
|
+
const items = toNavigationTabEntries(state).map((entry) => entry.kind === 'menu'
|
|
19
|
+
? {
|
|
20
|
+
type: 'group',
|
|
21
|
+
label: entry.tab.label,
|
|
22
|
+
labelTranslationKey: entry.tab.labelTranslationKey,
|
|
23
|
+
icon: entry.tab.icon,
|
|
24
|
+
srcSet: entry.tab.srcSet,
|
|
25
|
+
items: entry.entries.map((_a) => {
|
|
26
|
+
var { active } = _a, link = __rest(_a, ["active"]);
|
|
27
|
+
return toRowLink(link, active);
|
|
28
|
+
}),
|
|
29
|
+
active: entry.active,
|
|
30
|
+
}
|
|
31
|
+
: toRowLink(entry.link, entry.active));
|
|
32
|
+
return items.length ? { items } : undefined;
|
|
33
|
+
}
|
|
34
|
+
function getNavbarItemClickedPayload(type) {
|
|
35
|
+
return [
|
|
36
|
+
Object.assign(Object.assign({}, (0, get_base_data_attributes_1.getBaseDataAttributes)('navbarItem', 'navbar')), { type }),
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
function toNavigationTabEntries(state) {
|
|
40
|
+
if (!(state === null || state === void 0 ? void 0 : state.tabs.length))
|
|
41
|
+
return [];
|
|
42
|
+
return state.tabs.flatMap((tab) => {
|
|
43
|
+
var _a;
|
|
44
|
+
const active = ((_a = state.activeTab) === null || _a === void 0 ? void 0 : _a.tabId) === tab.tabId;
|
|
45
|
+
if (tab.menu) {
|
|
46
|
+
const entries = tab.menu
|
|
47
|
+
.filter((menuEntry) => !!menuEntry.link)
|
|
48
|
+
.map((_a) => { var _b; var { tabId } = _a, link = __rest(_a, ["tabId"]); return (Object.assign(Object.assign({}, link), { active: active && tabId === ((_b = state.activeMenuEntry) === null || _b === void 0 ? void 0 : _b.tabId) })); });
|
|
49
|
+
return entries.length ? [{ kind: 'menu', tab, entries, active }] : [];
|
|
50
|
+
}
|
|
51
|
+
if (!tab.link)
|
|
52
|
+
return [];
|
|
53
|
+
return [
|
|
54
|
+
{
|
|
55
|
+
kind: 'link',
|
|
56
|
+
link: {
|
|
57
|
+
label: tab.label,
|
|
58
|
+
labelTranslationKey: tab.labelTranslationKey,
|
|
59
|
+
link: tab.link,
|
|
60
|
+
icon: tab.icon,
|
|
61
|
+
srcSet: tab.srcSet,
|
|
62
|
+
},
|
|
63
|
+
active,
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function toRowLink(link, active) {
|
|
69
|
+
return Object.assign(Object.assign({ type: 'link' }, link), { active });
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=navigation-tabs.js.map
|
package/lib/index.d.ts
CHANGED
|
@@ -46,6 +46,11 @@ export * from './components/Navbar/Navbar';
|
|
|
46
46
|
export * from './components/Navbar/NavbarItem';
|
|
47
47
|
export * from './components/Navbar/NavbarLogo';
|
|
48
48
|
export * from './components/Navbar/NavbarMenu';
|
|
49
|
+
export * from './components/NavigationTabs/NavigationTabs';
|
|
50
|
+
export { NavigationTab } from './components/NavigationTabs/NavigationTab';
|
|
51
|
+
export type { NavigationTabProps } from './components/NavigationTabs/NavigationTab';
|
|
52
|
+
export * from './components/NavigationTabs/NavigationTabMenu';
|
|
53
|
+
export * from './components/NavigationTabs/NavigationTabContent';
|
|
49
54
|
export * from './components/Footer/Footer';
|
|
50
55
|
export * from './components/Footer/FooterColumn';
|
|
51
56
|
export * from './components/Footer/FooterCopyright';
|
package/lib/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.markdoc = void 0;
|
|
39
|
+
exports.markdoc = exports.NavigationTab = void 0;
|
|
40
40
|
__exportStar(require("./core"), exports);
|
|
41
41
|
__exportStar(require("./ext/configure"), exports);
|
|
42
42
|
/* Components */
|
|
@@ -90,6 +90,12 @@ __exportStar(require("./components/Navbar/Navbar"), exports);
|
|
|
90
90
|
__exportStar(require("./components/Navbar/NavbarItem"), exports);
|
|
91
91
|
__exportStar(require("./components/Navbar/NavbarLogo"), exports);
|
|
92
92
|
__exportStar(require("./components/Navbar/NavbarMenu"), exports);
|
|
93
|
+
/* NavigationTabs */
|
|
94
|
+
__exportStar(require("./components/NavigationTabs/NavigationTabs"), exports);
|
|
95
|
+
var NavigationTab_1 = require("./components/NavigationTabs/NavigationTab");
|
|
96
|
+
Object.defineProperty(exports, "NavigationTab", { enumerable: true, get: function () { return NavigationTab_1.NavigationTab; } });
|
|
97
|
+
__exportStar(require("./components/NavigationTabs/NavigationTabMenu"), exports);
|
|
98
|
+
__exportStar(require("./components/NavigationTabs/NavigationTabContent"), exports);
|
|
93
99
|
/* Footer */
|
|
94
100
|
__exportStar(require("./components/Footer/Footer"), exports);
|
|
95
101
|
__exportStar(require("./components/Footer/FooterColumn"), exports);
|
|
@@ -16,7 +16,7 @@ function PageLayout({ sidebar, children, }) {
|
|
|
16
16
|
const Container = styled_components_1.default.div `
|
|
17
17
|
display: flex;
|
|
18
18
|
flex-direction: row;
|
|
19
|
-
min-height: calc(100vh - var(--navbar-
|
|
19
|
+
min-height: calc(100vh - var(--navbar-offset));
|
|
20
20
|
|
|
21
21
|
@media screen and (min-width: ${utils_1.breakpoints.max}) {
|
|
22
22
|
max-width: var(--container-max-width);
|
|
@@ -11,8 +11,8 @@ const SkipContent_1 = require("../components/SkipContent/SkipContent");
|
|
|
11
11
|
const AIAssistantButton_1 = require("../components/Buttons/AIAssistantButton");
|
|
12
12
|
const hooks_1 = require("../core/hooks");
|
|
13
13
|
function RootLayout({ children }) {
|
|
14
|
-
const {
|
|
15
|
-
const { askAi } =
|
|
14
|
+
const { useSearchFeatures } = (0, hooks_1.useThemeHooks)();
|
|
15
|
+
const { askAi } = useSearchFeatures();
|
|
16
16
|
return (react_1.default.createElement("div", { "data-component-name": "layouts/RootLayout" },
|
|
17
17
|
react_1.default.createElement(SkipContent_1.SkipContent, null),
|
|
18
18
|
react_1.default.createElement(Navbar_1.Navbar, null),
|
|
@@ -41,7 +41,7 @@ const FilterWrapper = styled_components_1.default.div `
|
|
|
41
41
|
padding-right: var(--spacing-xl);
|
|
42
42
|
padding-left: var(--spacing-xl);
|
|
43
43
|
padding-bottom: var(--spacing-xs);
|
|
44
|
-
top: var(--navbar-height);
|
|
44
|
+
top: var(--navbar-stack-height);
|
|
45
45
|
background-color: var(--bg-color);
|
|
46
46
|
z-index: var(--z-index-raised);
|
|
47
47
|
max-width: var(--md-content-max-width);
|
|
@@ -68,9 +68,9 @@ const CodePanelWrapper = styled_components_1.default.div `
|
|
|
68
68
|
border: 1px solid var(--code-panel-border-color);
|
|
69
69
|
border-radius: var(--code-panel-border-radius);
|
|
70
70
|
overflow: clip;
|
|
71
|
-
--code-block-max-height: calc(100vh - var(--navbar-height) - 2 * var(--spacing-xl));
|
|
72
|
-
height: calc(100vh - var(--navbar-height) - 2 * var(--spacing-xl));
|
|
71
|
+
--code-block-max-height: calc(100vh - var(--navbar-stack-height) - 2 * var(--spacing-xl));
|
|
72
|
+
height: calc(100vh - var(--navbar-stack-height) - 2 * var(--spacing-xl));
|
|
73
73
|
position: sticky;
|
|
74
|
-
top: calc(var(--navbar-height) + var(--spacing-xl));
|
|
74
|
+
top: calc(var(--navbar-stack-height) + var(--spacing-xl));
|
|
75
75
|
`;
|
|
76
76
|
//# sourceMappingURL=CodePanel.js.map
|
|
@@ -95,7 +95,7 @@ const DocsPanel = styled_components_1.default.div `
|
|
|
95
95
|
flex-direction: column;
|
|
96
96
|
|
|
97
97
|
min-height: 0;
|
|
98
|
-
min-height: calc(100vh - var(--navbar-height));
|
|
98
|
+
min-height: calc(100vh - var(--navbar-stack-height));
|
|
99
99
|
|
|
100
100
|
padding-top: var(--spacing-xl);
|
|
101
101
|
padding-right: var(--spacing-xs);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/theme",
|
|
3
|
-
"version": "0.70.0-next.
|
|
3
|
+
"version": "0.70.0-next.4",
|
|
4
4
|
"description": "Shared UI components lib",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"theme",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/core": "7.29.7",
|
|
44
44
|
"@markdoc/markdoc": "0.5.2",
|
|
45
|
-
"@redocly/realm-asyncapi-sdk": "0.16.0-next.
|
|
45
|
+
"@redocly/realm-asyncapi-sdk": "0.16.0-next.2",
|
|
46
46
|
"@shikijs/types": "3.21.0",
|
|
47
47
|
"@testing-library/react": "16.3.0",
|
|
48
48
|
"@testing-library/user-event": "14.6.1",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"webpack": "5.105.2"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@redocly/config": "0.
|
|
74
|
+
"@redocly/config": "0.61.0",
|
|
75
75
|
"@tanstack/react-query": "5.62.3",
|
|
76
76
|
"@tanstack/react-virtual": "3.13.0",
|
|
77
77
|
"@xyflow/react": "12.8.3",
|
|
@@ -256,7 +256,7 @@ const CatalogDescription = styled.p`
|
|
|
256
256
|
const CatalogPageWrapper = styled.div`
|
|
257
257
|
--sidebar-width: var(--catalog-sidebar-width);
|
|
258
258
|
|
|
259
|
-
height: calc(100vh - var(--navbar-
|
|
259
|
+
height: calc(100vh - var(--navbar-offset));
|
|
260
260
|
display: flex;
|
|
261
261
|
flex-direction: column;
|
|
262
262
|
overflow: hidden;
|
package/src/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.tsx
CHANGED
|
@@ -164,10 +164,10 @@ export function CatalogEntityHistorySidebar({
|
|
|
164
164
|
|
|
165
165
|
const SidebarOverlay = styled.div`
|
|
166
166
|
position: fixed;
|
|
167
|
-
top:
|
|
167
|
+
top: var(--navbar-offset);
|
|
168
168
|
left: 0;
|
|
169
169
|
width: var(--sidebar-width);
|
|
170
|
-
height: calc(100vh - var(--navbar-
|
|
170
|
+
height: calc(100vh - var(--navbar-offset));
|
|
171
171
|
padding: var(--catalog-history-sidebar-padding);
|
|
172
172
|
background-color: var(--catalog-history-sidebar-bg-color);
|
|
173
173
|
border-right: 1px solid var(--catalog-history-sidebar-border-color);
|
|
@@ -120,7 +120,7 @@ const SplitViewWrapper = styled.div`
|
|
|
120
120
|
const SchemaSampleWrapper = styled.div`
|
|
121
121
|
flex: 1;
|
|
122
122
|
position: sticky;
|
|
123
|
-
top: calc(var(--navbar-
|
|
123
|
+
top: calc(var(--navbar-offset) + var(--spacing-md));
|
|
124
124
|
align-self: flex-start;
|
|
125
125
|
padding-top: var(--spacing-sm);
|
|
126
126
|
`;
|
|
@@ -23,7 +23,7 @@ export function CatalogMobileFiltersPanel({
|
|
|
23
23
|
|
|
24
24
|
const CatalogMobileFiltersPanelWrapper = styled.div`
|
|
25
25
|
width: 100%;
|
|
26
|
-
max-height: calc(100vh - var(--navbar-
|
|
26
|
+
max-height: calc(100vh - var(--navbar-offset));
|
|
27
27
|
overflow-y: auto;
|
|
28
28
|
background: var(--sidebar-bg-color);
|
|
29
29
|
display: flex;
|
package/src/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.tsx
CHANGED
|
@@ -27,10 +27,10 @@ export function CatalogMobileFiltersPanelOverlay({
|
|
|
27
27
|
const CatalogMobileFiltersPanelOverlayWrapper = styled.div`
|
|
28
28
|
display: none;
|
|
29
29
|
position: fixed;
|
|
30
|
-
top:
|
|
30
|
+
top: var(--navbar-offset);
|
|
31
31
|
left: 0;
|
|
32
32
|
width: 100%;
|
|
33
|
-
height: calc(100vh - var(--navbar-
|
|
33
|
+
height: calc(100vh - var(--navbar-offset));
|
|
34
34
|
z-index: 3;
|
|
35
35
|
background: var(--bg-color);
|
|
36
36
|
flex-direction: column;
|
|
@@ -156,13 +156,16 @@ export const Dropdown = forwardRef<HTMLDivElement, DropdownProps>(
|
|
|
156
156
|
|
|
157
157
|
const triggerChild = React.Children.only(trigger) as ReactElement<TriggerProps>;
|
|
158
158
|
|
|
159
|
+
const isLinkTrigger = Boolean(triggerChild.props?.to || triggerChild.props?.href);
|
|
160
|
+
|
|
159
161
|
const dropdownTrigger = cloneElement(triggerChild, {
|
|
160
162
|
onClick: triggerEvent === 'click' ? handleToggle : undefined,
|
|
163
|
+
'aria-haspopup': 'menu',
|
|
161
164
|
'aria-expanded': isOpen,
|
|
162
165
|
icon: withArrow ? isOpen ? <ChevronUpIcon /> : <ChevronDownIcon /> : undefined,
|
|
163
166
|
...(withArrow ? { iconPosition: 'right' } : {}),
|
|
164
167
|
...triggerChild.props,
|
|
165
|
-
onKeyDown: triggerEvent === 'click' ? handleKeyDown : undefined,
|
|
168
|
+
onKeyDown: triggerEvent === 'click' || !isLinkTrigger ? handleKeyDown : undefined,
|
|
166
169
|
});
|
|
167
170
|
|
|
168
171
|
const menu = (
|
|
@@ -71,7 +71,7 @@ export const Markdown = styled.main
|
|
|
71
71
|
${markdownLinksCss}
|
|
72
72
|
|
|
73
73
|
a[name], [id] {
|
|
74
|
-
scroll-margin-top:
|
|
74
|
+
scroll-margin-top: var(--navbar-offset);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
img,
|
|
@@ -84,7 +84,7 @@ export const Markdown = styled.main
|
|
|
84
84
|
font-family: var(--heading-font-family);
|
|
85
85
|
position: relative;
|
|
86
86
|
|
|
87
|
-
scroll-margin-top:
|
|
87
|
+
scroll-margin-top: var(--navbar-offset);
|
|
88
88
|
${headingAnchorCss(ANCHOR_CLASS)};
|
|
89
89
|
|
|
90
90
|
h1,
|
|
@@ -295,6 +295,7 @@ export const Markdown = styled.main
|
|
|
295
295
|
font-size: inherit;
|
|
296
296
|
font-family: inherit;
|
|
297
297
|
border: none;
|
|
298
|
+
padding: 0;
|
|
298
299
|
}
|
|
299
300
|
}
|
|
300
301
|
|
|
@@ -5,6 +5,7 @@ import type { JSX } from 'react';
|
|
|
5
5
|
import type { DrilldownMenuItemDetails, ItemState } from '@redocly/theme/core/types';
|
|
6
6
|
|
|
7
7
|
import { MenuItem } from '@redocly/theme/components/Menu/MenuItem';
|
|
8
|
+
import { MenuSelect } from '@redocly/theme/components/Menu/MenuSelect';
|
|
8
9
|
import { MenuItemType } from '@redocly/theme/core/constants';
|
|
9
10
|
import { getMenuItemType } from '@redocly/theme/core/utils';
|
|
10
11
|
|
|
@@ -28,6 +29,10 @@ export function Menu({
|
|
|
28
29
|
return (
|
|
29
30
|
<MenuWrapper className={className} data-component-name="Menu/Menu">
|
|
30
31
|
{items.map((item, index) => {
|
|
32
|
+
if (getMenuItemType(item) === MenuItemType.Select) {
|
|
33
|
+
return <MenuSelect item={item} key={`${item.label}-${index}`} />;
|
|
34
|
+
}
|
|
35
|
+
|
|
31
36
|
return (
|
|
32
37
|
<MenuItem
|
|
33
38
|
item={item}
|