@redocly/theme 0.55.0-rc.2 → 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/Admonition/Admonition.js +4 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +2 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.js +2 -1
- package/lib/components/Button/Button.d.ts +1 -0
- package/lib/components/Catalog/Catalog.d.ts +11 -0
- package/lib/components/Catalog/Catalog.js +138 -0
- package/lib/components/Catalog/CatalogActionsRow.d.ts +15 -0
- package/lib/components/Catalog/CatalogActionsRow.js +34 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCard.d.ts +8 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCard.js +179 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCardView.d.ts +8 -0
- package/lib/components/Catalog/CatalogCardView/CatalogCardView.js +20 -0
- package/lib/components/Catalog/CatalogEntities.d.ts +18 -0
- package/lib/components/Catalog/CatalogEntities.js +63 -0
- package/lib/components/Catalog/CatalogEntitiesEmptyState.d.ts +2 -0
- package/lib/components/Catalog/CatalogEntitiesEmptyState.js +38 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.d.ts +12 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +133 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.d.ts +7 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +49 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityLinks.js +48 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +111 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.js +25 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.js +69 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.d.ts +7 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +48 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.js +19 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.js +20 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.js +20 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.js +23 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.js +21 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.js +24 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.d.ts +6 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.js +21 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +21 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.js +37 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +10 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +31 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +25 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +27 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +22 -0
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +60 -0
- package/lib/components/Catalog/CatalogEntityIcon.d.ts +5 -0
- package/lib/components/Catalog/CatalogEntityIcon.js +38 -0
- package/lib/components/Catalog/CatalogEntityTypeIcon.d.ts +5 -0
- package/lib/components/Catalog/CatalogEntityTypeIcon.js +42 -0
- package/lib/components/Catalog/CatalogHighlight.d.ts +4 -0
- package/lib/components/Catalog/CatalogHighlight.js +48 -0
- package/lib/components/Catalog/CatalogPageDescription.d.ts +9 -0
- package/lib/components/Catalog/CatalogPageDescription.js +52 -0
- package/lib/components/Catalog/CatalogSelector.d.ts +12 -0
- package/lib/components/Catalog/CatalogSelector.js +48 -0
- package/lib/components/Catalog/CatalogSortButton.d.ts +10 -0
- package/lib/components/Catalog/CatalogSortButton.js +71 -0
- package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.d.ts +5 -0
- package/lib/components/Catalog/CatalogTableView/CatalogDomainsCell.js +19 -0
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.d.ts +6 -0
- package/lib/components/Catalog/CatalogTableView/CatalogEntityCell.js +63 -0
- package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.d.ts +5 -0
- package/lib/components/Catalog/CatalogTableView/CatalogOwnersCell.js +19 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.d.ts +11 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.js +101 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +31 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +106 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +27 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +127 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.d.ts +6 -0
- package/lib/components/Catalog/CatalogTableView/CatalogTagsCell.js +20 -0
- package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.d.ts +7 -0
- package/lib/components/Catalog/CatalogTableView/CatalogUserEntityCell.js +66 -0
- package/lib/components/Catalog/CatalogTagsWithTooltip.d.ts +9 -0
- package/lib/components/Catalog/CatalogTagsWithTooltip.js +46 -0
- package/lib/components/Catalog/CatalogViewModeToggle.d.ts +7 -0
- package/lib/components/Catalog/CatalogViewModeToggle.js +67 -0
- package/lib/components/Catalog/variables.d.ts +1 -0
- package/lib/components/Catalog/variables.dark.d.ts +1 -0
- package/lib/components/Catalog/variables.dark.js +8 -0
- package/lib/components/Catalog/variables.js +354 -0
- package/lib/components/CatalogClassic/CatalogClassicHighlight.js +1 -1
- package/lib/components/Dropdown/variables.js +1 -1
- package/lib/components/Filter/Filter.d.ts +1 -1
- package/lib/components/Filter/Filter.js +2 -2
- package/lib/components/Filter/FilterCheckboxes.d.ts +1 -1
- package/lib/components/Filter/FilterCheckboxes.js +4 -4
- package/lib/components/Filter/FilterContent.d.ts +3 -1
- package/lib/components/Filter/FilterContent.js +34 -4
- package/lib/components/Filter/FilterInput.js +35 -3
- package/lib/components/Filter/FilterSelect.d.ts +1 -1
- package/lib/components/Filter/FilterSelect.js +4 -4
- package/lib/components/Image/Image.js +2 -2
- package/lib/components/LoadMore/LoadMore.d.ts +8 -0
- package/lib/components/LoadMore/LoadMore.js +18 -0
- package/lib/components/Markdown/Markdown.js +1 -1
- package/lib/components/Menu/MenuItem.d.ts +1 -1
- package/lib/components/Menu/MenuItem.js +7 -3
- package/lib/components/PageNavigation/NavigationButton.d.ts +13 -0
- package/lib/components/PageNavigation/NavigationButton.js +32 -0
- package/lib/components/PageNavigation/NextButton.js +10 -29
- package/lib/components/PageNavigation/PageNavigation.js +1 -1
- package/lib/components/PageNavigation/PreviousButton.js +11 -27
- package/lib/components/Search/SearchAiConversationInput.js +2 -1
- package/lib/components/Select/Select.js +22 -6
- package/lib/components/Select/SelectInput.d.ts +1 -0
- package/lib/components/Select/SelectInput.js +7 -3
- package/lib/components/Select/variables.js +2 -2
- package/lib/components/Sidebar/Sidebar.d.ts +3 -0
- package/lib/components/Sidebar/Sidebar.js +3 -2
- package/lib/components/SkipContent/SkipContent.d.ts +2 -0
- package/lib/components/SkipContent/SkipContent.js +68 -0
- package/lib/components/SkipContent/variables.d.ts +1 -0
- package/lib/components/SkipContent/variables.js +23 -0
- package/lib/components/Tag/Tag.d.ts +3 -1
- package/lib/components/Tag/Tag.js +54 -2
- package/lib/components/Tag/variables.js +21 -0
- package/lib/components/Tooltip/Tooltip.d.ts +2 -1
- package/lib/components/Tooltip/Tooltip.js +26 -19
- package/lib/components/Tooltip/variables.js +17 -0
- package/lib/components/VersionPicker/VersionPicker.js +22 -3
- package/lib/components/VersionPicker/variables.js +1 -0
- package/lib/core/constants/catalog.d.ts +1 -0
- package/lib/core/constants/catalog.js +5 -0
- package/lib/core/constants/common.d.ts +1 -0
- package/lib/core/constants/common.js +2 -1
- package/lib/core/constants/index.d.ts +1 -0
- package/lib/core/constants/index.js +1 -0
- package/lib/core/constants/search.d.ts +1 -0
- package/lib/core/constants/search.js +2 -1
- package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +1 -0
- package/lib/core/hooks/__mocks__/use-theme-hooks.js +1 -0
- package/lib/core/hooks/catalog/useCatalogEntities.d.ts +4 -0
- package/lib/core/hooks/catalog/useCatalogEntities.js +17 -0
- package/lib/core/hooks/catalog/useCatalogTableHeaderCellActions.d.ts +15 -0
- package/lib/core/hooks/catalog/useCatalogTableHeaderCellActions.js +23 -0
- package/lib/core/hooks/catalog/useCatalogTableViewRow.d.ts +11 -0
- package/lib/core/hooks/catalog/useCatalogTableViewRow.js +26 -0
- package/lib/core/hooks/index.d.ts +2 -0
- package/lib/core/hooks/index.js +2 -0
- package/lib/core/hooks/use-user-teams.d.ts +1 -0
- package/lib/core/hooks/use-user-teams.js +10 -0
- package/lib/core/styles/dark.js +2 -0
- package/lib/core/styles/global.js +65 -60
- package/lib/core/types/catalog.d.ts +118 -5
- package/lib/core/types/filter.d.ts +1 -0
- package/lib/core/types/hooks.d.ts +11 -4
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/index.js +1 -0
- package/lib/core/types/l10n.d.ts +1 -1
- package/lib/core/types/telemetry.d.ts +32 -0
- package/lib/core/types/telemetry.js +3 -0
- package/lib/core/utils/index.d.ts +1 -0
- package/lib/core/utils/index.js +1 -0
- package/lib/core/utils/parse-style-string.d.ts +1 -0
- package/lib/core/utils/parse-style-string.js +23 -0
- package/lib/icons/AscSortIcon/AscSortIcon.d.ts +9 -0
- package/lib/icons/AscSortIcon/AscSortIcon.js +25 -0
- package/lib/icons/CardsIcon/CardsIcon.d.ts +9 -0
- package/lib/icons/CardsIcon/CardsIcon.js +25 -0
- package/lib/icons/CaretDownIcon/CaretDownIcon.d.ts +9 -0
- package/lib/icons/CaretDownIcon/CaretDownIcon.js +22 -0
- package/lib/icons/CaretUpIcon/CaretUpIcon.d.ts +9 -0
- package/lib/icons/CaretUpIcon/CaretUpIcon.js +22 -0
- package/lib/icons/DescSortIcon/DescSortIcon.d.ts +9 -0
- package/lib/icons/DescSortIcon/DescSortIcon.js +25 -0
- package/lib/icons/EntityTypeIcon/EntityTypeIcon.d.ts +9 -0
- package/lib/icons/EntityTypeIcon/EntityTypeIcon.js +26 -0
- package/lib/icons/GithubIcon/GithubIcon.d.ts +9 -0
- package/lib/icons/GithubIcon/GithubIcon.js +22 -0
- package/lib/icons/GraphIcon/GraphIcon.d.ts +9 -0
- package/lib/icons/GraphIcon/GraphIcon.js +22 -0
- package/lib/icons/PeopleIcon/PeopleIcon.d.ts +9 -0
- package/lib/icons/PeopleIcon/PeopleIcon.js +27 -0
- package/lib/icons/SlackIcon/SlackIcon.d.ts +9 -0
- package/lib/icons/SlackIcon/SlackIcon.js +29 -0
- package/lib/icons/SortIcon/SortIcon.d.ts +9 -0
- package/lib/icons/SortIcon/SortIcon.js +25 -0
- package/lib/icons/TableIcon/TableIcon.d.ts +9 -0
- package/lib/icons/TableIcon/TableIcon.js +22 -0
- package/lib/icons/TagsIcon/TagsIcon.d.ts +9 -0
- package/lib/icons/TagsIcon/TagsIcon.js +24 -0
- package/lib/index.d.ts +18 -1
- package/lib/index.js +19 -1
- package/lib/layouts/PageLayout.js +2 -1
- package/lib/layouts/RootLayout.js +2 -0
- package/lib/markdoc/components/Tabs/Tab.d.ts +2 -1
- package/lib/markdoc/components/Tabs/Tab.js +10 -2
- package/lib/markdoc/components/Tabs/TabList.d.ts +1 -4
- package/lib/markdoc/components/Tabs/TabList.js +18 -38
- package/lib/markdoc/components/Tabs/Tabs.d.ts +3 -1
- package/lib/markdoc/components/Tabs/Tabs.js +5 -9
- package/package.json +4 -3
- package/src/components/Admonition/Admonition.tsx +4 -0
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +7 -2
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/Catalog/Catalog.tsx +235 -0
- package/src/components/Catalog/CatalogActionsRow.tsx +58 -0
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +227 -0
- package/src/components/Catalog/CatalogCardView/CatalogCardView.tsx +29 -0
- package/src/components/Catalog/CatalogEntities.tsx +107 -0
- package/src/components/Catalog/CatalogEntitiesEmptyState.tsx +38 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +207 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +60 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityLinks.tsx +67 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityMetadata.tsx +93 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ApiDescriptionProperty.tsx +35 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityProperties.tsx +83 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +62 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/ContactProperty.tsx +36 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/DomainsProperty.tsx +38 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/EntityTypeProperty.tsx +33 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/GitProperty.tsx +41 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/OwnersProperty.tsx +42 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/TagsProperty.tsx +39 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/UserEmailProperty.tsx +31 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +97 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +80 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +92 -0
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +127 -0
- package/src/components/Catalog/CatalogEntityIcon.tsx +41 -0
- package/src/components/Catalog/CatalogEntityTypeIcon.tsx +48 -0
- package/src/components/Catalog/CatalogHighlight.tsx +56 -0
- package/src/components/Catalog/CatalogPageDescription.tsx +72 -0
- package/src/components/Catalog/CatalogSelector.tsx +67 -0
- package/src/components/Catalog/CatalogSortButton.tsx +78 -0
- package/src/components/Catalog/CatalogTableView/CatalogDomainsCell.tsx +26 -0
- package/src/components/Catalog/CatalogTableView/CatalogEntityCell.tsx +77 -0
- package/src/components/Catalog/CatalogTableView/CatalogOwnersCell.tsx +26 -0
- package/src/components/Catalog/CatalogTableView/CatalogTableHeaderCell.tsx +120 -0
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +176 -0
- package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +180 -0
- package/src/components/Catalog/CatalogTableView/CatalogTagsCell.tsx +28 -0
- package/src/components/Catalog/CatalogTableView/CatalogUserEntityCell.tsx +77 -0
- package/src/components/Catalog/CatalogTagsWithTooltip.tsx +83 -0
- package/src/components/Catalog/CatalogViewModeToggle.tsx +65 -0
- package/src/components/Catalog/variables.dark.ts +5 -0
- package/src/components/Catalog/variables.ts +351 -0
- package/src/components/CatalogClassic/CatalogClassicHighlight.tsx +1 -1
- package/src/components/Dropdown/variables.ts +1 -1
- package/src/components/Filter/Filter.tsx +10 -2
- package/src/components/Filter/FilterCheckboxes.tsx +8 -4
- package/src/components/Filter/FilterContent.tsx +21 -5
- package/src/components/Filter/FilterInput.tsx +16 -4
- package/src/components/Filter/FilterSelect.tsx +8 -4
- package/src/components/Image/Image.tsx +5 -9
- package/src/components/LoadMore/LoadMore.tsx +38 -0
- package/src/components/Markdown/Markdown.tsx +1 -1
- package/src/components/Menu/MenuItem.tsx +11 -2
- package/src/components/PageNavigation/NavigationButton.tsx +68 -0
- package/src/components/PageNavigation/NextButton.tsx +20 -43
- package/src/components/PageNavigation/PageNavigation.tsx +1 -1
- package/src/components/PageNavigation/PreviousButton.tsx +20 -43
- package/src/components/Search/SearchAiConversationInput.tsx +3 -0
- package/src/components/Select/Select.tsx +29 -4
- package/src/components/Select/SelectInput.tsx +20 -1
- package/src/components/Select/variables.ts +2 -2
- package/src/components/Sidebar/Sidebar.tsx +1 -1
- package/src/components/SkipContent/SkipContent.tsx +47 -0
- package/src/components/SkipContent/variables.ts +20 -0
- package/src/components/Tag/Tag.tsx +67 -1
- package/src/components/Tag/variables.ts +21 -0
- package/src/components/Tooltip/Tooltip.tsx +31 -22
- package/src/components/Tooltip/variables.ts +17 -0
- package/src/components/VersionPicker/VersionPicker.tsx +32 -2
- package/src/components/VersionPicker/variables.ts +1 -0
- package/src/core/constants/catalog.ts +1 -0
- package/src/core/constants/common.ts +1 -0
- package/src/core/constants/index.ts +1 -0
- package/src/core/constants/search.ts +2 -0
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +1 -0
- package/src/core/hooks/catalog/useCatalogEntities.ts +16 -0
- package/src/core/hooks/catalog/useCatalogTableHeaderCellActions.ts +38 -0
- package/src/core/hooks/catalog/useCatalogTableViewRow.ts +40 -0
- package/src/core/hooks/index.ts +2 -0
- package/src/core/hooks/use-user-teams.ts +8 -0
- package/src/core/styles/dark.ts +2 -0
- package/src/core/styles/global.ts +5 -0
- package/src/core/types/catalog.ts +143 -5
- package/src/core/types/filter.ts +1 -0
- package/src/core/types/hooks.ts +32 -5
- package/src/core/types/index.ts +1 -0
- package/src/core/types/l10n.ts +22 -1
- package/src/core/types/telemetry.ts +36 -0
- package/src/core/utils/index.ts +1 -0
- package/src/core/utils/load-and-navigate.ts +5 -4
- package/src/core/utils/parse-style-string.ts +21 -0
- package/src/icons/AscSortIcon/AscSortIcon.tsx +29 -0
- package/src/icons/CardsIcon/CardsIcon.tsx +38 -0
- package/src/icons/CaretDownIcon/CaretDownIcon.tsx +26 -0
- package/src/icons/CaretUpIcon/CaretUpIcon.tsx +26 -0
- package/src/icons/DescSortIcon/DescSortIcon.tsx +29 -0
- package/src/icons/EntityTypeIcon/EntityTypeIcon.tsx +49 -0
- package/src/icons/GithubIcon/GithubIcon.tsx +35 -0
- package/src/icons/GraphIcon/GraphIcon.tsx +26 -0
- package/src/icons/PeopleIcon/PeopleIcon.tsx +46 -0
- package/src/icons/SlackIcon/SlackIcon.tsx +61 -0
- package/src/icons/SortIcon/SortIcon.tsx +29 -0
- package/src/icons/TableIcon/TableIcon.tsx +26 -0
- package/src/icons/TagsIcon/TagsIcon.tsx +41 -0
- package/src/index.ts +20 -1
- package/src/layouts/PageLayout.tsx +4 -1
- package/src/layouts/RootLayout.tsx +2 -0
- package/src/markdoc/components/Tabs/Tab.tsx +12 -1
- package/src/markdoc/components/Tabs/TabList.tsx +40 -70
- package/src/markdoc/components/Tabs/Tabs.tsx +11 -10
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.d.ts +0 -1
- package/lib/components/OpenApiDocs/hooks/AfterOpenApiDescription.js +0 -5
- package/lib/ext/process-scorecard.d.ts +0 -5
- package/lib/ext/process-scorecard.js +0 -11
- package/src/components/OpenApiDocs/hooks/AfterOpenApiDescription.tsx +0 -1
- package/src/ext/process-scorecard.ts +0 -13
package/src/index.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from '@redocly/theme/components/Dropdown/Dropdown';
|
|
|
15
15
|
export * from '@redocly/theme/components/Dropdown/DropdownMenu';
|
|
16
16
|
export * from '@redocly/theme/components/Dropdown/DropdownMenuItem';
|
|
17
17
|
export * from '@redocly/theme/components/Loaders/Loading';
|
|
18
|
+
export * from '@redocly/theme/components/LoadMore/LoadMore';
|
|
18
19
|
export * from '@redocly/theme/components/Link/Link';
|
|
19
20
|
export * from '@redocly/theme/components/Portal/Portal';
|
|
20
21
|
export * from '@redocly/theme/components/Segmented/Segmented';
|
|
@@ -89,7 +90,6 @@ export * from '@redocly/theme/components/Sidebar/Sidebar';
|
|
|
89
90
|
/* OpenApiDocs */
|
|
90
91
|
export * from '@redocly/theme/components/OpenApiDocs/hooks/AfterOpenApiOperation';
|
|
91
92
|
export * from '@redocly/theme/components/OpenApiDocs/hooks/AfterOpenApiTitle';
|
|
92
|
-
export * from '@redocly/theme/components/OpenApiDocs/hooks/AfterOpenApiDescription';
|
|
93
93
|
export * from '@redocly/theme/components/OpenApiDocs/hooks/BeforeOpenApiOperation';
|
|
94
94
|
export * from '@redocly/theme/components/OpenApiDocs/hooks/OpenApiFooter';
|
|
95
95
|
export * from '@redocly/theme/components/OpenApiDocs/hooks/OpenApiHeader';
|
|
@@ -118,6 +118,25 @@ export * from '@redocly/theme/components/Menu/MenuMobile';
|
|
|
118
118
|
export * from '@redocly/theme/components/Breadcrumbs/Breadcrumb';
|
|
119
119
|
export * from '@redocly/theme/components/Breadcrumbs/Breadcrumbs';
|
|
120
120
|
/* Catalog */
|
|
121
|
+
export * from '@redocly/theme/components/Catalog/Catalog';
|
|
122
|
+
export * from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntity';
|
|
123
|
+
export * from '@redocly/theme/components/Catalog/CatalogCardView/CatalogCardView';
|
|
124
|
+
export * from '@redocly/theme/components/Catalog/CatalogCardView/CatalogCard';
|
|
125
|
+
export * from '@redocly/theme/components/Catalog/CatalogTableView/CatalogDomainsCell';
|
|
126
|
+
export * from '@redocly/theme/components/Catalog/CatalogTableView/CatalogEntityCell';
|
|
127
|
+
export * from '@redocly/theme/components/Catalog/CatalogTableView/CatalogOwnersCell';
|
|
128
|
+
export * from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableHeaderCell';
|
|
129
|
+
export * from '@redocly/theme/components/Catalog/CatalogTableView/CatalogTableView';
|
|
130
|
+
export * from '@redocly/theme/components/Catalog/CatalogSelector';
|
|
131
|
+
export * from '@redocly/theme/components/Catalog/CatalogSortButton';
|
|
132
|
+
export * from '@redocly/theme/components/Catalog/CatalogTagsWithTooltip';
|
|
133
|
+
export * from '@redocly/theme/components/Catalog/CatalogViewModeToggle';
|
|
134
|
+
export * from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations';
|
|
135
|
+
export * from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations';
|
|
136
|
+
export * from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations';
|
|
137
|
+
export * from '@redocly/theme/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable';
|
|
138
|
+
|
|
139
|
+
/* CatalogClassic */
|
|
121
140
|
export * from '@redocly/theme/components/CatalogClassic/CatalogClassic';
|
|
122
141
|
export * from '@redocly/theme/components/CatalogClassic/CatalogClassicCard';
|
|
123
142
|
export * from '@redocly/theme/components/CatalogClassic/CatalogClassicActions';
|
|
@@ -4,6 +4,7 @@ import styled from 'styled-components';
|
|
|
4
4
|
import type { JSX } from 'react';
|
|
5
5
|
|
|
6
6
|
import { breakpoints } from '@redocly/theme/core/utils';
|
|
7
|
+
import { CONTENT_ID } from '@redocly/theme/core/constants';
|
|
7
8
|
|
|
8
9
|
interface PageLayoutProps {
|
|
9
10
|
sidebar?: React.ReactNode;
|
|
@@ -16,7 +17,9 @@ export function PageLayout({
|
|
|
16
17
|
return (
|
|
17
18
|
<Container data-component-name="Layout/PageLayout">
|
|
18
19
|
{sidebar}
|
|
19
|
-
<ContentContainer
|
|
20
|
+
<ContentContainer id={CONTENT_ID} tabIndex={0}>
|
|
21
|
+
{children}
|
|
22
|
+
</ContentContainer>
|
|
20
23
|
</Container>
|
|
21
24
|
);
|
|
22
25
|
}
|
|
@@ -4,6 +4,7 @@ import type { JSX } from 'react';
|
|
|
4
4
|
|
|
5
5
|
import { Navbar } from '@redocly/theme/components/Navbar/Navbar';
|
|
6
6
|
import { Footer } from '@redocly/theme/components/Footer/Footer';
|
|
7
|
+
import { SkipContent } from '@redocly/theme/components/SkipContent/SkipContent';
|
|
7
8
|
|
|
8
9
|
export type LayoutConfig = {
|
|
9
10
|
children: React.ReactNode;
|
|
@@ -12,6 +13,7 @@ export type LayoutConfig = {
|
|
|
12
13
|
export function RootLayout({ children }: LayoutConfig): JSX.Element {
|
|
13
14
|
return (
|
|
14
15
|
<div data-component-name="layouts/RootLayout">
|
|
16
|
+
<SkipContent />
|
|
15
17
|
<Navbar />
|
|
16
18
|
{children}
|
|
17
19
|
<Footer />
|
|
@@ -14,6 +14,7 @@ export type TabProps = {
|
|
|
14
14
|
setRef: (element: HTMLButtonElement | null) => void;
|
|
15
15
|
onKeyDown: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
16
16
|
onClick: () => void;
|
|
17
|
+
icon?: React.ReactNode;
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
export function TabComponent({
|
|
@@ -24,6 +25,7 @@ export function TabComponent({
|
|
|
24
25
|
setRef,
|
|
25
26
|
onKeyDown,
|
|
26
27
|
onClick,
|
|
28
|
+
icon,
|
|
27
29
|
}: TabProps): JSX.Element {
|
|
28
30
|
return (
|
|
29
31
|
<TabItem data-component-name="Markdoc/Tabs/Tab" size={size} tabIndex={0}>
|
|
@@ -39,10 +41,19 @@ export function TabComponent({
|
|
|
39
41
|
onKeyDown={onKeyDown}
|
|
40
42
|
onClick={onClick}
|
|
41
43
|
>
|
|
42
|
-
|
|
44
|
+
<LabelWrapper>
|
|
45
|
+
{icon}
|
|
46
|
+
{label}
|
|
47
|
+
</LabelWrapper>
|
|
43
48
|
</TabButtonLink>
|
|
44
49
|
</TabItem>
|
|
45
50
|
);
|
|
46
51
|
}
|
|
47
52
|
|
|
53
|
+
const LabelWrapper = styled.div`
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
gap: 4px;
|
|
57
|
+
`;
|
|
58
|
+
|
|
48
59
|
export const Tab = styled(TabComponent)``;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import type { JSX } from 'react';
|
|
@@ -8,8 +8,7 @@ import { TabItemProps, TabsSize } from '@redocly/theme/markdoc/components/Tabs/T
|
|
|
8
8
|
import { Dropdown } from '@redocly/theme/components/Dropdown/Dropdown';
|
|
9
9
|
import { DropdownMenu } from '@redocly/theme/components/Dropdown/DropdownMenu';
|
|
10
10
|
import { DropdownMenuItem } from '@redocly/theme/components/Dropdown/DropdownMenuItem';
|
|
11
|
-
import {
|
|
12
|
-
import { ChevronUpIcon } from '@redocly/theme/icons/ChevronUpIcon/ChevronUpIcon';
|
|
11
|
+
import { Button } from '@redocly/theme/components/Button/Button';
|
|
13
12
|
|
|
14
13
|
type TabListProps = {
|
|
15
14
|
childrenArray: React.ReactElement<TabItemProps>[];
|
|
@@ -42,16 +41,6 @@ export function TabList({
|
|
|
42
41
|
allTabsHidden,
|
|
43
42
|
tabsContainerRef,
|
|
44
43
|
}: TabListProps): JSX.Element {
|
|
45
|
-
const [isDropdownOpen, setIsDropdownOpen] = useState<boolean>(false);
|
|
46
|
-
|
|
47
|
-
const handleDropdownOpen = useCallback(() => {
|
|
48
|
-
setIsDropdownOpen(true);
|
|
49
|
-
}, []);
|
|
50
|
-
|
|
51
|
-
const handleDropdownClose = useCallback(() => {
|
|
52
|
-
setIsDropdownOpen(false);
|
|
53
|
-
}, []);
|
|
54
|
-
|
|
55
44
|
return (
|
|
56
45
|
<TabListContainer role="tablist" ref={tabsContainerRef} data-animating={isAnimating}>
|
|
57
46
|
<HighlightBar size={size} style={{ left: highlightStyle.left, width: highlightStyle.width }}>
|
|
@@ -59,13 +48,14 @@ export function TabList({
|
|
|
59
48
|
</HighlightBar>
|
|
60
49
|
{childrenArray.map((child, index) => {
|
|
61
50
|
if (!visibleTabs.includes(index)) return null;
|
|
62
|
-
const { label } = child.props;
|
|
51
|
+
const { label, icon } = child.props;
|
|
63
52
|
const tabId = getTabId(label, index);
|
|
64
53
|
return (
|
|
65
54
|
<Tab
|
|
66
55
|
key={`key-${tabId}`}
|
|
67
56
|
tabId={tabId}
|
|
68
57
|
label={label}
|
|
58
|
+
icon={icon}
|
|
69
59
|
size={size}
|
|
70
60
|
disabled={child.props.disable}
|
|
71
61
|
setRef={(el: HTMLButtonElement | null) => {
|
|
@@ -88,47 +78,41 @@ export function TabList({
|
|
|
88
78
|
tabIndex={0}
|
|
89
79
|
>
|
|
90
80
|
{overflowTabs.length > 0 && (
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
</DropdownMenuItem>
|
|
127
|
-
);
|
|
128
|
-
})}
|
|
129
|
-
</DropdownMenu>
|
|
130
|
-
</Dropdown>
|
|
131
|
-
</div>
|
|
81
|
+
<Dropdown
|
|
82
|
+
trigger={
|
|
83
|
+
<TabButtonLink
|
|
84
|
+
size={size}
|
|
85
|
+
className={
|
|
86
|
+
overflowTabs.some((index) => activeTab === childrenArray[index].props.label)
|
|
87
|
+
? 'active'
|
|
88
|
+
: undefined
|
|
89
|
+
}
|
|
90
|
+
>
|
|
91
|
+
{allTabsHidden ? activeTab : 'More'}
|
|
92
|
+
</TabButtonLink>
|
|
93
|
+
}
|
|
94
|
+
alignment="start"
|
|
95
|
+
withArrow={true}
|
|
96
|
+
>
|
|
97
|
+
<DropdownMenu>
|
|
98
|
+
{overflowTabs.map((index) => {
|
|
99
|
+
const { label } = childrenArray[index].props;
|
|
100
|
+
const tabId = getTabId(label, index);
|
|
101
|
+
return (
|
|
102
|
+
<DropdownMenuItem
|
|
103
|
+
key={`more-${tabId}`}
|
|
104
|
+
active={activeTab === label}
|
|
105
|
+
onAction={() => {
|
|
106
|
+
onTabClick(index);
|
|
107
|
+
}}
|
|
108
|
+
disabled={childrenArray[index].props.disable}
|
|
109
|
+
>
|
|
110
|
+
{label}
|
|
111
|
+
</DropdownMenuItem>
|
|
112
|
+
);
|
|
113
|
+
})}
|
|
114
|
+
</DropdownMenu>
|
|
115
|
+
</Dropdown>
|
|
132
116
|
)}
|
|
133
117
|
</TabItem>
|
|
134
118
|
</TabListContainer>
|
|
@@ -231,25 +215,11 @@ const HighlightBar = styled.div<{ size: TabsSize }>`
|
|
|
231
215
|
}
|
|
232
216
|
`;
|
|
233
217
|
|
|
234
|
-
export const TabButtonLink = styled
|
|
235
|
-
size: TabsSize;
|
|
236
|
-
disabled?: boolean;
|
|
237
|
-
}>`
|
|
238
|
-
all: unset;
|
|
239
|
-
flex-grow: 1;
|
|
240
|
-
cursor: pointer;
|
|
241
|
-
width: 100%;
|
|
242
|
-
text-align: center;
|
|
218
|
+
export const TabButtonLink = styled(Button)`
|
|
243
219
|
color: var(--md-tabs-tab-text-color);
|
|
244
220
|
font-family: var(--md-tabs-tab-font-family);
|
|
245
221
|
font-style: var(--md-tabs-tab-font-style);
|
|
246
222
|
background-color: var(--md-tabs-tab-bg-color);
|
|
247
|
-
white-space: nowrap;
|
|
248
|
-
display: inline-flex;
|
|
249
|
-
align-items: center;
|
|
250
|
-
justify-content: center;
|
|
251
|
-
gap: var(--spacing-xxs);
|
|
252
|
-
z-index: 2;
|
|
253
223
|
|
|
254
224
|
transition:
|
|
255
225
|
background-color 300ms ease-in-out,
|
|
@@ -16,15 +16,17 @@ export type TabItemProps = {
|
|
|
16
16
|
disable?: boolean;
|
|
17
17
|
onClick?: () => void;
|
|
18
18
|
children: React.ReactNode;
|
|
19
|
+
icon?: React.ReactNode;
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
type TabsProps = {
|
|
22
23
|
children: React.ReactElement<TabItemProps>[];
|
|
23
24
|
className?: string;
|
|
24
25
|
size: TabsSize;
|
|
26
|
+
forceReady?: boolean;
|
|
25
27
|
};
|
|
26
28
|
|
|
27
|
-
export function Tabs({ children, className, size }: TabsProps): JSX.Element {
|
|
29
|
+
export function Tabs({ children, className, size, forceReady = false }: TabsProps): JSX.Element {
|
|
28
30
|
const [childrenArray, setChildrenArray] = useState<React.ReactElement<TabItemProps>[]>(
|
|
29
31
|
React.Children.toArray(children) as React.ReactElement<TabItemProps>[],
|
|
30
32
|
);
|
|
@@ -34,7 +36,6 @@ export function Tabs({ children, className, size }: TabsProps): JSX.Element {
|
|
|
34
36
|
}, [children]);
|
|
35
37
|
const tabsContainerRef = useRef<HTMLUListElement>(null);
|
|
36
38
|
const [isAnimating, setIsAnimating] = useState<boolean>(false);
|
|
37
|
-
|
|
38
39
|
const initialTab = childrenArray[0]?.props.label ?? '';
|
|
39
40
|
const {
|
|
40
41
|
activeTab,
|
|
@@ -105,15 +106,11 @@ export function Tabs({ children, className, size }: TabsProps): JSX.Element {
|
|
|
105
106
|
setHighlightStyle({ left: offsetLeft, width: offsetWidth });
|
|
106
107
|
}
|
|
107
108
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
setIsAnimating(false);
|
|
113
|
-
}, 300);
|
|
109
|
+
if (visibleTabs.includes(activeIndex)) {
|
|
110
|
+
activeTabElement?.classList.add('active');
|
|
111
|
+
}
|
|
114
112
|
|
|
115
113
|
return () => {
|
|
116
|
-
clearTimeout(timeoutId);
|
|
117
114
|
container.querySelectorAll('[data-label]').forEach((el) => {
|
|
118
115
|
el.classList.remove('active');
|
|
119
116
|
});
|
|
@@ -130,7 +127,11 @@ export function Tabs({ children, className, size }: TabsProps): JSX.Element {
|
|
|
130
127
|
}, [activeTab, prevTab, childrenArray, visibleTabs, overflowTabs]);
|
|
131
128
|
|
|
132
129
|
return (
|
|
133
|
-
<TabsContainer
|
|
130
|
+
<TabsContainer
|
|
131
|
+
data-component-name="Markdoc/Tabs/Tabs"
|
|
132
|
+
className={className}
|
|
133
|
+
isReady={ready || forceReady}
|
|
134
|
+
>
|
|
134
135
|
<TabList
|
|
135
136
|
size={size}
|
|
136
137
|
childrenArray={childrenArray}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const AfterOpenApiDescription: any;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useProcessScorecard = useProcessScorecard;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
function useProcessScorecard() {
|
|
6
|
-
return {
|
|
7
|
-
processScorecard: (0, react_1.useCallback)((scorecard) => scorecard, []),
|
|
8
|
-
processInfo: (0, react_1.useCallback)((info) => info, []),
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=process-scorecard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const AfterOpenApiDescription: any = null;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useCallback } from 'react';
|
|
2
|
-
|
|
3
|
-
import type { CatalogItem } from '@redocly/theme';
|
|
4
|
-
|
|
5
|
-
export function useProcessScorecard(): {
|
|
6
|
-
processScorecard: <T = any>(scorecard: T, api: CatalogItem) => T;
|
|
7
|
-
processInfo: <T>(info: T) => T;
|
|
8
|
-
} {
|
|
9
|
-
return {
|
|
10
|
-
processScorecard: useCallback((scorecard) => scorecard, []),
|
|
11
|
-
processInfo: useCallback((info) => info, []),
|
|
12
|
-
};
|
|
13
|
-
}
|