@redocly/theme 0.59.0-next.0 → 0.59.0-next.10

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 (262) hide show
  1. package/LICENSE +7 -1
  2. package/lib/components/Accordion/Accordion.d.ts +12 -0
  3. package/lib/components/Accordion/Accordion.js +85 -0
  4. package/lib/components/Accordion/AccordionBody.d.ts +8 -0
  5. package/lib/components/Accordion/AccordionBody.js +73 -0
  6. package/lib/components/Accordion/AccordionHeader.d.ts +10 -0
  7. package/lib/components/Accordion/AccordionHeader.js +37 -0
  8. package/lib/components/Accordion/AccordionTitle.d.ts +6 -0
  9. package/lib/components/Accordion/AccordionTitle.js +20 -0
  10. package/lib/components/Accordion/variables.d.ts +1 -0
  11. package/lib/components/Accordion/variables.js +59 -0
  12. package/lib/components/Admonition/Admonition.js +17 -7
  13. package/lib/components/Badge/Badge.js +17 -7
  14. package/lib/components/Breadcrumbs/Breadcrumb.js +17 -7
  15. package/lib/components/Breadcrumbs/BreadcrumbDropdown.js +17 -7
  16. package/lib/components/Button/Button.js +17 -7
  17. package/lib/components/Buttons/AIAssistantButton.d.ts +2 -0
  18. package/lib/components/Buttons/AIAssistantButton.js +139 -0
  19. package/lib/components/Buttons/CopyButton.js +17 -7
  20. package/lib/components/Buttons/variables.d.ts +1 -0
  21. package/lib/components/Buttons/variables.dark.d.ts +1 -0
  22. package/lib/components/Buttons/variables.dark.js +10 -0
  23. package/lib/components/Buttons/variables.js +51 -0
  24. package/lib/components/Catalog/Catalog.d.ts +6 -0
  25. package/lib/components/Catalog/Catalog.js +9 -8
  26. package/lib/components/Catalog/CatalogEntities.js +17 -7
  27. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.js +17 -7
  28. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.js +17 -7
  29. package/lib/components/Catalog/CatalogEntity/CatalogEntityInfoBar.js +1 -0
  30. package/lib/components/Catalog/CatalogEntity/CatalogEntityMetadata.js +17 -7
  31. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.js +1 -1
  32. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +17 -7
  33. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +1 -1
  34. package/lib/components/Catalog/CatalogEntity/CatalogEntitySchema.js +17 -7
  35. package/lib/components/Catalog/CatalogEntityIcon.js +2 -1
  36. package/lib/components/Catalog/CatalogFilter/CatalogFilter.d.ts +6 -0
  37. package/lib/components/Catalog/CatalogFilter/CatalogFilter.js +39 -0
  38. package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.d.ts +6 -0
  39. package/lib/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.js +152 -0
  40. package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.d.ts +13 -0
  41. package/lib/components/Catalog/CatalogFilter/CatalogFilterContent.js +102 -0
  42. package/lib/components/Catalog/CatalogFilter/CatalogFilterDateRange.d.ts +6 -0
  43. package/lib/components/Catalog/CatalogFilter/CatalogFilterDateRange.js +121 -0
  44. package/lib/components/Catalog/CatalogFilter/CatalogFilterSelect.d.ts +6 -0
  45. package/lib/components/Catalog/CatalogFilter/CatalogFilterSelect.js +126 -0
  46. package/lib/components/Catalog/CatalogSelector.js +0 -1
  47. package/lib/components/Catalog/CatalogSortButton.js +17 -7
  48. package/lib/components/Catalog/CatalogTableView/CatalogTableHeaderCell.js +17 -7
  49. package/lib/components/Catalog/CatalogViewModeToggle.js +17 -7
  50. package/lib/components/Catalog/variables.js +1 -2
  51. package/lib/components/CatalogClassic/CatalogClassicActions.js +17 -7
  52. package/lib/components/CatalogClassic/CatalogClassicCard.js +17 -7
  53. package/lib/components/CatalogClassic/CatalogClassicHighlight.js +17 -7
  54. package/lib/components/CatalogClassic/CatalogClassicVirtualizedGroups.js +17 -7
  55. package/lib/components/CodeBlock/CodeBlock.js +17 -7
  56. package/lib/components/CodeBlock/CodeBlockContainer.js +17 -7
  57. package/lib/components/CodeBlock/CodeBlockTabs.js +17 -7
  58. package/lib/components/Dropdown/Dropdown.d.ts +16 -2
  59. package/lib/components/Dropdown/Dropdown.js +22 -12
  60. package/lib/components/Dropdown/DropdownMenuItem.js +17 -7
  61. package/lib/components/Feedback/Comment.js +17 -7
  62. package/lib/components/Feedback/Feedback.js +17 -7
  63. package/lib/components/Feedback/Mood.js +17 -7
  64. package/lib/components/Feedback/Rating.js +17 -7
  65. package/lib/components/Feedback/Reasons.js +17 -7
  66. package/lib/components/Feedback/Scale.js +17 -7
  67. package/lib/components/Feedback/Sentiment.js +17 -7
  68. package/lib/components/Feedback/Stars.js +17 -7
  69. package/lib/components/Filter/FilterContent.js +17 -7
  70. package/lib/components/Filter/FilterInput.d.ts +1 -0
  71. package/lib/components/Filter/FilterInput.js +19 -9
  72. package/lib/components/Filter/FilterOptions.js +2 -0
  73. package/lib/components/Filter/variables.js +7 -4
  74. package/lib/components/Image/Image.js +17 -7
  75. package/lib/components/JsonViewer/JsonViewer.js +17 -7
  76. package/lib/components/JsonViewer/helpers.js +17 -7
  77. package/lib/components/LastUpdated/LastUpdated.js +17 -7
  78. package/lib/components/Link/Link.js +17 -7
  79. package/lib/components/Markdown/Markdown.js +17 -7
  80. package/lib/components/Marker/Marker.js +17 -7
  81. package/lib/components/Menu/MenuContainer.js +17 -7
  82. package/lib/components/Menu/MenuItem.js +18 -8
  83. package/lib/components/Menu/MenuMobile.js +17 -7
  84. package/lib/components/Navbar/NavbarItem.js +3 -3
  85. package/lib/components/PageActions/PageActions.js +17 -7
  86. package/lib/components/PageNavigation/NextButton.js +17 -7
  87. package/lib/components/Panel/Panel.js +17 -7
  88. package/lib/components/Panel/PanelBody.js +17 -7
  89. package/lib/components/Search/FilterFields/SearchFilterFieldSelect.js +17 -7
  90. package/lib/components/Search/FilterFields/SearchFilterFieldTags.js +1 -2
  91. package/lib/components/Search/SearchAiActionButtons.d.ts +10 -0
  92. package/lib/components/Search/SearchAiActionButtons.js +43 -0
  93. package/lib/components/Search/SearchAiConversationInput.d.ts +3 -1
  94. package/lib/components/Search/SearchAiConversationInput.js +56 -14
  95. package/lib/components/Search/SearchAiDialog.d.ts +3 -6
  96. package/lib/components/Search/SearchAiDialog.js +39 -19
  97. package/lib/components/Search/SearchAiMessage.d.ts +9 -5
  98. package/lib/components/Search/SearchAiMessage.js +146 -22
  99. package/lib/components/Search/SearchAiNegativeFeedbackForm.d.ts +8 -0
  100. package/lib/components/Search/SearchAiNegativeFeedbackForm.js +169 -0
  101. package/lib/components/Search/SearchAiResponse.js +2 -3
  102. package/lib/components/Search/SearchDialog.d.ts +2 -1
  103. package/lib/components/Search/SearchDialog.js +55 -14
  104. package/lib/components/Search/SearchFilter.js +17 -7
  105. package/lib/components/Search/SearchGroups.js +19 -9
  106. package/lib/components/Search/SearchHighlight.js +17 -7
  107. package/lib/components/Search/SearchItem.js +17 -7
  108. package/lib/components/Search/SearchRecent.js +17 -7
  109. package/lib/components/Search/SearchShortcut.js +17 -7
  110. package/lib/components/Search/SearchSuggestedPages.js +17 -7
  111. package/lib/components/Search/SearchTrigger.js +17 -7
  112. package/lib/components/Search/variables.js +36 -64
  113. package/lib/components/Segmented/Segmented.js +17 -7
  114. package/lib/components/Select/Select.js +17 -7
  115. package/lib/components/Select/SelectInput.js +18 -8
  116. package/lib/components/Sidebar/Sidebar.js +17 -7
  117. package/lib/components/SidebarActions/styled.js +17 -7
  118. package/lib/components/SkipContent/SkipContent.js +17 -7
  119. package/lib/components/Switch/Switch.js +17 -7
  120. package/lib/components/TableOfContent/TableOfContent.js +17 -7
  121. package/lib/components/Tag/Tag.d.ts +2 -1
  122. package/lib/components/Tag/Tag.js +67 -18
  123. package/lib/components/Tag/variables.dark.js +137 -38
  124. package/lib/components/Tag/variables.js +78 -61
  125. package/lib/components/Tooltip/Tooltip.js +17 -7
  126. package/lib/components/VersionPicker/VersionPicker.js +17 -7
  127. package/lib/core/constants/search.d.ts +5 -4
  128. package/lib/core/constants/search.js +4 -5
  129. package/lib/core/contexts/CodeSnippetContext.js +17 -7
  130. package/lib/core/hooks/index.d.ts +1 -0
  131. package/lib/core/hooks/index.js +1 -0
  132. package/lib/core/hooks/menu/use-nested-menu.js +1 -1
  133. package/lib/core/hooks/search/use-feedback-tooltip.d.ts +6 -0
  134. package/lib/core/hooks/search/use-feedback-tooltip.js +26 -0
  135. package/lib/core/hooks/use-product-picker.js +2 -1
  136. package/lib/core/hooks/use-tabs.d.ts +3 -2
  137. package/lib/core/hooks/use-tabs.js +115 -57
  138. package/lib/core/hooks/use-telemetry-fallback.d.ts +10 -8
  139. package/lib/core/hooks/use-telemetry-fallback.js +10 -8
  140. package/lib/core/styles/dark.js +33 -26
  141. package/lib/core/styles/global.js +68 -59
  142. package/lib/core/templates/Markdown.js +17 -7
  143. package/lib/core/types/hooks.d.ts +6 -3
  144. package/lib/core/types/l10n.d.ts +1 -1
  145. package/lib/core/types/search.d.ts +11 -4
  146. package/lib/core/types/search.js +6 -0
  147. package/lib/core/utils/download-code-walkthrough.js +17 -7
  148. package/lib/core/utils/frontmatter-translate.d.ts +6 -0
  149. package/lib/core/utils/frontmatter-translate.js +14 -0
  150. package/lib/core/utils/get-file-icon.js +17 -7
  151. package/lib/core/utils/index.d.ts +1 -0
  152. package/lib/core/utils/index.js +1 -0
  153. package/lib/icons/AiStarsGradientIcon/AiStarsGradientIcon.js +44 -4
  154. package/lib/icons/AiStarsIcon/AiStarsIcon.js +11 -2
  155. package/lib/icons/CubeIcon/CubeIcon.d.ts +9 -0
  156. package/lib/icons/CubeIcon/CubeIcon.js +17 -0
  157. package/lib/icons/GenericIcon/GenericIcon.js +17 -7
  158. package/lib/icons/HashtagIcon/HashtagIcon.d.ts +9 -0
  159. package/lib/icons/HashtagIcon/HashtagIcon.js +22 -0
  160. package/lib/icons/RedoclyIcon/RedoclyIcon.d.ts +9 -0
  161. package/lib/icons/RedoclyIcon/RedoclyIcon.js +24 -0
  162. package/lib/icons/Spinner/Spinner.js +17 -7
  163. package/lib/icons/ThumbDownFilledIcon/ThumbDownFilledIcon.d.ts +9 -0
  164. package/lib/icons/ThumbDownFilledIcon/ThumbDownFilledIcon.js +34 -0
  165. package/lib/icons/ThumbUpFilledIcon/ThumbUpFilledIcon.d.ts +9 -0
  166. package/lib/icons/ThumbUpFilledIcon/ThumbUpFilledIcon.js +34 -0
  167. package/lib/index.d.ts +3 -0
  168. package/lib/index.js +20 -7
  169. package/lib/layouts/OIDCForbidden.js +17 -7
  170. package/lib/layouts/RootLayout.js +6 -1
  171. package/lib/layouts/ThreePanelLayout.js +17 -7
  172. package/lib/markdoc/components/Cards/Card.js +1 -28
  173. package/lib/markdoc/components/Cards/Cards.js +17 -7
  174. package/lib/markdoc/components/CodeGroup/CodeGroup.js +17 -7
  175. package/lib/markdoc/components/CodeWalkthrough/CodeContainer.js +17 -7
  176. package/lib/markdoc/components/CodeWalkthrough/CodePanel.js +17 -7
  177. package/lib/markdoc/components/CodeWalkthrough/CodePanelHeader.js +17 -7
  178. package/lib/markdoc/components/CodeWalkthrough/CodePanelPreview.js +17 -7
  179. package/lib/markdoc/components/CodeWalkthrough/CodePanelToolbar.js +17 -7
  180. package/lib/markdoc/components/CodeWalkthrough/CodeStep.js +17 -7
  181. package/lib/markdoc/components/CodeWalkthrough/CodeToggle.js +17 -7
  182. package/lib/markdoc/components/CodeWalkthrough/CodeWalkthrough.js +17 -7
  183. package/lib/markdoc/components/CodeWalkthrough/Input.js +17 -7
  184. package/lib/markdoc/components/Heading/Heading.js +17 -7
  185. package/lib/markdoc/components/HtmlBlock/HtmlBlock.js +17 -7
  186. package/lib/markdoc/components/InlineSvg/InlineSvg.js +17 -7
  187. package/lib/markdoc/components/MarkdocExample/MarkdocExample.js +17 -7
  188. package/lib/markdoc/components/Tabs/TabList.d.ts +3 -1
  189. package/lib/markdoc/components/Tabs/TabList.js +214 -54
  190. package/lib/markdoc/components/Tabs/Tabs.d.ts +2 -1
  191. package/lib/markdoc/components/Tabs/Tabs.js +74 -19
  192. package/lib/markdoc/default.d.ts +104 -1
  193. package/lib/markdoc/default.js +17 -7
  194. package/lib/markdoc/tags/card.js +0 -1
  195. package/package.json +8 -8
  196. package/src/components/Accordion/Accordion.tsx +100 -0
  197. package/src/components/Accordion/AccordionBody.tsx +65 -0
  198. package/src/components/Accordion/AccordionHeader.tsx +68 -0
  199. package/src/components/Accordion/AccordionTitle.tsx +26 -0
  200. package/src/components/Accordion/variables.ts +56 -0
  201. package/src/components/Buttons/AIAssistantButton.tsx +145 -0
  202. package/src/components/Buttons/variables.dark.ts +7 -0
  203. package/src/components/Buttons/variables.ts +48 -0
  204. package/src/components/Catalog/Catalog.tsx +18 -6
  205. package/src/components/Catalog/CatalogEntity/CatalogEntityInfoBar.tsx +1 -0
  206. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityApiDescriptionRelations.tsx +1 -1
  207. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +1 -1
  208. package/src/components/Catalog/CatalogEntityIcon.tsx +2 -1
  209. package/src/components/Catalog/CatalogFilter/CatalogFilter.tsx +61 -0
  210. package/src/components/Catalog/CatalogFilter/CatalogFilterCheckboxes.tsx +169 -0
  211. package/src/components/Catalog/CatalogFilter/CatalogFilterContent.tsx +121 -0
  212. package/src/components/Catalog/CatalogFilter/CatalogFilterDateRange.tsx +147 -0
  213. package/src/components/Catalog/CatalogFilter/CatalogFilterSelect.tsx +136 -0
  214. package/src/components/Catalog/CatalogSelector.tsx +0 -1
  215. package/src/components/Catalog/variables.ts +1 -2
  216. package/src/components/Dropdown/Dropdown.tsx +84 -79
  217. package/src/components/Filter/FilterInput.tsx +3 -2
  218. package/src/components/Filter/FilterOptions.tsx +2 -0
  219. package/src/components/Filter/variables.ts +7 -4
  220. package/src/components/Menu/MenuItem.tsx +1 -0
  221. package/src/components/Navbar/NavbarItem.tsx +6 -5
  222. package/src/components/Search/FilterFields/SearchFilterFieldTags.tsx +3 -3
  223. package/src/components/Search/SearchAiActionButtons.tsx +76 -0
  224. package/src/components/Search/SearchAiConversationInput.tsx +61 -18
  225. package/src/components/Search/SearchAiDialog.tsx +54 -25
  226. package/src/components/Search/SearchAiMessage.tsx +172 -43
  227. package/src/components/Search/SearchAiNegativeFeedbackForm.tsx +210 -0
  228. package/src/components/Search/SearchAiResponse.tsx +2 -2
  229. package/src/components/Search/SearchDialog.tsx +56 -15
  230. package/src/components/Search/SearchGroups.tsx +2 -0
  231. package/src/components/Search/variables.ts +36 -64
  232. package/src/components/Select/SelectInput.tsx +1 -0
  233. package/src/components/Tag/Tag.tsx +36 -20
  234. package/src/components/Tag/variables.dark.ts +137 -38
  235. package/src/components/Tag/variables.ts +78 -61
  236. package/src/core/constants/search.ts +8 -4
  237. package/src/core/hooks/index.ts +1 -0
  238. package/src/core/hooks/menu/use-nested-menu.ts +2 -2
  239. package/src/core/hooks/search/use-feedback-tooltip.ts +32 -0
  240. package/src/core/hooks/use-product-picker.ts +2 -1
  241. package/src/core/hooks/use-tabs.ts +168 -86
  242. package/src/core/hooks/use-telemetry-fallback.ts +10 -8
  243. package/src/core/styles/dark.ts +15 -8
  244. package/src/core/styles/global.ts +11 -2
  245. package/src/core/types/hooks.ts +6 -1
  246. package/src/core/types/l10n.ts +6 -0
  247. package/src/core/types/search.ts +13 -4
  248. package/src/core/utils/frontmatter-translate.ts +9 -0
  249. package/src/core/utils/index.ts +1 -0
  250. package/src/icons/AiStarsGradientIcon/AiStarsGradientIcon.tsx +13 -4
  251. package/src/icons/AiStarsIcon/AiStarsIcon.tsx +11 -2
  252. package/src/icons/CubeIcon/CubeIcon.tsx +27 -0
  253. package/src/icons/HashtagIcon/HashtagIcon.tsx +23 -0
  254. package/src/icons/RedoclyIcon/RedoclyIcon.tsx +26 -0
  255. package/src/icons/ThumbDownFilledIcon/ThumbDownFilledIcon.tsx +38 -0
  256. package/src/icons/ThumbUpFilledIcon/ThumbUpFilledIcon.tsx +35 -0
  257. package/src/index.ts +3 -0
  258. package/src/layouts/RootLayout.tsx +6 -0
  259. package/src/markdoc/components/Cards/Card.tsx +1 -28
  260. package/src/markdoc/components/Tabs/TabList.tsx +312 -105
  261. package/src/markdoc/components/Tabs/Tabs.tsx +136 -11
  262. package/src/markdoc/tags/card.ts +0 -1
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __rest = (this && this.__rest) || function (s, e) {
26
36
  var t = {};
27
37
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.HtmlBlock = HtmlBlock;
27
37
  const React = __importStar(require("react"));
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.InlineSvg = InlineSvg;
27
37
  const React = __importStar(require("react"));
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
@@ -6,8 +6,10 @@ type TabListProps = {
6
6
  size: TabsSize;
7
7
  activeTab: string;
8
8
  onTabChange: (tab: string) => void;
9
+ containerRef: React.RefObject<HTMLUListElement | null>;
10
+ onReadyChange?: (isReady: boolean) => void;
9
11
  };
10
- export declare function TabList({ childrenArray, size, activeTab, onTabChange, }: TabListProps): JSX.Element;
12
+ export declare function TabList({ childrenArray, size, activeTab, onTabChange, containerRef, onReadyChange, }: TabListProps): JSX.Element;
11
13
  export declare const TabListContainer: import("styled-components").StyledComponent<"ul", any, {}, never>;
12
14
  export declare const TabItem: import("styled-components").StyledComponent<"li", any, {
13
15
  active?: boolean;
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.TabButtonLink = exports.TabItem = exports.TabListContainer = void 0;
27
37
  exports.TabList = TabList;
@@ -34,47 +44,144 @@ const DropdownMenuItem_1 = require("../../../components/Dropdown/DropdownMenuIte
34
44
  const Button_1 = require("../../../components/Button/Button");
35
45
  const hooks_1 = require("../../../core/hooks");
36
46
  const utils_1 = require("../../../core/utils");
37
- function TabList({ childrenArray, size, activeTab, onTabChange, }) {
38
- const tabsContainerRef = (0, react_1.useRef)(null);
39
- const { allTabsHidden, overflowTabs, visibleTabs, handleKeyboard, onTabClick, setTabRef } = (0, hooks_1.useTabs)({
47
+ /**
48
+ * Calculates optimal dropdown position relative to viewport to ensure visibility.
49
+ * Positions below the button by default, but moves above if insufficient space.
50
+ * Adjusts horizontal position to prevent overflow off screen edges.
51
+ */
52
+ const calculateDropdownPosition = (buttonRect, dropdownRect) => {
53
+ const gap = 4;
54
+ const margin = 16;
55
+ const spaceBelow = window.innerHeight - buttonRect.bottom;
56
+ const spaceAbove = buttonRect.top;
57
+ // Position below button, or above if dropdown doesn't fit below
58
+ const top = spaceBelow < dropdownRect.height + gap && spaceAbove > spaceBelow
59
+ ? buttonRect.top - gap
60
+ : buttonRect.bottom + gap;
61
+ // Align with button left edge, adjust if overflows screen
62
+ const idealLeft = buttonRect.left;
63
+ const rightEdge = idealLeft + dropdownRect.width;
64
+ const overflowsRight = rightEdge > window.innerWidth - margin;
65
+ const left = overflowsRight
66
+ ? window.innerWidth - dropdownRect.width - margin
67
+ : Math.max(margin, idealLeft);
68
+ return { top, left };
69
+ };
70
+ /**
71
+ * Manages dropdown positioning and updates on scroll/resize events for TabList.
72
+ */
73
+ const useDropdownPosition = (hasOverflow, dropdownRef) => {
74
+ const [dropdownPosition, setDropdownPosition] = (0, react_1.useState)({});
75
+ const [isDropdownOpen, setIsDropdownOpen] = (0, react_1.useState)(false);
76
+ const updateDropdownPosition = (0, react_1.useCallback)(() => {
77
+ if (!dropdownRef.current)
78
+ return;
79
+ const button = dropdownRef.current.querySelector('button');
80
+ const dropdownMenu = dropdownRef.current.querySelector('div:last-child');
81
+ if (!button || !dropdownMenu)
82
+ return;
83
+ const buttonRect = button.getBoundingClientRect();
84
+ const dropdownRect = dropdownMenu.getBoundingClientRect();
85
+ const position = calculateDropdownPosition(buttonRect, dropdownRect);
86
+ setDropdownPosition(position);
87
+ }, [dropdownRef]);
88
+ // Track when dropdown menu appears and recalculate position
89
+ (0, react_1.useEffect)(() => {
90
+ if (!hasOverflow || !isDropdownOpen || !dropdownRef.current)
91
+ return;
92
+ const dropdownMenu = dropdownRef.current.querySelector('div:last-child');
93
+ if (!dropdownMenu)
94
+ return;
95
+ // ResizeObserver tracks both initial render and size changes
96
+ const resizeObserver = new ResizeObserver(() => {
97
+ updateDropdownPosition();
98
+ });
99
+ resizeObserver.observe(dropdownMenu);
100
+ return () => resizeObserver.disconnect();
101
+ }, [hasOverflow, isDropdownOpen, dropdownRef, updateDropdownPosition]);
102
+ // Update position on scroll/resize
103
+ (0, react_1.useEffect)(() => {
104
+ if (!hasOverflow || !isDropdownOpen)
105
+ return;
106
+ window.addEventListener('scroll', updateDropdownPosition, true);
107
+ window.addEventListener('resize', updateDropdownPosition);
108
+ return () => {
109
+ window.removeEventListener('scroll', updateDropdownPosition, true);
110
+ window.removeEventListener('resize', updateDropdownPosition);
111
+ };
112
+ }, [hasOverflow, isDropdownOpen, updateDropdownPosition]);
113
+ return {
114
+ dropdownPosition,
115
+ isDropdownOpen,
116
+ setIsDropdownOpen,
117
+ setDropdownPosition,
118
+ updateDropdownPosition,
119
+ };
120
+ };
121
+ const renderTab = (child, index, size, setTabRef, handleKeyboard, onTabClick) => {
122
+ const { label, icon } = child.props;
123
+ const tabId = (0, utils_1.getTabId)(label, index);
124
+ return (react_1.default.createElement(Tab_1.Tab, { key: `key-${tabId}`, tabId: tabId, label: label, icon: icon, size: size, disabled: child.props.disable, setRef: (el) => setTabRef(el, index), onKeyDown: (event) => handleKeyboard(event, index), onClick: () => {
125
+ var _a, _b;
126
+ (_b = (_a = child.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a);
127
+ onTabClick(label);
128
+ } }));
129
+ };
130
+ function TabList({ childrenArray, size, activeTab, onTabChange, containerRef, onReadyChange, }) {
131
+ const dropdownRef = (0, react_1.useRef)(null);
132
+ const totalTabs = childrenArray.length;
133
+ const { overflowTabs, visibleTabs, handleKeyboard, onTabClick, setTabRef, isReady } = (0, hooks_1.useTabs)({
40
134
  activeTab,
41
135
  onTabChange,
42
- containerRef: tabsContainerRef,
43
- totalTabs: childrenArray.length,
136
+ containerRef,
137
+ totalTabs,
44
138
  });
139
+ (0, react_1.useEffect)(() => {
140
+ onReadyChange === null || onReadyChange === void 0 ? void 0 : onReadyChange(isReady);
141
+ }, [isReady, onReadyChange]);
45
142
  const { highlightStyle } = useHighlightBarAnimation({
46
143
  activeTab,
47
144
  childrenArray,
48
145
  overflowTabs,
49
- tabsContainerRef,
146
+ tabsContainerRef: containerRef,
50
147
  visibleTabs,
51
148
  });
52
- return (react_1.default.createElement(exports.TabListContainer, { role: "tablist", ref: tabsContainerRef },
149
+ const hasOverflow = overflowTabs.length > 0;
150
+ const isMoreActive = hasOverflow &&
151
+ overflowTabs.some((i) => childrenArray[i] && activeTab === childrenArray[i].props.label);
152
+ // Show as selector when no visible tabs (all tabs in dropdown)
153
+ const showAsSelector = visibleTabs.length === 0 && hasOverflow;
154
+ const { dropdownPosition, setIsDropdownOpen, setDropdownPosition } = useDropdownPosition(hasOverflow, dropdownRef);
155
+ return (react_1.default.createElement(exports.TabListContainer, { role: "tablist", ref: containerRef },
53
156
  react_1.default.createElement(HighlightBar, { size: size, style: highlightStyle },
54
157
  react_1.default.createElement("div", null)),
55
158
  childrenArray.map((child, index) => {
56
- if (!visibleTabs.includes(index))
159
+ // Show all tabs before ready (for measurement), then only visible ones
160
+ const shouldRender = !isReady || visibleTabs.includes(index);
161
+ if (!shouldRender)
57
162
  return null;
58
- const { label, icon } = child.props;
59
- const tabId = (0, utils_1.getTabId)(label, index);
60
- return (react_1.default.createElement(Tab_1.Tab, { key: `key-${tabId}`, tabId: tabId, label: label, icon: icon, size: size, disabled: child.props.disable, setRef: (el) => setTabRef(el, index), onKeyDown: (event) => handleKeyboard(event, index), onClick: () => {
61
- var _a, _b;
62
- (_b = (_a = child.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a);
63
- onTabClick(label);
64
- } }));
163
+ return renderTab(child, index, size, setTabRef, handleKeyboard, onTabClick);
65
164
  }),
66
- react_1.default.createElement(exports.TabItem, { size: size, active: overflowTabs.some((index) => activeTab === childrenArray[index].props.label), tabIndex: 0 }, overflowTabs.length > 0 && (react_1.default.createElement(Dropdown_1.Dropdown, { trigger: react_1.default.createElement(exports.TabButtonLink, { size: size, className: overflowTabs.some((index) => activeTab === childrenArray[index].props.label)
67
- ? 'active'
68
- : undefined }, allTabsHidden ? activeTab : 'More'), alignment: "start", withArrow: true },
69
- react_1.default.createElement(DropdownMenu_1.DropdownMenu, null, overflowTabs.map((index) => {
70
- const { label } = childrenArray[index].props;
71
- const tabId = (0, utils_1.getTabId)(label, index);
72
- return (react_1.default.createElement(DropdownMenuItem_1.DropdownMenuItem, { key: `more-${tabId}`, active: activeTab === label, onAction: () => {
73
- var _a, _b;
74
- (_b = (_a = childrenArray[index].props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a);
75
- onTabClick(index);
76
- }, disabled: childrenArray[index].props.disable }, label));
77
- })))))));
165
+ hasOverflow && (react_1.default.createElement(exports.TabItem, { size: size, active: isMoreActive || showAsSelector, tabIndex: 0, className: "dropdown-tab" },
166
+ react_1.default.createElement(DropdownWrapper, { "$top": dropdownPosition.top, "$left": dropdownPosition.left, onClickCapture: () => {
167
+ setIsDropdownOpen(true);
168
+ } },
169
+ react_1.default.createElement(FixedPositionDropdown, { ref: dropdownRef, trigger: react_1.default.createElement(exports.TabButtonLink, { size: size, className: isMoreActive || showAsSelector ? 'active' : undefined }, showAsSelector ? react_1.default.createElement(TabButtonText, null, activeTab) : 'More'), alignment: "start", withArrow: true, onClose: () => {
170
+ setIsDropdownOpen(false);
171
+ setDropdownPosition({});
172
+ } },
173
+ react_1.default.createElement(DropdownMenu_1.DropdownMenu, null, overflowTabs.map((index) => {
174
+ const child = childrenArray[index];
175
+ if (!child)
176
+ return null;
177
+ const { label } = child.props;
178
+ const tabId = (0, utils_1.getTabId)(label, index);
179
+ return (react_1.default.createElement(DropdownMenuItem_1.DropdownMenuItem, { key: `more-${tabId}`, active: activeTab === label, onAction: () => {
180
+ var _a, _b;
181
+ (_b = (_a = child.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a);
182
+ onTabClick(index);
183
+ }, disabled: child.props.disable }, label));
184
+ }))))))));
78
185
  }
79
186
  const useHighlightBarAnimation = (props) => {
80
187
  const { childrenArray, activeTab, tabsContainerRef, visibleTabs, overflowTabs } = props;
@@ -89,18 +196,11 @@ const useHighlightBarAnimation = (props) => {
89
196
  setHighlightStyle({ left: 0, width: 0 });
90
197
  return;
91
198
  }
92
- const activeTabElement = container.querySelector(`[data-label="${activeTab}"]`);
93
- if (!activeTabElement)
94
- return;
199
+ // Remove active class from all tabs first
95
200
  container.querySelectorAll('[data-label]').forEach((el) => {
96
201
  el.classList.remove('active');
97
202
  });
98
- const { offsetLeft, offsetWidth } = activeTabElement;
99
- if (visibleTabs.includes(activeIndex)) {
100
- activeTabElement.classList.add('active');
101
- setHighlightStyle({ left: offsetLeft, width: offsetWidth });
102
- return;
103
- }
203
+ // Check if active tab is in overflow first
104
204
  if (overflowTabs.includes(activeIndex)) {
105
205
  const moreButton = container.querySelector('button');
106
206
  if (!moreButton)
@@ -113,6 +213,16 @@ const useHighlightBarAnimation = (props) => {
113
213
  });
114
214
  return;
115
215
  }
216
+ // Active tab is visible, find its element
217
+ const activeTabElement = container.querySelector(`[data-label="${activeTab}"]`);
218
+ if (!activeTabElement)
219
+ return;
220
+ const { offsetLeft, offsetWidth } = activeTabElement;
221
+ if (visibleTabs.includes(activeIndex)) {
222
+ activeTabElement.classList.add('active');
223
+ setHighlightStyle({ left: offsetLeft, width: offsetWidth });
224
+ return;
225
+ }
116
226
  }, [activeTab, childrenArray, visibleTabs, overflowTabs, tabsContainerRef]);
117
227
  return { highlightStyle };
118
228
  };
@@ -122,15 +232,11 @@ exports.TabListContainer = styled_components_1.default.ul `
122
232
  gap: var(--md-tabs-gap);
123
233
  width: 100%;
124
234
  min-width: 0;
125
- position: relative;
126
235
 
127
236
  &::before {
128
237
  content: '';
129
238
  position: absolute;
130
- top: 0px;
131
- left: 0px;
132
- right: 0px;
133
- bottom: 0px;
239
+ inset: 0;
134
240
  border: var(--md-tabs-border);
135
241
  border-width: var(--md-tabs-border-width);
136
242
  pointer-events: none;
@@ -138,11 +244,17 @@ exports.TabListContainer = styled_components_1.default.ul `
138
244
 
139
245
  && {
140
246
  padding: var(--md-tabs-padding);
141
- margin-block-end: 0;
142
247
  margin: 0;
143
248
 
144
249
  & > li {
145
- margin-bottom: 0px;
250
+ margin-bottom: 0;
251
+ flex-shrink: 0;
252
+
253
+ &.dropdown-tab {
254
+ flex-shrink: 1;
255
+ min-width: 0;
256
+ max-width: 100%;
257
+ }
146
258
  }
147
259
  }
148
260
  `;
@@ -152,7 +264,7 @@ exports.TabItem = styled_components_1.default.li `
152
264
  cursor: pointer;
153
265
  align-items: center;
154
266
  padding: var(--md-tabs-tab-wrapper-padding);
155
- z-index: 1;
267
+ z-index: var(--z-index-surface);
156
268
 
157
269
  ${({ active, size }) => active
158
270
  ? (0, styled_components_1.css) `
@@ -189,6 +301,46 @@ exports.TabItem = styled_components_1.default.li `
189
301
  }
190
302
  }
191
303
  `;
304
+ const DropdownWrapper = styled_components_1.default.div.attrs((props) => ({
305
+ style: Object.assign(Object.assign({}, (props.$top !== undefined && { '--dropdown-top': `${props.$top}px` })), (props.$left !== undefined && { '--dropdown-left': `${props.$left}px` })),
306
+ })) `
307
+ position: static;
308
+ z-index: var(--z-index-raised);
309
+ width: 100%;
310
+ min-width: 0;
311
+ `;
312
+ const FixedPositionDropdown = (0, styled_components_1.default)(Dropdown_1.Dropdown) `
313
+ position: static;
314
+ width: 100%;
315
+ min-width: 0;
316
+
317
+ > div:first-child {
318
+ width: 100%;
319
+ min-width: 0;
320
+ }
321
+
322
+ > div:last-child {
323
+ position: fixed;
324
+ top: var(--dropdown-top, 0);
325
+ left: var(--dropdown-left, 0);
326
+ right: auto;
327
+ bottom: auto;
328
+ transform: none;
329
+ padding-top: 0;
330
+ max-width: min(400px, calc(100vw - 32px));
331
+ max-height: calc(100vh - var(--dropdown-top, 0) - 32px);
332
+ overflow-y: auto;
333
+ z-index: var(--z-index-raised);
334
+
335
+ ul {
336
+ li {
337
+ overflow: hidden;
338
+ text-overflow: ellipsis;
339
+ white-space: nowrap;
340
+ }
341
+ }
342
+ }
343
+ `;
192
344
  const HighlightBar = styled_components_1.default.div `
193
345
  position: absolute;
194
346
  top: 0;
@@ -208,11 +360,19 @@ const HighlightBar = styled_components_1.default.div `
208
360
  border-radius: var(--md-tabs-${({ size }) => size}-active-tab-border-radius);
209
361
  }
210
362
  `;
363
+ const TabButtonText = styled_components_1.default.span `
364
+ overflow: hidden;
365
+ text-overflow: ellipsis;
366
+ white-space: nowrap;
367
+ flex: 1;
368
+ min-width: 0;
369
+ `;
211
370
  exports.TabButtonLink = (0, styled_components_1.default)(Button_1.Button) `
212
371
  color: var(--md-tabs-tab-text-color);
213
372
  font-family: var(--md-tabs-tab-font-family);
214
373
  font-style: var(--md-tabs-tab-font-style);
215
374
  background-color: var(--md-tabs-tab-bg-color);
375
+ width: 100%;
216
376
 
217
377
  transition:
218
378
  background-color 300ms ease-in-out,
@@ -231,9 +391,9 @@ exports.TabButtonLink = (0, styled_components_1.default)(Button_1.Button) `
231
391
 
232
392
  &.active {
233
393
  color: var(--md-tabs-active-tab-text-color);
234
- font-size: var(--md-tabs-${({ size }) => size}-active-tab-font-size);
235
394
  font-family: var(--md-tabs-active-tab-font-family);
236
395
  font-style: var(--md-tabs-active-tab-font-style);
396
+ font-size: var(--md-tabs-${({ size }) => size}-active-tab-font-size);
237
397
  font-weight: var(--md-tabs-${({ size }) => size}-active-tab-font-weight);
238
398
  line-height: var(--md-tabs-${({ size }) => size}-active-tab-line-height);
239
399
  background-color: var(--md-tabs-active-tab-bg-color);
@@ -243,12 +403,12 @@ exports.TabButtonLink = (0, styled_components_1.default)(Button_1.Button) `
243
403
 
244
404
  &:hover {
245
405
  color: var(--md-tabs-hover-tab-text-color);
246
- font-size: var(--md-tabs-${({ size }) => size}-hover-tab-font-size);
247
406
  font-family: var(--md-tabs-hover-tab-font-family);
248
407
  font-style: var(--md-tabs-hover-tab-font-style);
408
+ font-size: var(--md-tabs-${({ size }) => size}-hover-tab-font-size);
249
409
  font-weight: var(--md-tabs-${({ size }) => size}-hover-tab-font-weight);
250
- background-color: var(--md-tabs-hover-tab-bg-color);
251
410
  line-height: var(--md-tabs-${({ size }) => size}-hover-tab-line-height);
411
+ background-color: var(--md-tabs-hover-tab-bg-color);
252
412
  border-radius: var(--md-tabs-${({ size }) => size}-hover-tab-border-radius);
253
413
  padding: var(--md-tabs-${({ size }) => size}-hover-tab-padding);
254
414
  }
@@ -17,7 +17,8 @@ type TabsProps = {
17
17
  className?: string;
18
18
  size: TabsSize;
19
19
  initialTab?: string;
20
+ forceReady?: boolean;
20
21
  };
21
- export declare function Tabs({ id, children, className, size, initialTab: propInitialTab, }: TabsProps): JSX.Element;
22
+ export declare function Tabs({ id, children, className, size, initialTab: propInitialTab, forceReady, }: TabsProps): JSX.Element;
22
23
  export declare const TabContent: import("styled-components").StyledComponent<"div", any, {}, never>;
23
24
  export {};