@redocly/theme 0.67.0-next.0 → 0.67.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.
Files changed (212) hide show
  1. package/lib/components/Admonition/Admonition.js +9 -9
  2. package/lib/components/Badge/Badge.d.ts +1 -1
  3. package/lib/components/Badge/Badge.js +4 -4
  4. package/lib/components/Button/Button.d.ts +1 -1
  5. package/lib/components/Button/Button.js +16 -17
  6. package/lib/components/Buttons/AIAssistantButton.js +2 -0
  7. package/lib/components/Catalog/CatalogActionsRow.js +3 -1
  8. package/lib/components/Catalog/CatalogAvatar.d.ts +3 -1
  9. package/lib/components/Catalog/CatalogAvatar.js +3 -3
  10. package/lib/components/Catalog/CatalogCardView/CatalogCard.js +4 -4
  11. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.js +7 -7
  12. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +6 -6
  13. package/lib/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.js +2 -2
  14. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +4 -6
  15. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +3 -5
  16. package/lib/components/Catalog/CatalogEntityTypeIcon.js +15 -11
  17. package/lib/components/Catalog/CatalogEntityTypeTag.js +5 -5
  18. package/lib/components/Catalog/CatalogTableView/CatalogTableView.js +5 -3
  19. package/lib/components/CatalogClassic/CatalogClassic.d.ts +4 -2
  20. package/lib/components/CatalogClassic/CatalogClassic.js +3 -1
  21. package/lib/components/CodeBlock/CodeBlockContainer.js +16 -4
  22. package/lib/components/CodeBlock/CodeBlockControls.d.ts +2 -1
  23. package/lib/components/CodeBlock/CodeBlockControls.js +9 -7
  24. package/lib/components/CodeBlock/CodeBlockTabs.js +2 -2
  25. package/lib/components/Dropdown/Dropdown.js +6 -6
  26. package/lib/components/Dropdown/DropdownMenuItem.d.ts +1 -1
  27. package/lib/components/Feedback/Comment.js +3 -3
  28. package/lib/components/Feedback/Mood.js +3 -3
  29. package/lib/components/Filter/FilterContent.js +2 -2
  30. package/lib/components/Footer/Footer.js +2 -2
  31. package/lib/components/Footer/FooterColumn.js +2 -2
  32. package/lib/components/Footer/FooterItem.js +5 -5
  33. package/lib/components/Image/Image.js +2 -2
  34. package/lib/components/LastUpdated/LastUpdated.js +2 -2
  35. package/lib/components/Link/Link.d.ts +2 -19
  36. package/lib/components/Link/Link.js +2 -9
  37. package/lib/components/Loaders/Loading.js +2 -2
  38. package/lib/components/Loaders/SpinnerLoader.js +4 -4
  39. package/lib/components/Markdown/Markdown.d.ts +7 -10
  40. package/lib/components/Markdown/Markdown.js +6 -3
  41. package/lib/components/Marker/Marker.js +3 -3
  42. package/lib/components/Menu/MenuContainer.d.ts +2 -2
  43. package/lib/components/Menu/MenuContainer.js +9 -11
  44. package/lib/components/Menu/MenuItem.js +14 -14
  45. package/lib/components/Menu/MenuMobile.js +8 -8
  46. package/lib/components/Navbar/NavbarItem.js +7 -7
  47. package/lib/components/PageNavigation/NavigationButton.js +3 -3
  48. package/lib/components/Panel/PanelBody.d.ts +5 -5
  49. package/lib/components/Panel/PanelBody.js +6 -3
  50. package/lib/components/Panel/PanelHeader.d.ts +2 -5
  51. package/lib/components/Panel/PanelHeader.js +6 -2
  52. package/lib/components/Search/SearchAiMessage.js +10 -8
  53. package/lib/components/Search/SearchDialog.js +6 -0
  54. package/lib/components/Search/SearchSuggestedPages.js +2 -2
  55. package/lib/components/Select/Select.js +3 -1
  56. package/lib/components/Select/SelectInput.d.ts +1 -0
  57. package/lib/components/Select/SelectInput.js +8 -8
  58. package/lib/components/Sidebar/Sidebar.d.ts +4 -2
  59. package/lib/components/Sidebar/Sidebar.js +10 -8
  60. package/lib/components/SidebarActions/styled.d.ts +6 -6
  61. package/lib/components/SidebarActions/styled.js +12 -4
  62. package/lib/components/StatusCode/StatusCode.d.ts +6 -4
  63. package/lib/components/StatusCode/StatusCode.js +8 -2
  64. package/lib/components/Switch/Switch.js +13 -13
  65. package/lib/components/TableOfContent/TableOfContent.js +2 -2
  66. package/lib/components/Tag/Tag.js +11 -11
  67. package/lib/components/Tooltip/AnchorTooltip.js +26 -25
  68. package/lib/components/Tooltip/JsTooltip.js +5 -5
  69. package/lib/components/Typography/CompactTypography.d.ts +27 -11
  70. package/lib/components/Typography/CompactTypography.js +2 -2
  71. package/lib/components/Typography/Typography.d.ts +6 -2
  72. package/lib/components/Typography/Typography.js +18 -3
  73. package/lib/components/UserMenu/UserAvatar.js +5 -5
  74. package/lib/core/contexts/ThemeDataContext.d.ts +1 -1
  75. package/lib/core/hooks/feedback/use-report-dialog.d.ts +8 -5
  76. package/lib/core/styles/global.js +1 -0
  77. package/lib/core/templates/Markdown.js +5 -6
  78. package/lib/core/types/index.d.ts +1 -0
  79. package/lib/core/types/link.d.ts +19 -0
  80. package/lib/core/types/link.js +3 -0
  81. package/lib/core/utils/details.d.ts +1 -1
  82. package/lib/core/utils/details.js +3 -0
  83. package/lib/core/utils/dom.d.ts +0 -1
  84. package/lib/core/utils/dom.js +0 -9
  85. package/lib/core/utils/index.d.ts +0 -1
  86. package/lib/core/utils/index.js +0 -1
  87. package/lib/ext/configure-helpers.d.ts +35 -0
  88. package/lib/ext/configure-helpers.js +3 -0
  89. package/lib/ext/configure.d.ts +3 -25
  90. package/lib/ext/configure.js +16 -0
  91. package/lib/ext/helpers/is-direct-configure-request-values.d.ts +15 -0
  92. package/lib/ext/helpers/is-direct-configure-request-values.js +42 -0
  93. package/lib/ext/use-configure-replay.d.ts +1 -1
  94. package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.d.ts +1 -1
  95. package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.js +6 -1
  96. package/lib/icons/AiStarsIcon/AiStarsIcon.d.ts +1 -1
  97. package/lib/icons/AiStarsIcon/AiStarsIcon.js +6 -1
  98. package/lib/icons/MagicWandIcon/MagicWandIcon.d.ts +23 -0
  99. package/lib/icons/MagicWandIcon/MagicWandIcon.js +25 -0
  100. package/lib/icons/ReturnKeyIcon/ReturnKeyIcon.d.ts +25 -5
  101. package/lib/index.d.ts +1 -0
  102. package/lib/index.js +1 -0
  103. package/lib/layouts/DocumentationLayout.js +2 -2
  104. package/lib/layouts/ThreePanelLayout.d.ts +27 -7
  105. package/lib/layouts/ThreePanelLayout.js +11 -8
  106. package/lib/markdoc/components/CodeWalkthrough/CodeContainer.js +2 -2
  107. package/lib/markdoc/components/CodeWalkthrough/CodePanelHeader.js +2 -2
  108. package/lib/markdoc/components/CodeWalkthrough/CodePanelPreview.js +2 -2
  109. package/lib/markdoc/components/CodeWalkthrough/CodeStep.d.ts +4 -2
  110. package/lib/markdoc/components/CodeWalkthrough/CodeStep.js +6 -2
  111. package/lib/markdoc/components/Image/Image.js +3 -3
  112. package/lib/markdoc/components/Tabs/TabItemFragment.d.ts +9 -0
  113. package/lib/markdoc/components/Tabs/TabItemFragment.js +11 -0
  114. package/lib/markdoc/components/Tabs/TabList.d.ts +7 -4
  115. package/lib/markdoc/components/Tabs/TabList.js +6 -4
  116. package/lib/markdoc/components/Tabs/Tabs.d.ts +3 -9
  117. package/lib/markdoc/components/Tabs/Tabs.js +12 -5
  118. package/lib/markdoc/components/default.d.ts +1 -0
  119. package/lib/markdoc/components/default.js +1 -0
  120. package/lib/markdoc/tags/tab.js +1 -1
  121. package/lib/markdoc/tags/tabs.js +1 -1
  122. package/package.json +2 -3
  123. package/src/components/Admonition/Admonition.tsx +11 -11
  124. package/src/components/Badge/Badge.tsx +11 -6
  125. package/src/components/Button/Button.tsx +51 -21
  126. package/src/components/Buttons/AIAssistantButton.tsx +2 -0
  127. package/src/components/Catalog/CatalogActionsRow.tsx +3 -1
  128. package/src/components/Catalog/CatalogAvatar.tsx +6 -10
  129. package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +6 -6
  130. package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNodeContent.tsx +14 -14
  131. package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +11 -11
  132. package/src/components/Catalog/CatalogEntity/CatalogEntityProperties/CatalogEntityPropertyCard.tsx +4 -4
  133. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +8 -11
  134. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +10 -9
  135. package/src/components/Catalog/CatalogEntityTypeIcon.tsx +22 -16
  136. package/src/components/Catalog/CatalogEntityTypeTag.tsx +8 -8
  137. package/src/components/Catalog/CatalogTableView/CatalogTableView.tsx +8 -6
  138. package/src/components/CatalogClassic/CatalogClassic.tsx +3 -1
  139. package/src/components/CodeBlock/CodeBlockContainer.tsx +23 -7
  140. package/src/components/CodeBlock/CodeBlockControls.tsx +16 -10
  141. package/src/components/CodeBlock/CodeBlockTabs.tsx +4 -4
  142. package/src/components/Dropdown/Dropdown.tsx +9 -9
  143. package/src/components/Dropdown/DropdownMenuItem.tsx +1 -1
  144. package/src/components/Feedback/Comment.tsx +5 -5
  145. package/src/components/Feedback/Mood.tsx +5 -5
  146. package/src/components/Filter/FilterContent.tsx +4 -4
  147. package/src/components/Filter/FilterPopover.tsx +1 -1
  148. package/src/components/Footer/Footer.tsx +4 -4
  149. package/src/components/Footer/FooterColumn.tsx +3 -3
  150. package/src/components/Footer/FooterItem.tsx +9 -9
  151. package/src/components/Image/Image.tsx +3 -3
  152. package/src/components/LastUpdated/LastUpdated.tsx +4 -4
  153. package/src/components/Link/Link.tsx +6 -51
  154. package/src/components/Loaders/Loading.tsx +3 -3
  155. package/src/components/Loaders/SpinnerLoader.tsx +5 -5
  156. package/src/components/Markdown/Markdown.tsx +7 -7
  157. package/src/components/Marker/Marker.tsx +4 -4
  158. package/src/components/Menu/MenuContainer.tsx +32 -16
  159. package/src/components/Menu/MenuItem.tsx +34 -29
  160. package/src/components/Menu/MenuMobile.tsx +12 -12
  161. package/src/components/Navbar/NavbarItem.tsx +13 -13
  162. package/src/components/PageNavigation/NavigationButton.tsx +4 -4
  163. package/src/components/Panel/PanelBody.tsx +7 -4
  164. package/src/components/Panel/PanelHeader.tsx +9 -4
  165. package/src/components/Search/SearchAiMessage.tsx +17 -15
  166. package/src/components/Search/SearchDialog.tsx +6 -0
  167. package/src/components/Search/SearchSuggestedPages.tsx +20 -5
  168. package/src/components/Select/Select.tsx +3 -1
  169. package/src/components/Select/SelectInput.tsx +10 -9
  170. package/src/components/Sidebar/Sidebar.tsx +15 -13
  171. package/src/components/SidebarActions/styled.ts +12 -4
  172. package/src/components/StatusCode/StatusCode.tsx +12 -4
  173. package/src/components/Switch/Switch.tsx +21 -21
  174. package/src/components/TableOfContent/TableOfContent.tsx +3 -3
  175. package/src/components/Tag/Tag.tsx +34 -27
  176. package/src/components/Tooltip/AnchorTooltip.tsx +50 -42
  177. package/src/components/Tooltip/JsTooltip.tsx +14 -13
  178. package/src/components/Typography/CompactTypography.tsx +4 -4
  179. package/src/components/Typography/Typography.tsx +21 -5
  180. package/src/components/UserMenu/UserAvatar.tsx +7 -7
  181. package/src/core/contexts/ThemeDataContext.tsx +1 -1
  182. package/src/core/hooks/feedback/use-report-dialog.ts +1 -5
  183. package/src/core/styles/dark.ts +1 -1
  184. package/src/core/styles/global.ts +1 -0
  185. package/src/core/templates/Markdown.tsx +6 -7
  186. package/src/core/types/index.ts +1 -0
  187. package/src/core/types/link.ts +20 -0
  188. package/src/core/utils/details.ts +4 -0
  189. package/src/core/utils/dom.ts +0 -8
  190. package/src/core/utils/index.ts +0 -1
  191. package/src/ext/configure-helpers.ts +45 -0
  192. package/src/ext/configure.ts +6 -26
  193. package/src/ext/helpers/is-direct-configure-request-values.ts +53 -0
  194. package/src/ext/use-configure-replay.ts +3 -3
  195. package/src/icons/AiStarsGradientIcon/AiStarsGradientIcon.tsx +9 -3
  196. package/src/icons/AiStarsIcon/AiStarsIcon.tsx +9 -3
  197. package/src/icons/MagicWandIcon/MagicWandIcon.tsx +26 -0
  198. package/src/icons/ReturnKeyIcon/ReturnKeyIcon.tsx +1 -1
  199. package/src/index.ts +1 -0
  200. package/src/layouts/DocumentationLayout.tsx +3 -3
  201. package/src/layouts/ThreePanelLayout.tsx +27 -14
  202. package/src/markdoc/components/CodeWalkthrough/CodeContainer.tsx +4 -4
  203. package/src/markdoc/components/CodeWalkthrough/CodePanelHeader.tsx +4 -4
  204. package/src/markdoc/components/CodeWalkthrough/CodePanelPreview.tsx +3 -3
  205. package/src/markdoc/components/CodeWalkthrough/CodeStep.tsx +6 -2
  206. package/src/markdoc/components/Image/Image.tsx +4 -4
  207. package/src/markdoc/components/Tabs/TabItemFragment.tsx +15 -0
  208. package/src/markdoc/components/Tabs/TabList.tsx +9 -6
  209. package/src/markdoc/components/Tabs/Tabs.tsx +21 -15
  210. package/src/markdoc/components/default.ts +1 -0
  211. package/src/markdoc/tags/tab.ts +1 -1
  212. package/src/markdoc/tags/tabs.ts +1 -1
@@ -9,7 +9,7 @@ type MarkdocImageProps = React.PropsWithChildren<ImageProps> & {
9
9
  export function Image(props: MarkdocImageProps) {
10
10
  const { align, ...rest } = props;
11
11
  return align ? (
12
- <ImageWrapper align={align}>
12
+ <ImageWrapper $align={align}>
13
13
  <ImageComponent {...rest} />
14
14
  </ImageWrapper>
15
15
  ) : (
@@ -17,13 +17,13 @@ export function Image(props: MarkdocImageProps) {
17
17
  );
18
18
  }
19
19
 
20
- const ImageWrapper = styled.div<{ align?: MarkdocImageProps['align'] }>`
21
- text-align: ${(props) => props.align || 'initial'};
20
+ const ImageWrapper = styled.div<{ $align?: MarkdocImageProps['align'] }>`
21
+ text-align: ${(props) => props.$align || 'initial'};
22
22
 
23
23
  img {
24
24
  display: block;
25
25
  ${(props) => {
26
- switch (props.align) {
26
+ switch (props.$align) {
27
27
  case 'left':
28
28
  return 'margin-right: auto; margin-left: 0;';
29
29
  case 'right':
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+
3
+ import type { JSX, PropsWithChildren } from 'react';
4
+
5
+ // Below props are used by the TabList component to render tab labels
6
+ export type TabItemProps = PropsWithChildren<{
7
+ label: string;
8
+ disable?: boolean;
9
+ onClick?: () => void;
10
+ icon?: React.ReactNode | string;
11
+ }>;
12
+
13
+ export function TabItemFragment({ children }: TabItemProps): JSX.Element {
14
+ return <div>{children}</div>;
15
+ }
@@ -2,9 +2,10 @@ import React, { useState, useRef, useEffect, useCallback } from 'react';
2
2
  import styled, { css } from 'styled-components';
3
3
 
4
4
  import type { JSX } from 'react';
5
+ import type { TabItemProps } from '@redocly/theme/markdoc/components/Tabs/TabItemFragment';
5
6
 
6
7
  import { Tab } from '@redocly/theme/markdoc/components/Tabs/Tab';
7
- import { TabItemProps, TabsSize } from '@redocly/theme/markdoc/components/Tabs/Tabs';
8
+ import { TabsSize } from '@redocly/theme/markdoc/components/Tabs/Tabs';
8
9
  import { Dropdown } from '@redocly/theme/components/Dropdown/Dropdown';
9
10
  import { DropdownMenu } from '@redocly/theme/components/Dropdown/DropdownMenu';
10
11
  import { DropdownMenuItem } from '@redocly/theme/components/Dropdown/DropdownMenuItem';
@@ -198,7 +199,7 @@ export function TabList({
198
199
 
199
200
  return (
200
201
  <TabListContainer role="tablist" ref={containerRef}>
201
- <HighlightBar size={size} style={highlightStyle}>
202
+ <HighlightBar $size={size} style={highlightStyle}>
202
203
  <div />
203
204
  </HighlightBar>
204
205
 
@@ -359,7 +360,9 @@ export const TabListContainer = styled.ul`
359
360
  }
360
361
  `;
361
362
 
362
- export const TabItem = styled.li<{ active?: boolean; size: TabsSize; tabIndex?: number }>`
363
+ export const TabItem = styled.li.withConfig({
364
+ shouldForwardProp: (prop) => !['active', 'size'].includes(prop),
365
+ })<{ tabIndex?: number; className?: string; active?: boolean; size: TabsSize }>`
363
366
  display: inline-flex;
364
367
  list-style: none;
365
368
  cursor: pointer;
@@ -449,12 +452,12 @@ const FixedPositionDropdown = styled(Dropdown)`
449
452
  }
450
453
  `;
451
454
 
452
- const HighlightBar = styled.div<{ size: TabsSize }>`
455
+ const HighlightBar = styled.div<{ $size: TabsSize }>`
453
456
  position: absolute;
454
457
  top: 0;
455
458
  bottom: 0;
456
459
  border: solid var(--md-tabs-active-tab-border-color);
457
- border-width: var(--md-tabs-${({ size }) => size}-active-tab-border-width);
460
+ border-width: var(--md-tabs-${({ $size }) => $size}-active-tab-border-width);
458
461
  transition:
459
462
  left 300ms ease-in-out,
460
463
  width 300ms ease-in-out;
@@ -465,7 +468,7 @@ const HighlightBar = styled.div<{ size: TabsSize }>`
465
468
  width: 100%;
466
469
  height: 100%;
467
470
  background-color: var(--md-tabs-active-tab-bg-color);
468
- border-radius: var(--md-tabs-${({ size }) => size}-active-tab-border-radius);
471
+ border-radius: var(--md-tabs-${({ $size }) => $size}-active-tab-border-radius);
469
472
  }
470
473
  `;
471
474
 
@@ -1,26 +1,24 @@
1
- import React, { useEffect, useRef, useState } from 'react';
1
+ import React, { isValidElement, useEffect, useRef, useState } from 'react';
2
2
  import { useInRouterContext } from 'react-router-dom';
3
3
  import styled from 'styled-components';
4
4
 
5
- import type { JSX } from 'react';
5
+ import type { JSX, ReactElement, ReactNode } from 'react';
6
6
 
7
7
  import { useActiveTab } from '@redocly/theme/core/hooks';
8
+ import {
9
+ TabItemFragment,
10
+ type TabItemProps,
11
+ } from '@redocly/theme/markdoc/components/Tabs/TabItemFragment';
8
12
  import { TabList } from '@redocly/theme/markdoc/components/Tabs/TabList';
9
13
  import { getTabId } from '@redocly/theme/core/utils';
10
14
 
15
+ export type { TabItemProps } from '@redocly/theme/markdoc/components/Tabs/TabItemFragment';
16
+
11
17
  export enum TabsSize {
12
18
  SMALL = 'small',
13
19
  MEDIUM = 'medium',
14
20
  }
15
21
 
16
- export type TabItemProps = {
17
- label: string;
18
- disable?: boolean;
19
- onClick?: () => void;
20
- children: React.ReactNode;
21
- icon?: React.ReactNode | string;
22
- };
23
-
24
22
  type TabsProps = {
25
23
  id?: string;
26
24
  children: React.ReactElement<TabItemProps>[];
@@ -55,14 +53,17 @@ export function Tabs({
55
53
  size,
56
54
  initialTab: propInitialTab,
57
55
  activeTab: controlledActiveTab,
58
- }: TabsProps): JSX.Element {
59
- const childrenArray = React.Children.toArray(children) as React.ReactElement<TabItemProps>[];
56
+ }: TabsProps): JSX.Element | null {
57
+ const inRouter = useInRouterContext();
58
+ const childrenArray = React.Children.toArray(children).filter(isTabItemFragment);
60
59
  const containerRef = useRef<HTMLUListElement | null>(null);
61
60
 
62
- const initialTab = propInitialTab ?? childrenArray[0]?.props.label ?? '';
63
- const labelsHash = childrenArray.map((c) => c.props.label).join('|');
61
+ if (childrenArray.length === 0) {
62
+ return null;
63
+ }
64
64
 
65
- const inRouter = useInRouterContext();
65
+ const initialTab = propInitialTab ?? childrenArray[0].props.label;
66
+ const labelsHash = childrenArray.map((c) => c.props.label).join('|');
66
67
 
67
68
  return (
68
69
  <TabsView
@@ -127,6 +128,11 @@ function TabsView({
127
128
  );
128
129
  }
129
130
 
131
+ function isTabItemFragment(node: ReactNode): node is ReactElement<TabItemProps> {
132
+ if (!isValidElement(node)) return false;
133
+ return node.type === TabItemFragment;
134
+ }
135
+
130
136
  /**
131
137
  * Validates that the active tab exists in children and resets to initial tab if not found.
132
138
  * Ensures tab state remains consistent when tab structure changes.
@@ -4,6 +4,7 @@ export * from '@redocly/theme/markdoc/components/MarkdocExample/MarkdocExample';
4
4
  export * from '@redocly/theme/markdoc/components/Heading/Heading';
5
5
  export * from '@redocly/theme/markdoc/components/Diagram/Diagram';
6
6
  export * from '@redocly/theme/markdoc/components/HtmlBlock/HtmlBlock';
7
+ export * from '@redocly/theme/markdoc/components/Tabs/TabItemFragment';
7
8
  export * from '@redocly/theme/markdoc/components/Tabs/Tab';
8
9
  export * from '@redocly/theme/markdoc/components/Tabs/TabList';
9
10
  export * from '@redocly/theme/markdoc/components/Tabs/Tabs';
@@ -7,7 +7,7 @@ export const tab: MarkdocSchemaWrapper = {
7
7
  disable: { type: Boolean, default: false },
8
8
  icon: { type: String, resolver: 'relativeOrCdnIcon' },
9
9
  },
10
- render: 'div',
10
+ render: 'TabItemFragment',
11
11
  },
12
12
  tagName: 'tab',
13
13
  };
@@ -14,7 +14,7 @@ export const tabs: MarkdocSchemaWrapper = {
14
14
  if (isTag(child) && child?.name === 'CodeBlock') {
15
15
  const key = child.attributes['data-language'] || 'default';
16
16
  const label = child.attributes['data-label'] || key;
17
- return new markdoc.Tag('div', { label, key }, [child]);
17
+ return new markdoc.Tag('TabItemFragment', { label, key }, [child]);
18
18
  }
19
19
  return child;
20
20
  });