@primer/react-brand 0.74.0 → 0.75.0-rc.96de7cef

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 (456) hide show
  1. package/docs/components/RiverAccordion/index.md +49 -6
  2. package/docs/components/SubdomainNavBar/index.md +215 -86
  3. package/docs/index.md +2 -2
  4. package/esm/Hero/sub-components/HeroLabel.d.ts +1 -0
  5. package/esm/Hero/sub-components/HeroLabel.d.ts.map +1 -1
  6. package/esm/Hero/sub-components/HeroLabel.js +7 -6
  7. package/esm/Hero/sub-components/HeroLabel.js.map +1 -1
  8. package/esm/SubdomainNavBar/NavigationVisbilityObserver.d.ts +3 -1
  9. package/esm/SubdomainNavBar/NavigationVisbilityObserver.d.ts.map +1 -1
  10. package/esm/SubdomainNavBar/NavigationVisbilityObserver.js +115 -63
  11. package/esm/SubdomainNavBar/NavigationVisbilityObserver.js.map +1 -1
  12. package/esm/SubdomainNavBar/SubdomainNavBar.d.ts +155 -18
  13. package/esm/SubdomainNavBar/SubdomainNavBar.d.ts.map +1 -1
  14. package/esm/SubdomainNavBar/SubdomainNavBar.js +474 -298
  15. package/esm/SubdomainNavBar/SubdomainNavBar.js.map +1 -1
  16. package/esm/SubdomainNavBar/SubdomainNavBar.module-WIrpYyjV.css +1 -0
  17. package/esm/SubdomainNavBar/SubdomainNavBar.module.js +33 -9
  18. package/esm/SubdomainNavBar/SubdomainNavBar.module.js.map +1 -1
  19. package/esm/SubdomainNavBar/SubdomainNavBarLinkContext.d.ts +9 -0
  20. package/esm/SubdomainNavBar/SubdomainNavBarLinkContext.d.ts.map +1 -0
  21. package/esm/SubdomainNavBar/SubdomainNavBarLinkContext.js +10 -0
  22. package/esm/SubdomainNavBar/SubdomainNavBarLinkContext.js.map +1 -0
  23. package/esm/SubdomainNavBar/useSearchKeyboardShortcut.d.ts +8 -0
  24. package/esm/SubdomainNavBar/useSearchKeyboardShortcut.d.ts.map +1 -0
  25. package/esm/SubdomainNavBar/useSearchKeyboardShortcut.js +52 -0
  26. package/esm/SubdomainNavBar/useSearchKeyboardShortcut.js.map +1 -0
  27. package/esm/SubdomainNavBar/useSearchResults.d.ts +24 -0
  28. package/esm/SubdomainNavBar/useSearchResults.d.ts.map +1 -0
  29. package/esm/SubdomainNavBar/useSearchResults.js +57 -0
  30. package/esm/SubdomainNavBar/useSearchResults.js.map +1 -0
  31. package/esm/SubdomainNavBar/useVisibilityObserver.d.ts +1 -1
  32. package/esm/SubdomainNavBar/useVisibilityObserver.d.ts.map +1 -1
  33. package/esm/SubdomainNavBar/useVisibilityObserver.js +60 -23
  34. package/esm/SubdomainNavBar/useVisibilityObserver.js.map +1 -1
  35. package/esm/TextCursorAnimation/TextCursorAnimation.d.ts +8 -3
  36. package/esm/TextCursorAnimation/TextCursorAnimation.d.ts.map +1 -1
  37. package/esm/TextCursorAnimation/TextCursorAnimation.js +53 -27
  38. package/esm/TextCursorAnimation/TextCursorAnimation.js.map +1 -1
  39. package/esm/TextCursorAnimation/TextCursorAnimation.module-BS4hPR8H.css +1 -0
  40. package/esm/TextCursorAnimation/TextCursorAnimation.module.js +14 -4
  41. package/esm/TextCursorAnimation/TextCursorAnimation.module.js.map +1 -1
  42. package/esm/hooks/useCursorAnimation.d.ts +8 -31
  43. package/esm/hooks/useCursorAnimation.d.ts.map +1 -1
  44. package/esm/hooks/useCursorAnimation.js +84 -36
  45. package/esm/hooks/useCursorAnimation.js.map +1 -1
  46. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes-BGj0AiDW.css +1 -0
  47. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/base-DKbXhPKv.css +1 -0
  48. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes-BucKYl1n.css +1 -0
  49. package/esm/river/RiverAccordion/RiverAccordion.d.ts +13 -4
  50. package/esm/river/RiverAccordion/RiverAccordion.d.ts.map +1 -1
  51. package/esm/river/RiverAccordion/RiverAccordion.js +35 -24
  52. package/esm/river/RiverAccordion/RiverAccordion.js.map +1 -1
  53. package/esm/river/RiverAccordion/RiverAccordion.module-Cr6Q-qkm.css +1 -0
  54. package/esm/river/RiverAccordion/RiverAccordion.module.js +7 -3
  55. package/esm/river/RiverAccordion/RiverAccordion.module.js.map +1 -1
  56. package/lib/Hero/sub-components/HeroLabel.d.ts +1 -0
  57. package/lib/SubdomainNavBar/NavigationVisbilityObserver.d.ts +3 -1
  58. package/lib/SubdomainNavBar/SubdomainNavBar.d.ts +155 -18
  59. package/lib/SubdomainNavBar/SubdomainNavBarLinkContext.d.ts +8 -0
  60. package/lib/SubdomainNavBar/useSearchKeyboardShortcut.d.ts +7 -0
  61. package/lib/SubdomainNavBar/useSearchResults.d.ts +23 -0
  62. package/lib/SubdomainNavBar/useVisibilityObserver.d.ts +1 -1
  63. package/lib/TextCursorAnimation/TextCursorAnimation.d.ts +8 -3
  64. package/lib/css/main.css +1388 -302
  65. package/lib/design-tokens/css/tokens/base/colors/color-scales-with-modes.css +1 -1
  66. package/lib/design-tokens/css/tokens/base/colors/light.css +1 -1
  67. package/lib/design-tokens/css/tokens/base/size/size.css +1 -1
  68. package/lib/design-tokens/css/tokens/base/typography/typography.css +1 -1
  69. package/lib/design-tokens/css/tokens/functional/animation/base.css +1 -1
  70. package/lib/design-tokens/css/tokens/functional/colors/global-with-modes.css +1 -1
  71. package/lib/design-tokens/css/tokens/functional/colors/global.css +1 -1
  72. package/lib/design-tokens/css/tokens/functional/components/accordion/colors-with-modes.css +1 -1
  73. package/lib/design-tokens/css/tokens/functional/components/action-menu/colors-with-modes.css +1 -1
  74. package/lib/design-tokens/css/tokens/functional/components/anchor-nav/colors-with-modes.css +1 -1
  75. package/lib/design-tokens/css/tokens/functional/components/bento/base.css +1 -1
  76. package/lib/design-tokens/css/tokens/functional/components/blinking-cursor/colors-with-modes.css +1 -1
  77. package/lib/design-tokens/css/tokens/functional/components/breadcrumbs/colors-with-modes.css +1 -1
  78. package/lib/design-tokens/css/tokens/functional/components/button/colors-with-modes.css +1 -1
  79. package/lib/design-tokens/css/tokens/functional/components/card/base.css +1 -1
  80. package/lib/design-tokens/css/tokens/functional/components/card/colors-with-modes.css +1 -1
  81. package/lib/design-tokens/css/tokens/functional/components/card/colors.css +1 -1
  82. package/lib/design-tokens/css/tokens/functional/components/comparison-table/colors-with-modes.css +1 -1
  83. package/lib/design-tokens/css/tokens/functional/components/comparison-table/comparison-table.css +1 -1
  84. package/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css +1 -1
  85. package/lib/design-tokens/css/tokens/functional/components/cta-banner/colors-with-modes.css +1 -1
  86. package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/colors-with-modes.css +1 -1
  87. package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/eyebrow-banner.css +1 -1
  88. package/lib/design-tokens/css/tokens/functional/components/faq/base.css +1 -1
  89. package/lib/design-tokens/css/tokens/functional/components/faq/colors-with-modes.css +1 -1
  90. package/lib/design-tokens/css/tokens/functional/components/faq/colors.css +1 -1
  91. package/lib/design-tokens/css/tokens/functional/components/faq/faq.css +1 -1
  92. package/lib/design-tokens/css/tokens/functional/components/footer/base.css +1 -1
  93. package/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css +1 -1
  94. package/lib/design-tokens/css/tokens/functional/components/footer/colors.css +1 -1
  95. package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/base.css +1 -1
  96. package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/colors-with-modes.css +1 -1
  97. package/lib/design-tokens/css/tokens/functional/components/grid/colors-with-modes.css +1 -1
  98. package/lib/design-tokens/css/tokens/functional/components/grid/colors.css +1 -1
  99. package/lib/design-tokens/css/tokens/functional/components/grid/grid.css +1 -1
  100. package/lib/design-tokens/css/tokens/functional/components/hero/base.css +1 -1
  101. package/lib/design-tokens/css/tokens/functional/components/icon/colors-with-modes.css +1 -1
  102. package/lib/design-tokens/css/tokens/functional/components/icon/colors.css +1 -1
  103. package/lib/design-tokens/css/tokens/functional/components/ide/base.css +1 -1
  104. package/lib/design-tokens/css/tokens/functional/components/ide/colors-with-modes.css +1 -1
  105. package/lib/design-tokens/css/tokens/functional/components/image/base.css +1 -1
  106. package/lib/design-tokens/css/tokens/functional/components/inline-code/colors-with-modes.css +1 -1
  107. package/lib/design-tokens/css/tokens/functional/components/inline-code/colors.css +1 -1
  108. package/lib/design-tokens/css/tokens/functional/components/inline-link/base.css +1 -1
  109. package/lib/design-tokens/css/tokens/functional/components/inline-link/colors-with-modes.css +1 -1
  110. package/lib/design-tokens/css/tokens/functional/components/inline-link/colors.css +1 -1
  111. package/lib/design-tokens/css/tokens/functional/components/label/colors-with-modes.css +1 -1
  112. package/lib/design-tokens/css/tokens/functional/components/label/colors.css +1 -1
  113. package/lib/design-tokens/css/tokens/functional/components/link/colors-with-modes.css +1 -1
  114. package/lib/design-tokens/css/tokens/functional/components/link/colors.css +1 -1
  115. package/lib/design-tokens/css/tokens/functional/components/logosuite/base.css +1 -1
  116. package/lib/design-tokens/css/tokens/functional/components/logosuite/colors-with-modes.css +1 -1
  117. package/lib/design-tokens/css/tokens/functional/components/logosuite/colors.css +1 -1
  118. package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors-with-modes.css +1 -1
  119. package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors.css +1 -1
  120. package/lib/design-tokens/css/tokens/functional/components/nav-list/colors-with-modes.css +1 -1
  121. package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors-with-modes.css +1 -1
  122. package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors.css +1 -1
  123. package/lib/design-tokens/css/tokens/functional/components/pricing-options/pricing-options.css +1 -1
  124. package/lib/design-tokens/css/tokens/functional/components/prose/base.css +1 -1
  125. package/lib/design-tokens/css/tokens/functional/components/prose/colors-with-modes.css +1 -1
  126. package/lib/design-tokens/css/tokens/functional/components/river/base.css +1 -1
  127. package/lib/design-tokens/css/tokens/functional/components/river/river.css +1 -1
  128. package/lib/design-tokens/css/tokens/functional/components/river-story-scroll/colors-with-modes.css +1 -1
  129. package/lib/design-tokens/css/tokens/functional/components/section/section.css +1 -1
  130. package/lib/design-tokens/css/tokens/functional/components/statistic/base.css +1 -1
  131. package/lib/design-tokens/css/tokens/functional/components/sub-nav/base.css +1 -1
  132. package/lib/design-tokens/css/tokens/functional/components/sub-nav/colors-with-modes.css +1 -1
  133. package/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes.css +7 -1
  134. package/lib/design-tokens/css/tokens/functional/components/tabs/base.css +1 -1
  135. package/lib/design-tokens/css/tokens/functional/components/tabs/colors-with-modes.css +1 -1
  136. package/lib/design-tokens/css/tokens/functional/components/tabs/colors.css +1 -1
  137. package/lib/design-tokens/css/tokens/functional/components/testimonial/base.css +1 -1
  138. package/lib/design-tokens/css/tokens/functional/components/testimonial/colors-with-modes.css +1 -1
  139. package/lib/design-tokens/css/tokens/functional/components/testimonial/colors.css +1 -1
  140. package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/base.css +8 -0
  141. package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes.css +7 -3
  142. package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors.css +4 -2
  143. package/lib/design-tokens/css/tokens/functional/components/tiles/colors-with-modes.css +1 -1
  144. package/lib/design-tokens/css/tokens/functional/components/timeline/base.css +1 -1
  145. package/lib/design-tokens/css/tokens/functional/components/timeline/colors-with-modes.css +1 -1
  146. package/lib/design-tokens/css/tokens/functional/components/timeline/colors.css +1 -1
  147. package/lib/design-tokens/css/tokens/functional/components/token/colors-with-modes.css +1 -1
  148. package/lib/design-tokens/css/tokens/functional/components/token/colors.css +1 -1
  149. package/lib/design-tokens/css/tokens/functional/components/tooltip/colors-with-modes.css +1 -1
  150. package/lib/design-tokens/css/tokens/functional/components/tooltip/colors.css +1 -1
  151. package/lib/design-tokens/css/tokens/functional/components/video-player/base.css +1 -1
  152. package/lib/design-tokens/css/tokens/functional/components/video-player/colors-with-modes.css +1 -1
  153. package/lib/design-tokens/css/tokens/functional/size/border.css +1 -1
  154. package/lib/design-tokens/css/tokens/functional/size/breakpoints.css +1 -1
  155. package/lib/design-tokens/css/tokens/functional/size/size-coarse.css +1 -1
  156. package/lib/design-tokens/css/tokens/functional/size/size-fine.css +1 -1
  157. package/lib/design-tokens/css/tokens/functional/size/size.css +1 -1
  158. package/lib/design-tokens/css/tokens/functional/size/viewport.css +1 -1
  159. package/lib/design-tokens/css/tokens/functional/typography/typography-responsive.css +1 -1
  160. package/lib/design-tokens/css/tokens/functional/typography/typography.css +1 -1
  161. package/lib/design-tokens/js/module/tokens/base/colors/light.js +1 -1
  162. package/lib/design-tokens/js/module/tokens/base/size/size.js +1 -1
  163. package/lib/design-tokens/js/module/tokens/base/typography/typography.js +1 -1
  164. package/lib/design-tokens/js/module/tokens/functional/animation/base.js +1 -1
  165. package/lib/design-tokens/js/module/tokens/functional/colors/global.js +1 -1
  166. package/lib/design-tokens/js/module/tokens/functional/components/bento/base.js +1 -1
  167. package/lib/design-tokens/js/module/tokens/functional/components/card/base.js +1 -1
  168. package/lib/design-tokens/js/module/tokens/functional/components/card/colors.js +1 -1
  169. package/lib/design-tokens/js/module/tokens/functional/components/comparison-table/comparison-table.js +1 -1
  170. package/lib/design-tokens/js/module/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
  171. package/lib/design-tokens/js/module/tokens/functional/components/faq/base.js +1 -1
  172. package/lib/design-tokens/js/module/tokens/functional/components/faq/colors.js +1 -1
  173. package/lib/design-tokens/js/module/tokens/functional/components/faq/faq.js +1 -1
  174. package/lib/design-tokens/js/module/tokens/functional/components/footer/base.js +1 -1
  175. package/lib/design-tokens/js/module/tokens/functional/components/footer/colors.js +1 -1
  176. package/lib/design-tokens/js/module/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
  177. package/lib/design-tokens/js/module/tokens/functional/components/grid/colors.js +1 -1
  178. package/lib/design-tokens/js/module/tokens/functional/components/grid/grid.js +1 -1
  179. package/lib/design-tokens/js/module/tokens/functional/components/hero/base.js +1 -1
  180. package/lib/design-tokens/js/module/tokens/functional/components/icon/colors.js +1 -1
  181. package/lib/design-tokens/js/module/tokens/functional/components/ide/base.js +1 -1
  182. package/lib/design-tokens/js/module/tokens/functional/components/image/base.js +1 -1
  183. package/lib/design-tokens/js/module/tokens/functional/components/inline-code/colors.js +1 -1
  184. package/lib/design-tokens/js/module/tokens/functional/components/inline-link/base.js +1 -1
  185. package/lib/design-tokens/js/module/tokens/functional/components/inline-link/colors.js +1 -1
  186. package/lib/design-tokens/js/module/tokens/functional/components/label/colors.js +1 -1
  187. package/lib/design-tokens/js/module/tokens/functional/components/link/colors.js +1 -1
  188. package/lib/design-tokens/js/module/tokens/functional/components/logosuite/base.js +1 -1
  189. package/lib/design-tokens/js/module/tokens/functional/components/logosuite/colors.js +1 -1
  190. package/lib/design-tokens/js/module/tokens/functional/components/media-playlist/colors.js +1 -1
  191. package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/colors.js +1 -1
  192. package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/pricing-options.js +1 -1
  193. package/lib/design-tokens/js/module/tokens/functional/components/prose/base.js +1 -1
  194. package/lib/design-tokens/js/module/tokens/functional/components/river/base.js +1 -1
  195. package/lib/design-tokens/js/module/tokens/functional/components/river/river.js +1 -1
  196. package/lib/design-tokens/js/module/tokens/functional/components/section/section.js +1 -1
  197. package/lib/design-tokens/js/module/tokens/functional/components/statistic/base.js +1 -1
  198. package/lib/design-tokens/js/module/tokens/functional/components/sub-nav/base.js +1 -1
  199. package/lib/design-tokens/js/module/tokens/functional/components/tabs/base.js +1 -1
  200. package/lib/design-tokens/js/module/tokens/functional/components/tabs/colors.js +1 -1
  201. package/lib/design-tokens/js/module/tokens/functional/components/testimonial/base.js +1 -1
  202. package/lib/design-tokens/js/module/tokens/functional/components/testimonial/colors.js +1 -1
  203. package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/base.js +14 -0
  204. package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/colors.js +10 -2
  205. package/lib/design-tokens/js/module/tokens/functional/components/timeline/base.js +1 -1
  206. package/lib/design-tokens/js/module/tokens/functional/components/timeline/colors.js +1 -1
  207. package/lib/design-tokens/js/module/tokens/functional/components/token/colors.js +1 -1
  208. package/lib/design-tokens/js/module/tokens/functional/components/tooltip/colors.js +1 -1
  209. package/lib/design-tokens/js/module/tokens/functional/components/video-player/base.js +1 -1
  210. package/lib/design-tokens/js/module/tokens/functional/size/border.js +1 -1
  211. package/lib/design-tokens/js/module/tokens/functional/size/breakpoints.js +1 -1
  212. package/lib/design-tokens/js/module/tokens/functional/size/size-coarse.js +1 -1
  213. package/lib/design-tokens/js/module/tokens/functional/size/size-fine.js +1 -1
  214. package/lib/design-tokens/js/module/tokens/functional/size/size.js +1 -1
  215. package/lib/design-tokens/js/module/tokens/functional/size/viewport.js +1 -1
  216. package/lib/design-tokens/js/module/tokens/functional/typography/typography-responsive.js +1 -1
  217. package/lib/design-tokens/js/module/tokens/functional/typography/typography.js +1 -1
  218. package/lib/design-tokens/js/tokens/base/colors/light.js +1 -1
  219. package/lib/design-tokens/js/tokens/base/size/size.js +1 -1
  220. package/lib/design-tokens/js/tokens/base/typography/typography.js +1 -1
  221. package/lib/design-tokens/js/tokens/functional/animation/base.js +1 -1
  222. package/lib/design-tokens/js/tokens/functional/colors/global.js +1 -1
  223. package/lib/design-tokens/js/tokens/functional/components/bento/base.js +1 -1
  224. package/lib/design-tokens/js/tokens/functional/components/card/base.js +1 -1
  225. package/lib/design-tokens/js/tokens/functional/components/card/colors.js +1 -1
  226. package/lib/design-tokens/js/tokens/functional/components/comparison-table/comparison-table.js +1 -1
  227. package/lib/design-tokens/js/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
  228. package/lib/design-tokens/js/tokens/functional/components/faq/base.js +1 -1
  229. package/lib/design-tokens/js/tokens/functional/components/faq/colors.js +1 -1
  230. package/lib/design-tokens/js/tokens/functional/components/faq/faq.js +1 -1
  231. package/lib/design-tokens/js/tokens/functional/components/footer/base.js +1 -1
  232. package/lib/design-tokens/js/tokens/functional/components/footer/colors.js +1 -1
  233. package/lib/design-tokens/js/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
  234. package/lib/design-tokens/js/tokens/functional/components/grid/colors.js +1 -1
  235. package/lib/design-tokens/js/tokens/functional/components/grid/grid.js +1 -1
  236. package/lib/design-tokens/js/tokens/functional/components/hero/base.js +1 -1
  237. package/lib/design-tokens/js/tokens/functional/components/icon/colors.js +1 -1
  238. package/lib/design-tokens/js/tokens/functional/components/ide/base.js +1 -1
  239. package/lib/design-tokens/js/tokens/functional/components/image/base.js +1 -1
  240. package/lib/design-tokens/js/tokens/functional/components/inline-code/colors.js +1 -1
  241. package/lib/design-tokens/js/tokens/functional/components/inline-link/base.js +1 -1
  242. package/lib/design-tokens/js/tokens/functional/components/inline-link/colors.js +1 -1
  243. package/lib/design-tokens/js/tokens/functional/components/label/colors.js +1 -1
  244. package/lib/design-tokens/js/tokens/functional/components/link/colors.js +1 -1
  245. package/lib/design-tokens/js/tokens/functional/components/logosuite/base.js +1 -1
  246. package/lib/design-tokens/js/tokens/functional/components/logosuite/colors.js +1 -1
  247. package/lib/design-tokens/js/tokens/functional/components/media-playlist/colors.js +1 -1
  248. package/lib/design-tokens/js/tokens/functional/components/pricing-options/colors.js +1 -1
  249. package/lib/design-tokens/js/tokens/functional/components/pricing-options/pricing-options.js +1 -1
  250. package/lib/design-tokens/js/tokens/functional/components/prose/base.js +1 -1
  251. package/lib/design-tokens/js/tokens/functional/components/river/base.js +1 -1
  252. package/lib/design-tokens/js/tokens/functional/components/river/river.js +1 -1
  253. package/lib/design-tokens/js/tokens/functional/components/section/section.js +1 -1
  254. package/lib/design-tokens/js/tokens/functional/components/statistic/base.js +1 -1
  255. package/lib/design-tokens/js/tokens/functional/components/sub-nav/base.js +1 -1
  256. package/lib/design-tokens/js/tokens/functional/components/tabs/base.js +1 -1
  257. package/lib/design-tokens/js/tokens/functional/components/tabs/colors.js +1 -1
  258. package/lib/design-tokens/js/tokens/functional/components/testimonial/base.js +1 -1
  259. package/lib/design-tokens/js/tokens/functional/components/testimonial/colors.js +1 -1
  260. package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/base.js +6 -0
  261. package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/colors.js +4 -2
  262. package/lib/design-tokens/js/tokens/functional/components/timeline/base.js +1 -1
  263. package/lib/design-tokens/js/tokens/functional/components/timeline/colors.js +1 -1
  264. package/lib/design-tokens/js/tokens/functional/components/token/colors.js +1 -1
  265. package/lib/design-tokens/js/tokens/functional/components/tooltip/colors.js +1 -1
  266. package/lib/design-tokens/js/tokens/functional/components/video-player/base.js +1 -1
  267. package/lib/design-tokens/js/tokens/functional/size/border.js +1 -1
  268. package/lib/design-tokens/js/tokens/functional/size/breakpoints.js +1 -1
  269. package/lib/design-tokens/js/tokens/functional/size/size-coarse.js +1 -1
  270. package/lib/design-tokens/js/tokens/functional/size/size-fine.js +1 -1
  271. package/lib/design-tokens/js/tokens/functional/size/size.js +1 -1
  272. package/lib/design-tokens/js/tokens/functional/size/viewport.js +1 -1
  273. package/lib/design-tokens/js/tokens/functional/typography/typography-responsive.js +1 -1
  274. package/lib/design-tokens/js/tokens/functional/typography/typography.js +1 -1
  275. package/lib/design-tokens/json/colors.json +6 -1
  276. package/lib/design-tokens/scss/tokens/base/colors/light.scss +1 -1
  277. package/lib/design-tokens/scss/tokens/base/size/size.scss +1 -1
  278. package/lib/design-tokens/scss/tokens/base/typography/typography.scss +1 -1
  279. package/lib/design-tokens/scss/tokens/functional/animation/base.scss +1 -1
  280. package/lib/design-tokens/scss/tokens/functional/colors/global.scss +1 -1
  281. package/lib/design-tokens/scss/tokens/functional/components/bento/base.scss +1 -1
  282. package/lib/design-tokens/scss/tokens/functional/components/card/base.scss +1 -1
  283. package/lib/design-tokens/scss/tokens/functional/components/card/colors.scss +1 -1
  284. package/lib/design-tokens/scss/tokens/functional/components/comparison-table/comparison-table.scss +1 -1
  285. package/lib/design-tokens/scss/tokens/functional/components/eyebrow-banner/eyebrow-banner.scss +1 -1
  286. package/lib/design-tokens/scss/tokens/functional/components/faq/base.scss +1 -1
  287. package/lib/design-tokens/scss/tokens/functional/components/faq/colors.scss +1 -1
  288. package/lib/design-tokens/scss/tokens/functional/components/faq/faq.scss +1 -1
  289. package/lib/design-tokens/scss/tokens/functional/components/footer/base.scss +1 -1
  290. package/lib/design-tokens/scss/tokens/functional/components/footer/colors.scss +1 -1
  291. package/lib/design-tokens/scss/tokens/functional/components/frosted-glass-vfx/base.scss +1 -1
  292. package/lib/design-tokens/scss/tokens/functional/components/grid/colors.scss +1 -1
  293. package/lib/design-tokens/scss/tokens/functional/components/grid/grid.scss +1 -1
  294. package/lib/design-tokens/scss/tokens/functional/components/hero/base.scss +1 -1
  295. package/lib/design-tokens/scss/tokens/functional/components/icon/colors.scss +1 -1
  296. package/lib/design-tokens/scss/tokens/functional/components/ide/base.scss +1 -1
  297. package/lib/design-tokens/scss/tokens/functional/components/image/base.scss +1 -1
  298. package/lib/design-tokens/scss/tokens/functional/components/inline-code/colors.scss +1 -1
  299. package/lib/design-tokens/scss/tokens/functional/components/inline-link/base.scss +1 -1
  300. package/lib/design-tokens/scss/tokens/functional/components/inline-link/colors.scss +1 -1
  301. package/lib/design-tokens/scss/tokens/functional/components/label/colors.scss +1 -1
  302. package/lib/design-tokens/scss/tokens/functional/components/link/colors.scss +1 -1
  303. package/lib/design-tokens/scss/tokens/functional/components/logosuite/base.scss +1 -1
  304. package/lib/design-tokens/scss/tokens/functional/components/logosuite/colors.scss +1 -1
  305. package/lib/design-tokens/scss/tokens/functional/components/media-playlist/colors.scss +1 -1
  306. package/lib/design-tokens/scss/tokens/functional/components/pricing-options/colors.scss +1 -1
  307. package/lib/design-tokens/scss/tokens/functional/components/pricing-options/pricing-options.scss +1 -1
  308. package/lib/design-tokens/scss/tokens/functional/components/prose/base.scss +1 -1
  309. package/lib/design-tokens/scss/tokens/functional/components/river/base.scss +1 -1
  310. package/lib/design-tokens/scss/tokens/functional/components/river/river.scss +1 -1
  311. package/lib/design-tokens/scss/tokens/functional/components/section/section.scss +1 -1
  312. package/lib/design-tokens/scss/tokens/functional/components/statistic/base.scss +1 -1
  313. package/lib/design-tokens/scss/tokens/functional/components/sub-nav/base.scss +1 -1
  314. package/lib/design-tokens/scss/tokens/functional/components/tabs/base.scss +1 -1
  315. package/lib/design-tokens/scss/tokens/functional/components/tabs/colors.scss +1 -1
  316. package/lib/design-tokens/scss/tokens/functional/components/testimonial/base.scss +1 -1
  317. package/lib/design-tokens/scss/tokens/functional/components/testimonial/colors.scss +1 -1
  318. package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/base.scss +5 -0
  319. package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/colors.scss +4 -2
  320. package/lib/design-tokens/scss/tokens/functional/components/timeline/base.scss +1 -1
  321. package/lib/design-tokens/scss/tokens/functional/components/timeline/colors.scss +1 -1
  322. package/lib/design-tokens/scss/tokens/functional/components/token/colors.scss +1 -1
  323. package/lib/design-tokens/scss/tokens/functional/components/tooltip/colors.scss +1 -1
  324. package/lib/design-tokens/scss/tokens/functional/components/video-player/base.scss +1 -1
  325. package/lib/design-tokens/scss/tokens/functional/size/border.scss +1 -1
  326. package/lib/design-tokens/scss/tokens/functional/size/breakpoints.scss +1 -1
  327. package/lib/design-tokens/scss/tokens/functional/size/size-coarse.scss +1 -1
  328. package/lib/design-tokens/scss/tokens/functional/size/size-fine.scss +1 -1
  329. package/lib/design-tokens/scss/tokens/functional/size/size.scss +1 -1
  330. package/lib/design-tokens/scss/tokens/functional/size/viewport.scss +1 -1
  331. package/lib/design-tokens/scss/tokens/functional/typography/typography-responsive.scss +1 -1
  332. package/lib/design-tokens/scss/tokens/functional/typography/typography.scss +1 -1
  333. package/lib/design-tokens/ts/tokens/base/colors/light.d.ts +1 -1
  334. package/lib/design-tokens/ts/tokens/base/colors/light.js +1 -1
  335. package/lib/design-tokens/ts/tokens/base/size/size.d.ts +1 -1
  336. package/lib/design-tokens/ts/tokens/base/size/size.js +1 -1
  337. package/lib/design-tokens/ts/tokens/base/typography/typography.d.ts +1 -1
  338. package/lib/design-tokens/ts/tokens/base/typography/typography.js +1 -1
  339. package/lib/design-tokens/ts/tokens/functional/animation/base.d.ts +1 -1
  340. package/lib/design-tokens/ts/tokens/functional/animation/base.js +1 -1
  341. package/lib/design-tokens/ts/tokens/functional/colors/global.d.ts +1 -1
  342. package/lib/design-tokens/ts/tokens/functional/colors/global.js +1 -1
  343. package/lib/design-tokens/ts/tokens/functional/components/bento/base.d.ts +1 -1
  344. package/lib/design-tokens/ts/tokens/functional/components/bento/base.js +1 -1
  345. package/lib/design-tokens/ts/tokens/functional/components/card/base.d.ts +1 -1
  346. package/lib/design-tokens/ts/tokens/functional/components/card/base.js +1 -1
  347. package/lib/design-tokens/ts/tokens/functional/components/card/colors.d.ts +1 -1
  348. package/lib/design-tokens/ts/tokens/functional/components/card/colors.js +1 -1
  349. package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.d.ts +1 -1
  350. package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.js +1 -1
  351. package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.d.ts +1 -1
  352. package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
  353. package/lib/design-tokens/ts/tokens/functional/components/faq/base.d.ts +1 -1
  354. package/lib/design-tokens/ts/tokens/functional/components/faq/base.js +1 -1
  355. package/lib/design-tokens/ts/tokens/functional/components/faq/colors.d.ts +1 -1
  356. package/lib/design-tokens/ts/tokens/functional/components/faq/colors.js +1 -1
  357. package/lib/design-tokens/ts/tokens/functional/components/faq/faq.d.ts +1 -1
  358. package/lib/design-tokens/ts/tokens/functional/components/faq/faq.js +1 -1
  359. package/lib/design-tokens/ts/tokens/functional/components/footer/base.d.ts +1 -1
  360. package/lib/design-tokens/ts/tokens/functional/components/footer/base.js +1 -1
  361. package/lib/design-tokens/ts/tokens/functional/components/footer/colors.d.ts +1 -1
  362. package/lib/design-tokens/ts/tokens/functional/components/footer/colors.js +1 -1
  363. package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.d.ts +1 -1
  364. package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
  365. package/lib/design-tokens/ts/tokens/functional/components/grid/colors.d.ts +1 -1
  366. package/lib/design-tokens/ts/tokens/functional/components/grid/colors.js +1 -1
  367. package/lib/design-tokens/ts/tokens/functional/components/grid/grid.d.ts +1 -1
  368. package/lib/design-tokens/ts/tokens/functional/components/grid/grid.js +1 -1
  369. package/lib/design-tokens/ts/tokens/functional/components/hero/base.d.ts +1 -1
  370. package/lib/design-tokens/ts/tokens/functional/components/hero/base.js +1 -1
  371. package/lib/design-tokens/ts/tokens/functional/components/icon/colors.d.ts +1 -1
  372. package/lib/design-tokens/ts/tokens/functional/components/icon/colors.js +1 -1
  373. package/lib/design-tokens/ts/tokens/functional/components/ide/base.d.ts +1 -1
  374. package/lib/design-tokens/ts/tokens/functional/components/ide/base.js +1 -1
  375. package/lib/design-tokens/ts/tokens/functional/components/image/base.d.ts +1 -1
  376. package/lib/design-tokens/ts/tokens/functional/components/image/base.js +1 -1
  377. package/lib/design-tokens/ts/tokens/functional/components/inline-code/colors.d.ts +1 -1
  378. package/lib/design-tokens/ts/tokens/functional/components/inline-code/colors.js +1 -1
  379. package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.d.ts +1 -1
  380. package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.js +1 -1
  381. package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.d.ts +1 -1
  382. package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.js +1 -1
  383. package/lib/design-tokens/ts/tokens/functional/components/label/colors.d.ts +1 -1
  384. package/lib/design-tokens/ts/tokens/functional/components/label/colors.js +1 -1
  385. package/lib/design-tokens/ts/tokens/functional/components/link/colors.d.ts +1 -1
  386. package/lib/design-tokens/ts/tokens/functional/components/link/colors.js +1 -1
  387. package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.d.ts +1 -1
  388. package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.js +1 -1
  389. package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.d.ts +1 -1
  390. package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.js +1 -1
  391. package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.d.ts +1 -1
  392. package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.js +1 -1
  393. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.d.ts +1 -1
  394. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.js +1 -1
  395. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.d.ts +1 -1
  396. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.js +1 -1
  397. package/lib/design-tokens/ts/tokens/functional/components/prose/base.d.ts +1 -1
  398. package/lib/design-tokens/ts/tokens/functional/components/prose/base.js +1 -1
  399. package/lib/design-tokens/ts/tokens/functional/components/river/base.d.ts +1 -1
  400. package/lib/design-tokens/ts/tokens/functional/components/river/base.js +1 -1
  401. package/lib/design-tokens/ts/tokens/functional/components/river/river.d.ts +1 -1
  402. package/lib/design-tokens/ts/tokens/functional/components/river/river.js +1 -1
  403. package/lib/design-tokens/ts/tokens/functional/components/section/section.d.ts +1 -1
  404. package/lib/design-tokens/ts/tokens/functional/components/section/section.js +1 -1
  405. package/lib/design-tokens/ts/tokens/functional/components/statistic/base.d.ts +1 -1
  406. package/lib/design-tokens/ts/tokens/functional/components/statistic/base.js +1 -1
  407. package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.d.ts +1 -1
  408. package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.js +1 -1
  409. package/lib/design-tokens/ts/tokens/functional/components/tabs/base.d.ts +1 -1
  410. package/lib/design-tokens/ts/tokens/functional/components/tabs/base.js +1 -1
  411. package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.d.ts +1 -1
  412. package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.js +1 -1
  413. package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.d.ts +1 -1
  414. package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.js +1 -1
  415. package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.d.ts +1 -1
  416. package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.js +1 -1
  417. package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/base.d.ts +17 -0
  418. package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/base.js +14 -0
  419. package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.d.ts +4 -2
  420. package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.js +4 -2
  421. package/lib/design-tokens/ts/tokens/functional/components/timeline/base.d.ts +1 -1
  422. package/lib/design-tokens/ts/tokens/functional/components/timeline/base.js +1 -1
  423. package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.d.ts +1 -1
  424. package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.js +1 -1
  425. package/lib/design-tokens/ts/tokens/functional/components/token/colors.d.ts +1 -1
  426. package/lib/design-tokens/ts/tokens/functional/components/token/colors.js +1 -1
  427. package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.d.ts +1 -1
  428. package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.js +1 -1
  429. package/lib/design-tokens/ts/tokens/functional/components/video-player/base.d.ts +1 -1
  430. package/lib/design-tokens/ts/tokens/functional/components/video-player/base.js +1 -1
  431. package/lib/design-tokens/ts/tokens/functional/size/border.d.ts +1 -1
  432. package/lib/design-tokens/ts/tokens/functional/size/border.js +1 -1
  433. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.d.ts +1 -1
  434. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.js +1 -1
  435. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.d.ts +1 -1
  436. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.js +1 -1
  437. package/lib/design-tokens/ts/tokens/functional/size/size-fine.d.ts +1 -1
  438. package/lib/design-tokens/ts/tokens/functional/size/size-fine.js +1 -1
  439. package/lib/design-tokens/ts/tokens/functional/size/size.d.ts +1 -1
  440. package/lib/design-tokens/ts/tokens/functional/size/size.js +1 -1
  441. package/lib/design-tokens/ts/tokens/functional/size/viewport.d.ts +1 -1
  442. package/lib/design-tokens/ts/tokens/functional/size/viewport.js +1 -1
  443. package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.d.ts +1 -1
  444. package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.js +1 -1
  445. package/lib/design-tokens/ts/tokens/functional/typography/typography.d.ts +1 -1
  446. package/lib/design-tokens/ts/tokens/functional/typography/typography.js +1 -1
  447. package/lib/hooks/useCursorAnimation.d.ts +8 -31
  448. package/lib/index.js +1 -1
  449. package/lib/river/RiverAccordion/RiverAccordion.d.ts +13 -4
  450. package/llms.txt +2 -2
  451. package/package.json +1 -1
  452. package/esm/SubdomainNavBar/SubdomainNavBar.module-Rf4qEDka.css +0 -1
  453. package/esm/TextCursorAnimation/TextCursorAnimation.module-BJLhwKrK.css +0 -1
  454. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes-ehJCoExh.css +0 -1
  455. package/esm/packages/design-tokens/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes-BODdIvrY.css +0 -1
  456. package/esm/river/RiverAccordion/RiverAccordion.module-BTU_metB.css +0 -1
@@ -2,20 +2,26 @@ import e from "../node_modules/clsx/dist/clsx.js";
2
2
  import { useId as t } from "../hooks/useId.js";
3
3
  import { Text as n } from "../Text/Text.js";
4
4
  import { Button as r } from "../Button/Button.js";
5
- import { useOnClickOutside as i } from "../hooks/useOnClickOutside.js";
6
- import { useKeyboardEscape as a } from "../hooks/useKeyboardEscape.js";
7
- import { ChevronLeftIcon as o, LinkExternalIcon as s, MarkGithubIcon as c, SearchIcon as l, XIcon as u } from "../node_modules/@primer/octicons-react/dist/index.esm.js";
8
- import { useWindowSize as d } from "../hooks/useWindowSize.js";
9
- import f from "./SubdomainNavBar.module.js";
10
- import { NavigationVisbilityObserver as p } from "./NavigationVisbilityObserver.js";
11
- import { useFocusTrap as m } from "../hooks/useFocusTrap.js";
12
- import '../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes-ehJCoExh.css';/* empty css */
13
- import { TextInput as h } from "../forms/TextInput/TextInput.js";
14
- import { FormControl as g } from "../forms/FormControl/FormControl.js";
15
- import _, { forwardRef as v, useCallback as y, useEffect as b, useMemo as x, useRef as S, useState as C } from "react";
16
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
5
+ import { useKeyboardEscape as i } from "../hooks/useKeyboardEscape.js";
6
+ import { ArrowUpRightIcon as a, ChevronLeftIcon as o, LinkExternalIcon as s, MarkGithubIcon as ee, SearchIcon as c } from "../node_modules/@primer/octicons-react/dist/index.esm.js";
7
+ import { useWindowSize as l } from "../hooks/useWindowSize.js";
8
+ import u from "./SubdomainNavBar.module.js";
9
+ import { SubdomainNavBarLinkContext as d, useSubdomainNavBarLinkContext as f } from "./SubdomainNavBarLinkContext.js";
10
+ import { NavigationVisbilityObserver as te } from "./NavigationVisbilityObserver.js";
11
+ import { useFocusTrap as ne } from "../hooks/useFocusTrap.js";
12
+ import '../packages/design-tokens/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes-BGj0AiDW.css';/* empty css */
13
+ import { useSearchKeyboardShortcut as re } from "./useSearchKeyboardShortcut.js";
14
+ import { useSearchResults as ie } from "./useSearchResults.js";
15
+ import { TextInput as ae } from "../forms/TextInput/TextInput.js";
16
+ import { FormControl as p } from "../forms/FormControl/FormControl.js";
17
+ import m, { forwardRef as h, useCallback as g, useEffect as _, useImperativeHandle as v, useMemo as y, useRef as b, useState as x } from "react";
18
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
17
19
  //#region src/SubdomainNavBar/SubdomainNavBar.tsx
18
- var D = {
20
+ var T = {
21
+ menuLabel: "Menu",
22
+ closeLabel: "Close",
23
+ overflowMenuLabel: "More"
24
+ }, E = m.createContext("small"), D = {
19
25
  root: "SubdomainNavBar",
20
26
  get innerContainer() {
21
27
  return `${this.root}-inner-container`;
@@ -30,366 +36,536 @@ var D = {
30
36
  return `${this.root}-search-live-region`;
31
37
  }
32
38
  };
33
- function O({ children: i, className: s, fixed: l = !0, fullWidth: u = !1, logoHref: h = "https://github.com", title: g, titleHref: v = "/", onNarrowMenuToggle: O, ...N }) {
34
- let [P, F] = C(!0), [I, L] = C(!1), { isSmall: R, isMedium: z } = d(), [B, V] = C(!1), H = S(null), U = t("start-of-content"), W = () => {
35
- let e = !P;
36
- F(e), O?.(!e);
37
- }, G = () => L(!I), K = S(null);
38
- b(() => {
39
- let e = document.querySelector("main");
40
- e && (e.id = e.id || U, H.current = e);
41
- }, [U]), m({
42
- containerRef: K,
39
+ function O(e) {
40
+ if (e.closest("[hidden], [inert], [aria-hidden=\"true\"]")) return !1;
41
+ for (let t = e; t; t = t.parentElement) {
42
+ let e = window.getComputedStyle(t);
43
+ if (e.display === "none" || e.visibility === "hidden") return !1;
44
+ }
45
+ return !0;
46
+ }
47
+ var k = h(function({ children: a, className: s, fixed: c = !0, fullWidth: f = !1, logoHref: ie = "https://github.com", style: ae, title: p, titleHref: h = "/", leadingComponent: k, trailingComponent: j, onNarrowMenuToggle: F, menuLabels: oe, skipToContentTargetId: I, ...se }, ce) {
48
+ let [L, le] = x(!0), [ue, R] = x(!1), [de, fe] = x(0), { isMedium: pe, isLarge: z } = l(), [me, he] = x(!1), [ge, B] = x(), V = b(null), _e = b(null), ve = t(), ye = `${ve}-main`, be = t(), H = {
49
+ ...T,
50
+ ...oe
51
+ }, U = g(() => {
52
+ fe(Math.max(0, V.current?.getBoundingClientRect().top ?? 0));
53
+ }, []), W = g(() => {
54
+ L || (le(!0), F?.(!1));
55
+ }, [L, F]), xe = () => {
56
+ if (!L) {
57
+ W();
58
+ return;
59
+ }
60
+ R(!1), U(), le(!1), F?.(!0);
61
+ }, Se = b(null), Ce = g(() => {
62
+ let e = Array.from(document.querySelectorAll("main")).find(O);
63
+ return e ? (e.id ||= document.getElementById("start-of-content") ? ye : "start-of-content", e) : _e.current;
64
+ }, [ye]), G = g(() => {
65
+ if (I) {
66
+ let e = document.getElementById(I);
67
+ if (e && O(e)) return e;
68
+ }
69
+ return Ce();
70
+ }, [Ce, I]), we = g(() => {
71
+ he(!0);
72
+ let e = G();
73
+ e && B(e.id);
74
+ }, [G]), Te = g((e) => {
75
+ if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
76
+ let t = I ? document.getElementById(I) : null, n = I && (!t || !O(t)), r = G();
77
+ if (n && console.warn(`SubdomainNavBar could not find the skip-to-content target "${I}". Falling back to the page's main content.`), !r) return;
78
+ let i = `#${encodeURIComponent(r.id)}`;
79
+ e.currentTarget.setAttribute("href", i), B(r.id);
80
+ let a = r.tabIndex < 0 && !r.hasAttribute("tabindex");
81
+ a && (r.tabIndex = -1);
82
+ let o = r.style.scrollMarginBlockStart;
83
+ if (c) {
84
+ let e = V.current?.getBoundingClientRect().height ?? 0;
85
+ r.style.scrollMarginBlockStart = `${e}px`;
86
+ }
87
+ r.addEventListener("blur", () => {
88
+ a && r.removeAttribute("tabindex"), r.style.scrollMarginBlockStart = o;
89
+ }, { once: !0 }), r.focus({ preventScroll: !0 });
90
+ }, [
91
+ c,
92
+ G,
93
+ I
94
+ ]);
95
+ _(() => {
96
+ let e = G();
97
+ e && B(e.id);
98
+ }, [G]), ne({
99
+ containerRef: Se,
43
100
  restoreFocusOnCleanUp: !0,
44
- disabled: P
45
- }), a(() => {
46
- F(!0), O?.(!1);
47
- }), b(() => {
48
- z && (F(!0), O?.(!1));
101
+ disabled: L
102
+ }), i(W), _(() => {
103
+ z && W();
104
+ }, [W, z]), _(() => {
105
+ if (L || z) return;
106
+ U();
107
+ let e = new ResizeObserver(U), t = V.current;
108
+ return t && e.observe(t), e.observe(document.documentElement), () => e.disconnect();
49
109
  }, [
50
110
  z,
51
- P,
52
- O
53
- ]), b(() => {
54
- let e = P ? "auto" : "hidden";
55
- document.body.style.overflow = e;
56
- }, [P]);
57
- let q = y(() => V(!0), []), J = y(() => V(!1), []), Y = x(() => _.Children.toArray(i).filter((e) => _.isValidElement(e) && typeof e.type != "string" && e.type === k), []).length > 0, X = x(() => _.Children.toArray(i).map((e, t) => {
58
- if (_.isValidElement(e) && e.type === k) {
59
- let n = typeof e.props.children == "string" ? e.props.children : `${t}`;
60
- return _.cloneElement(e, {
61
- "data-navitemid": n,
62
- href: e.props.href,
63
- children: e.props.children,
64
- style: { "--animation-order": t }
65
- });
66
- }
67
- return null;
68
- }).filter(Boolean), [i]), Z = x(() => {
69
- let e = _.Children.toArray(i).find((e) => _.isValidElement(e) && e.type === j), t = _.Children.toArray(i).find((e) => _.isValidElement(e) && e.type === M);
70
- return !!e && !!t;
71
- }, [i]);
72
- return /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("div", {
73
- className: e(f["SubdomainNavBar-outer-container"], l && f["SubdomainNavBar-outer-container--fixed"], Z && f["SubdomainNavBar-outer-container--has-actions"]),
74
- children: [/* @__PURE__ */ T(r, {
111
+ L,
112
+ U
113
+ ]), _(() => {
114
+ if (L) return;
115
+ let e = document.body.style.overflow;
116
+ return document.body.style.overflow = "hidden", () => {
117
+ document.body.style.overflow = e;
118
+ };
119
+ }, [L]);
120
+ let Ee = g(() => he(!1), []), K = y(() => m.Children.toArray(a).filter((e) => m.isValidElement(e) && typeof e.type != "string" && e.type === A), []).length > 0, q = y(() => m.Children.toArray(a).map((e, t) => m.isValidElement(e) && e.type === A ? m.cloneElement(e, {
121
+ href: e.props.href,
122
+ children: e.props.children,
123
+ style: { "--animation-order": t }
124
+ }) : null).filter(Boolean), [a]), J = y(() => m.Children.toArray(a).filter((e) => m.isValidElement(e) && (e.type === N || e.type === P)), [a]), De = y(() => J.map((e) => m.cloneElement(e, { onClick: (t) => {
125
+ e.props.onClick?.(t), t.defaultPrevented || W();
126
+ } })), [J, W]), Y = J.length > 0, Oe = y(() => m.Children.toArray(a).find((e) => m.isValidElement(e) && e.type === M), [a]), ke = !!Oe, X = g(() => {
127
+ ke && (W(), R(!0));
128
+ }, [W, ke]), Z = g(() => R(!1), []);
129
+ v(ce, () => V.current ? Object.assign(V.current, {
130
+ openSearch: X,
131
+ closeSearch: Z
132
+ }) : {
133
+ openSearch: X,
134
+ closeSearch: Z
135
+ }, [Z, X]), re({
136
+ disabled: ue,
137
+ keyboardShortcut: Oe?.props.keyboardShortcut,
138
+ onTrigger: X
139
+ });
140
+ let Q = k != null, $ = j != null, Ae = K || Y || Q || $, je = {
141
+ ...ae,
142
+ "--SubdomainNavBar-menu-offset-block-start": `${de}px`
143
+ };
144
+ return /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w("div", {
145
+ className: e(u["SubdomainNavBar-outer-container"], c && u["SubdomainNavBar-outer-container--fixed"]),
146
+ children: [/* @__PURE__ */ C(r, {
75
147
  as: "a",
76
- href: `#${H.current?.id || U}`,
148
+ href: `#${ge || I || ve}`,
77
149
  variant: "primary",
78
- className: e(f["SubdomainNavBar-skip-to-content"], !B && "visually-hidden"),
79
- onFocus: q,
80
- onBlur: J,
150
+ size: "small",
151
+ className: e(u["SubdomainNavBar-skip-to-content"], !me && "visually-hidden"),
152
+ onFocus: we,
153
+ onBlur: Ee,
154
+ onClick: Te,
81
155
  children: "Skip to content"
82
- }), /* @__PURE__ */ T("header", {
83
- className: e(f.SubdomainNavBar, s),
156
+ }), /* @__PURE__ */ w("header", {
157
+ ref: V,
158
+ className: e(u.SubdomainNavBar, s),
84
159
  "data-testid": D.root,
85
- ...N,
86
- children: /* @__PURE__ */ E("div", {
87
- ref: K,
88
- className: e(f["SubdomainNavBar-inner-container"], I && f["SubdomainNavBar-inner-container--search-open"], !u && f["SubdomainNavBar-inner-container--centered"]),
160
+ style: je,
161
+ ...se,
162
+ children: [/* @__PURE__ */ w("div", {
163
+ ref: Se,
164
+ className: e(u["SubdomainNavBar-inner-container"], ue && u["SubdomainNavBar-inner-container--search-open"], !f && u["SubdomainNavBar-inner-container--centered"]),
89
165
  "data-testid": D.innerContainer,
90
166
  children: [
91
- /* @__PURE__ */ T("nav", {
167
+ /* @__PURE__ */ C("nav", {
92
168
  "aria-label": "Header logo and title",
93
- children: /* @__PURE__ */ E("ol", {
94
- className: f["SubdomainNavBar-title-area"],
95
- children: [/* @__PURE__ */ T("li", { children: /* @__PURE__ */ E("a", {
96
- href: h,
169
+ children: /* @__PURE__ */ w("ol", {
170
+ className: u["SubdomainNavBar-title-area"],
171
+ children: [/* @__PURE__ */ C("li", { children: /* @__PURE__ */ w("a", {
172
+ href: ie,
97
173
  "aria-label": "Github Home",
98
- className: f["SubdomainNavBar-logo-mark"],
99
- children: [/* @__PURE__ */ T("span", {
100
- className: e(f["SubdomainNavBar-back-arrow"]),
101
- children: /* @__PURE__ */ T(o, {
174
+ className: u["SubdomainNavBar-logo-mark"],
175
+ children: [/* @__PURE__ */ C("span", {
176
+ className: u["SubdomainNavBar-back-arrow"],
177
+ children: /* @__PURE__ */ C(o, {
102
178
  fill: "currentColor",
103
179
  size: 24
104
180
  })
105
- }), /* @__PURE__ */ T(c, {
181
+ }), /* @__PURE__ */ C(ee, {
106
182
  fill: "currentColor",
107
183
  size: 24
108
184
  })]
109
- }) }), g && R && /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("li", {
110
- role: "separator",
111
- className: f["SubdomainNavBar-title-separator"],
112
- "aria-hidden": !0,
113
- children: "/"
114
- }), /* @__PURE__ */ T("li", { children: /* @__PURE__ */ T("a", {
115
- href: v,
116
- "aria-label": `${g} home`,
117
- className: e(f["SubdomainNavBar-title"]),
118
- children: /* @__PURE__ */ T(n, {
185
+ }) }), p && /* @__PURE__ */ C(S, { children: /* @__PURE__ */ C("li", { children: /* @__PURE__ */ C("a", {
186
+ href: h,
187
+ "aria-label": `${p} home`,
188
+ className: e(u["SubdomainNavBar-title"]),
189
+ children: /* @__PURE__ */ w(n, {
119
190
  size: "400",
120
191
  weight: "medium",
121
- children: g
192
+ children: [
193
+ /* @__PURE__ */ C("span", {
194
+ className: u["SubdomainNavBar-title-prefix"],
195
+ children: "GitHub"
196
+ }),
197
+ " ",
198
+ /* @__PURE__ */ C("span", {
199
+ className: u["SubdomainNavBar-title-label"],
200
+ children: p
201
+ })
202
+ ]
122
203
  })
123
- }) })] })]
204
+ }) }) })]
124
205
  })
125
206
  }),
126
- Y && /* @__PURE__ */ T("nav", {
207
+ K && /* @__PURE__ */ C("nav", {
127
208
  id: "menu-navigation",
128
- "aria-label": g,
129
- className: f["SubdomainNavBar-primary-nav"],
209
+ "aria-label": p,
210
+ className: u["SubdomainNavBar-primary-nav"],
130
211
  "data-testid": D.menuLinks,
131
- children: /* @__PURE__ */ T(p, {
132
- className: e(f["SubdomainNavBar-primary-nav-list--invisible"]),
133
- children: X
212
+ children: /* @__PURE__ */ C(te, {
213
+ className: e(u["SubdomainNavBar-primary-nav-list--invisible"]),
214
+ overflowMenuLabel: H.overflowMenuLabel,
215
+ children: q
134
216
  })
135
217
  }),
136
- /* @__PURE__ */ E("div", {
137
- className: e(f["SubdomainNavBar-secondary-nav"]),
218
+ z && Q && /* @__PURE__ */ C("div", {
219
+ className: u["SubdomainNavBar-leading-component"],
220
+ children: k
221
+ }),
222
+ /* @__PURE__ */ w("div", {
223
+ className: e(u["SubdomainNavBar-secondary-nav"]),
138
224
  children: [
139
- _.Children.toArray(i).map((e) => _.isValidElement(e) && e.type === A ? _.cloneElement(e, {
140
- active: I,
141
- handlerFn: G,
142
- title: g
225
+ m.Children.toArray(a).map((t) => m.isValidElement(t) && t.type === M ? m.cloneElement(t, {
226
+ active: ue,
227
+ className: e(t.props.className, z && (Y || $) && u["SubdomainNavBar-search-trigger--has-trailing-item"]),
228
+ onSearchOpen: X,
229
+ onSearchClose: Z,
230
+ title: p
143
231
  }) : null).filter(Boolean),
144
- Y && /* @__PURE__ */ E("button", {
145
- "aria-expanded": !P,
146
- "aria-label": "Menu",
147
- "aria-controls": "menu-navigation",
148
- "aria-haspopup": "true",
149
- className: e(f["SubdomainNavBar-menu-button"], f["SubdomainNavBar-mobile-menu-button"], !P && f["SubdomainNavBar-menu-button--close"]),
232
+ Ae && /* @__PURE__ */ w("button", {
233
+ "aria-expanded": !L,
234
+ "aria-label": L ? H.menuLabel : H.closeLabel,
235
+ "aria-controls": be,
236
+ className: e(u["SubdomainNavBar-menu-button"], u["SubdomainNavBar-mobile-menu-button"], !L && u["SubdomainNavBar-menu-button--close"]),
150
237
  "data-testid": D.menuButton,
151
- onClick: W,
152
- children: [
153
- /* @__PURE__ */ T("div", { className: e(f["SubdomainNavBar-menu-button-bar"]) }),
154
- /* @__PURE__ */ T("div", { className: e(f["SubdomainNavBar-menu-button-bar"]) }),
155
- /* @__PURE__ */ T("div", { className: e(f["SubdomainNavBar-menu-button-bar"]) })
156
- ]
238
+ onClick: xe,
239
+ children: [/* @__PURE__ */ w("span", {
240
+ className: u["SubdomainNavBar-menu-button-icon"],
241
+ "aria-hidden": "true",
242
+ children: [
243
+ /* @__PURE__ */ C("span", { className: u["SubdomainNavBar-menu-button-bar"] }),
244
+ /* @__PURE__ */ C("span", { className: u["SubdomainNavBar-menu-button-bar"] }),
245
+ /* @__PURE__ */ C("span", { className: u["SubdomainNavBar-menu-button-bar"] })
246
+ ]
247
+ }), /* @__PURE__ */ C("span", {
248
+ className: u["SubdomainNavBar-menu-button-label"],
249
+ children: L ? H.menuLabel : H.closeLabel
250
+ })]
157
251
  }),
158
- z && /* @__PURE__ */ T("div", {
159
- className: e(f["SubdomainNavBar-button-area"], f["SubdomainNavBar-button-area--visible"]),
160
- children: /* @__PURE__ */ T("div", {
161
- className: f["SubdomainNavBar-button-area-inner"],
162
- children: _.Children.toArray(i).map((e) => _.isValidElement(e) && (e.type === j || e.type === M) ? e : null).filter(Boolean)
252
+ z && $ && /* @__PURE__ */ C("div", {
253
+ className: u["SubdomainNavBar-trailing-component"],
254
+ children: j
255
+ }),
256
+ z && Y && /* @__PURE__ */ C("div", {
257
+ className: e(u["SubdomainNavBar-button-area"], u["SubdomainNavBar-button-area--visible"], $ && u["SubdomainNavBar-button-area--has-leading-item"]),
258
+ children: /* @__PURE__ */ C("div", {
259
+ className: u["SubdomainNavBar-button-area-inner"],
260
+ children: J
163
261
  })
164
262
  }),
165
- !z && /* @__PURE__ */ E("div", {
166
- className: e(f["SubdomainNavBar-menu-wrapper"], P && f["SubdomainNavBar-menu-wrapper--close"]),
167
- children: [/* @__PURE__ */ E("div", { children: [g && v && /* @__PURE__ */ T(n, {
168
- as: "p",
169
- children: /* @__PURE__ */ T("a", {
170
- href: v,
171
- "aria-label": `${g} home`,
172
- className: e(f["SubdomainNavBar-link"], f["SubdomainNavBar-link--title"]),
173
- children: g
174
- })
175
- }), Y && !P && /* @__PURE__ */ T(p, {
176
- className: e(f["SubdomainNavBar-primary-nav-list--visible"]),
177
- children: X
178
- })] }), /* @__PURE__ */ T("div", {
179
- className: e(f["SubdomainNavBar-button-area"], f["SubdomainNavBar-button-area--visible"]),
180
- children: /* @__PURE__ */ T("div", {
181
- className: f["SubdomainNavBar-button-area-inner"],
182
- children: _.Children.toArray(i).map((e) => _.isValidElement(e) && (e.type === j || e.type === M) ? e : null).filter(Boolean)
263
+ !z && /* @__PURE__ */ w("div", {
264
+ id: be,
265
+ className: e(u["SubdomainNavBar-menu-wrapper"], L && u["SubdomainNavBar-menu-wrapper--close"]),
266
+ children: [!L && /* @__PURE__ */ w("div", { children: [Q && /* @__PURE__ */ C("div", {
267
+ className: u["SubdomainNavBar-leading-component"],
268
+ children: k
269
+ }), K && /* @__PURE__ */ C(d.Provider, {
270
+ value: { onLinkClick: W },
271
+ children: pe ? /* @__PURE__ */ C("ul", {
272
+ className: u["SubdomainNavBar-primary-nav-list--visible"],
273
+ children: q
274
+ }) : /* @__PURE__ */ C(te, {
275
+ className: e(u["SubdomainNavBar-primary-nav-list--visible"]),
276
+ overflowMenuLabel: H.overflowMenuLabel,
277
+ children: q
183
278
  })
279
+ })] }), !L && (Y || $) && /* @__PURE__ */ w("div", {
280
+ className: e(u["SubdomainNavBar-menu-wrapper-footer"], (K || Q) && u["SubdomainNavBar-menu-wrapper-footer--has-leading-item"]),
281
+ children: [$ && /* @__PURE__ */ C("div", {
282
+ className: u["SubdomainNavBar-trailing-component"],
283
+ children: j
284
+ }), Y && /* @__PURE__ */ C("div", {
285
+ className: e(u["SubdomainNavBar-button-area"], u["SubdomainNavBar-button-area--visible"]),
286
+ children: /* @__PURE__ */ C("div", {
287
+ className: u["SubdomainNavBar-button-area-inner"],
288
+ children: /* @__PURE__ */ C(E.Provider, {
289
+ value: pe ? "small" : "medium",
290
+ children: De
291
+ })
292
+ })
293
+ })]
184
294
  })]
185
295
  })
186
296
  ]
187
297
  })
188
298
  ]
189
- })
299
+ }), !z && !L && /* @__PURE__ */ C("div", {
300
+ className: u["SubdomainNavBar-menu-backdrop"],
301
+ "aria-hidden": "true"
302
+ })]
190
303
  })]
191
- }), !H.current && /* @__PURE__ */ T("div", {
192
- id: `${U}`,
304
+ }), /* @__PURE__ */ C("div", {
305
+ ref: _e,
306
+ id: ve,
193
307
  tabIndex: -1
194
308
  })] });
195
- }
196
- function k({ href: t, className: n, children: r, isExternal: i, ...a }) {
197
- return /* @__PURE__ */ T("li", {
198
- className: e(f["SubdomainNavBar-primary-nav-list-item"], n),
199
- ...a,
200
- children: /* @__PURE__ */ E("a", {
309
+ });
310
+ function A({ href: t, className: n, children: r, isExternal: i, "aria-current": a, "aria-hidden": o, tabIndex: ee, ...c }) {
311
+ let { isOverflowed: l, onLinkClick: d } = f();
312
+ return /* @__PURE__ */ C("li", {
313
+ ...c,
314
+ "aria-hidden": l ? !0 : o,
315
+ className: e(u["SubdomainNavBar-primary-nav-list-item"], n),
316
+ tabIndex: l ? -1 : ee,
317
+ children: /* @__PURE__ */ C("a", {
201
318
  href: t,
202
- className: f["SubdomainNavBar-link"],
203
- children: [/* @__PURE__ */ T("span", {
204
- className: f["SubdomainNavBar-link-text"],
205
- children: r
206
- }), i && /* @__PURE__ */ T(s, {
207
- size: 16,
208
- "aria-label": "External link"
209
- })]
319
+ "aria-current": a,
320
+ className: u["SubdomainNavBar-link"],
321
+ onClick: d,
322
+ tabIndex: l ? -1 : void 0,
323
+ children: /* @__PURE__ */ w("span", {
324
+ className: u["SubdomainNavBar-link-content"],
325
+ children: [/* @__PURE__ */ C("span", {
326
+ className: u["SubdomainNavBar-link-text"],
327
+ children: r
328
+ }), i && /* @__PURE__ */ C(s, {
329
+ size: 16,
330
+ "aria-label": "External link"
331
+ })]
332
+ })
210
333
  })
211
334
  });
212
335
  }
213
- var A = v(({ active: t, title: r, searchResults: o, searchTerm: s, handlerFn: c, onSubmit: d, onChange: p }, _) => {
214
- let v = S(null);
215
- m({
216
- containerRef: v,
217
- restoreFocusOnCleanUp: !0,
218
- disabled: !t
219
- }), i(v, c);
220
- let [x, O] = C(-1), [k, A] = C(), [j, M] = C(!1), N = y((e) => {
221
- c && c(e), O(-1);
222
- }, [c]);
223
- i(v, N), a(() => {
224
- if (!k && t) return N(), !1;
225
- A(!1), O(-1);
226
- });
227
- let P = y((e) => {
228
- let t = [
229
- "ArrowDown",
230
- "ArrowUp",
231
- "Escape",
232
- "Enter"
233
- ], n = x, r = o ? o.length : 0, i = v.current, a;
234
- if (!t.includes(e.key) || e.key === "Enter" && x === -1 || !i) return !1;
235
- e.preventDefault(), e.key === "ArrowDown" ? (a = n < r - 1 ? n + 1 : -1, O(a)) : e.key === "ArrowUp" && (a = n === -1 ? r - 1 : n - 1, O(a)), ["ArrowDown", "ArrowUp"].includes(e.key) && i.querySelector(`#subdomainnavbar-search-result-${a}`)?.scrollIntoView(), e.key === "Enter" && i.querySelector(`#subdomainnavbar-search-result-${x} a`).click();
236
- }, [o, x]), F = y(() => {
237
- M(!0), setTimeout(() => {
238
- t && M(!1);
239
- }, 200);
240
- }, [t]);
241
- return b(() => {
242
- A(!!(o && o.length)), F();
243
- }, [
244
- o,
245
- s,
246
- F
247
- ]), /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("div", {
248
- className: e(f["SubdomainNavBar-search-trigger"]),
249
- children: /* @__PURE__ */ T("button", {
250
- "aria-label": "Toggle search bar",
251
- className: f["SubdomainNavBar-search-button"],
252
- onClick: c,
253
- "data-testid": "toggle-search",
254
- children: /* @__PURE__ */ T(l, { "aria-label": "Search icon" })
255
- })
256
- }), t && /* @__PURE__ */ E("div", {
257
- ref: v,
258
- role: "dialog",
259
- "aria-label": `Search ${r}`,
260
- "aria-modal": "true",
261
- tabIndex: -1,
262
- className: e(f["SubdomainNavBar-search-dialog"]),
263
- children: [/* @__PURE__ */ E("div", {
264
- className: e(f["SubdomainNavBar-search-dialog-control-area"]),
265
- children: [/* @__PURE__ */ T("form", {
266
- className: e(f["SubdomainNavBar-search-form"]),
267
- onSubmit: d,
268
- role: "search",
269
- children: /* @__PURE__ */ E(g, {
270
- fullWidth: !0,
271
- size: "medium",
272
- children: [/* @__PURE__ */ T(g.Label, {
273
- visuallyHidden: !0,
274
- children: "Search"
275
- }), /* @__PURE__ */ T(h, {
276
- ref: _,
277
- className: e(f["SubdomainNavBar-search-text-input"]),
278
- name: "search",
279
- role: "combobox",
280
- "aria-expanded": k,
281
- "aria-controls": "listbox-search-results",
282
- placeholder: `Search ${r}`,
283
- onChange: p,
284
- defaultValue: s,
285
- invisible: !0,
286
- leadingVisual: /* @__PURE__ */ T(l, { size: 16 }),
287
- "aria-activedescendant": x === -1 ? void 0 : `subdomainnavbar-search-result-${x}`,
288
- onKeyDown: P
336
+ var j = {
337
+ searchLabel: "Search",
338
+ closeLabel: "Close",
339
+ resultsLabel: "Results",
340
+ searchResultsLabel: "Search results",
341
+ formatSearchWithTitle: (e) => `Search ${e}`,
342
+ formatSearchTrigger: (e) => `${e} search`,
343
+ formatResultsHeading: (e) => `Results for “${e}”`,
344
+ formatResultsLabel: (e) => `Results for ${e}`,
345
+ formatSuggestions: (e) => `${e} suggestions.`
346
+ }, M = h(({ active: t, className: r, title: i, searchResults: o, searchTerm: s, onSearchOpen: ee, onSearchClose: l, onSubmit: d, onChange: f, placeholder: te, shortcutLabel: ne, keyboardShortcut: re, labels: m }, h) => {
347
+ let v = b(null), y = b(null), x = {
348
+ ...j,
349
+ ...m
350
+ }, T = te ?? (i ? x.formatSearchWithTitle(i) : x.searchLabel), E = i ? x.formatSearchWithTitle(i) : x.searchLabel, O = ne ?? (re || ""), { activeDescendant: k, handleSearchResultKeyDown: A, hasGroupedSearchResults: M, hasSearchResults: N, normalizedSearchResultGroups: P, resetActiveDescendant: F, searchResultsLength: oe } = ie({
351
+ dialogRef: v,
352
+ searchResults: o
353
+ }), I = g(() => {
354
+ l?.(), F();
355
+ }, [l, F]), se = g((e) => {
356
+ if (y.current = e, typeof h == "function") {
357
+ h(e);
358
+ return;
359
+ }
360
+ h && (h.current = e);
361
+ }, [h]);
362
+ _(() => {
363
+ let e = v.current;
364
+ if (e) {
365
+ if (t) {
366
+ e.open || (typeof e.showModal == "function" ? e.showModal() : e.setAttribute("open", "")), y.current?.focus();
367
+ return;
368
+ }
369
+ e.open && (typeof e.close == "function" ? e.close() : e.removeAttribute("open"));
370
+ }
371
+ }, [t, y]), _(() => {
372
+ let e = v.current;
373
+ if (!e) return;
374
+ let t = (t) => {
375
+ if (t.target !== e) return;
376
+ let n = e.getBoundingClientRect();
377
+ t.clientX >= n.left && t.clientX <= n.right && t.clientY >= n.top && t.clientY <= n.bottom || I();
378
+ };
379
+ return e.addEventListener("click", t), () => e.removeEventListener("click", t);
380
+ }, [I]);
381
+ let ce = g((e) => {
382
+ e.preventDefault(), I();
383
+ }, [I]), L = ({ result: e, index: t }) => /* @__PURE__ */ w("li", {
384
+ className: u["SubdomainNavBar-search-result-item"],
385
+ role: "presentation",
386
+ children: [
387
+ /* @__PURE__ */ C("div", {
388
+ className: u["SubdomainNavBar-search-result-item-container"],
389
+ children: /* @__PURE__ */ w("a", {
390
+ id: `subdomainnavbar-search-result-${t}`,
391
+ href: e.url,
392
+ role: "option",
393
+ "aria-selected": t === k,
394
+ children: [/* @__PURE__ */ C("span", { children: e.title }), M && e.isExternal && /* @__PURE__ */ C(a, {
395
+ size: 20,
396
+ "aria-hidden": "true"
289
397
  })]
290
398
  })
291
- }), /* @__PURE__ */ T("button", {
292
- "aria-label": "Close",
293
- className: e(f["SubdomainNavBar-menu-button"], f["SubdomainNavBar-menu-button--close"]),
294
- onClick: N,
295
- children: /* @__PURE__ */ T(u, { size: 24 })
399
+ }),
400
+ /* @__PURE__ */ C(n, {
401
+ as: "p",
402
+ size: "200",
403
+ id: `subdomainnavbar-search-result-item-desc${t}`,
404
+ className: u["SubdomainNavBar-search-result-item-desc"],
405
+ children: e.description
406
+ }),
407
+ /* @__PURE__ */ w("div", {
408
+ className: u["SubdomainNavBar-search-result-item-meta"],
409
+ children: [/* @__PURE__ */ C(n, {
410
+ size: "100",
411
+ className: u["SubdomainNavBar-search-result-item-desc"],
412
+ children: e.date
413
+ }), e.category && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w(n, {
414
+ size: "100",
415
+ className: u["SubdomainNavBar-search-result-item-desc"],
416
+ children: [
417
+ " ",
418
+ "•",
419
+ " "
420
+ ]
421
+ }), /* @__PURE__ */ C(n, {
422
+ size: "100",
423
+ className: u["SubdomainNavBar-search-result-item-desc"],
424
+ children: e.category
425
+ })] })]
426
+ })
427
+ ]
428
+ }, `${e.title}-${t}`);
429
+ return /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("div", {
430
+ className: e(u["SubdomainNavBar-search-trigger"], r),
431
+ children: /* @__PURE__ */ w("button", {
432
+ "aria-label": x.formatSearchTrigger(T),
433
+ className: u["SubdomainNavBar-search-input-button"],
434
+ onClick: ee,
435
+ "data-testid": "toggle-search",
436
+ type: "button",
437
+ children: [/* @__PURE__ */ w("span", {
438
+ className: u["SubdomainNavBar-search-input-button-placeholder"],
439
+ children: [/* @__PURE__ */ C(c, {
440
+ "aria-hidden": "true",
441
+ size: 16
442
+ }), /* @__PURE__ */ C("span", { children: T })]
443
+ }), O && /* @__PURE__ */ C("span", {
444
+ className: u["SubdomainNavBar-search-input-button-shortcut"],
445
+ children: O
296
446
  })]
297
- }), /* @__PURE__ */ E("div", {
447
+ })
448
+ }), /* @__PURE__ */ C("dialog", {
449
+ ref: v,
450
+ "aria-label": E,
451
+ className: e(u["SubdomainNavBar-search-dialog"], N && u["SubdomainNavBar-search-dialog--has-results"]),
452
+ onCancel: ce,
453
+ children: t && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("div", {
454
+ className: e(u["SubdomainNavBar-search-dialog-control-area"]),
455
+ children: /* @__PURE__ */ w("div", {
456
+ className: u["SubdomainNavBar-search-input-area"],
457
+ children: [/* @__PURE__ */ C("form", {
458
+ className: e(u["SubdomainNavBar-search-form"]),
459
+ onSubmit: d,
460
+ role: "search",
461
+ children: /* @__PURE__ */ w(p, {
462
+ fullWidth: !0,
463
+ size: "medium",
464
+ children: [/* @__PURE__ */ C(p.Label, {
465
+ visuallyHidden: !0,
466
+ children: x.searchLabel
467
+ }), /* @__PURE__ */ C(ae, {
468
+ ref: se,
469
+ className: e(u["SubdomainNavBar-search-text-input"]),
470
+ name: "search",
471
+ role: "combobox",
472
+ autoComplete: "off",
473
+ "aria-autocomplete": "list",
474
+ "aria-expanded": N,
475
+ "aria-controls": "listbox-search-results",
476
+ placeholder: T,
477
+ onChange: f,
478
+ defaultValue: s,
479
+ invisible: !0,
480
+ leadingVisual: /* @__PURE__ */ C(c, { size: 16 }),
481
+ "aria-activedescendant": k === -1 ? void 0 : `subdomainnavbar-search-result-${k}`,
482
+ onKeyDown: A
483
+ })]
484
+ })
485
+ }), /* @__PURE__ */ C("button", {
486
+ "aria-label": x.closeLabel,
487
+ className: u["SubdomainNavBar-search-close-button"],
488
+ onClick: I,
489
+ type: "button",
490
+ children: x.closeLabel
491
+ })]
492
+ })
493
+ }), /* @__PURE__ */ w("div", {
298
494
  id: "listbox-search-results",
299
- children: [k && /* @__PURE__ */ E("div", {
300
- className: e(f["SubdomainNavBar-search-results-container"]),
301
- children: [/* @__PURE__ */ E(n, {
495
+ className: e(u["SubdomainNavBar-search-results-area"], N && u["SubdomainNavBar-search-results-area--visible"]),
496
+ children: [N && /* @__PURE__ */ w("div", {
497
+ className: e(u["SubdomainNavBar-search-results-container"]),
498
+ children: [!M && /* @__PURE__ */ C(n, {
302
499
  id: "subdomainnavbar-search-results-heading",
303
- className: f["SubdomainNavBar-search-results-heading"],
304
- children: [
305
- "Results for ",
306
- s,
307
- "”"
308
- ]
309
- }), /* @__PURE__ */ T("ul", {
500
+ className: u["SubdomainNavBar-search-results-heading"],
501
+ children: x.formatResultsHeading(s ?? "")
502
+ }), /* @__PURE__ */ C("ul", {
310
503
  role: "listbox",
311
504
  tabIndex: 0,
312
- "aria-labelledby": "subdomainnavbar-search-results-heading",
313
- className: e(f["SubdomainNavBar-search-results"]),
314
- children: o?.map((e, t) => /* @__PURE__ */ E("li", {
315
- id: `subdomainnavbar-search-result-${t}`,
316
- className: f["SubdomainNavBar-search-result-item"],
317
- role: "option",
318
- "aria-selected": t === x,
319
- children: [
320
- /* @__PURE__ */ T("div", {
321
- className: f["SubdomainNavBar-search-result-item-container"],
322
- children: /* @__PURE__ */ T("a", {
323
- href: e.url,
324
- children: e.title
325
- })
326
- }),
327
- /* @__PURE__ */ T(n, {
328
- as: "p",
329
- size: "200",
330
- id: `subdomainnavbar-search-result-item-desc${t}`,
331
- className: f["SubdomainNavBar-search-result-item-desc"],
332
- children: e.description
333
- }),
334
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T(n, {
335
- size: "100",
336
- className: f["SubdomainNavBar-search-result-item-desc"],
337
- children: e.date
338
- }), e.category && /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E(n, {
339
- size: "100",
340
- className: f["SubdomainNavBar-search-result-item-desc"],
341
- children: [
342
- " ",
343
- "•",
344
- " "
345
- ]
346
- }), /* @__PURE__ */ T(n, {
347
- size: "100",
348
- className: f["SubdomainNavBar-search-result-item-desc"],
349
- children: e.category
350
- })] })] })
351
- ]
352
- }, `${e.title}-${t}`))
505
+ "aria-labelledby": M ? void 0 : "subdomainnavbar-search-results-heading",
506
+ "aria-label": M ? s ? x.formatResultsLabel(s) : x.searchResultsLabel : void 0,
507
+ className: e(u["SubdomainNavBar-search-results"]),
508
+ children: M ? P.map((e, t) => {
509
+ let r = `subdomainnavbar-search-result-group-${t}`;
510
+ return /* @__PURE__ */ w("li", {
511
+ className: u["SubdomainNavBar-search-result-group"],
512
+ role: "presentation",
513
+ children: [e.title && /* @__PURE__ */ C(n, {
514
+ id: r,
515
+ className: u["SubdomainNavBar-search-result-group-heading"],
516
+ children: e.title
517
+ }), /* @__PURE__ */ C("ul", {
518
+ className: u["SubdomainNavBar-search-result-group-list"],
519
+ role: "group",
520
+ "aria-labelledby": e.title ? r : void 0,
521
+ "aria-label": e.title ? void 0 : x.resultsLabel,
522
+ children: e.results.map(L)
523
+ })]
524
+ }, e.title ?? `ungrouped-${t}`);
525
+ }) : P.flatMap((e) => e.results.map(L))
353
526
  })]
354
- }), /* @__PURE__ */ E("div", {
527
+ }), /* @__PURE__ */ w("div", {
355
528
  "aria-live": "polite",
356
529
  "aria-atomic": "true",
357
530
  "data-testid": D.liveRegion,
358
531
  className: "visually-hidden",
359
- children: [`${o?.length} suggestions.`, j && /* @__PURE__ */ T("span", { children: "\xA0" })]
532
+ children: [x.formatSuggestions(oe), /* @__PURE__ */ C("span", { children: "\xA0" })]
360
533
  })]
361
- })]
534
+ })] })
362
535
  })] });
363
536
  });
364
- function j({ children: t, href: n, ...i }) {
365
- return /* @__PURE__ */ T(r, {
537
+ k.displayName = "SubdomainNavBar";
538
+ function N({ children: t, href: n, ...i }) {
539
+ let a = m.useContext(E);
540
+ return /* @__PURE__ */ C(r, {
366
541
  as: "a",
367
542
  href: n,
368
- className: e(f["SubdomainNavBar-cta-button"]),
543
+ className: e(u["SubdomainNavBar-cta-button"]),
369
544
  variant: "primary",
370
- size: "small",
545
+ size: a,
371
546
  ...i,
372
547
  children: t
373
548
  });
374
549
  }
375
- function M({ children: t, href: n, ...i }) {
376
- return /* @__PURE__ */ T(r, {
550
+ function P({ children: t, href: n, ...i }) {
551
+ let a = m.useContext(E);
552
+ return /* @__PURE__ */ C(r, {
377
553
  as: "a",
378
554
  href: n,
379
- className: e(f["SubdomainNavBar-cta-button"], f["SubdomainNavBar-cta-button--secondary"]),
380
- size: "small",
555
+ className: e(u["SubdomainNavBar-cta-button"], u["SubdomainNavBar-cta-button--secondary"]),
556
+ size: a,
381
557
  ...i,
382
558
  children: t
383
559
  });
384
560
  }
385
- var N = Object.assign(O, {
386
- Link: k,
387
- Search: A,
388
- PrimaryAction: j,
389
- SecondaryAction: M,
561
+ var F = Object.assign(k, {
562
+ Link: A,
563
+ Search: M,
564
+ PrimaryAction: N,
565
+ SecondaryAction: P,
390
566
  testIds: D
391
567
  });
392
568
  //#endregion
393
- export { N as SubdomainNavBar };
569
+ export { F as SubdomainNavBar };
394
570
 
395
571
  //# sourceMappingURL=SubdomainNavBar.js.map