@redocly/theme 0.82.2-rc.1 → 0.82.2-rc.3
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/Button/Button.js +1 -1
- package/lib/components/Catalog/CatalogCard.js +4 -5
- package/lib/components/CodeBlock/CodeBlock.js +1 -1
- package/lib/components/Dropdown/Dropdown.js +10 -5
- package/lib/components/Dropdown/DropdownMenuItem.js +22 -5
- package/lib/components/Dropdown/variables.js +5 -1
- package/lib/components/Feedback/Comment.js +1 -1
- package/lib/components/Feedback/Mood.js +4 -4
- package/lib/components/Feedback/Rating.js +1 -1
- package/lib/components/Feedback/Scale.js +1 -1
- package/lib/components/Feedback/Sentiment.js +3 -3
- package/lib/components/Filter/FilterContent.js +1 -1
- package/lib/components/LanguagePicker/LanguagePicker.js +5 -2
- package/lib/components/LanguagePicker/variables.js +4 -1
- package/lib/components/Markdown/Markdown.js +6 -6
- package/lib/components/Product/ProductPicker.js +4 -1
- package/lib/components/Product/variables.js +4 -1
- package/lib/components/Sidebar/Sidebar.js +3 -9
- package/lib/components/Tooltip/Tooltip.js +2 -2
- package/lib/components/Tooltip/variables.js +4 -0
- package/lib/components/Typography/H1.js +1 -1
- package/lib/components/Typography/H2.js +1 -1
- package/lib/components/Typography/H3.js +1 -1
- package/lib/components/Typography/H4.js +1 -1
- package/lib/components/UserMenu/UserMenu.js +4 -1
- package/lib/components/UserMenu/variables.js +4 -1
- package/lib/core/styles/global.js +3 -4
- package/lib/core/types/catalog.d.ts +3 -0
- package/lib/core/types/hooks.d.ts +3 -1
- package/package.json +2 -2
- package/src/components/Button/Button.tsx +5 -1
- package/src/components/Catalog/CatalogCard.tsx +20 -23
- package/src/components/CodeBlock/CodeBlock.tsx +1 -1
- package/src/components/Dropdown/Dropdown.tsx +12 -6
- package/src/components/Dropdown/DropdownMenuItem.tsx +24 -5
- package/src/components/Dropdown/variables.ts +5 -1
- package/src/components/Feedback/Comment.tsx +1 -1
- package/src/components/Feedback/Mood.tsx +5 -4
- package/src/components/Feedback/Rating.tsx +1 -1
- package/src/components/Feedback/Scale.tsx +1 -1
- package/src/components/Feedback/Sentiment.tsx +4 -3
- package/src/components/Filter/FilterContent.tsx +1 -1
- package/src/components/LanguagePicker/LanguagePicker.tsx +5 -2
- package/src/components/LanguagePicker/variables.ts +4 -1
- package/src/components/Markdown/Markdown.tsx +7 -7
- package/src/components/Product/ProductPicker.tsx +4 -1
- package/src/components/Product/variables.ts +4 -1
- package/src/components/Search/SearchDialog.tsx +1 -1
- package/src/components/Segmented/Segmented.tsx +2 -1
- package/src/components/Sidebar/Sidebar.tsx +3 -10
- package/src/components/Tooltip/Tooltip.tsx +2 -2
- package/src/components/Tooltip/variables.ts +4 -0
- package/src/components/Typography/H1.ts +1 -1
- package/src/components/Typography/H2.ts +1 -1
- package/src/components/Typography/H3.ts +1 -1
- package/src/components/Typography/H4.ts +1 -1
- package/src/components/UserMenu/UserMenu.tsx +4 -1
- package/src/components/UserMenu/variables.ts +4 -1
- package/src/core/styles/global.ts +4 -5
- package/src/core/types/catalog.ts +3 -1
- package/src/core/types/hooks.ts +3 -1
- package/src/core/utils/menu.ts +1 -2
- package/src/layouts/ThreePanelLayout.tsx +1 -0
package/src/core/types/hooks.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResolvedNavItemWithLink, Version } from '@redocly/config';
|
|
1
|
+
import type { PageProps, ResolvedNavItemWithLink, Version } from '@redocly/config';
|
|
2
2
|
import type { Callback, TFunction as TFunc } from 'i18next';
|
|
3
3
|
import type { To, Location } from 'react-router-dom';
|
|
4
4
|
import type { CatalogConfig, ProductUiConfig } from '@redocly/theme/config';
|
|
@@ -62,6 +62,8 @@ export type ThemeHooks = {
|
|
|
62
62
|
| undefined;
|
|
63
63
|
useCatalog: (config: CatalogConfig) => FilteredCatalog;
|
|
64
64
|
useTelemetry: () => { send(action: TelemetryEvent, data: unknown): void };
|
|
65
|
+
useUserTeams: () => string[];
|
|
66
|
+
usePageProps: <T extends Record<string, unknown>>() => PageProps & T;
|
|
65
67
|
};
|
|
66
68
|
|
|
67
69
|
export type I18nConfig = {
|
package/src/core/utils/menu.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { withPathPrefix } from '@redocly/theme/core/utils/urls';
|
|
2
|
-
|
|
3
1
|
import type { ResolvedNavItem, Version } from '@redocly/config';
|
|
4
2
|
import type { Location } from 'react-router-dom';
|
|
5
3
|
|
|
4
|
+
import { withPathPrefix } from '@redocly/theme/core/utils/urls';
|
|
6
5
|
import { getPathnameForLocale } from '@redocly/theme/core/utils';
|
|
7
6
|
import { type Locale, type TFunction, type ItemState } from '@redocly/theme/core/types';
|
|
8
7
|
import { MenuItemType } from '@redocly/theme/core/constants';
|