@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
@@ -1 +1 @@
1
- {"version":3,"file":"RiverAccordion.js","names":[],"sources":["../../../src/river/RiverAccordion/RiverAccordion.tsx"],"sourcesContent":["import React, {createContext, forwardRef, useCallback, useContext, useMemo, useState, useRef, useEffect} from 'react'\nimport {clsx} from 'clsx'\nimport {TriangleDownIcon, TriangleUpIcon} from '@primer/octicons-react'\n\nimport {Heading, type HeadingProps, Link, Text} from '../..'\nimport {useProvidedRefOrCreate} from '../../hooks/useRef'\nimport {useId} from '../../hooks/useId'\n\n/**\n * Design tokens\n */\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/river/river.css'\n\n/** Main Stylesheet (as a CSS Module) */\nimport styles from './RiverAccordion.module.css'\nimport gridlineStyles from '../../component-helpers/shared.module.css'\n\ntype RiverAccordionContextType = {\n openIndex: number\n setOpenIndex: (index: number) => void\n variant: RiverAccordionVariant\n}\n\nconst RiverAccordionContext = createContext<RiverAccordionContextType | null>(null)\n\nconst useRiverAccordionContext = (): RiverAccordionContextType => {\n const context = useContext(RiverAccordionContext)\n if (context === null) {\n throw new Error('useRiverAccordionContext must be used within a RiverAccordion component')\n }\n return context\n}\n\ntype RiverAccordionItemContextType = {\n index: number\n isOpen: boolean\n id: string\n}\n\nconst RiverAccordionItemContext = createContext<RiverAccordionItemContextType | null>(null)\n\nconst useRiverAccordionItemContext = (): RiverAccordionItemContextType => {\n const context = useContext(RiverAccordionItemContext)\n if (context === null) {\n throw new Error('useRiverAccordionItemContext must be used within a RiverAccordion component')\n }\n return context\n}\n\nexport const RiverAccordionVariants = ['default', 'gridline'] as const\nexport type RiverAccordionVariant = (typeof RiverAccordionVariants)[number]\n\nexport type RiverAccordionProps = React.PropsWithChildren<{\n align?: 'start' | 'end'\n variant?: RiverAccordionVariant\n}> &\n React.HTMLAttributes<HTMLDivElement>\n\nconst RiverAccordionRoot = forwardRef<HTMLDivElement, RiverAccordionProps>(\n ({align = 'start', variant = 'default', children, className, ...rest}, forwardedRef) => {\n const containerRef = useProvidedRefOrCreate<HTMLDivElement>(forwardedRef as React.RefObject<HTMLDivElement>)\n const [openIndex, setOpenIndex] = useState(0)\n\n const accordionComponents = useMemo(() => {\n return React.Children.toArray(children).reduce<{\n items: React.ReactElement<RiverAccordionItemProps>[]\n visuals: React.ReactElement<RiverAccordionVisualProps>[]\n }>(\n (acc, child) => {\n if (!isRiverAccordionItem(child)) {\n return acc\n }\n\n const visualChild = React.Children.toArray(child.props.children).find(isRiverAccordionVisual)\n\n if (visualChild) {\n acc.items.push(child)\n acc.visuals.push(visualChild)\n }\n\n return acc\n },\n {items: [], visuals: []},\n )\n }, [children])\n\n const items = accordionComponents.items.map((item, index) => React.cloneElement(item, {key: index, index}))\n const visuals = accordionComponents.visuals.map((visual, index) =>\n React.cloneElement(visual, {key: index, 'aria-hidden': true}),\n )\n\n const contextValue = useMemo(\n () => ({\n openIndex,\n setOpenIndex,\n variant,\n }),\n [openIndex, setOpenIndex, variant],\n )\n\n return (\n <RiverAccordionContext.Provider value={contextValue}>\n <div\n ref={containerRef}\n className={clsx(\n styles.RiverAccordion,\n styles[`RiverAccordion__align-${align}`],\n styles[`RiverAccordion--variant-${variant}`],\n variant === 'gridline' && gridlineStyles.gridline,\n className,\n )}\n {...rest}\n >\n <div className={styles.RiverAccordion__accordionContainer}>{items}</div>\n <div className={styles.RiverAccordion__visualsContainer}>\n <div className={styles.RiverAccordion__visualsWrapper}>{visuals}</div>\n </div>\n </div>\n </RiverAccordionContext.Provider>\n )\n },\n)\n\nexport type RiverAccordionItemProps = React.HTMLAttributes<HTMLDivElement> & {\n children: React.ReactElement<RiverAccordionHeadingProps | RiverAccordionContentProps>[]\n index?: number\n}\n\nconst RiverAccordionItem = ({className, index, children, ...props}: RiverAccordionItemProps) => {\n const {openIndex} = useRiverAccordionContext()\n const panelId = useId()\n const isOpen = index === openIndex\n const panelRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n if (panelRef.current) {\n // Workaround to avoid React 18 / 19 type mismatches with the `inert` attribute.\n // This approach won't immediately apply the attribute in pure SSR contexts, only post-hydration\n // TODO: Move back to JSX when React 19 is fully adopted in Dotcom.\n panelRef.current.toggleAttribute('inert', !isOpen)\n }\n }, [isOpen])\n\n const itemContextValue = useMemo(\n () => ({\n id: panelId,\n // Index optional for consumers, but always provided by parent\n index: index as number,\n isOpen,\n }),\n [panelId, index, isOpen],\n )\n\n const {heading, content, visual} = useMemo(() => {\n return React.Children.toArray(children).reduce<{\n heading: React.ReactElement<RiverAccordionHeadingProps> | null\n content: React.ReactElement<RiverAccordionContentProps> | null\n visual: React.ReactElement<RiverAccordionVisualProps> | null\n }>(\n (acc, child) => {\n if (isRiverAccordionHeading(child)) {\n acc.heading = child\n }\n\n if (isRiverAccordionContent(child)) {\n acc.content = child\n }\n\n if (isRiverAccordionVisual(child)) {\n acc.visual = child\n }\n\n return acc\n },\n {heading: null, content: null, visual: null},\n )\n }, [children])\n\n if (!heading || !content || !visual) {\n return null\n }\n\n return (\n <RiverAccordionItemContext.Provider value={itemContextValue}>\n <div\n className={clsx(styles.RiverAccordion__item, isOpen && styles['RiverAccordion__item--open'], className)}\n {...props}\n >\n {heading}\n <div ref={panelRef} className={styles.RiverAccordion__panel} id={panelId} aria-hidden={!isOpen}>\n {content}\n {visual}\n </div>\n </div>\n </RiverAccordionItemContext.Provider>\n )\n}\n\nexport type RiverAccordionHeadingProps = HeadingProps\n\nconst RiverAccordionHeading = ({as = 'h3', children, className, size = '6', ...props}: RiverAccordionHeadingProps) => {\n const {setOpenIndex} = useRiverAccordionContext()\n const {id, index, isOpen} = useRiverAccordionItemContext()\n\n const onClick = useCallback(() => {\n if (!isOpen) {\n setOpenIndex(index)\n }\n }, [index, isOpen, setOpenIndex])\n\n return (\n <Heading size={size} as={as} className={clsx(styles.RiverAccordion__heading, className)} {...props}>\n <button\n type=\"button\"\n className={styles.RiverAccordion__trigger}\n onClick={onClick}\n aria-disabled={isOpen}\n aria-controls={id}\n aria-expanded={isOpen}\n >\n {children}\n <span aria-hidden=\"true\" className={styles.RiverAccordion__icon}>\n {isOpen ? <TriangleUpIcon size={24} /> : <TriangleDownIcon size={24} />}\n </span>\n </button>\n </Heading>\n )\n}\n\nexport type RiverAccordionContentProps = React.HTMLAttributes<HTMLDivElement>\n\nconst RiverAccordionContent = ({className, children, ...props}: RiverAccordionContentProps) => {\n const childrenWithStyledText = useMemo(() => {\n const isLink = createComponentTypeGuard(Link)\n const isText = createComponentTypeGuard(Text)\n\n return React.Children.toArray(children).map(child => {\n if (isText(child)) {\n return React.cloneElement(child, {\n as: child.props.as ?? 'p',\n variant: child.props.variant ?? 'muted',\n size: child.props.size ?? '300',\n })\n }\n\n if (isLink(child)) {\n return React.cloneElement(child, {\n variant: child.props.variant ?? 'accent',\n })\n }\n\n return child\n })\n }, [children])\n\n return (\n <div className={clsx(styles.RiverAccordion__content, className)} {...props}>\n {childrenWithStyledText}\n </div>\n )\n}\n\nexport type RiverAccordionVisualProps = React.HTMLAttributes<HTMLDivElement>\n\nconst RiverAccordionVisual = ({className, ...props}: RiverAccordionVisualProps) => {\n const {variant} = useRiverAccordionContext()\n\n return (\n <div\n className={clsx(\n styles.RiverAccordion__visual,\n variant === 'gridline' && styles['RiverAccordion__visual--has-background'],\n className,\n )}\n {...props}\n />\n )\n}\n\nconst createComponentTypeGuard =\n <T,>(componentType: React.ComponentType<T>) =>\n (element: unknown): element is React.ReactElement<T> =>\n React.isValidElement(element) && element.type === componentType\n\nconst isRiverAccordionItem = createComponentTypeGuard(RiverAccordionItem)\nconst isRiverAccordionContent = createComponentTypeGuard(RiverAccordionContent)\nconst isRiverAccordionHeading = createComponentTypeGuard(RiverAccordionHeading)\nconst isRiverAccordionVisual = createComponentTypeGuard(RiverAccordionVisual)\n\n/**\n * Use the RiverAccordion to create collapsible content panels with associated visuals.\n * @see https://primer.style/brand/components/RiverAccordion\n */\nexport const RiverAccordion = Object.assign(RiverAccordionRoot, {\n Content: RiverAccordionContent,\n Heading: RiverAccordionHeading,\n Item: RiverAccordionItem,\n Visual: RiverAccordionVisual,\n})\n"],"mappings":";;;;;;;;;;;;;AAuBA,IAAM,IAAwB,EAAgD,KAAK,EAE7E,UAA4D;CAChE,IAAM,IAAU,EAAW,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EAAyB,EAAsB,EACzE,IAAyB,EAAyB,EAAqB,EAMhE,IAAiB,OAAO,OAAO,GAAoB;CAC9D,SAAS;CACT,SAAS;CACT,MAAM;CACN,QAAQ;CACT,CAAC"}
1
+ {"version":3,"file":"RiverAccordion.js","names":[],"sources":["../../../src/river/RiverAccordion/RiverAccordion.tsx"],"sourcesContent":["import React, {createContext, forwardRef, useCallback, useContext, useMemo, useState, useRef, useEffect} from 'react'\nimport {clsx} from 'clsx'\nimport {TriangleDownIcon, TriangleUpIcon, type Icon} from '@primer/octicons-react'\n\nimport {Heading, type HeadingProps, Link, Text} from '../..'\nimport {useProvidedRefOrCreate} from '../../hooks/useRef'\nimport {useId} from '../../hooks/useId'\n\n/**\n * Design tokens\n */\nimport '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/river/river.css'\n\n/** Main Stylesheet (as a CSS Module) */\nimport styles from './RiverAccordion.module.css'\nimport gridlineStyles from '../../component-helpers/shared.module.css'\n\ntype RiverAccordionContextType = {\n openIndex: number\n setOpenIndex: (index: number) => void\n variant: RiverAccordionVariant\n}\n\nconst RiverAccordionContext = createContext<RiverAccordionContextType | null>(null)\n\nconst useRiverAccordionContext = (): RiverAccordionContextType => {\n const context = useContext(RiverAccordionContext)\n if (context === null) {\n throw new Error('useRiverAccordionContext must be used within a RiverAccordion component')\n }\n return context\n}\n\ntype RiverAccordionItemContextType = {\n index: number\n isOpen: boolean\n id: string\n}\n\nconst RiverAccordionItemContext = createContext<RiverAccordionItemContextType | null>(null)\n\nconst useRiverAccordionItemContext = (): RiverAccordionItemContextType => {\n const context = useContext(RiverAccordionItemContext)\n if (context === null) {\n throw new Error('useRiverAccordionItemContext must be used within a RiverAccordion component')\n }\n return context\n}\n\nexport const RiverAccordionVariants = ['default', 'gridline'] as const\nexport type RiverAccordionVariant = (typeof RiverAccordionVariants)[number]\n\nexport type RiverAccordionProps = React.PropsWithChildren<{\n align?: 'start' | 'end'\n variant?: RiverAccordionVariant\n}> &\n React.HTMLAttributes<HTMLDivElement>\n\nconst RiverAccordionRoot = forwardRef<HTMLDivElement, RiverAccordionProps>(\n ({align = 'start', variant = 'default', children, className, ...rest}, forwardedRef) => {\n const containerRef = useProvidedRefOrCreate<HTMLDivElement>(forwardedRef as React.RefObject<HTMLDivElement>)\n const [openIndex, setOpenIndex] = useState(0)\n\n const accordionComponents = useMemo(() => {\n return React.Children.toArray(children).reduce<{\n items: React.ReactElement<RiverAccordionItemProps>[]\n visuals: React.ReactElement<RiverAccordionVisualProps>[]\n }>(\n (acc, child) => {\n if (!isRiverAccordionItem(child)) {\n return acc\n }\n\n const visualChild = React.Children.toArray(child.props.children).find(isRiverAccordionVisual)\n\n if (visualChild) {\n acc.items.push(child)\n acc.visuals.push(visualChild)\n }\n\n return acc\n },\n {items: [], visuals: []},\n )\n }, [children])\n\n const items = accordionComponents.items.map((item, index) => React.cloneElement(item, {key: index, index}))\n const visuals = accordionComponents.visuals.map((visual, index) =>\n React.cloneElement(visual, {key: index, 'aria-hidden': true}),\n )\n const activeItemHasBackground =\n variant === 'gridline' && (accordionComponents.visuals[openIndex]?.props.hasBackground ?? true)\n\n const contextValue = useMemo(\n () => ({\n openIndex,\n setOpenIndex,\n variant,\n }),\n [openIndex, setOpenIndex, variant],\n )\n\n return (\n <RiverAccordionContext.Provider value={contextValue}>\n <div\n ref={containerRef}\n className={clsx(\n styles.RiverAccordion,\n styles[`RiverAccordion__align-${align}`],\n styles[`RiverAccordion--variant-${variant}`],\n activeItemHasBackground && styles['RiverAccordion--active-item-has-background'],\n variant === 'gridline' && gridlineStyles.gridline,\n className,\n )}\n {...rest}\n >\n <div className={styles.RiverAccordion__accordionContainer}>{items}</div>\n <div className={styles.RiverAccordion__visualsContainer}>\n <div className={styles.RiverAccordion__visualsWrapper}>{visuals}</div>\n </div>\n </div>\n </RiverAccordionContext.Provider>\n )\n },\n)\n\nexport type RiverAccordionItemProps = React.HTMLAttributes<HTMLDivElement> & {\n children: React.ReactElement<RiverAccordionHeadingProps | RiverAccordionContentProps>[]\n index?: number\n}\n\nconst RiverAccordionItem = ({className, index, children, ...props}: RiverAccordionItemProps) => {\n const {openIndex} = useRiverAccordionContext()\n const panelId = useId()\n const isOpen = index === openIndex\n const panelRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n if (panelRef.current) {\n // Workaround to avoid React 18 / 19 type mismatches with the `inert` attribute.\n // This approach won't immediately apply the attribute in pure SSR contexts, only post-hydration\n // TODO: Move back to JSX when React 19 is fully adopted in Dotcom.\n panelRef.current.toggleAttribute('inert', !isOpen)\n }\n }, [isOpen])\n\n const itemContextValue = useMemo(\n () => ({\n id: panelId,\n // Index optional for consumers, but always provided by parent\n index: index as number,\n isOpen,\n }),\n [panelId, index, isOpen],\n )\n\n const {heading, content, visual} = useMemo(() => {\n return React.Children.toArray(children).reduce<{\n heading: React.ReactElement<RiverAccordionHeadingProps> | null\n content: React.ReactElement<RiverAccordionContentProps> | null\n visual: React.ReactElement<RiverAccordionVisualProps> | null\n }>(\n (acc, child) => {\n if (isRiverAccordionHeading(child)) {\n acc.heading = child\n }\n\n if (isRiverAccordionContent(child)) {\n acc.content = child\n }\n\n if (isRiverAccordionVisual(child)) {\n acc.visual = child\n }\n\n return acc\n },\n {heading: null, content: null, visual: null},\n )\n }, [children])\n\n if (!heading || !content || !visual) {\n return null\n }\n\n return (\n <RiverAccordionItemContext.Provider value={itemContextValue}>\n <div\n className={clsx(styles.RiverAccordion__item, isOpen && styles['RiverAccordion__item--open'], className)}\n {...props}\n >\n {heading}\n <div ref={panelRef} className={styles.RiverAccordion__panel} id={panelId} aria-hidden={!isOpen}>\n {content}\n {visual}\n </div>\n </div>\n </RiverAccordionItemContext.Provider>\n )\n}\n\nexport type RiverAccordionHeadingProps = HeadingProps & {\n leadingVisual?: React.ReactElement | Icon\n}\n\nconst RiverAccordionHeading = ({\n as = 'h3',\n children,\n className,\n leadingVisual: LeadingVisual,\n size = '6',\n ...props\n}: RiverAccordionHeadingProps) => {\n const {setOpenIndex} = useRiverAccordionContext()\n const {id, index, isOpen} = useRiverAccordionItemContext()\n\n const onClick = useCallback(() => {\n if (!isOpen) {\n setOpenIndex(index)\n }\n }, [index, isOpen, setOpenIndex])\n\n return (\n <Heading size={size} as={as} className={clsx(styles.RiverAccordion__heading, className)} {...props}>\n <button\n type=\"button\"\n className={clsx(\n styles.RiverAccordion__trigger,\n LeadingVisual && styles['RiverAccordion__trigger--has-leading-visual'],\n )}\n onClick={onClick}\n aria-disabled={isOpen}\n aria-controls={id}\n aria-expanded={isOpen}\n >\n {LeadingVisual && (\n <span aria-hidden=\"true\" className={styles.RiverAccordion__leadingVisual}>\n {typeof LeadingVisual === 'function' ? <LeadingVisual /> : LeadingVisual}\n </span>\n )}\n {LeadingVisual ? <span className={styles.RiverAccordion__headingText}>{children}</span> : children}\n <span aria-hidden=\"true\" className={styles.RiverAccordion__icon}>\n {isOpen ? <TriangleUpIcon size={24} /> : <TriangleDownIcon size={24} />}\n </span>\n </button>\n </Heading>\n )\n}\n\nexport type RiverAccordionContentProps = React.HTMLAttributes<HTMLDivElement>\n\nconst RiverAccordionContent = ({className, children, ...props}: RiverAccordionContentProps) => {\n const childrenWithStyledText = useMemo(() => {\n const isLink = createComponentTypeGuard(Link)\n const isText = createComponentTypeGuard(Text)\n\n return React.Children.toArray(children).map(child => {\n if (isText(child)) {\n return React.cloneElement(child, {\n as: child.props.as ?? 'p',\n variant: child.props.variant ?? 'muted',\n size: child.props.size ?? '300',\n })\n }\n\n if (isLink(child)) {\n return React.cloneElement(child, {\n variant: child.props.variant ?? 'accent',\n })\n }\n\n return child\n })\n }, [children])\n\n return (\n <div className={clsx(styles.RiverAccordion__content, className)} {...props}>\n {childrenWithStyledText}\n </div>\n )\n}\n\nexport type RiverAccordionVisualProps = React.HTMLAttributes<HTMLDivElement> & {\n /**\n * Displays a padded background when the parent RiverAccordion uses the gridline variant.\n * @default true\n */\n hasBackground?: boolean\n}\n\nconst RiverAccordionVisual = ({className, hasBackground = true, ...props}: RiverAccordionVisualProps) => {\n const {variant} = useRiverAccordionContext()\n\n return (\n <div\n className={clsx(\n styles.RiverAccordion__visual,\n variant === 'gridline' && hasBackground && styles['RiverAccordion__visual--has-background'],\n className,\n )}\n {...props}\n />\n )\n}\n\nconst createComponentTypeGuard =\n <T,>(componentType: React.ComponentType<T>) =>\n (element: unknown): element is React.ReactElement<T> =>\n React.isValidElement(element) && element.type === componentType\n\nconst isRiverAccordionItem = createComponentTypeGuard(RiverAccordionItem)\nconst isRiverAccordionContent = createComponentTypeGuard(RiverAccordionContent)\nconst isRiverAccordionHeading = createComponentTypeGuard(RiverAccordionHeading)\nconst isRiverAccordionVisual = createComponentTypeGuard(RiverAccordionVisual)\n\n/**\n * Use the RiverAccordion to create collapsible content panels with associated visuals.\n * @see https://primer.style/brand/components/RiverAccordion\n */\nexport const RiverAccordion = Object.assign(RiverAccordionRoot, {\n Content: RiverAccordionContent,\n Heading: RiverAccordionHeading,\n Item: RiverAccordionItem,\n Visual: RiverAccordionVisual,\n})\n"],"mappings":";;;;;;;;;;;;;AAuBA,IAAM,IAAwB,EAAgD,KAAK,EAE7E,UAA4D;CAChE,IAAM,IAAU,EAAW,EAAsB;AACjD,KAAI,MAAY,KACd,OAAU,MAAM,0EAA0E;AAE5F,QAAO;GASH,IAA4B,EAAoD,KAAK,EAErF,UAAoE;CACxE,IAAM,IAAU,EAAW,EAA0B;AACrD,KAAI,MAAY,KACd,OAAU,MAAM,8EAA8E;AAEhG,QAAO;GAGI,IAAyB,CAAC,WAAW,WAAW,EASvD,IAAqB,GACxB,EAAC,WAAQ,SAAS,aAAU,WAAW,aAAU,cAAW,GAAG,KAAO,MAAiB;CACtF,IAAM,IAAe,EAAuC,EAAgD,EACtG,CAAC,GAAW,KAAgB,EAAS,EAAE,EAEvC,IAAsB,QACnB,EAAM,SAAS,QAAQ,EAAS,CAAC,QAIrC,GAAK,MAAU;AACd,MAAI,CAAC,EAAqB,EAAM,CAC9B,QAAO;EAGT,IAAM,IAAc,EAA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-module__RiverAccordion___cECsB{grid-gap:0;grid-template:"visual""accordion"/1fr;gap:0;display:grid;position:relative}@media screen and (width>=63.25rem){.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB{--gap-width:var(--brand-Grid-spacing-column-gap);--column-and-gap-width:calc((100% + var(--gap-width)) / 12);--4-grid-columns:calc(4 * var(--column-and-gap-width));--7-grid-columns-minus-last-gap:calc((7 * var(--column-and-gap-width)) - var(--gap-width));gap:var(--column-and-gap-width);grid-template-rows:auto}.Primer_Brand__RiverAccordion-module__RiverAccordion__align-start___wbXB3{grid-template-columns:var(--4-grid-columns) var(--7-grid-columns-minus-last-gap);grid-template-areas:"accordion visual"}.Primer_Brand__RiverAccordion-module__RiverAccordion__align-end___Zq4qJ{grid-template-columns:var(--7-grid-columns-minus-last-gap) var(--4-grid-columns);grid-template-areas:"visual accordion"}}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4{padding-inline:var(--brand-RiverAccordion-variant-gridline-spacing-outerInline);padding-block:var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock);position:relative}@media screen and (width>=63.25rem){.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4{--gap-width:var(--brand-RiverAccordion-variant-gridline-spacing-contentGap);--half-column:calc(50% - var(--gap-width) / 2);gap:var(--gap-width);align-items:center}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4.Primer_Brand__RiverAccordion-module__RiverAccordion__align-start___wbXB3{grid-template-columns:var(--half-column) var(--half-column);grid-template-areas:"accordion visual"}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4.Primer_Brand__RiverAccordion-module__RiverAccordion__align-end___Zq4qJ{grid-template-columns:var(--half-column) var(--half-column);grid-template-areas:"visual accordion"}}@media (width>=80rem){.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4{border-inline:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted)}}.Primer_Brand__RiverAccordion-module__RiverAccordion--active-item-has-background___z_IlG .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx{margin-inline:calc(-1 * var(--brand-RiverAccordion-variant-gridline-spacing-outerInline));margin-block-start:calc(-1 * var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock))}@media screen and (width>=48rem) and (width<=63.24rem){.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB{max-width:618px;margin-inline:auto}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4{border-inline:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted)}}.Primer_Brand__RiverAccordion-module__RiverAccordion--active-item-has-background___z_IlG .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6{border-radius:0}.Primer_Brand__RiverAccordion-module__RiverAccordion__accordionContainer___a80ds{grid-area:accordion}.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx{grid-area:visual}.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6{border-radius:var(--base-size-6);grid-template-columns:subgrid;grid-template-rows:subgrid;width:100%;display:grid;overflow:hidden}.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob{opacity:0;width:100%;height:100%;transition:opacity var(--brand-animation-duration-default) var(--brand-animation-easing-default), scale var(--brand-animation-duration-default) var(--brand-animation-easing-default);grid-area:1/1;align-items:center;display:flex;scale:1.05}.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob>*{border-radius:var(--base-size-6);-o-object-fit:contain;object-fit:contain;width:100%;height:auto;display:block;overflow:hidden}.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob img,.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob picture,.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob video{border-radius:var(--base-size-6);-o-object-fit:contain;object-fit:contain;width:100%;height:auto;display:block}.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob>* img,.Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob>* video{border-radius:var(--base-size-6);-o-object-fit:cover;object-fit:cover;width:100%;height:auto;display:block}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB{padding:var(--base-size-32);background:var(--brand-RiverAccordion-visual-background,var(--brand-color-canvas-subtle));justify-content:center;align-items:center;display:flex}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB>*{border-radius:var(--base-size-6);justify-content:center;align-items:center;max-width:100%;height:auto;display:flex}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB img,.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB picture,.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB video{border-radius:var(--base-size-6);max-width:100%;height:auto}@media screen and (width>=63.25rem){.Primer_Brand__RiverAccordion-module__RiverAccordion--active-item-has-background___z_IlG{grid-template-columns:1fr 1fr;align-items:stretch;gap:0;padding:0}.Primer_Brand__RiverAccordion-module__RiverAccordion--active-item-has-background___z_IlG .Primer_Brand__RiverAccordion-module__RiverAccordion__accordionContainer___a80ds{padding:var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock) var(--brand-RiverAccordion-variant-gridline-spacing-outerInline);flex-direction:column;justify-content:center;display:flex}.Primer_Brand__RiverAccordion-module__RiverAccordion__align-start___wbXB3.Primer_Brand__RiverAccordion-module__RiverAccordion--active-item-has-background___z_IlG .Primer_Brand__RiverAccordion-module__RiverAccordion__accordionContainer___a80ds{padding-inline-end:var(--brand-RiverAccordion-variant-gridline-spacing-contentGap)}.Primer_Brand__RiverAccordion-module__RiverAccordion__align-end___Zq4qJ.Primer_Brand__RiverAccordion-module__RiverAccordion--active-item-has-background___z_IlG .Primer_Brand__RiverAccordion-module__RiverAccordion__accordionContainer___a80ds{padding-inline-start:var(--brand-RiverAccordion-variant-gridline-spacing-contentGap)}.Primer_Brand__RiverAccordion-module__RiverAccordion--active-item-has-background___z_IlG .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx{margin:0}.Primer_Brand__RiverAccordion-module__RiverAccordion--active-item-has-background___z_IlG .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6{height:100%}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB{padding:var(--base-size-64);justify-content:center;align-items:center}.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB>*,.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB img,.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB picture,.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6>.Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB video{border-radius:var(--base-size-6)}}:is(.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:first-child) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:first-child,.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(2)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(2),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(3)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(3),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(4)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(4),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(5)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(5),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(6)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(6),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(7)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(7),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(8)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(8),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(9)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(9),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2:nth-child(10)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:nth-child(10),.Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB:not(:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2)) .Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob:first-child){opacity:1;z-index:1;scale:1}.Primer_Brand__RiverAccordion-module__RiverAccordion__accordionContainer___a80ds .Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob{clip:rect(0, 0, 0, 0);word-wrap:normal;border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.Primer_Brand__RiverAccordion-module__RiverAccordion__item___SheMX{border-bottom:var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);padding-block-start:var(--base-size-32);position:relative}@media screen and (width<=63.24rem){.Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4 .Primer_Brand__RiverAccordion-module__RiverAccordion__item___SheMX:last-child{border-bottom:none}}.Primer_Brand__RiverAccordion-module__RiverAccordion__item___SheMX:not(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2) .Primer_Brand__RiverAccordion-module__RiverAccordion__heading___O56M6{color:var(--brand-color-text-muted)}.Primer_Brand__RiverAccordion-module__RiverAccordion__trigger___1RM50{color:inherit;cursor:pointer;font:inherit;text-align:left;width:100%;padding:0;padding:var(--base-size-4);margin:0;margin:calc(var(--base-size-4) * -1);background:0 0;border:none;justify-content:space-between;align-items:center;display:flex}.Primer_Brand__RiverAccordion-module__RiverAccordion__trigger--has-leading-visual___NFSnt{gap:var(--base-size-20);justify-content:flex-start}.Primer_Brand__RiverAccordion-module__RiverAccordion__leadingVisual___TZ5da{height:var(--base-size-20);width:var(--base-size-20);flex-shrink:0;justify-content:center;align-items:center;display:flex}.Primer_Brand__RiverAccordion-module__RiverAccordion__leadingVisual___TZ5da>*{width:100%;height:100%}.Primer_Brand__RiverAccordion-module__RiverAccordion__headingText___VHHmp{flex:1;min-width:0}.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2 .Primer_Brand__RiverAccordion-module__RiverAccordion__trigger___1RM50{cursor:auto;cursor:initial}.Primer_Brand__RiverAccordion-module__RiverAccordion__item___SheMX:not(.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2) .Primer_Brand__RiverAccordion-module__RiverAccordion__trigger___1RM50:after{content:"";width:100%;height:100%;display:block;position:absolute}.Primer_Brand__RiverAccordion-module__RiverAccordion__panel___Y4GUN{transition:grid-template-rows var(--brand-animation-duration-default) var(--brand-animation-easing-default), margin-block-start var(--brand-animation-duration-default) var(--brand-animation-easing-default), padding-block-end var(--brand-animation-duration-default) var(--brand-animation-easing-default);grid-template-rows:0fr;margin-block-start:var(--base-size-32);display:grid;overflow-y:clip}.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2 .Primer_Brand__RiverAccordion-module__RiverAccordion__panel___Y4GUN{grid-template-rows:1fr;margin-block-start:var(--base-size-12);padding-block-end:var(--base-size-32)}.Primer_Brand__RiverAccordion-module__RiverAccordion__content___87sh8{align-items:flex-start;gap:var(--base-size-20);flex-direction:column;min-height:0;display:flex}.Primer_Brand__RiverAccordion-module__RiverAccordion__item___SheMX:has(.Primer_Brand__RiverAccordion-module__RiverAccordion__leadingVisual___TZ5da) .Primer_Brand__RiverAccordion-module__RiverAccordion__content___87sh8{padding-inline-start:calc(var(--base-size-20) + var(--base-size-20))}.Primer_Brand__RiverAccordion-module__RiverAccordion__icon___FMAZH{color:var(--brand-color-text-muted);flex-shrink:0;align-items:center;display:flex}.Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2 .Primer_Brand__RiverAccordion-module__RiverAccordion__icon___FMAZH{color:var(--brand-color-text-default)}
@@ -1,17 +1,21 @@
1
- import './RiverAccordion.module-BTU_metB.css';var e = {
1
+ import './RiverAccordion.module-Cr6Q-qkm.css';var e = {
2
2
  RiverAccordion: "Primer_Brand__RiverAccordion-module__RiverAccordion___cECsB",
3
3
  "RiverAccordion__align-start": "Primer_Brand__RiverAccordion-module__RiverAccordion__align-start___wbXB3",
4
4
  "RiverAccordion__align-end": "Primer_Brand__RiverAccordion-module__RiverAccordion__align-end___Zq4qJ",
5
5
  "RiverAccordion--variant-gridline": "Primer_Brand__RiverAccordion-module__RiverAccordion--variant-gridline___1SmA4",
6
- RiverAccordion__visualsWrapper: "Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6",
7
- "RiverAccordion__visual--has-background": "Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB",
6
+ "RiverAccordion--active-item-has-background": "Primer_Brand__RiverAccordion-module__RiverAccordion--active-item-has-background___z_IlG",
8
7
  RiverAccordion__visualsContainer: "Primer_Brand__RiverAccordion-module__RiverAccordion__visualsContainer___IvQlx",
8
+ RiverAccordion__visualsWrapper: "Primer_Brand__RiverAccordion-module__RiverAccordion__visualsWrapper___Z8Yr6",
9
9
  RiverAccordion__accordionContainer: "Primer_Brand__RiverAccordion-module__RiverAccordion__accordionContainer___a80ds",
10
10
  RiverAccordion__visual: "Primer_Brand__RiverAccordion-module__RiverAccordion__visual___aIsob",
11
+ "RiverAccordion__visual--has-background": "Primer_Brand__RiverAccordion-module__RiverAccordion__visual--has-background___JQ9GB",
11
12
  "RiverAccordion__item--open": "Primer_Brand__RiverAccordion-module__RiverAccordion__item--open___YH6K2",
12
13
  RiverAccordion__item: "Primer_Brand__RiverAccordion-module__RiverAccordion__item___SheMX",
13
14
  RiverAccordion__heading: "Primer_Brand__RiverAccordion-module__RiverAccordion__heading___O56M6",
14
15
  RiverAccordion__trigger: "Primer_Brand__RiverAccordion-module__RiverAccordion__trigger___1RM50",
16
+ "RiverAccordion__trigger--has-leading-visual": "Primer_Brand__RiverAccordion-module__RiverAccordion__trigger--has-leading-visual___NFSnt",
17
+ RiverAccordion__leadingVisual: "Primer_Brand__RiverAccordion-module__RiverAccordion__leadingVisual___TZ5da",
18
+ RiverAccordion__headingText: "Primer_Brand__RiverAccordion-module__RiverAccordion__headingText___VHHmp",
15
19
  RiverAccordion__panel: "Primer_Brand__RiverAccordion-module__RiverAccordion__panel___Y4GUN",
16
20
  RiverAccordion__content: "Primer_Brand__RiverAccordion-module__RiverAccordion__content___87sh8",
17
21
  RiverAccordion__icon: "Primer_Brand__RiverAccordion-module__RiverAccordion__icon___FMAZH"
@@ -1 +1 @@
1
- {"version":3,"file":"RiverAccordion.module.js","names":[],"sources":["../../../src/river/RiverAccordion/RiverAccordion.module.css"],"sourcesContent":[".RiverAccordion {\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: auto auto;\n grid-template-areas:\n 'visual'\n 'accordion';\n gap: 0;\n position: relative;\n}\n\n@media screen and (min-width: 63.25rem) {\n .RiverAccordion {\n --gap-width: var(--brand-Grid-spacing-column-gap);\n --column-and-gap-width: calc((100% + var(--gap-width)) / 12);\n\n --4-grid-columns: calc(4 * var(--column-and-gap-width));\n --7-grid-columns-minus-last-gap: calc((7 * var(--column-and-gap-width)) - var(--gap-width));\n\n grid-template-rows: auto;\n gap: var(--column-and-gap-width);\n }\n\n .RiverAccordion__align-start {\n grid-template-columns: var(--4-grid-columns) var(--7-grid-columns-minus-last-gap);\n grid-template-areas: 'accordion visual';\n }\n\n .RiverAccordion__align-end {\n grid-template-columns: var(--7-grid-columns-minus-last-gap) var(--4-grid-columns);\n grid-template-areas: 'visual accordion';\n }\n}\n\n/* Gridline variant */\n\n.RiverAccordion--variant-gridline {\n position: relative;\n padding-inline: var(--brand-RiverAccordion-variant-gridline-spacing-outerInline);\n padding-block: var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock);\n}\n\n@media screen and (min-width: 63.25rem) {\n .RiverAccordion--variant-gridline {\n --gap-width: var(--brand-RiverAccordion-variant-gridline-spacing-contentGap);\n --half-column: calc(50% - var(--gap-width) / 2);\n\n gap: var(--gap-width);\n align-items: center;\n }\n\n .RiverAccordion--variant-gridline.RiverAccordion__align-start {\n grid-template-columns: var(--half-column) var(--half-column);\n grid-template-areas: 'accordion visual';\n }\n\n .RiverAccordion--variant-gridline.RiverAccordion__align-end {\n grid-template-columns: var(--half-column) var(--half-column);\n grid-template-areas: 'visual accordion';\n }\n}\n\n@media (min-width: 80rem) {\n .RiverAccordion--variant-gridline {\n border-inline: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper {\n border-radius: var(--brand-borderRadius-medium);\n}\n\n.RiverAccordion--variant-gridline:has(.RiverAccordion__visual--has-background) .RiverAccordion__visualsContainer {\n margin-inline: calc(-1 * var(--brand-RiverAccordion-variant-gridline-spacing-outerInline));\n margin-block-start: calc(-1 * var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock));\n}\n\n@media screen and (min-width: 48rem) and (max-width: 63.24rem) {\n .RiverAccordion {\n max-width: 618px;\n margin-inline: auto;\n }\n\n .RiverAccordion--variant-gridline {\n border-inline: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper:has(.RiverAccordion__visual--has-background) {\n border-radius: 0;\n}\n\n.RiverAccordion__accordionContainer {\n grid-area: accordion;\n}\n\n.RiverAccordion__visualsContainer {\n grid-area: visual;\n}\n\n.RiverAccordion__visualsWrapper {\n width: 100%;\n overflow: hidden;\n border-radius: var(--brand-borderRadius-xlarge);\n display: grid;\n grid-template-columns: subgrid;\n grid-template-rows: subgrid;\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual {\n grid-column: 1;\n grid-row: 1;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n opacity: 0;\n scale: 1.05;\n transition: opacity var(--brand-animation-duration-default) var(--brand-animation-easing-default),\n scale var(--brand-animation-duration-default) var(--brand-animation-easing-default);\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual > * {\n display: block;\n width: 100%;\n height: auto;\n overflow: hidden;\n border-radius: var(--brand-borderRadius-xlarge);\n object-fit: contain;\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual > * {\n border-radius: var(--brand-borderRadius-medium);\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual img,\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual picture,\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual video {\n display: block;\n width: 100%;\n height: auto;\n border-radius: inherit;\n object-fit: contain;\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual > * img,\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual > * video {\n display: block;\n width: 100%;\n height: 100%;\n border-radius: inherit;\n object-fit: cover;\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--base-size-32);\n background: var(--brand-RiverAccordion-visual-background, var(--brand-color-canvas-subtle));\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background > * {\n display: flex;\n align-items: center;\n justify-content: center;\n max-width: 100%;\n height: auto;\n border-radius: var(--brand-borderRadius-large);\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background img,\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background picture,\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background video {\n max-width: 100%;\n height: 100%;\n border-radius: var(--brand-borderRadius-large);\n}\n\n@media screen and (min-width: 63.25rem) {\n .RiverAccordion--variant-gridline:has(.RiverAccordion__visual--has-background) {\n padding: 0;\n gap: 0;\n align-items: stretch;\n grid-template-columns: 1fr 1fr;\n }\n\n .RiverAccordion--variant-gridline:has(.RiverAccordion__visual--has-background) .RiverAccordion__accordionContainer {\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock)\n var(--brand-RiverAccordion-variant-gridline-spacing-outerInline);\n }\n\n .RiverAccordion--variant-gridline.RiverAccordion__align-start:has(.RiverAccordion__visual--has-background)\n .RiverAccordion__accordionContainer {\n padding-inline-end: var(--brand-RiverAccordion-variant-gridline-spacing-contentGap);\n }\n\n .RiverAccordion--variant-gridline.RiverAccordion__align-end:has(.RiverAccordion__visual--has-background)\n .RiverAccordion__accordionContainer {\n padding-inline-start: var(--brand-RiverAccordion-variant-gridline-spacing-contentGap);\n }\n\n .RiverAccordion--variant-gridline:has(.RiverAccordion__visual--has-background) .RiverAccordion__visualsContainer {\n margin: 0;\n }\n\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper:has(.RiverAccordion__visual--has-background) {\n height: 100%;\n }\n\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background {\n align-items: center;\n justify-content: center;\n padding: var(--base-size-64);\n }\n\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background > *,\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background img,\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background picture,\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background video {\n border-radius: var(--brand-borderRadius-large);\n }\n}\n\n/* Show the visual when the corresponding accordion item is open */\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(1)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(1),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(2)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(2),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(3)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(3),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(4)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(4),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(5)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(5),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(6)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(6),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(7)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(7),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(8)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(8),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(9)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(9),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(10)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(10),\n/* Just in case all accordions are somehow closed, show the first visual */\n.RiverAccordion:not(:has(.RiverAccordion__item--open)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(1) {\n opacity: 1;\n scale: 1;\n z-index: 1;\n}\n\n/* Visually hide visuals inside the accordion */\n.RiverAccordion__accordionContainer .RiverAccordion__visual {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n word-wrap: normal;\n border: 0;\n}\n\n.RiverAccordion__item {\n position: relative;\n padding-block-start: var(--base-size-32);\n border-bottom: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n}\n\n@media screen and (max-width: 63.24rem) {\n .RiverAccordion--variant-gridline .RiverAccordion__item:last-child {\n border-bottom: none;\n }\n}\n\n.RiverAccordion__item:not(.RiverAccordion__item--open) .RiverAccordion__heading {\n color: var(--brand-color-text-muted);\n}\n\n.RiverAccordion__trigger {\n background: none;\n border: none;\n color: inherit;\n cursor: pointer;\n font: inherit;\n margin: 0;\n padding: 0;\n text-align: left;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: var(--base-size-4);\n margin: calc(var(--base-size-4) * -1);\n}\n\n.RiverAccordion__item--open .RiverAccordion__trigger {\n cursor: initial;\n}\n\n.RiverAccordion__item:not(.RiverAccordion__item--open) .RiverAccordion__trigger::after {\n content: '';\n position: absolute;\n display: block;\n width: 100%;\n height: 100%;\n}\n\n.RiverAccordion__panel {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows var(--brand-animation-duration-default) var(--brand-animation-easing-default),\n margin-block-start var(--brand-animation-duration-default) var(--brand-animation-easing-default),\n padding-block-end var(--brand-animation-duration-default) var(--brand-animation-easing-default);\n margin-block-start: var(--base-size-32);\n overflow-y: clip;\n}\n\n.RiverAccordion__item--open .RiverAccordion__panel {\n margin-block-start: var(--base-size-12);\n padding-block-end: var(--base-size-32);\n grid-template-rows: 1fr;\n}\n\n.RiverAccordion__content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n min-height: 0;\n gap: var(--base-size-20);\n}\n\n.RiverAccordion__icon {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n color: var(--brand-color-text-muted);\n}\n\n.RiverAccordion__item--open .RiverAccordion__icon {\n color: var(--brand-color-text-default);\n}\n"],"mappings":""}
1
+ {"version":3,"file":"RiverAccordion.module.js","names":[],"sources":["../../../src/river/RiverAccordion/RiverAccordion.module.css"],"sourcesContent":[".RiverAccordion {\n display: grid;\n grid-template-columns: 1fr;\n grid-template-rows: auto auto;\n grid-template-areas:\n 'visual'\n 'accordion';\n gap: 0;\n position: relative;\n}\n\n@media screen and (min-width: 63.25rem) {\n .RiverAccordion {\n --gap-width: var(--brand-Grid-spacing-column-gap);\n --column-and-gap-width: calc((100% + var(--gap-width)) / 12);\n\n --4-grid-columns: calc(4 * var(--column-and-gap-width));\n --7-grid-columns-minus-last-gap: calc((7 * var(--column-and-gap-width)) - var(--gap-width));\n\n grid-template-rows: auto;\n gap: var(--column-and-gap-width);\n }\n\n .RiverAccordion__align-start {\n grid-template-columns: var(--4-grid-columns) var(--7-grid-columns-minus-last-gap);\n grid-template-areas: 'accordion visual';\n }\n\n .RiverAccordion__align-end {\n grid-template-columns: var(--7-grid-columns-minus-last-gap) var(--4-grid-columns);\n grid-template-areas: 'visual accordion';\n }\n}\n\n/* Gridline variant */\n\n.RiverAccordion--variant-gridline {\n position: relative;\n padding-inline: var(--brand-RiverAccordion-variant-gridline-spacing-outerInline);\n padding-block: var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock);\n}\n\n@media screen and (min-width: 63.25rem) {\n .RiverAccordion--variant-gridline {\n --gap-width: var(--brand-RiverAccordion-variant-gridline-spacing-contentGap);\n --half-column: calc(50% - var(--gap-width) / 2);\n\n gap: var(--gap-width);\n align-items: center;\n }\n\n .RiverAccordion--variant-gridline.RiverAccordion__align-start {\n grid-template-columns: var(--half-column) var(--half-column);\n grid-template-areas: 'accordion visual';\n }\n\n .RiverAccordion--variant-gridline.RiverAccordion__align-end {\n grid-template-columns: var(--half-column) var(--half-column);\n grid-template-areas: 'visual accordion';\n }\n}\n\n@media (min-width: 80rem) {\n .RiverAccordion--variant-gridline {\n border-inline: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n}\n\n.RiverAccordion--active-item-has-background .RiverAccordion__visualsContainer {\n margin-inline: calc(-1 * var(--brand-RiverAccordion-variant-gridline-spacing-outerInline));\n margin-block-start: calc(-1 * var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock));\n}\n\n@media screen and (min-width: 48rem) and (max-width: 63.24rem) {\n .RiverAccordion {\n max-width: 618px;\n margin-inline: auto;\n }\n\n .RiverAccordion--variant-gridline {\n border-inline: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n }\n}\n\n.RiverAccordion--active-item-has-background .RiverAccordion__visualsWrapper {\n border-radius: 0;\n}\n\n.RiverAccordion__accordionContainer {\n grid-area: accordion;\n}\n\n.RiverAccordion__visualsContainer {\n grid-area: visual;\n}\n\n.RiverAccordion__visualsWrapper {\n width: 100%;\n overflow: hidden;\n border-radius: var(--base-size-6);\n display: grid;\n grid-template-columns: subgrid;\n grid-template-rows: subgrid;\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual {\n grid-column: 1;\n grid-row: 1;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n opacity: 0;\n scale: 1.05;\n transition: opacity var(--brand-animation-duration-default) var(--brand-animation-easing-default),\n scale var(--brand-animation-duration-default) var(--brand-animation-easing-default);\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual > * {\n display: block;\n width: 100%;\n height: auto;\n overflow: hidden;\n border-radius: var(--base-size-6);\n object-fit: contain;\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual img,\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual picture,\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual video {\n display: block;\n width: 100%;\n height: auto;\n border-radius: var(--base-size-6);\n object-fit: contain;\n}\n\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual > * img,\n.RiverAccordion__visualsWrapper > .RiverAccordion__visual > * video {\n display: block;\n width: 100%;\n height: auto;\n border-radius: var(--base-size-6);\n object-fit: cover;\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: var(--base-size-32);\n background: var(--brand-RiverAccordion-visual-background, var(--brand-color-canvas-subtle));\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background > * {\n display: flex;\n align-items: center;\n justify-content: center;\n max-width: 100%;\n height: auto;\n border-radius: var(--base-size-6);\n}\n\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background img,\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background picture,\n.RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background video {\n max-width: 100%;\n height: auto;\n border-radius: var(--base-size-6);\n}\n\n@media screen and (min-width: 63.25rem) {\n .RiverAccordion--active-item-has-background {\n padding: 0;\n gap: 0;\n align-items: stretch;\n grid-template-columns: 1fr 1fr;\n }\n\n .RiverAccordion--active-item-has-background .RiverAccordion__accordionContainer {\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: var(--brand-RiverAccordion-variant-gridline-spacing-outerBlock)\n var(--brand-RiverAccordion-variant-gridline-spacing-outerInline);\n }\n\n .RiverAccordion__align-start.RiverAccordion--active-item-has-background .RiverAccordion__accordionContainer {\n padding-inline-end: var(--brand-RiverAccordion-variant-gridline-spacing-contentGap);\n }\n\n .RiverAccordion__align-end.RiverAccordion--active-item-has-background .RiverAccordion__accordionContainer {\n padding-inline-start: var(--brand-RiverAccordion-variant-gridline-spacing-contentGap);\n }\n\n .RiverAccordion--active-item-has-background .RiverAccordion__visualsContainer {\n margin: 0;\n }\n\n .RiverAccordion--active-item-has-background .RiverAccordion__visualsWrapper {\n height: 100%;\n }\n\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background {\n align-items: center;\n justify-content: center;\n padding: var(--base-size-64);\n }\n\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background > *,\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background img,\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background picture,\n .RiverAccordion--variant-gridline .RiverAccordion__visualsWrapper > .RiverAccordion__visual--has-background video {\n border-radius: var(--base-size-6);\n }\n}\n\n/* Show the visual when the corresponding accordion item is open */\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(1)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(1),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(2)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(2),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(3)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(3),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(4)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(4),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(5)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(5),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(6)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(6),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(7)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(7),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(8)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(8),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(9)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(9),\n.RiverAccordion:has(.RiverAccordion__item--open:nth-child(10)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(10),\n/* Just in case all accordions are somehow closed, show the first visual */\n.RiverAccordion:not(:has(.RiverAccordion__item--open)) .RiverAccordion__visualsContainer .RiverAccordion__visual:nth-child(1) {\n opacity: 1;\n scale: 1;\n z-index: 1;\n}\n\n/* Visually hide visuals inside the accordion */\n.RiverAccordion__accordionContainer .RiverAccordion__visual {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n word-wrap: normal;\n border: 0;\n}\n\n.RiverAccordion__item {\n position: relative;\n padding-block-start: var(--base-size-32);\n border-bottom: var(--brand-borderWidth-thin) solid var(--brand-color-border-muted);\n}\n\n@media screen and (max-width: 63.24rem) {\n .RiverAccordion--variant-gridline .RiverAccordion__item:last-child {\n border-bottom: none;\n }\n}\n\n.RiverAccordion__item:not(.RiverAccordion__item--open) .RiverAccordion__heading {\n color: var(--brand-color-text-muted);\n}\n\n.RiverAccordion__trigger {\n background: none;\n border: none;\n color: inherit;\n cursor: pointer;\n font: inherit;\n margin: 0;\n padding: 0;\n text-align: left;\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: var(--base-size-4);\n margin: calc(var(--base-size-4) * -1);\n}\n\n.RiverAccordion__trigger--has-leading-visual {\n gap: var(--base-size-20);\n justify-content: flex-start;\n}\n\n.RiverAccordion__leadingVisual {\n align-items: center;\n display: flex;\n flex-shrink: 0;\n height: var(--base-size-20);\n justify-content: center;\n width: var(--base-size-20);\n}\n\n.RiverAccordion__leadingVisual > * {\n height: 100%;\n width: 100%;\n}\n\n.RiverAccordion__headingText {\n flex: 1;\n min-width: 0;\n}\n\n.RiverAccordion__item--open .RiverAccordion__trigger {\n cursor: initial;\n}\n\n.RiverAccordion__item:not(.RiverAccordion__item--open) .RiverAccordion__trigger::after {\n content: '';\n position: absolute;\n display: block;\n width: 100%;\n height: 100%;\n}\n\n.RiverAccordion__panel {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows var(--brand-animation-duration-default) var(--brand-animation-easing-default),\n margin-block-start var(--brand-animation-duration-default) var(--brand-animation-easing-default),\n padding-block-end var(--brand-animation-duration-default) var(--brand-animation-easing-default);\n margin-block-start: var(--base-size-32);\n overflow-y: clip;\n}\n\n.RiverAccordion__item--open .RiverAccordion__panel {\n margin-block-start: var(--base-size-12);\n padding-block-end: var(--base-size-32);\n grid-template-rows: 1fr;\n}\n\n.RiverAccordion__content {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n min-height: 0;\n gap: var(--base-size-20);\n}\n\n.RiverAccordion__item:has(.RiverAccordion__leadingVisual) .RiverAccordion__content {\n padding-inline-start: calc(var(--base-size-20) + var(--base-size-20));\n}\n\n.RiverAccordion__icon {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n color: var(--brand-color-text-muted);\n}\n\n.RiverAccordion__item--open .RiverAccordion__icon {\n color: var(--brand-color-text-default);\n}\n"],"mappings":""}
@@ -3,5 +3,6 @@ import type { BaseProps } from '../../component-helpers';
3
3
  export type HeroLabelProps = Omit<TextProps, 'as' | 'ref' | 'animate'> & Omit<BaseProps<HTMLSpanElement>, 'animate'> & {
4
4
  animate?: boolean;
5
5
  animationDelay?: number;
6
+ initialText?: string;
6
7
  };
7
8
  export declare const HeroLabel: import("react").ForwardRefExoticComponent<Omit<HeroLabelProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
@@ -1,5 +1,7 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
2
  import { BaseProps } from '../component-helpers';
3
- type NavigationVisibilityObserverProps = PropsWithChildren<BaseProps<HTMLUListElement> & React.HTMLAttributes<HTMLUListElement>>;
3
+ type NavigationVisibilityObserverProps = PropsWithChildren<BaseProps<HTMLUListElement> & React.HTMLAttributes<HTMLUListElement> & {
4
+ overflowMenuLabel: string;
5
+ }>;
4
6
  export declare const NavigationVisbilityObserver: React.ForwardRefExoticComponent<Omit<NavigationVisibilityObserverProps, "ref"> & React.RefAttributes<HTMLUListElement>>;
5
7
  export {};
@@ -3,16 +3,26 @@ import React, { PropsWithChildren } from 'react';
3
3
  * Design tokens
4
4
  */
5
5
  import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes.css';
6
- export type SubdomainNavBarProps = {
6
+ export type SubdomainNavBarMenuLabels = {
7
7
  /**
8
- * Valid child elements are `SubdomainNavBar.Link`, `SubdomainNavBar.PrimaryAction`,
9
- * `SubdomainNavBar.SecondaryAction` and `SubdomainNavBar.Search`
8
+ * Visible and accessible label for the closed narrow menu control.
10
9
  */
11
- children?: React.ReactNode | React.ReactElement<SubdomainNavBarLinkProps> | React.ReactElement<SearchProps> | React.ReactElement<CTAActionProps>;
10
+ menuLabel: string;
12
11
  /**
13
- * Forward a custom HTML class attribute
12
+ * Visible and accessible label for the open narrow menu control.
14
13
  */
15
- className?: string;
14
+ closeLabel: string;
15
+ /**
16
+ * Visible and accessible label for the desktop overflow menu control.
17
+ */
18
+ overflowMenuLabel: string;
19
+ };
20
+ export type SubdomainNavBarProps = Omit<React.HTMLAttributes<HTMLElement>, 'children' | 'title'> & {
21
+ /**
22
+ * Valid child elements are `SubdomainNavBar.Link`, `SubdomainNavBar.PrimaryAction`,
23
+ * `SubdomainNavBar.SecondaryAction` and `SubdomainNavBar.Search`
24
+ */
25
+ children?: React.ReactNode | React.ReactElement<SubdomainNavBarLinkProps> | React.ReactElement<SubdomainNavBarSearchProps> | React.ReactElement<CTAActionProps>;
16
26
  /**
17
27
  * Fixes the navigation bar to the top of the viewport. Defaults to `true`.
18
28
  */
@@ -22,7 +32,15 @@ export type SubdomainNavBarProps = {
22
32
  */
23
33
  fullWidth?: boolean;
24
34
  /**
25
- * The title or name of the subdomain. Appears adjacent to the logo and is required for communicating content to assisitive technologies.
35
+ * Optional React element rendered after the navigation links.
36
+ */
37
+ leadingComponent?: React.ReactElement;
38
+ /**
39
+ * Optional React element rendered after the actions.
40
+ */
41
+ trailingComponent?: React.ReactElement;
42
+ /**
43
+ * The title or name of the subdomain. Appears adjacent to the logo and is required for communicating content to assistive technologies.
26
44
  */
27
45
  title: string;
28
46
  /**
@@ -37,41 +55,160 @@ export type SubdomainNavBarProps = {
37
55
  * When the menu is opened or closed on narrow viewports, this callback is called with the new open state.
38
56
  */
39
57
  onNarrowMenuToggle?: (isOpen: boolean) => void;
58
+ /**
59
+ * Customizable visible and accessible menu labels.
60
+ */
61
+ menuLabels?: Partial<SubdomainNavBarMenuLabels>;
62
+ /**
63
+ * ID of the element that receives focus when the skip-to-content link is activated.
64
+ * Defaults to the first rendered `main` element that is not hidden from assistive technologies.
65
+ */
66
+ skipToContentTargetId?: string;
67
+ };
68
+ export type SubdomainNavBarHandle = HTMLElement & {
69
+ openSearch: () => void;
70
+ closeSearch: () => void;
40
71
  };
41
- declare function Root({ children, className, fixed, fullWidth, logoHref, title, titleHref, onNarrowMenuToggle, ...rest }: SubdomainNavBarProps): import("react/jsx-runtime").JSX.Element;
42
72
  export type SubdomainNavBarLinkProps = {
43
73
  href: string;
44
74
  isExternal?: boolean;
45
- 'data-navitemid'?: string;
46
75
  } & React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>;
47
- declare function Link({ href, className, children, isExternal, ...rest }: PropsWithChildren<SubdomainNavBarLinkProps>): import("react/jsx-runtime").JSX.Element;
76
+ declare function Link({ href, className, children, isExternal, 'aria-current': ariaCurrent, 'aria-hidden': ariaHidden, tabIndex, ...rest }: PropsWithChildren<SubdomainNavBarLinkProps>): import("react/jsx-runtime").JSX.Element;
48
77
  export type SubdomainNavBarSearchResultProps = {
49
78
  title: string;
50
79
  description: string;
51
80
  url: string;
52
81
  date: string;
53
82
  category?: string;
83
+ group?: string;
84
+ isExternal?: boolean;
85
+ };
86
+ export type SubdomainNavBarSearchResultGroupProps = {
87
+ title: string;
88
+ results: SubdomainNavBarSearchResultProps[];
54
89
  };
55
- type HandlerEvent = MouseEvent | TouchEvent | FocusEvent;
56
- type SearchProps = {
90
+ export type SubdomainNavBarSearchResults = SubdomainNavBarSearchResultProps[] | SubdomainNavBarSearchResultGroupProps[];
91
+ export type SubdomainNavBarSearchLabels = {
92
+ /**
93
+ * Accessible label for the search input. Defaults to "Search".
94
+ */
95
+ searchLabel: string;
96
+ /**
97
+ * Visible and accessible label for the close action. Defaults to "Close".
98
+ */
99
+ closeLabel: string;
100
+ /**
101
+ * Accessible label for an untitled search result group. Defaults to "Results".
102
+ */
103
+ resultsLabel: string;
104
+ /**
105
+ * Accessible label for grouped search results without a search term. Defaults to "Search results".
106
+ */
107
+ searchResultsLabel: string;
108
+ /**
109
+ * Formats the default search placeholder and dialog label using the navigation title.
110
+ */
111
+ formatSearchWithTitle: (title: string) => string;
112
+ /**
113
+ * Formats the accessible label for the responsive search trigger.
114
+ */
115
+ formatSearchTrigger: (placeholder: string) => string;
116
+ /**
117
+ * Formats the visible heading for ungrouped search results.
118
+ */
119
+ formatResultsHeading: (searchTerm: string) => string;
120
+ /**
121
+ * Formats the accessible label for grouped search results.
122
+ */
123
+ formatResultsLabel: (searchTerm: string) => string;
124
+ /**
125
+ * Formats the search result count announcement.
126
+ */
127
+ formatSuggestions: (count: number) => string;
128
+ };
129
+ export type SubdomainNavBarSearchProps = {
57
130
  onSubmit: (e: React.FormEvent<HTMLFormElement>) => void;
58
131
  onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
59
- ref: React.RefObject<HTMLInputElement>;
60
132
  active?: boolean;
133
+ className?: string;
61
134
  title?: string;
62
- handlerFn?: (event: HandlerEvent) => void;
63
- autoComplete?: boolean;
64
- searchResults?: SubdomainNavBarSearchResultProps[];
135
+ onSearchOpen?: () => void;
136
+ onSearchClose?: () => void;
137
+ /**
138
+ * Placeholder text shown in the search trigger and the opened search input.
139
+ */
140
+ placeholder?: string;
141
+ /**
142
+ * Optional keyboard shortcut hint shown in the search trigger. Pass an empty string to hide it.
143
+ */
144
+ shortcutLabel?: string;
145
+ /**
146
+ * Optional global keyboard shortcut that opens the search dialog. Omit or pass `false` to disable it.
147
+ * Supports single keys and modifier combinations, such as `/` or `Command+Option+k`.
148
+ */
149
+ keyboardShortcut?: string | false;
150
+ searchResults?: SubdomainNavBarSearchResults;
65
151
  searchTerm?: string;
152
+ /**
153
+ * Customizable visible and accessible search text. Unspecified labels use the English defaults.
154
+ */
155
+ labels?: Partial<SubdomainNavBarSearchLabels>;
66
156
  };
67
157
  type CTAActionProps = {
68
158
  href: string;
69
159
  } & React.HTMLAttributes<HTMLAnchorElement>;
70
160
  declare function PrimaryAction({ children, href, ...rest }: PropsWithChildren<CTAActionProps>): import("react/jsx-runtime").JSX.Element;
71
161
  declare function SecondaryAction({ children, href, ...rest }: PropsWithChildren<CTAActionProps>): import("react/jsx-runtime").JSX.Element;
72
- export declare const SubdomainNavBar: typeof Root & {
162
+ export declare const SubdomainNavBar: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement>, "title" | "children"> & {
163
+ /**
164
+ * Valid child elements are `SubdomainNavBar.Link`, `SubdomainNavBar.PrimaryAction`,
165
+ * `SubdomainNavBar.SecondaryAction` and `SubdomainNavBar.Search`
166
+ */
167
+ children?: React.ReactNode | React.ReactElement<SubdomainNavBarLinkProps> | React.ReactElement<SubdomainNavBarSearchProps> | React.ReactElement<CTAActionProps>;
168
+ /**
169
+ * Fixes the navigation bar to the top of the viewport. Defaults to `true`.
170
+ */
171
+ fixed?: boolean;
172
+ /**
173
+ * Fill the maximum width of the parent container. Defaults to `false`.
174
+ */
175
+ fullWidth?: boolean;
176
+ /**
177
+ * Optional React element rendered after the navigation links.
178
+ */
179
+ leadingComponent?: React.ReactElement;
180
+ /**
181
+ * Optional React element rendered after the actions.
182
+ */
183
+ trailingComponent?: React.ReactElement;
184
+ /**
185
+ * The title or name of the subdomain. Appears adjacent to the logo and is required for communicating content to assistive technologies.
186
+ */
187
+ title: string;
188
+ /**
189
+ * The URL for the site. Typically used to link the titleText prop value to the site root.
190
+ */
191
+ titleHref?: string;
192
+ /**
193
+ * Optionally change the URL of the logo
194
+ */
195
+ logoHref?: string;
196
+ /**
197
+ * When the menu is opened or closed on narrow viewports, this callback is called with the new open state.
198
+ */
199
+ onNarrowMenuToggle?: (isOpen: boolean) => void;
200
+ /**
201
+ * Customizable visible and accessible menu labels.
202
+ */
203
+ menuLabels?: Partial<SubdomainNavBarMenuLabels>;
204
+ /**
205
+ * ID of the element that receives focus when the skip-to-content link is activated.
206
+ * Defaults to the first rendered `main` element that is not hidden from assistive technologies.
207
+ */
208
+ skipToContentTargetId?: string;
209
+ } & React.RefAttributes<SubdomainNavBarHandle>> & {
73
210
  Link: typeof Link;
74
- Search: React.ForwardRefExoticComponent<Omit<SearchProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
211
+ Search: React.ForwardRefExoticComponent<SubdomainNavBarSearchProps & React.RefAttributes<HTMLInputElement>>;
75
212
  PrimaryAction: typeof PrimaryAction;
76
213
  SecondaryAction: typeof SecondaryAction;
77
214
  testIds: {
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type SubdomainNavBarLinkContextValue = {
3
+ isOverflowed?: boolean;
4
+ onLinkClick?: React.MouseEventHandler<HTMLAnchorElement>;
5
+ };
6
+ export declare const SubdomainNavBarLinkContext: React.Context<SubdomainNavBarLinkContextValue>;
7
+ export declare function useSubdomainNavBarLinkContext(): SubdomainNavBarLinkContextValue;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ type UseSearchKeyboardShortcutOptions = {
2
+ disabled: boolean;
3
+ keyboardShortcut?: string | false;
4
+ onTrigger: () => void;
5
+ };
6
+ export declare function useSearchKeyboardShortcut({ disabled, keyboardShortcut, onTrigger, }: UseSearchKeyboardShortcutOptions): void;
7
+ export {};
@@ -0,0 +1,23 @@
1
+ import { type KeyboardEvent, type RefObject } from 'react';
2
+ import type { SubdomainNavBarSearchResultProps, SubdomainNavBarSearchResults } from './SubdomainNavBar';
3
+ export type NormalizedSearchResultGroup = {
4
+ title?: string;
5
+ results: Array<{
6
+ result: SubdomainNavBarSearchResultProps;
7
+ index: number;
8
+ }>;
9
+ };
10
+ type UseSearchResultsOptions = {
11
+ dialogRef: RefObject<HTMLDialogElement | null>;
12
+ searchResults?: SubdomainNavBarSearchResults;
13
+ };
14
+ export declare function useSearchResults({ dialogRef, searchResults }: UseSearchResultsOptions): {
15
+ activeDescendant: number;
16
+ handleSearchResultKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
17
+ hasGroupedSearchResults: boolean;
18
+ hasSearchResults: boolean;
19
+ normalizedSearchResultGroups: NormalizedSearchResultGroup[];
20
+ resetActiveDescendant: () => void;
21
+ searchResultsLength: number;
22
+ };
23
+ export {};
@@ -2,4 +2,4 @@ import { RefObject } from 'react';
2
2
  export type VisibilityMap = {
3
3
  [key: string]: boolean;
4
4
  };
5
- export declare function useVisibilityObserver(navigationRef: RefObject<HTMLUListElement | null>, children: any): VisibilityMap[];
5
+ export declare function useVisibilityObserver(navigationRef: RefObject<HTMLUListElement | null>, overflowRef: RefObject<HTMLElement | null>, measurementKey: string, disabled?: boolean): VisibilityMap[];
@@ -1,18 +1,23 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
2
  import { TextProps } from '../Text/Text';
3
+ import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/base.css';
3
4
  import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes.css';
4
5
  export declare const testIds: {
5
6
  root: string;
7
+ readonly text: string;
6
8
  readonly cursor: string;
7
9
  };
8
10
  export type TextCursorAnimationProps = {
9
11
  /**
10
- * Whether to animate the text reveal with a sliding wipe animation
11
- * and a cursor that transitions from grey to green.
12
+ * Whether to animate the text with a typing effect.
12
13
  */
13
14
  animate?: boolean;
15
+ /**
16
+ * Optional text to type before transitioning to the final text
17
+ */
18
+ initialText?: string;
14
19
  ['data-testid']?: string;
15
20
  delay?: number;
16
21
  waitForPageLoad?: boolean;
17
22
  } & React.HTMLAttributes<HTMLSpanElement> & Omit<TextProps, 'animate' | 'as'>;
18
- export declare function TextCursorAnimation({ children, className, animate, 'data-testid': testId, delay, waitForPageLoad, variant, }: PropsWithChildren<TextCursorAnimationProps>): import("react/jsx-runtime").JSX.Element;
23
+ export declare function TextCursorAnimation({ children, className, animate, initialText, 'data-testid': testId, delay, waitForPageLoad, variant, }: PropsWithChildren<TextCursorAnimationProps>): import("react/jsx-runtime").JSX.Element;