@redocly/theme 0.60.0-next.5 → 0.60.0-next.7
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/Banner/Banner.d.ts +6 -0
- package/lib/components/Banner/Banner.js +172 -0
- package/lib/components/Banner/variables.d.ts +1 -0
- package/lib/components/Banner/variables.dark.d.ts +1 -0
- package/lib/components/Banner/variables.dark.js +12 -0
- package/lib/components/Banner/variables.js +45 -0
- package/lib/components/Breadcrumbs/BreadcrumbDropdown.d.ts +1 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/lib/components/Catalog/Catalog.d.ts +1 -1
- package/lib/components/Catalog/CatalogCardView/CatalogCard.d.ts +1 -1
- package/lib/components/Catalog/CatalogCardView/CatalogCardView.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntities.d.ts +1 -1
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.d.ts +2 -2
- package/lib/components/Catalog/CatalogEntityIcon.d.ts +1 -1
- package/lib/components/Catalog/CatalogTableView/CatalogTableView.d.ts +2 -2
- package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.d.ts +1 -1
- package/lib/components/LanguagePicker/LanguagePicker.js +1 -0
- package/lib/components/Navbar/Navbar.js +13 -5
- package/lib/components/Search/SearchAiConversationInput.js +1 -1
- package/lib/core/hooks/catalog/use-catalog-table-view-row.d.ts +1 -1
- package/lib/core/hooks/use-theme-hooks.js +1 -0
- package/lib/core/styles/dark.js +2 -0
- package/lib/core/styles/global.js +32 -30
- package/lib/core/types/catalog.d.ts +1 -1
- package/lib/core/types/hooks.d.ts +5 -1
- package/lib/core/utils/type-guards.d.ts +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/package.json +7 -14
- package/src/components/Banner/Banner.tsx +179 -0
- package/src/components/Banner/variables.dark.ts +10 -0
- package/src/components/Banner/variables.ts +43 -0
- package/src/components/Breadcrumbs/BreadcrumbDropdown.tsx +1 -1
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
- package/src/components/Catalog/Catalog.tsx +2 -1
- package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +2 -1
- package/src/components/Catalog/CatalogCardView/CatalogCardView.tsx +3 -2
- package/src/components/Catalog/CatalogEntities.tsx +2 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +1 -1
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +7 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityDefaultRelations.tsx +6 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +3 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +6 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.tsx +2 -2
- package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +7 -2
- package/src/components/Catalog/CatalogEntityIcon.tsx +2 -1
- package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +3 -2
- package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +3 -2
- package/src/components/LanguagePicker/LanguagePicker.tsx +1 -0
- package/src/components/Navbar/Navbar.tsx +13 -5
- package/src/components/Search/SearchAiConversationInput.tsx +1 -1
- package/src/core/hooks/__mocks__/use-theme-hooks.ts +4 -0
- package/src/core/hooks/catalog/use-catalog-table-view-row.ts +1 -1
- package/src/core/hooks/use-theme-hooks.ts +1 -0
- package/src/core/styles/dark.ts +2 -0
- package/src/core/styles/global.ts +2 -0
- package/src/core/types/catalog.ts +1 -1
- package/src/core/types/hooks.ts +5 -0
- package/src/core/utils/type-guards.ts +1 -1
- package/src/index.ts +2 -0
|
@@ -26,6 +26,7 @@ import { menu, mobileMenu } from '@redocly/theme/components/Menu/variables';
|
|
|
26
26
|
import { code } from '@redocly/theme/components/CodeBlock/variables';
|
|
27
27
|
import { productPicker } from '@redocly/theme/components/Product/variables';
|
|
28
28
|
import { markdown } from '@redocly/theme/components/Markdown/variables';
|
|
29
|
+
import { banner } from '@redocly/theme/components/Banner/variables';
|
|
29
30
|
import { markdownTabs } from '@redocly/theme/markdoc/components/Tabs/variables';
|
|
30
31
|
import { mermaid } from '@redocly/theme/markdoc/components/Mermaid/variables';
|
|
31
32
|
import { lastUpdated } from '@redocly/theme/components/LastUpdated/variables';
|
|
@@ -1239,6 +1240,7 @@ export const styles = css`
|
|
|
1239
1240
|
${apiReferenceDocs}
|
|
1240
1241
|
${apiReferencePanels}
|
|
1241
1242
|
${badges}
|
|
1243
|
+
${banner}
|
|
1242
1244
|
${borders}
|
|
1243
1245
|
${breadcrumbs}
|
|
1244
1246
|
${button}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InfiniteData, UseInfiniteQueryResult } from '@tanstack/react-query';
|
|
2
|
-
import { CatalogEntityConfig, LayoutVariant } from '@redocly/config';
|
|
3
2
|
import { ENTITY_RELATION_TYPES } from '@redocly/config';
|
|
4
3
|
|
|
4
|
+
import type { CatalogEntityConfig, LayoutVariant } from '@redocly/config';
|
|
5
5
|
import type { CatalogFilterConfig } from '@redocly/theme/config';
|
|
6
6
|
|
|
7
7
|
export type SortOption = 'title' | '-title' | 'type' | '-type';
|
package/src/core/types/hooks.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AsyncApiRealmUI } from '@redocly/realm-asyncapi-sdk';
|
|
2
2
|
import type {
|
|
3
|
+
BannerConfig,
|
|
3
4
|
CatalogEntityConfig,
|
|
4
5
|
PageData,
|
|
5
6
|
PageProps,
|
|
@@ -83,6 +84,10 @@ export type ThemeHooks = {
|
|
|
83
84
|
breadcrumbs: BreadcrumbItem[];
|
|
84
85
|
currentItemSiblings?: BreadcrumbItem[];
|
|
85
86
|
};
|
|
87
|
+
useBanner: () => {
|
|
88
|
+
banner: BannerConfig | undefined;
|
|
89
|
+
dismissBanner: (content: string) => void;
|
|
90
|
+
};
|
|
86
91
|
useSearch: (
|
|
87
92
|
product?: string,
|
|
88
93
|
autoSearchDisabled?: boolean,
|
package/src/index.ts
CHANGED
|
@@ -52,6 +52,8 @@ export * from '@redocly/theme/components/Footer/Footer';
|
|
|
52
52
|
export * from '@redocly/theme/components/Footer/FooterColumn';
|
|
53
53
|
export * from '@redocly/theme/components/Footer/FooterCopyright';
|
|
54
54
|
export * from '@redocly/theme/components/Footer/FooterItem';
|
|
55
|
+
/* Banner */
|
|
56
|
+
export * from '@redocly/theme/components/Banner/Banner';
|
|
55
57
|
/* Typography */
|
|
56
58
|
export * from '@redocly/theme/components/Typography/CompactTypography';
|
|
57
59
|
export * from '@redocly/theme/components/Typography/Emphasis';
|