@redocly/theme 0.68.0-next.0 → 0.68.0-next.2
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/Accordion/Accordion.d.ts +1 -1
- package/lib/components/Accordion/AccordionBody.d.ts +1 -1
- package/lib/components/Accordion/AccordionHeader.d.ts +1 -1
- package/lib/components/Admonition/Admonition.d.ts +1 -1
- package/lib/components/Breadcrumbs/BreadcrumbDropdown.d.ts +1 -1
- package/lib/components/Button/Button.d.ts +1 -1
- package/lib/components/Buttons/ConnectMCPButton.d.ts +1 -1
- package/lib/components/Buttons/DownloadButton.d.ts +1 -1
- package/lib/components/Buttons/NewTabButton.d.ts +1 -1
- package/lib/components/Catalog/CatalogActionsRow.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntities.js +2 -11
- package/lib/components/Catalog/CatalogEntitiesEmptyState.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNode.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistoryButton.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityHistorySidebar.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityRevisionItem.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityHistory/CatalogEntityVersionItem.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +3 -16
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +3 -9
- package/lib/components/Catalog/CatalogEntity/ShowMoreButton.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntityIcon.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilter.d.ts +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.d.ts +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +1 -7
- package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.d.ts +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterDateRange.d.ts +1 -1
- package/lib/components/Catalog/CatalogFilter/CatalogFilterSelect.d.ts +1 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanel.d.ts +1 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelHeader.d.ts +1 -1
- package/lib/components/Catalog/CatalogMobileFiltersPanel/CatalogMobileFiltersPanelOverlay.d.ts +1 -1
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBar.d.ts +1 -1
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarControls.d.ts +1 -1
- package/lib/components/Catalog/CatalogMobileTopBar/CatalogMobileTopBarFiltersButton.d.ts +1 -1
- package/lib/components/Catalog/CatalogPageDescription.d.ts +1 -1
- package/lib/components/Catalog/CatalogSelector.d.ts +2 -2
- package/lib/components/Catalog/CatalogSortButton.d.ts +1 -1
- package/lib/components/Catalog/CatalogTableView/CatalogEntityRelationCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTableView/CatalogLastUpdateCell.d.ts +1 -1
- package/lib/components/Catalog/CatalogTags.d.ts +1 -1
- package/lib/components/Catalog/CatalogViewModeToggle.d.ts +1 -1
- package/lib/components/CatalogClassic/CatalogClassicVirtualizedGroups.d.ts +1 -1
- package/lib/components/CodeBlock/CodeBlockControls.d.ts +1 -1
- package/lib/components/Feedback/Comment.d.ts +1 -1
- package/lib/components/Feedback/Feedback.js +4 -1
- package/lib/components/Feedback/ReportDialog.d.ts +1 -1
- package/lib/components/Filter/Filter.d.ts +1 -1
- package/lib/components/Filter/FilterCheckboxes.d.ts +1 -1
- package/lib/components/Filter/FilterContent.d.ts +1 -1
- package/lib/components/Filter/FilterPopover.d.ts +1 -1
- package/lib/components/Filter/FilterSelect.d.ts +1 -1
- package/lib/components/Footer/FooterCopyright.d.ts +1 -1
- package/lib/components/LoadMore/LoadMore.d.ts +1 -1
- package/lib/components/Menu/Menu.d.ts +1 -1
- package/lib/components/Menu/MenuContainer.d.ts +1 -1
- package/lib/components/PageNavigation/NavigationButton.d.ts +1 -1
- package/lib/components/PageNavigation/PageNavigation.d.ts +1 -1
- package/lib/components/Panel/Panel.d.ts +1 -1
- package/lib/components/Portal/Portal.d.ts +1 -1
- package/lib/components/Search/FilterFields/SearchFilterFieldSelect.d.ts +1 -1
- package/lib/components/Search/FilterFields/SearchFilterFieldTags.d.ts +1 -1
- package/lib/components/Search/SearchAiActionButtons.d.ts +1 -1
- package/lib/components/Search/SearchAiConversationInput.d.ts +1 -1
- package/lib/components/Search/SearchAiDialog.d.ts +1 -1
- package/lib/components/Search/SearchAiMessage.d.ts +1 -1
- package/lib/components/Search/SearchAiNegativeFeedbackForm.d.ts +1 -1
- package/lib/components/Search/SearchDialog.d.ts +1 -1
- package/lib/components/Search/SearchFilter.d.ts +1 -1
- package/lib/components/Search/SearchFilterField.d.ts +1 -1
- package/lib/components/Search/SearchGroups.d.ts +1 -1
- package/lib/components/Search/SearchInput.d.ts +1 -1
- package/lib/components/Search/SearchItem.d.ts +1 -1
- package/lib/components/Sidebar/Sidebar.d.ts +1 -1
- package/lib/components/SidebarActions/styled.d.ts +3 -3
- package/lib/components/SidebarLogo/SidebarLogo.d.ts +1 -1
- package/lib/components/SvgViewer/SvgViewer.d.ts +1 -1
- package/lib/components/Switch/Switch.d.ts +1 -1
- package/lib/components/Tags/CounterTag.d.ts +2 -2
- package/lib/components/Tags/HttpTag.d.ts +2 -2
- package/lib/components/Toast/Toast.d.ts +1 -1
- package/lib/components/Typography/CompactTypography.d.ts +8 -8
- package/lib/components/UserMenu/LoginButton.d.ts +1 -1
- package/lib/components/UserMenu/UserAvatar.d.ts +1 -1
- package/lib/components/UserMenu/UserInfoMenuItem.d.ts +1 -1
- package/lib/core/hooks/catalog/use-catalog-entity-details.d.ts +1 -1
- package/lib/core/hooks/catalog/use-catalog-table-header-cell-actions.d.ts +1 -1
- package/lib/core/hooks/code-walkthrough/use-code-walkthrough-steps.d.ts +1 -1
- package/lib/core/hooks/menu/use-collapse.d.ts +1 -1
- package/lib/core/hooks/menu/use-mobile-menu-items.d.ts +2 -2
- package/lib/core/hooks/use-active-heading.js +5 -2
- package/lib/core/hooks/use-connect-mcp-button.d.ts +1 -1
- package/lib/core/hooks/use-element-size.d.ts +1 -1
- package/lib/core/hooks/use-product-picker.d.ts +3 -3
- package/lib/core/hooks/use-store.d.ts +1 -1
- package/lib/core/hooks/use-tabs.d.ts +1 -1
- package/lib/core/hooks/use-telemetry-fallback.d.ts +1 -1
- package/lib/core/hooks/use-telemetry-fallback.js +1 -1
- package/lib/core/hooks/use-toast-logic.d.ts +1 -1
- package/lib/core/hooks/use-tooltip-fallback-placement.d.ts +1 -1
- package/lib/core/styles/dark.js +11 -0
- package/lib/core/styles/global.js +36 -34
- package/lib/core/utils/get-operation-color.d.ts +1 -1
- package/lib/core/utils/load-and-navigate.d.ts +1 -1
- package/lib/core/utils/tooltip-placement.d.ts +2 -2
- package/lib/core/utils/transform-revisions-to-version-history.d.ts +1 -1
- package/lib/icons/AddIcon/AddIcon.d.ts +3 -1
- package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.d.ts +3 -1
- package/lib/icons/AiStarsIcon/AiStarsIcon.d.ts +3 -1
- package/lib/icons/AnthropicIcon/AnthropicIcon.d.ts +3 -1
- package/lib/icons/ArrowDownIcon/ArrowDownIcon.d.ts +3 -1
- package/lib/icons/ArrowLeftIcon/ArrowLeftIcon.d.ts +3 -1
- package/lib/icons/ArrowRightIcon/ArrowRightIcon.d.ts +3 -1
- package/lib/icons/ArrowUpRightIcon/ArrowUpRightIcon.d.ts +3 -1
- package/lib/icons/AscSortIcon/AscSortIcon.d.ts +3 -1
- package/lib/icons/BareMetalServerIcon/BareMetalServerIcon.d.ts +3 -1
- package/lib/icons/BookmarkAddIcon/BookmarkAddIcon.d.ts +3 -1
- package/lib/icons/BotIcon/BotIcon.d.ts +3 -1
- package/lib/icons/CDNIcon/CDNIcon.d.ts +3 -1
- package/lib/icons/CardsIcon/CardsIcon.d.ts +3 -1
- package/lib/icons/CaretDownIcon/CaretDownIcon.d.ts +3 -1
- package/lib/icons/CaretUpIcon/CaretUpIcon.d.ts +3 -1
- package/lib/icons/CertificateIcon/CertificateIcon.d.ts +3 -1
- package/lib/icons/CharacterIcon/CharacterIcon.d.ts +3 -1
- package/lib/icons/ChatGptIcon/ChatGptIcon.d.ts +3 -1
- package/lib/icons/ChatIcon/ChatIcon.d.ts +3 -1
- package/lib/icons/CheckboxFilledIcon/CheckboxFilledIcon.d.ts +3 -1
- package/lib/icons/CheckboxIcon/CheckboxIcon.d.ts +6 -4
- package/lib/icons/CheckmarkFilledIcon/CheckmarkFilledIcon.d.ts +3 -1
- package/lib/icons/CheckmarkIcon/CheckmarkIcon.d.ts +3 -1
- package/lib/icons/CheckmarkOutlineIcon/CheckmarkOutlineIcon.d.ts +3 -1
- package/lib/icons/ChevronDownIcon/ChevronDownIcon.d.ts +3 -1
- package/lib/icons/ChevronLeftIcon/ChevronLeftIcon.d.ts +3 -1
- package/lib/icons/ChevronRightIcon/ChevronRightIcon.d.ts +3 -1
- package/lib/icons/ChevronSortIcon/ChevronSortIcon.d.ts +5 -3
- package/lib/icons/ChevronUpIcon/ChevronUpIcon.d.ts +3 -1
- package/lib/icons/CircleDashIcon/CircleDashIcon.d.ts +3 -1
- package/lib/icons/ClaudeIcon/ClaudeIcon.d.ts +3 -1
- package/lib/icons/CleanIcon/CleanIcon.d.ts +3 -1
- package/lib/icons/CloseFilledIcon/CloseFilledIcon.d.ts +3 -1
- package/lib/icons/CloseIcon/CloseIcon.d.ts +3 -1
- package/lib/icons/CloseOutlineIcon/CloseOutlineIcon.d.ts +3 -1
- package/lib/icons/CloudUploadIcon/CloudUploadIcon.d.ts +3 -1
- package/lib/icons/CodeIcon/CodeIcon.d.ts +3 -1
- package/lib/icons/ColorPaletteIcon/ColorPaletteIcon.d.ts +3 -1
- package/lib/icons/ConnectIcon/ConnectIcon.d.ts +3 -1
- package/lib/icons/ContrastIcon/ContrastIcon.d.ts +3 -1
- package/lib/icons/CookieIcon/CookieIcon.d.ts +3 -1
- package/lib/icons/CopyIcon/CopyIcon.d.ts +3 -1
- package/lib/icons/CopyLinkIcon/CopyLinkIcon.d.ts +3 -1
- package/lib/icons/CubeIcon/CubeIcon.d.ts +3 -1
- package/lib/icons/CursorIcon/CursorIcon.d.ts +3 -1
- package/lib/icons/CurveAutoColonIcon/CurveAutoColonIcon.d.ts +3 -1
- package/lib/icons/DataFormatIcon/DataFormatIcon.d.ts +3 -1
- package/lib/icons/DataRefineryIcon/DataRefineryIcon.d.ts +3 -1
- package/lib/icons/DatabaseIcon/DatabaseIcon.d.ts +3 -1
- package/lib/icons/DescSortIcon/DescSortIcon.d.ts +3 -1
- package/lib/icons/DeselectIcon/DeselectIcon.d.ts +3 -1
- package/lib/icons/DirectionRightIcon/DirectionRightIcon.d.ts +3 -1
- package/lib/icons/DocumentAddIcon/DocumentAddIcon.d.ts +3 -1
- package/lib/icons/DocumentBlankIcon/DocumentBlankIcon.d.ts +3 -1
- package/lib/icons/DocumentCssIcon/DocumentCssIcon.d.ts +3 -1
- package/lib/icons/DocumentGraphqlIcon/DocumentGraphqlIcon.d.ts +3 -1
- package/lib/icons/DocumentHtmlIcon/DocumentHtmlIcon.d.ts +3 -1
- package/lib/icons/DocumentIcon/DocumentIcon.d.ts +3 -1
- package/lib/icons/DocumentJavaIcon/DocumentJavaIcon.d.ts +3 -1
- package/lib/icons/DocumentJsIcon/DocumentJsIcon.d.ts +3 -1
- package/lib/icons/DocumentJsonIcon/DocumentJsonIcon.d.ts +3 -1
- package/lib/icons/DocumentMarkdownIcon/DocumentMarkdownIcon.d.ts +3 -1
- package/lib/icons/DocumentPythonIcon/DocumentPythonIcon.d.ts +3 -1
- package/lib/icons/DocumentReactIcon/DocumentReactIcon.d.ts +3 -1
- package/lib/icons/DocumentShellIcon/DocumentShellIcon.d.ts +3 -1
- package/lib/icons/DocumentTsIcon/DocumentTsIcon.d.ts +3 -1
- package/lib/icons/DocumentYamlIcon/DocumentYamlIcon.d.ts +3 -1
- package/lib/icons/DownloadIcon/DownloadIcon.d.ts +3 -1
- package/lib/icons/DraggableIcon/DraggableIcon.d.ts +3 -1
- package/lib/icons/EditIcon/EditIcon.d.ts +3 -1
- package/lib/icons/EmailIcon/EmailIcon.d.ts +3 -1
- package/lib/icons/EntityTypeIcon/EntityTypeIcon.d.ts +3 -1
- package/lib/icons/ErrorFilledIcon/ErrorFilledIcon.d.ts +3 -1
- package/lib/icons/ErrorIcon/ErrorIcon.d.ts +3 -1
- package/lib/icons/ExportIcon/ExportIcon.d.ts +3 -1
- package/lib/icons/FaceDissatisfiedIcon/FaceDissatisfiedIcon.d.ts +3 -1
- package/lib/icons/FaceNeutralIcon/FaceNeutralIcon.d.ts +3 -1
- package/lib/icons/FaceSatisfiedIcon/FaceSatisfiedIcon.d.ts +3 -1
- package/lib/icons/FileIcon/FileIcon.d.ts +3 -1
- package/lib/icons/FileStorageIcon/FileStorageIcon.d.ts +3 -1
- package/lib/icons/FilterIcon/FilterIcon.d.ts +3 -1
- package/lib/icons/FitToViewIcon/FitToViewIcon.d.ts +3 -1
- package/lib/icons/FlowIcon/FlowIcon.d.ts +3 -1
- package/lib/icons/FolderAddIcon/FolderAddIcon.d.ts +3 -1
- package/lib/icons/FolderIcon/FolderIcon.d.ts +3 -1
- package/lib/icons/FolderMoveToIcon/FolderMoveToIcon.d.ts +3 -1
- package/lib/icons/GeminiIcon/GeminiIcon.d.ts +3 -1
- package/lib/icons/GenericIcon/GenericIcon.d.ts +1 -1
- package/lib/icons/GithubIcon/GithubIcon.d.ts +3 -1
- package/lib/icons/GlobalOutlinedIcon/GlobalOutlinedIcon.d.ts +3 -1
- package/lib/icons/GraphIcon/GraphIcon.d.ts +3 -1
- package/lib/icons/GraphqlIcon/GraphqlIcon.d.ts +3 -1
- package/lib/icons/GridIcon/GridIcon.d.ts +3 -1
- package/lib/icons/HashtagIcon/HashtagIcon.d.ts +3 -1
- package/lib/icons/HexagonIcon/HexagonIcon.d.ts +3 -1
- package/lib/icons/HierarchyIcon/HierarchyIcon.d.ts +3 -1
- package/lib/icons/HorizontalViewIcon/HorizontalViewIcon.d.ts +3 -1
- package/lib/icons/IBMCloudHyperProtectCryptoServicesIcon/IBMCloudHyperProtectCryptoServicesIcon.d.ts +3 -1
- package/lib/icons/IdeaIcon/IdeaIcon.d.ts +3 -1
- package/lib/icons/InformationFilledIcon/InformationFilledIcon.d.ts +3 -1
- package/lib/icons/InformationIcon/InformationIcon.d.ts +3 -1
- package/lib/icons/JsonIcon/JsonIcon.d.ts +3 -1
- package/lib/icons/KafkaIcon/KafkaIcon.d.ts +3 -1
- package/lib/icons/LaunchIcon/LaunchIcon.d.ts +3 -1
- package/lib/icons/LinkIcon/LinkIcon.d.ts +3 -1
- package/lib/icons/LogoutIcon/LogoutIcon.d.ts +3 -1
- package/lib/icons/MagicWandIcon/MagicWandIcon.d.ts +3 -1
- package/lib/icons/MarkdownFullIcon/MarkdownFullIcon.d.ts +3 -1
- package/lib/icons/MaximizeIcon/MaximizeIcon.d.ts +3 -1
- package/lib/icons/MenuIcon/MenuIcon.d.ts +3 -1
- package/lib/icons/MinimizeIcon/MinimizeIcon.d.ts +3 -1
- package/lib/icons/MobileSidebarIcon/MobileSidebarIcon.d.ts +3 -1
- package/lib/icons/MoleculesIcon/MoleculesIcon.d.ts +3 -1
- package/lib/icons/MoonIcon/MoonIcon.d.ts +3 -1
- package/lib/icons/NavaidMilitaryIcon/NavaidMilitaryIcon.d.ts +3 -1
- package/lib/icons/NetworkIcon/NetworkIcon.d.ts +3 -1
- package/lib/icons/NoneIcon/NoneIcon.d.ts +3 -1
- package/lib/icons/NoteIcon/NoteIcon.d.ts +3 -1
- package/lib/icons/NotesIcon/NotesIcon.d.ts +3 -1
- package/lib/icons/OverflowMenuHorizontalIcon/OverflowMenuHorizontalIcon.d.ts +3 -1
- package/lib/icons/OverflowMenuVerticalIcon/OverflowMenuVerticalIcon.d.ts +3 -1
- package/lib/icons/PeopleIcon/PeopleIcon.d.ts +3 -1
- package/lib/icons/PlayIcon/PlayIcon.d.ts +3 -1
- package/lib/icons/PlaylistIcon/PlaylistIcon.d.ts +3 -1
- package/lib/icons/PlusCustomIcon/PlusCustomIcon.d.ts +3 -1
- package/lib/icons/RabbitMQIcon/RabbitMQIcon.d.ts +3 -1
- package/lib/icons/RadioCheckButtonIcon/RadioCheckButtonIcon.d.ts +3 -1
- package/lib/icons/RecentlyViewedIcon/RecentlyViewedIcon.d.ts +3 -1
- package/lib/icons/RedoclyIcon/RedoclyIcon.d.ts +3 -1
- package/lib/icons/RenewIcon/RenewIcon.d.ts +3 -1
- package/lib/icons/ResetIcon/ResetIcon.d.ts +3 -1
- package/lib/icons/RestartIcon/RestartIcon.d.ts +3 -1
- package/lib/icons/ReturnKeyIcon/ReturnKeyIcon.d.ts +8 -8
- package/lib/icons/RocketIcon/RocketIcon.d.ts +3 -1
- package/lib/icons/SaveIcon/SaveIcon.d.ts +3 -1
- package/lib/icons/SearchIcon/SearchIcon.d.ts +3 -1
- package/lib/icons/SecurityIcon/SecurityIcon.d.ts +3 -1
- package/lib/icons/SelectIcon/SelectIcon.d.ts +3 -1
- package/lib/icons/SendIcon/SendIcon.d.ts +3 -1
- package/lib/icons/SettingsCogIcon/SettingsCogIcon.d.ts +3 -1
- package/lib/icons/SettingsIcon/SettingsIcon.d.ts +5 -3
- package/lib/icons/ShareIcon/ShareIcon.d.ts +3 -1
- package/lib/icons/SidePanelCloseIcon/SidePanelCloseIcon.d.ts +3 -1
- package/lib/icons/SidePanelOpenIcon/SidePanelOpenIcon.d.ts +3 -1
- package/lib/icons/SlackIcon/SlackIcon.d.ts +3 -1
- package/lib/icons/SortIcon/SortIcon.d.ts +3 -1
- package/lib/icons/SpinnerIcon/SpinnerIcon.d.ts +3 -1
- package/lib/icons/StarFilledIcon/StarFilledIcon.d.ts +3 -1
- package/lib/icons/StarIcon/StarIcon.d.ts +3 -1
- package/lib/icons/StopIcon/StopIcon.d.ts +3 -1
- package/lib/icons/SubtractIcon/SubtractIcon.d.ts +3 -1
- package/lib/icons/SunIcon/SunIcon.d.ts +3 -1
- package/lib/icons/TableBuiltIcon/TableBuiltIcon.d.ts +3 -1
- package/lib/icons/TableIcon/TableIcon.d.ts +3 -1
- package/lib/icons/TagsIcon/TagsIcon.d.ts +3 -1
- package/lib/icons/TaskViewIcon/TaskViewIcon.d.ts +3 -1
- package/lib/icons/ThumbDownFilledIcon/ThumbDownFilledIcon.d.ts +3 -1
- package/lib/icons/ThumbDownIcon/ThumbDownIcon.d.ts +3 -1
- package/lib/icons/ThumbUpFilledIcon/ThumbUpFilledIcon.d.ts +3 -1
- package/lib/icons/ThumbUpIcon/ThumbUpIcon.d.ts +3 -1
- package/lib/icons/TimeIcon/TimeIcon.d.ts +3 -1
- package/lib/icons/TrashCanIcon/TrashCanIcon.d.ts +3 -1
- package/lib/icons/UserIcon/UserIcon.d.ts +3 -1
- package/lib/icons/VSCodeIcon/VSCodeIcon.d.ts +3 -1
- package/lib/icons/ValueVariableIcon/ValueVariableIcon.d.ts +3 -1
- package/lib/icons/VerticalViewIcon/VerticalViewIcon.d.ts +3 -1
- package/lib/icons/ViewIcon/ViewIcon.d.ts +3 -1
- package/lib/icons/ViewOffIcon/ViewOffIcon.d.ts +3 -1
- package/lib/icons/WarningAltFilled/WarningAltFilled.d.ts +3 -1
- package/lib/icons/WarningAltFilledIcon/WarningAltFilledIcon.d.ts +3 -1
- package/lib/icons/WarningAltIcon/WarningAltIcon.d.ts +3 -1
- package/lib/icons/WarningCycleIcon/WarningCycleIcon.d.ts +3 -1
- package/lib/icons/WarningFilledIcon/WarningFilledIcon.d.ts +3 -1
- package/lib/icons/WarningSquareIcon/WarningSquareIcon.d.ts +3 -1
- package/lib/icons/WorkflowAutomationIcon/WorkflowAutomationIcon.d.ts +3 -1
- package/lib/icons/WorkflowHierarchyIcon/WorkflowHierarchyIcon.d.ts +3 -1
- package/lib/layouts/CodeWalkthroughLayout.d.ts +1 -1
- package/lib/layouts/DocumentationLayout.d.ts +1 -1
- package/lib/layouts/DocumentationLayoutBottom.d.ts +1 -1
- package/lib/layouts/DocumentationLayoutTop.d.ts +1 -1
- package/lib/layouts/PageLayout.d.ts +1 -1
- package/lib/markdoc/components/Cards/Card.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeContainer.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeFilters.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanel.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodePanelHeader.d.ts +1 -1
- package/lib/markdoc/components/CodeWalkthrough/CodeStep.d.ts +1 -1
- package/lib/markdoc/components/ConnectMCP/ConnectMCP.d.ts +1 -1
- package/lib/markdoc/components/Diagram/Diagram.d.ts +1 -1
- package/lib/markdoc/components/Heading/Heading.d.ts +1 -1
- package/lib/markdoc/components/InlineSvg/InlineSvg.d.ts +1 -1
- package/lib/markdoc/components/LoginButton/LoginButton.d.ts +1 -1
- package/lib/markdoc/components/NumberedList/NumberedItem.d.ts +25 -0
- package/lib/markdoc/components/NumberedList/NumberedItem.js +217 -0
- package/lib/markdoc/components/NumberedList/NumberedList.d.ts +5 -0
- package/lib/markdoc/components/NumberedList/NumberedList.js +28 -0
- package/lib/markdoc/components/NumberedList/variables.d.ts +1 -0
- package/lib/markdoc/components/NumberedList/variables.js +42 -0
- package/lib/markdoc/components/Tabs/Tab.d.ts +1 -1
- package/lib/markdoc/components/Tabs/TabList.d.ts +3 -3
- package/lib/markdoc/components/Tabs/Tabs.d.ts +1 -1
- package/lib/markdoc/components/default.d.ts +2 -0
- package/lib/markdoc/components/default.js +2 -0
- package/lib/markdoc/default.d.ts +46 -1
- package/lib/markdoc/default.js +4 -0
- package/lib/markdoc/tags/numbered-item.d.ts +2 -0
- package/lib/markdoc/tags/numbered-item.js +35 -0
- package/lib/markdoc/tags/numbered-list.d.ts +2 -0
- package/lib/markdoc/tags/numbered-list.js +28 -0
- package/lib/plugin.d.ts +2 -2
- package/package.json +6 -6
- package/src/components/Catalog/CatalogEntities.tsx +7 -11
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +8 -9
- package/src/components/Catalog/CatalogEntity/CatalogEntitySchema.tsx +6 -8
- package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +2 -4
- package/src/components/Feedback/Feedback.tsx +11 -1
- package/src/core/hooks/use-active-heading.ts +7 -2
- package/src/core/hooks/use-telemetry-fallback.ts +1 -1
- package/src/core/styles/dark.ts +12 -0
- package/src/core/styles/global.ts +2 -0
- package/src/markdoc/components/NumberedList/NumberedItem.tsx +274 -0
- package/src/markdoc/components/NumberedList/NumberedList.tsx +37 -0
- package/src/markdoc/components/NumberedList/variables.ts +39 -0
- package/src/markdoc/components/default.ts +2 -0
- package/src/markdoc/default.ts +4 -0
- package/src/markdoc/tags/numbered-item.ts +46 -0
- package/src/markdoc/tags/numbered-list.ts +34 -0
package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx
CHANGED
|
@@ -8,7 +8,8 @@ import type { BffCatalogEntity, BffCatalogRelatedEntity } from '@redocly/theme/c
|
|
|
8
8
|
import { CatalogColumn } from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
|
|
9
9
|
import { CatalogActionsRow } from '@redocly/theme/components/Catalog/CatalogActionsRow';
|
|
10
10
|
import { CatalogEntityRelationsTableContent } from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent';
|
|
11
|
-
import {
|
|
11
|
+
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
12
|
+
import { getBaseDataAttributes } from '@redocly/theme/core/utils';
|
|
12
13
|
import { reverseRelationMap } from '@redocly/theme/core/constants';
|
|
13
14
|
|
|
14
15
|
export type CatalogEntityRelationsTableProps = {
|
|
@@ -51,22 +52,20 @@ export function CatalogEntityRelationsTable({
|
|
|
51
52
|
}: CatalogEntityRelationsTableProps): JSX.Element {
|
|
52
53
|
const { useTelemetry } = useThemeHooks();
|
|
53
54
|
const telemetry = useTelemetry();
|
|
54
|
-
const { getEntityDetailsLink } = useCatalogEntityDetails({
|
|
55
|
-
catalogConfig,
|
|
56
|
-
entitiesCatalogConfig,
|
|
57
|
-
});
|
|
58
55
|
|
|
59
56
|
const onRowClick = (relatedEntity: BffCatalogRelatedEntity) => {
|
|
60
57
|
if (searchQuery) {
|
|
61
|
-
telemetry.
|
|
58
|
+
telemetry.sendCatalogEntitiesRelatedEntitiesListSearchResultClickedMessage([
|
|
62
59
|
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
...getBaseDataAttributes(
|
|
61
|
+
'catalogEntitiesRelatedEntitiesListSearchResultId',
|
|
62
|
+
'catalogEntitiesRelatedEntitiesListSearchResult',
|
|
63
|
+
),
|
|
66
64
|
query: searchQuery,
|
|
67
65
|
entityKey: entity.key,
|
|
68
66
|
entityType: entity.type,
|
|
69
67
|
relationType: reverseRelationMap[relatedEntity.relationType],
|
|
68
|
+
relatedEntityId: relatedEntity.id,
|
|
70
69
|
relatedEntityKey: relatedEntity.key,
|
|
71
70
|
relatedEntityType: relatedEntity.type,
|
|
72
71
|
},
|
|
@@ -5,8 +5,9 @@ import * as Sampler from 'openapi-sampler';
|
|
|
5
5
|
import type { CatalogEntityConfig } from '@redocly/config';
|
|
6
6
|
import type { BffCatalogEntity, BffCatalogRelatedEntity } from '@redocly/theme/core/types';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
9
9
|
import { useCatalogEntitySchema } from '@redocly/theme/core/hooks';
|
|
10
|
+
import { getBaseDataAttributes } from '@redocly/theme/core/utils';
|
|
10
11
|
import { JsonViewer } from '@redocly/theme/components/JsonViewer/JsonViewer';
|
|
11
12
|
import { CopyButton } from '@redocly/theme/components/Buttons/CopyButton';
|
|
12
13
|
|
|
@@ -24,7 +25,6 @@ export type CatalogEntitySchemaProps = {
|
|
|
24
25
|
export function CatalogEntitySchema({
|
|
25
26
|
entity,
|
|
26
27
|
relatedEntity,
|
|
27
|
-
catalogConfig,
|
|
28
28
|
RedocSchema,
|
|
29
29
|
StoreProvider,
|
|
30
30
|
GraphqlTypeRenderer,
|
|
@@ -35,9 +35,6 @@ export function CatalogEntitySchema({
|
|
|
35
35
|
const { definition, parsedSchema, rawSchema } = useCatalogEntitySchema({ entity, relatedEntity });
|
|
36
36
|
const isGraphql = entity.metadata?.specType === 'graphql';
|
|
37
37
|
const graphqlSDL = entity?.metadata?.sdl;
|
|
38
|
-
const { getEntityDetailsLink } = useCatalogEntityDetails({
|
|
39
|
-
catalogConfig,
|
|
40
|
-
});
|
|
41
38
|
|
|
42
39
|
return (
|
|
43
40
|
<MetadataWrapper data-component-name="Catalog/CatalogEntity/CatalogEntitySchema">
|
|
@@ -54,9 +51,10 @@ export function CatalogEntitySchema({
|
|
|
54
51
|
onCopyClick={() =>
|
|
55
52
|
telemetry.sendCatalogEntitiesCopyDataSchemaClickedMessage([
|
|
56
53
|
{
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
...getBaseDataAttributes('catalogEntitiesCopyDataSchemaId', 'button'),
|
|
55
|
+
entityId: entity.id,
|
|
56
|
+
entityKey: entity.key,
|
|
57
|
+
entityType: entity.type,
|
|
60
58
|
},
|
|
61
59
|
])
|
|
62
60
|
}
|
|
@@ -12,7 +12,7 @@ import { FilterInput } from '@redocly/theme/components/Filter/FilterInput';
|
|
|
12
12
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
13
13
|
import { CheckboxIcon } from '@redocly/theme/icons/CheckboxIcon/CheckboxIcon';
|
|
14
14
|
import { CounterTag } from '@redocly/theme/components/Tags/CounterTag';
|
|
15
|
-
import { changeTextCasing } from '@redocly/theme/core/utils';
|
|
15
|
+
import { changeTextCasing, getBaseDataAttributes } from '@redocly/theme/core/utils';
|
|
16
16
|
import { Accordion } from '@redocly/theme/components/Accordion/Accordion';
|
|
17
17
|
|
|
18
18
|
export type CatalogFilterCheckboxesProps = FilterProps & {
|
|
@@ -104,9 +104,7 @@ export function CatalogFilterCheckboxes({
|
|
|
104
104
|
filter.toggleOption(value);
|
|
105
105
|
telemetry.sendCatalogEntitiesFilterCheckboxToggledMessage([
|
|
106
106
|
{
|
|
107
|
-
|
|
108
|
-
object: 'checkbox',
|
|
109
|
-
uri: window.location.href,
|
|
107
|
+
...getBaseDataAttributes('catalogEntitiesFilterCheckboxId', 'checkbox'),
|
|
110
108
|
category: filter.property,
|
|
111
109
|
value: value,
|
|
112
110
|
},
|
|
@@ -11,6 +11,7 @@ import { Comment } from '@redocly/theme/components/Feedback/Comment';
|
|
|
11
11
|
import { Mood } from '@redocly/theme/components/Feedback/Mood';
|
|
12
12
|
import { Scale } from '@redocly/theme/components/Feedback/Scale';
|
|
13
13
|
import { DEFAULT_FEEDBACK_TYPE } from '@redocly/theme/core/constants';
|
|
14
|
+
import { getBaseDataAttributes } from '@redocly/theme/core/utils';
|
|
14
15
|
|
|
15
16
|
const feedbackComponents = {
|
|
16
17
|
rating: Rating,
|
|
@@ -58,7 +59,16 @@ export function Feedback(props: FeedbackProps & { path?: string }) {
|
|
|
58
59
|
settings={settings}
|
|
59
60
|
onSubmit={(values) => {
|
|
60
61
|
submitFeedback({ type, values, path });
|
|
61
|
-
telemetry.sendFeedbackMessage(
|
|
62
|
+
telemetry.sendFeedbackMessage([
|
|
63
|
+
{
|
|
64
|
+
...getBaseDataAttributes<
|
|
65
|
+
'feedbackFormId',
|
|
66
|
+
'feedbackForm',
|
|
67
|
+
'urn:redocly:realm:ui:feedbackForm:feedbackFormId'
|
|
68
|
+
>('feedbackFormId', 'feedbackForm'),
|
|
69
|
+
feedbackType: type,
|
|
70
|
+
},
|
|
71
|
+
]);
|
|
62
72
|
}}
|
|
63
73
|
/>
|
|
64
74
|
</FeedbackWrapper>
|
|
@@ -64,8 +64,13 @@ export function useActiveHeading(
|
|
|
64
64
|
const headers = Array.from(allHeaders);
|
|
65
65
|
|
|
66
66
|
if (displayedHeadingsRef.current && displayedHeadingsRef.current.length > 0) {
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
// Resolve targets by id so anchors that are not headings (e.g. numbered
|
|
68
|
+
// list items with a lifted headline) can be scrolled to and tracked.
|
|
69
|
+
return displayedHeadingsRef.current
|
|
70
|
+
.map((heading) =>
|
|
71
|
+
heading?.id ? allContent.querySelector<HTMLElement>(`[id="${heading.id}"]`) : null,
|
|
72
|
+
)
|
|
73
|
+
.filter((element): element is HTMLElement => element !== null);
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
return headers;
|
|
@@ -8,7 +8,7 @@ export const useTelemetryFallback = () => ({
|
|
|
8
8
|
sendCatalogEntitiesCopyDataSchemaClickedMessage: () => {},
|
|
9
9
|
sendCatalogEntitiesViewModeChangedMessage: () => {},
|
|
10
10
|
sendCatalogEntitiesRelatedEntitiesListSearchQueryMessage: () => {},
|
|
11
|
-
|
|
11
|
+
sendCatalogEntitiesRelatedEntitiesListSearchResultClickedMessage: () => {},
|
|
12
12
|
sendCatalogEntitiesListSearchQueryMessage: () => {},
|
|
13
13
|
sendCatalogEntitiesListSearchResultClickedMessage: () => {},
|
|
14
14
|
sendRedirectMessage: () => {},
|
package/src/core/styles/dark.ts
CHANGED
|
@@ -60,6 +60,17 @@ const badgesDarkMode = css`
|
|
|
60
60
|
// @tokens End
|
|
61
61
|
`
|
|
62
62
|
|
|
63
|
+
const numberedListDarkMode = css`
|
|
64
|
+
/**
|
|
65
|
+
* @tokens Markdown Numbered List
|
|
66
|
+
*/
|
|
67
|
+
|
|
68
|
+
--md-numbered-list-marker-bg-color: var(--color-warm-grey-3); // @presenter Color
|
|
69
|
+
--md-numbered-list-marker-bg-color-hover: var(--color-warm-grey-4); // @presenter Color
|
|
70
|
+
|
|
71
|
+
// @tokens End
|
|
72
|
+
`
|
|
73
|
+
|
|
63
74
|
|
|
64
75
|
export const darkMode = css`
|
|
65
76
|
/* === Dark Theme Colors === */
|
|
@@ -352,6 +363,7 @@ export const darkMode = css`
|
|
|
352
363
|
${bannerDarkMode}
|
|
353
364
|
${admonitionDarkMode}
|
|
354
365
|
${badgesDarkMode}
|
|
366
|
+
${numberedListDarkMode}
|
|
355
367
|
${activeBrandPaletteDark}
|
|
356
368
|
${codeBlockDarkMode}
|
|
357
369
|
/**
|
|
@@ -29,6 +29,7 @@ import { productPicker } from '@redocly/theme/components/Product/variables';
|
|
|
29
29
|
import { markdown } from '@redocly/theme/components/Markdown/variables';
|
|
30
30
|
import { banner } from '@redocly/theme/components/Banner/variables';
|
|
31
31
|
import { markdownTabs } from '@redocly/theme/markdoc/components/Tabs/variables';
|
|
32
|
+
import { markdownNumberedList } from '@redocly/theme/markdoc/components/NumberedList/variables';
|
|
32
33
|
import { diagram } from '@redocly/theme/markdoc/components/Diagram/variables';
|
|
33
34
|
import { lastUpdated } from '@redocly/theme/components/LastUpdated/variables';
|
|
34
35
|
import { logo } from '@redocly/theme/components/Logo/variables';
|
|
@@ -1344,6 +1345,7 @@ export const styles = css<{ palette?: string }>`
|
|
|
1344
1345
|
${logo}
|
|
1345
1346
|
${markdown}
|
|
1346
1347
|
${markdownTabs}
|
|
1348
|
+
${markdownNumberedList}
|
|
1347
1349
|
${diagram}
|
|
1348
1350
|
${menu}
|
|
1349
1351
|
${mobileMenu}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import React, { createElement } from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import type { JSX, PropsWithChildren, ReactNode } from 'react';
|
|
5
|
+
|
|
6
|
+
import { GenericIcon } from '@redocly/theme/icons/GenericIcon/GenericIcon';
|
|
7
|
+
import { LinkIcon } from '@redocly/theme/icons/LinkIcon/LinkIcon';
|
|
8
|
+
|
|
9
|
+
export const NumberedListType = {
|
|
10
|
+
ICON: 'icon',
|
|
11
|
+
NUMBER: 'number',
|
|
12
|
+
DOT: 'dot',
|
|
13
|
+
} as const;
|
|
14
|
+
|
|
15
|
+
export type NumberedListType = (typeof NumberedListType)[keyof typeof NumberedListType];
|
|
16
|
+
|
|
17
|
+
export const NumberedListSize = {
|
|
18
|
+
SMALL: 'small',
|
|
19
|
+
MEDIUM: 'medium',
|
|
20
|
+
} as const;
|
|
21
|
+
|
|
22
|
+
export type NumberedListSize = (typeof NumberedListSize)[keyof typeof NumberedListSize];
|
|
23
|
+
|
|
24
|
+
export type NumberedItemProps = PropsWithChildren<{
|
|
25
|
+
headline?: ReactNode;
|
|
26
|
+
anchorId?: string;
|
|
27
|
+
headlineLevel?: number;
|
|
28
|
+
icon?: string | ReactNode;
|
|
29
|
+
/* Internal use only: raw SVG content resolved for relative `.svg` icons */
|
|
30
|
+
iconRawContent?: string;
|
|
31
|
+
className?: string;
|
|
32
|
+
/* Injected by the parent NumberedList component */
|
|
33
|
+
type?: NumberedListType;
|
|
34
|
+
size?: NumberedListSize;
|
|
35
|
+
index?: number;
|
|
36
|
+
isLast?: boolean;
|
|
37
|
+
}>;
|
|
38
|
+
|
|
39
|
+
export function NumberedItem({
|
|
40
|
+
headline,
|
|
41
|
+
anchorId,
|
|
42
|
+
headlineLevel,
|
|
43
|
+
icon,
|
|
44
|
+
iconRawContent,
|
|
45
|
+
className,
|
|
46
|
+
type = NumberedListType.NUMBER,
|
|
47
|
+
size = NumberedListSize.MEDIUM,
|
|
48
|
+
index = 1,
|
|
49
|
+
isLast = true,
|
|
50
|
+
children,
|
|
51
|
+
}: NumberedItemProps): JSX.Element {
|
|
52
|
+
const isDot = type === NumberedListType.DOT;
|
|
53
|
+
const headlineTextId = anchorId ? `${anchorId}-heading-text` : undefined;
|
|
54
|
+
|
|
55
|
+
const marker = (
|
|
56
|
+
<Marker $type={type} $size={size} data-dot={isDot || undefined}>
|
|
57
|
+
{type === NumberedListType.ICON && (
|
|
58
|
+
<MarkerContent className="numbered-item-marker-content">
|
|
59
|
+
<GenericIcon icon={icon} rawContent={iconRawContent} />
|
|
60
|
+
</MarkerContent>
|
|
61
|
+
)}
|
|
62
|
+
{type === NumberedListType.NUMBER && (
|
|
63
|
+
<MarkerContent className="numbered-item-marker-content">{index}</MarkerContent>
|
|
64
|
+
)}
|
|
65
|
+
{anchorId && (
|
|
66
|
+
<MarkerLink className="numbered-item-marker-link" $isDot={isDot}>
|
|
67
|
+
<MarkerLinkIcon
|
|
68
|
+
aria-hidden="true"
|
|
69
|
+
focusable="false"
|
|
70
|
+
color="--md-numbered-list-marker-text-color"
|
|
71
|
+
/>
|
|
72
|
+
</MarkerLink>
|
|
73
|
+
)}
|
|
74
|
+
</Marker>
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<NumberedItemWrapper
|
|
79
|
+
data-component-name="Markdoc/NumberedList/NumberedItem"
|
|
80
|
+
className={className}
|
|
81
|
+
id={anchorId}
|
|
82
|
+
$size={size}
|
|
83
|
+
$isDot={isDot}
|
|
84
|
+
>
|
|
85
|
+
<MarkerRail>
|
|
86
|
+
{anchorId ? (
|
|
87
|
+
<a
|
|
88
|
+
href={`#${anchorId}`}
|
|
89
|
+
{...(headline
|
|
90
|
+
? { 'aria-labelledby': headlineTextId }
|
|
91
|
+
: { 'aria-label': 'Link to this item' })}
|
|
92
|
+
>
|
|
93
|
+
{marker}
|
|
94
|
+
</a>
|
|
95
|
+
) : (
|
|
96
|
+
marker
|
|
97
|
+
)}
|
|
98
|
+
<Tail data-testid="numbered-item-tail" $isLast={isLast} />
|
|
99
|
+
</MarkerRail>
|
|
100
|
+
<NumberedItemContent>
|
|
101
|
+
{headline &&
|
|
102
|
+
createElement(
|
|
103
|
+
NumberedItemHeadline,
|
|
104
|
+
{ as: `h${headlineLevel ?? 3}` as keyof JSX.IntrinsicElements, id: headlineTextId },
|
|
105
|
+
headline,
|
|
106
|
+
)}
|
|
107
|
+
<NumberedItemBody>{children}</NumberedItemBody>
|
|
108
|
+
</NumberedItemContent>
|
|
109
|
+
</NumberedItemWrapper>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const markerSize = css<{ $size?: string }>`
|
|
114
|
+
${({ $size }) =>
|
|
115
|
+
$size === NumberedListSize.SMALL
|
|
116
|
+
? css`
|
|
117
|
+
width: var(--md-numbered-list-marker-small-size);
|
|
118
|
+
height: var(--md-numbered-list-marker-small-size);
|
|
119
|
+
--icon-width: var(--md-numbered-list-icon-small-size);
|
|
120
|
+
--icon-height: var(--md-numbered-list-icon-small-size);
|
|
121
|
+
`
|
|
122
|
+
: css`
|
|
123
|
+
width: var(--md-numbered-list-marker-medium-size);
|
|
124
|
+
height: var(--md-numbered-list-marker-medium-size);
|
|
125
|
+
--icon-width: var(--md-numbered-list-icon-medium-size);
|
|
126
|
+
--icon-height: var(--md-numbered-list-icon-medium-size);
|
|
127
|
+
`}
|
|
128
|
+
`;
|
|
129
|
+
|
|
130
|
+
const Marker = styled.span<{ $type: string; $size: string }>`
|
|
131
|
+
position: relative;
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
justify-content: center;
|
|
135
|
+
flex-shrink: 0;
|
|
136
|
+
border-radius: 50%;
|
|
137
|
+
color: var(--md-numbered-list-marker-text-color);
|
|
138
|
+
font-size: var(--md-numbered-list-marker-font-size);
|
|
139
|
+
|
|
140
|
+
${({ $type }) =>
|
|
141
|
+
$type === NumberedListType.DOT
|
|
142
|
+
? css`
|
|
143
|
+
width: var(--md-numbered-list-dot-size);
|
|
144
|
+
height: var(--md-numbered-list-dot-size);
|
|
145
|
+
background-color: var(--text-color-primary);
|
|
146
|
+
`
|
|
147
|
+
: css`
|
|
148
|
+
${markerSize}
|
|
149
|
+
background-color: var(--md-numbered-list-marker-bg-color);
|
|
150
|
+
`}
|
|
151
|
+
`;
|
|
152
|
+
|
|
153
|
+
const MarkerContent = styled.span`
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: center;
|
|
157
|
+
`;
|
|
158
|
+
|
|
159
|
+
const MarkerLink = styled.span<{ $isDot?: boolean }>`
|
|
160
|
+
display: none;
|
|
161
|
+
align-items: center;
|
|
162
|
+
justify-content: center;
|
|
163
|
+
|
|
164
|
+
svg {
|
|
165
|
+
width: var(--icon-width, 16px);
|
|
166
|
+
height: var(--icon-height, 16px);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
${({ $isDot }) =>
|
|
170
|
+
$isDot &&
|
|
171
|
+
css`
|
|
172
|
+
position: absolute;
|
|
173
|
+
inset-inline-end: calc(100% + var(--md-numbered-list-dot-link-gap));
|
|
174
|
+
`}
|
|
175
|
+
`;
|
|
176
|
+
|
|
177
|
+
const MarkerLinkIcon = styled(LinkIcon)`
|
|
178
|
+
path:first-of-type {
|
|
179
|
+
fill: var(--md-numbered-list-marker-icon-bg-color);
|
|
180
|
+
}
|
|
181
|
+
`;
|
|
182
|
+
|
|
183
|
+
const MarkerRail = styled.span`
|
|
184
|
+
display: flex;
|
|
185
|
+
flex-direction: column;
|
|
186
|
+
align-items: center;
|
|
187
|
+
align-self: stretch;
|
|
188
|
+
flex-shrink: 0;
|
|
189
|
+
|
|
190
|
+
a {
|
|
191
|
+
display: flex;
|
|
192
|
+
border-radius: 50%;
|
|
193
|
+
/* Overrides the global markdown link rule a:not([role='button']), which is more specific. */
|
|
194
|
+
text-decoration: none !important;
|
|
195
|
+
|
|
196
|
+
&:hover,
|
|
197
|
+
&:focus {
|
|
198
|
+
text-decoration: none !important;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
`;
|
|
202
|
+
|
|
203
|
+
const Tail = styled.span<{ $isLast: boolean }>`
|
|
204
|
+
flex: 1 0 0;
|
|
205
|
+
min-height: var(--spacing-xs);
|
|
206
|
+
width: var(--md-numbered-list-tail-width);
|
|
207
|
+
background: ${({ $isLast }) =>
|
|
208
|
+
$isLast
|
|
209
|
+
? 'var(--md-numbered-list-tail-fade-gradient)'
|
|
210
|
+
: 'var(--md-numbered-list-tail-bg-color)'};
|
|
211
|
+
`;
|
|
212
|
+
|
|
213
|
+
const NumberedItemHeadline = styled.h3`
|
|
214
|
+
margin: 0;
|
|
215
|
+
color: var(--md-numbered-list-headline-text-color);
|
|
216
|
+
font-size: var(--md-numbered-list-headline-font-size);
|
|
217
|
+
font-weight: var(--md-numbered-list-headline-font-weight);
|
|
218
|
+
line-height: var(--md-numbered-list-headline-line-height);
|
|
219
|
+
`;
|
|
220
|
+
|
|
221
|
+
const NumberedItemBody = styled.div`
|
|
222
|
+
display: flex;
|
|
223
|
+
flex-direction: column;
|
|
224
|
+
gap: var(--md-numbered-list-body-gap);
|
|
225
|
+
color: var(--md-numbered-list-body-text-color);
|
|
226
|
+
font-size: var(--md-numbered-list-body-font-size);
|
|
227
|
+
|
|
228
|
+
> p {
|
|
229
|
+
margin: 0;
|
|
230
|
+
}
|
|
231
|
+
`;
|
|
232
|
+
|
|
233
|
+
const NumberedItemContent = styled.div`
|
|
234
|
+
display: flex;
|
|
235
|
+
flex-direction: column;
|
|
236
|
+
gap: var(--spacing-unit);
|
|
237
|
+
flex: 1;
|
|
238
|
+
min-width: 0;
|
|
239
|
+
padding-bottom: var(--spacing-sm);
|
|
240
|
+
`;
|
|
241
|
+
|
|
242
|
+
const NumberedItemWrapper = styled.li<{ $size?: string; $isDot?: boolean }>`
|
|
243
|
+
display: flex;
|
|
244
|
+
gap: var(--md-numbered-list-gap);
|
|
245
|
+
align-items: stretch;
|
|
246
|
+
|
|
247
|
+
${({ $isDot }) =>
|
|
248
|
+
$isDot &&
|
|
249
|
+
css`
|
|
250
|
+
${MarkerRail} {
|
|
251
|
+
padding-top: var(--md-numbered-list-dot-rail-padding-top);
|
|
252
|
+
}
|
|
253
|
+
`}
|
|
254
|
+
|
|
255
|
+
&:last-child ${NumberedItemContent} {
|
|
256
|
+
padding-bottom: 0;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&:hover,
|
|
260
|
+
&:focus-within {
|
|
261
|
+
${Marker} {
|
|
262
|
+
background-color: ${({ $isDot }) =>
|
|
263
|
+
$isDot ? 'var(--text-color-primary)' : 'var(--md-numbered-list-marker-bg-color-hover)'};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
a ${Marker}:not([data-dot]) .numbered-item-marker-content {
|
|
267
|
+
display: none;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
a ${Marker} .numbered-item-marker-link {
|
|
271
|
+
display: flex;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
`;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import type { JSX, PropsWithChildren } from 'react';
|
|
5
|
+
|
|
6
|
+
export type NumberedListProps = PropsWithChildren<{
|
|
7
|
+
className?: string;
|
|
8
|
+
}>;
|
|
9
|
+
|
|
10
|
+
export function NumberedList({ className, children }: NumberedListProps): JSX.Element | null {
|
|
11
|
+
if (React.Children.count(children) === 0) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<NumberedListWrapper
|
|
17
|
+
data-component-name="Markdoc/NumberedList/NumberedList"
|
|
18
|
+
className={className}
|
|
19
|
+
>
|
|
20
|
+
{children}
|
|
21
|
+
</NumberedListWrapper>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const NumberedListWrapper = styled.ol`
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
margin: var(--md-numbered-list-margin);
|
|
29
|
+
padding: 0;
|
|
30
|
+
list-style: none;
|
|
31
|
+
|
|
32
|
+
&& {
|
|
33
|
+
& > li:not(:last-child) {
|
|
34
|
+
margin-bottom: 0;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export const markdownNumberedList = css`
|
|
4
|
+
/**
|
|
5
|
+
* @tokens Markdown Numbered List
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
--md-numbered-list-margin: var(--spacing-sm) 0; // @presenter Spacing
|
|
9
|
+
--md-numbered-list-gap: var(--spacing-base); // @presenter Spacing
|
|
10
|
+
|
|
11
|
+
--md-numbered-list-marker-bg-color: var(--color-warm-grey-2); // @presenter Color
|
|
12
|
+
--md-numbered-list-marker-bg-color-hover: var(--color-warm-grey-3); // @presenter Color
|
|
13
|
+
--md-numbered-list-marker-icon-bg-color: transparent; // @presenter Color
|
|
14
|
+
--md-numbered-list-marker-text-color: var(--text-color-primary); // @presenter Color
|
|
15
|
+
--md-numbered-list-marker-font-size: var(--font-size-base); // @presenter FontSize
|
|
16
|
+
|
|
17
|
+
--md-numbered-list-marker-medium-size: 28px; // @presenter Spacing
|
|
18
|
+
--md-numbered-list-icon-medium-size: 16px; // @presenter Spacing
|
|
19
|
+
--md-numbered-list-tail-width: 1px; // @presenter Spacing
|
|
20
|
+
--md-numbered-list-marker-small-size: 24px; // @presenter Spacing
|
|
21
|
+
--md-numbered-list-icon-small-size: 12px; // @presenter Spacing
|
|
22
|
+
--md-numbered-list-dot-size: 10px; // @presenter Spacing
|
|
23
|
+
--md-numbered-list-dot-rail-padding-top: 7px; // @presenter Spacing
|
|
24
|
+
--md-numbered-list-dot-link-gap: 6px; // @presenter Spacing
|
|
25
|
+
|
|
26
|
+
--md-numbered-list-tail-bg-color: var(--md-numbered-list-marker-bg-color); // @presenter Color
|
|
27
|
+
--md-numbered-list-tail-fade-gradient: linear-gradient(to bottom, var(--md-numbered-list-tail-bg-color), transparent); // @presenter Color
|
|
28
|
+
|
|
29
|
+
--md-numbered-list-headline-text-color: var(--text-color-primary); // @presenter Color
|
|
30
|
+
--md-numbered-list-headline-font-size: var(--font-size-base); // @presenter FontSize
|
|
31
|
+
--md-numbered-list-headline-font-weight: var(--font-weight-medium); // @presenter FontWeight
|
|
32
|
+
--md-numbered-list-headline-line-height: var(--line-height-base); // @presenter LineHeight
|
|
33
|
+
|
|
34
|
+
--md-numbered-list-body-text-color: var(--text-color-secondary); // @presenter Color
|
|
35
|
+
--md-numbered-list-body-gap: var(--spacing-xs); // @presenter Spacing
|
|
36
|
+
--md-numbered-list-body-font-size: var(--font-size-base); // @presenter FontSize
|
|
37
|
+
|
|
38
|
+
// @tokens End
|
|
39
|
+
`;
|
|
@@ -8,6 +8,8 @@ export * from '@redocly/theme/markdoc/components/Tabs/TabItemFragment';
|
|
|
8
8
|
export * from '@redocly/theme/markdoc/components/Tabs/Tab';
|
|
9
9
|
export * from '@redocly/theme/markdoc/components/Tabs/TabList';
|
|
10
10
|
export * from '@redocly/theme/markdoc/components/Tabs/Tabs';
|
|
11
|
+
export * from '@redocly/theme/markdoc/components/NumberedList/NumberedItem';
|
|
12
|
+
export * from '@redocly/theme/markdoc/components/NumberedList/NumberedList';
|
|
11
13
|
export * from '@redocly/theme/markdoc/components/CodeBlock/CodeBlock';
|
|
12
14
|
export * from '@redocly/theme/markdoc/components/Cards/Cards';
|
|
13
15
|
export * from '@redocly/theme/markdoc/components/Cards/Card';
|
package/src/markdoc/default.ts
CHANGED
|
@@ -14,6 +14,8 @@ import { markdocExample } from '@redocly/theme/markdoc/tags/markdoc-example';
|
|
|
14
14
|
import { partial } from '@redocly/theme/markdoc/tags/partial';
|
|
15
15
|
import { tab } from '@redocly/theme/markdoc/tags/tab';
|
|
16
16
|
import { tabs } from '@redocly/theme/markdoc/tags/tabs';
|
|
17
|
+
import { numberedItem } from '@redocly/theme/markdoc/tags/numbered-item';
|
|
18
|
+
import { numberedList } from '@redocly/theme/markdoc/tags/numbered-list';
|
|
17
19
|
import { debug } from '@redocly/theme/markdoc/tags/debug';
|
|
18
20
|
import { codeSnippet } from '@redocly/theme/markdoc/tags/code-snippet';
|
|
19
21
|
import { inlineSvg } from '@redocly/theme/markdoc/tags/inline-svg';
|
|
@@ -38,6 +40,8 @@ export const tags = {
|
|
|
38
40
|
[partial.tagName]: partial.schema,
|
|
39
41
|
[tab.tagName]: tab.schema,
|
|
40
42
|
[tabs.tagName]: tabs.schema,
|
|
43
|
+
[numberedItem.tagName]: numberedItem.schema,
|
|
44
|
+
[numberedList.tagName]: numberedList.schema,
|
|
41
45
|
[codeSnippet.tagName]: codeSnippet.schema,
|
|
42
46
|
[inlineSvg.tagName]: inlineSvg.schema,
|
|
43
47
|
[cards.tagName]: cards.schema,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import markdoc from '@markdoc/markdoc';
|
|
2
|
+
|
|
3
|
+
import type { MarkdocSchemaWrapper } from '@redocly/theme/markdoc/tags/types';
|
|
4
|
+
|
|
5
|
+
import { isTag } from '@redocly/theme/core/utils';
|
|
6
|
+
|
|
7
|
+
const HEADING_TAG_NAME = /^(Heading|h[1-6])$/;
|
|
8
|
+
|
|
9
|
+
export const numberedItem: MarkdocSchemaWrapper = {
|
|
10
|
+
schema: {
|
|
11
|
+
transform(node, config) {
|
|
12
|
+
const attributes = node.transformAttributes(config);
|
|
13
|
+
const children = node.transformChildren(config);
|
|
14
|
+
const [first, ...body] = children;
|
|
15
|
+
|
|
16
|
+
if (isTag(first) && HEADING_TAG_NAME.test(String(first.name))) {
|
|
17
|
+
const headlineLevel =
|
|
18
|
+
typeof first.attributes.level === 'number'
|
|
19
|
+
? first.attributes.level
|
|
20
|
+
: Number(String(first.name).slice(1)) || undefined;
|
|
21
|
+
|
|
22
|
+
return new markdoc.Tag(
|
|
23
|
+
'NumberedItem',
|
|
24
|
+
{
|
|
25
|
+
...attributes,
|
|
26
|
+
headline: first.children,
|
|
27
|
+
anchorId: first.attributes.id,
|
|
28
|
+
headlineLevel,
|
|
29
|
+
},
|
|
30
|
+
body,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return new markdoc.Tag('NumberedItem', attributes, children);
|
|
35
|
+
},
|
|
36
|
+
attributes: {
|
|
37
|
+
icon: { type: String, resolver: 'relativeOrCdnIcon' },
|
|
38
|
+
iconRawContent: {
|
|
39
|
+
// internal use only
|
|
40
|
+
type: String,
|
|
41
|
+
render: true,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
tagName: 'numbered-item',
|
|
46
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import markdoc from '@markdoc/markdoc';
|
|
2
|
+
|
|
3
|
+
import type { Tag } from '@markdoc/markdoc';
|
|
4
|
+
import type { MarkdocSchemaWrapper } from '@redocly/theme/markdoc/tags/types';
|
|
5
|
+
|
|
6
|
+
import { isTag } from '@redocly/theme/core/utils';
|
|
7
|
+
|
|
8
|
+
export const numberedList: MarkdocSchemaWrapper = {
|
|
9
|
+
schema: {
|
|
10
|
+
transform(node, config) {
|
|
11
|
+
const attributes = node.transformAttributes(config);
|
|
12
|
+
const items = node
|
|
13
|
+
.transformChildren(config)
|
|
14
|
+
.filter((child): child is Tag => isTag(child) && child.name === 'NumberedItem');
|
|
15
|
+
|
|
16
|
+
items.forEach((item, index) => {
|
|
17
|
+
item.attributes = {
|
|
18
|
+
...item.attributes,
|
|
19
|
+
type: attributes.type,
|
|
20
|
+
size: attributes.size,
|
|
21
|
+
index: index + 1,
|
|
22
|
+
isLast: index === items.length - 1,
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return new markdoc.Tag('NumberedList', attributes, items);
|
|
27
|
+
},
|
|
28
|
+
attributes: {
|
|
29
|
+
type: { type: String, matches: ['icon', 'number', 'dot'], default: 'number' },
|
|
30
|
+
size: { type: String, matches: ['small', 'medium'], default: 'medium' },
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
tagName: 'numbered-list',
|
|
34
|
+
};
|