@primer/react-brand 0.71.0 → 0.71.1-rc.1b68fd40

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 (373) hide show
  1. package/docs/components/Pagination/index.md +28 -10
  2. package/docs/index.md +2 -2
  3. package/esm/Pagination/Pagination.d.ts +7 -1
  4. package/esm/Pagination/Pagination.d.ts.map +1 -1
  5. package/esm/Pagination/Pagination.js +63 -50
  6. package/esm/Pagination/Pagination.js.map +1 -1
  7. package/lib/Pagination/Pagination.d.ts +7 -1
  8. package/lib/css/main.css +68 -68
  9. package/lib/design-tokens/css/tokens/base/colors/color-scales-with-modes.css +1 -1
  10. package/lib/design-tokens/css/tokens/base/colors/light.css +1 -1
  11. package/lib/design-tokens/css/tokens/base/size/size.css +1 -1
  12. package/lib/design-tokens/css/tokens/base/typography/typography.css +1 -1
  13. package/lib/design-tokens/css/tokens/functional/animation/base.css +1 -1
  14. package/lib/design-tokens/css/tokens/functional/colors/global-with-modes.css +1 -1
  15. package/lib/design-tokens/css/tokens/functional/colors/global.css +1 -1
  16. package/lib/design-tokens/css/tokens/functional/components/accordion/colors-with-modes.css +1 -1
  17. package/lib/design-tokens/css/tokens/functional/components/action-menu/colors-with-modes.css +1 -1
  18. package/lib/design-tokens/css/tokens/functional/components/anchor-nav/colors-with-modes.css +1 -1
  19. package/lib/design-tokens/css/tokens/functional/components/bento/base.css +1 -1
  20. package/lib/design-tokens/css/tokens/functional/components/blinking-cursor/colors-with-modes.css +1 -1
  21. package/lib/design-tokens/css/tokens/functional/components/breadcrumbs/colors-with-modes.css +1 -1
  22. package/lib/design-tokens/css/tokens/functional/components/button/colors-with-modes.css +1 -1
  23. package/lib/design-tokens/css/tokens/functional/components/card/base.css +1 -1
  24. package/lib/design-tokens/css/tokens/functional/components/card/colors-with-modes.css +1 -1
  25. package/lib/design-tokens/css/tokens/functional/components/card/colors.css +1 -1
  26. package/lib/design-tokens/css/tokens/functional/components/comparison-table/colors-with-modes.css +1 -1
  27. package/lib/design-tokens/css/tokens/functional/components/comparison-table/comparison-table.css +1 -1
  28. package/lib/design-tokens/css/tokens/functional/components/control/colors-with-modes.css +1 -1
  29. package/lib/design-tokens/css/tokens/functional/components/cta-banner/colors-with-modes.css +1 -1
  30. package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/colors-with-modes.css +1 -1
  31. package/lib/design-tokens/css/tokens/functional/components/eyebrow-banner/eyebrow-banner.css +1 -1
  32. package/lib/design-tokens/css/tokens/functional/components/faq/base.css +1 -1
  33. package/lib/design-tokens/css/tokens/functional/components/faq/colors-with-modes.css +1 -1
  34. package/lib/design-tokens/css/tokens/functional/components/faq/colors.css +1 -1
  35. package/lib/design-tokens/css/tokens/functional/components/faq/faq.css +1 -1
  36. package/lib/design-tokens/css/tokens/functional/components/footer/colors-with-modes.css +1 -1
  37. package/lib/design-tokens/css/tokens/functional/components/footer/colors.css +1 -1
  38. package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/base.css +1 -1
  39. package/lib/design-tokens/css/tokens/functional/components/frosted-glass-vfx/colors-with-modes.css +1 -1
  40. package/lib/design-tokens/css/tokens/functional/components/grid/colors-with-modes.css +1 -1
  41. package/lib/design-tokens/css/tokens/functional/components/grid/colors.css +1 -1
  42. package/lib/design-tokens/css/tokens/functional/components/grid/grid.css +1 -1
  43. package/lib/design-tokens/css/tokens/functional/components/hero/base.css +1 -1
  44. package/lib/design-tokens/css/tokens/functional/components/icon/colors-with-modes.css +1 -1
  45. package/lib/design-tokens/css/tokens/functional/components/icon/colors.css +1 -1
  46. package/lib/design-tokens/css/tokens/functional/components/ide/base.css +1 -1
  47. package/lib/design-tokens/css/tokens/functional/components/ide/colors-with-modes.css +1 -1
  48. package/lib/design-tokens/css/tokens/functional/components/image/base.css +1 -1
  49. package/lib/design-tokens/css/tokens/functional/components/inline-link/base.css +1 -1
  50. package/lib/design-tokens/css/tokens/functional/components/inline-link/colors-with-modes.css +1 -1
  51. package/lib/design-tokens/css/tokens/functional/components/inline-link/colors.css +1 -1
  52. package/lib/design-tokens/css/tokens/functional/components/label/colors-with-modes.css +1 -1
  53. package/lib/design-tokens/css/tokens/functional/components/label/colors.css +1 -1
  54. package/lib/design-tokens/css/tokens/functional/components/link/colors-with-modes.css +1 -1
  55. package/lib/design-tokens/css/tokens/functional/components/link/colors.css +1 -1
  56. package/lib/design-tokens/css/tokens/functional/components/logosuite/base.css +1 -1
  57. package/lib/design-tokens/css/tokens/functional/components/logosuite/colors-with-modes.css +1 -1
  58. package/lib/design-tokens/css/tokens/functional/components/logosuite/colors.css +1 -1
  59. package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors-with-modes.css +1 -1
  60. package/lib/design-tokens/css/tokens/functional/components/media-playlist/colors.css +1 -1
  61. package/lib/design-tokens/css/tokens/functional/components/nav-list/colors-with-modes.css +1 -1
  62. package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors-with-modes.css +1 -1
  63. package/lib/design-tokens/css/tokens/functional/components/pricing-options/colors.css +1 -1
  64. package/lib/design-tokens/css/tokens/functional/components/pricing-options/pricing-options.css +1 -1
  65. package/lib/design-tokens/css/tokens/functional/components/prose/base.css +1 -1
  66. package/lib/design-tokens/css/tokens/functional/components/prose/colors-with-modes.css +1 -1
  67. package/lib/design-tokens/css/tokens/functional/components/river/base.css +1 -1
  68. package/lib/design-tokens/css/tokens/functional/components/river/river.css +1 -1
  69. package/lib/design-tokens/css/tokens/functional/components/river-story-scroll/colors-with-modes.css +1 -1
  70. package/lib/design-tokens/css/tokens/functional/components/section/section.css +1 -1
  71. package/lib/design-tokens/css/tokens/functional/components/statistic/base.css +1 -1
  72. package/lib/design-tokens/css/tokens/functional/components/sub-nav/base.css +1 -1
  73. package/lib/design-tokens/css/tokens/functional/components/sub-nav/colors-with-modes.css +1 -1
  74. package/lib/design-tokens/css/tokens/functional/components/subdomain-nav-bar/colors-with-modes.css +1 -1
  75. package/lib/design-tokens/css/tokens/functional/components/tabs/base.css +1 -1
  76. package/lib/design-tokens/css/tokens/functional/components/tabs/colors-with-modes.css +1 -1
  77. package/lib/design-tokens/css/tokens/functional/components/tabs/colors.css +1 -1
  78. package/lib/design-tokens/css/tokens/functional/components/testimonial/base.css +1 -1
  79. package/lib/design-tokens/css/tokens/functional/components/testimonial/colors-with-modes.css +1 -1
  80. package/lib/design-tokens/css/tokens/functional/components/testimonial/colors.css +1 -1
  81. package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors-with-modes.css +1 -1
  82. package/lib/design-tokens/css/tokens/functional/components/text-cursor-animation/colors.css +1 -1
  83. package/lib/design-tokens/css/tokens/functional/components/tiles/colors-with-modes.css +1 -1
  84. package/lib/design-tokens/css/tokens/functional/components/timeline/base.css +1 -1
  85. package/lib/design-tokens/css/tokens/functional/components/timeline/colors-with-modes.css +1 -1
  86. package/lib/design-tokens/css/tokens/functional/components/timeline/colors.css +1 -1
  87. package/lib/design-tokens/css/tokens/functional/components/token/colors-with-modes.css +1 -1
  88. package/lib/design-tokens/css/tokens/functional/components/token/colors.css +1 -1
  89. package/lib/design-tokens/css/tokens/functional/components/tooltip/colors-with-modes.css +1 -1
  90. package/lib/design-tokens/css/tokens/functional/components/tooltip/colors.css +1 -1
  91. package/lib/design-tokens/css/tokens/functional/components/video-player/base.css +1 -1
  92. package/lib/design-tokens/css/tokens/functional/components/video-player/colors-with-modes.css +1 -1
  93. package/lib/design-tokens/css/tokens/functional/size/border.css +1 -1
  94. package/lib/design-tokens/css/tokens/functional/size/breakpoints.css +1 -1
  95. package/lib/design-tokens/css/tokens/functional/size/size-coarse.css +1 -1
  96. package/lib/design-tokens/css/tokens/functional/size/size-fine.css +1 -1
  97. package/lib/design-tokens/css/tokens/functional/size/size.css +1 -1
  98. package/lib/design-tokens/css/tokens/functional/size/viewport.css +1 -1
  99. package/lib/design-tokens/css/tokens/functional/typography/typography-responsive.css +1 -1
  100. package/lib/design-tokens/css/tokens/functional/typography/typography.css +1 -1
  101. package/lib/design-tokens/js/module/tokens/base/colors/light.js +1 -1
  102. package/lib/design-tokens/js/module/tokens/base/size/size.js +1 -1
  103. package/lib/design-tokens/js/module/tokens/base/typography/typography.js +1 -1
  104. package/lib/design-tokens/js/module/tokens/functional/animation/base.js +1 -1
  105. package/lib/design-tokens/js/module/tokens/functional/colors/global.js +1 -1
  106. package/lib/design-tokens/js/module/tokens/functional/components/bento/base.js +1 -1
  107. package/lib/design-tokens/js/module/tokens/functional/components/card/base.js +1 -1
  108. package/lib/design-tokens/js/module/tokens/functional/components/card/colors.js +1 -1
  109. package/lib/design-tokens/js/module/tokens/functional/components/comparison-table/comparison-table.js +1 -1
  110. package/lib/design-tokens/js/module/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
  111. package/lib/design-tokens/js/module/tokens/functional/components/faq/base.js +1 -1
  112. package/lib/design-tokens/js/module/tokens/functional/components/faq/colors.js +1 -1
  113. package/lib/design-tokens/js/module/tokens/functional/components/faq/faq.js +1 -1
  114. package/lib/design-tokens/js/module/tokens/functional/components/footer/colors.js +1 -1
  115. package/lib/design-tokens/js/module/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
  116. package/lib/design-tokens/js/module/tokens/functional/components/grid/colors.js +1 -1
  117. package/lib/design-tokens/js/module/tokens/functional/components/grid/grid.js +1 -1
  118. package/lib/design-tokens/js/module/tokens/functional/components/hero/base.js +1 -1
  119. package/lib/design-tokens/js/module/tokens/functional/components/icon/colors.js +1 -1
  120. package/lib/design-tokens/js/module/tokens/functional/components/ide/base.js +1 -1
  121. package/lib/design-tokens/js/module/tokens/functional/components/image/base.js +1 -1
  122. package/lib/design-tokens/js/module/tokens/functional/components/inline-link/base.js +1 -1
  123. package/lib/design-tokens/js/module/tokens/functional/components/inline-link/colors.js +1 -1
  124. package/lib/design-tokens/js/module/tokens/functional/components/label/colors.js +1 -1
  125. package/lib/design-tokens/js/module/tokens/functional/components/link/colors.js +1 -1
  126. package/lib/design-tokens/js/module/tokens/functional/components/logosuite/base.js +1 -1
  127. package/lib/design-tokens/js/module/tokens/functional/components/logosuite/colors.js +1 -1
  128. package/lib/design-tokens/js/module/tokens/functional/components/media-playlist/colors.js +1 -1
  129. package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/colors.js +1 -1
  130. package/lib/design-tokens/js/module/tokens/functional/components/pricing-options/pricing-options.js +1 -1
  131. package/lib/design-tokens/js/module/tokens/functional/components/prose/base.js +1 -1
  132. package/lib/design-tokens/js/module/tokens/functional/components/river/base.js +1 -1
  133. package/lib/design-tokens/js/module/tokens/functional/components/river/river.js +1 -1
  134. package/lib/design-tokens/js/module/tokens/functional/components/section/section.js +1 -1
  135. package/lib/design-tokens/js/module/tokens/functional/components/statistic/base.js +1 -1
  136. package/lib/design-tokens/js/module/tokens/functional/components/sub-nav/base.js +1 -1
  137. package/lib/design-tokens/js/module/tokens/functional/components/tabs/base.js +1 -1
  138. package/lib/design-tokens/js/module/tokens/functional/components/tabs/colors.js +1 -1
  139. package/lib/design-tokens/js/module/tokens/functional/components/testimonial/base.js +1 -1
  140. package/lib/design-tokens/js/module/tokens/functional/components/testimonial/colors.js +1 -1
  141. package/lib/design-tokens/js/module/tokens/functional/components/text-cursor-animation/colors.js +1 -1
  142. package/lib/design-tokens/js/module/tokens/functional/components/timeline/base.js +1 -1
  143. package/lib/design-tokens/js/module/tokens/functional/components/timeline/colors.js +1 -1
  144. package/lib/design-tokens/js/module/tokens/functional/components/token/colors.js +1 -1
  145. package/lib/design-tokens/js/module/tokens/functional/components/tooltip/colors.js +1 -1
  146. package/lib/design-tokens/js/module/tokens/functional/components/video-player/base.js +1 -1
  147. package/lib/design-tokens/js/module/tokens/functional/size/border.js +1 -1
  148. package/lib/design-tokens/js/module/tokens/functional/size/breakpoints.js +1 -1
  149. package/lib/design-tokens/js/module/tokens/functional/size/size-coarse.js +1 -1
  150. package/lib/design-tokens/js/module/tokens/functional/size/size-fine.js +1 -1
  151. package/lib/design-tokens/js/module/tokens/functional/size/size.js +1 -1
  152. package/lib/design-tokens/js/module/tokens/functional/size/viewport.js +1 -1
  153. package/lib/design-tokens/js/module/tokens/functional/typography/typography-responsive.js +1 -1
  154. package/lib/design-tokens/js/module/tokens/functional/typography/typography.js +1 -1
  155. package/lib/design-tokens/js/tokens/base/colors/light.js +1 -1
  156. package/lib/design-tokens/js/tokens/base/size/size.js +1 -1
  157. package/lib/design-tokens/js/tokens/base/typography/typography.js +1 -1
  158. package/lib/design-tokens/js/tokens/functional/animation/base.js +1 -1
  159. package/lib/design-tokens/js/tokens/functional/colors/global.js +1 -1
  160. package/lib/design-tokens/js/tokens/functional/components/bento/base.js +1 -1
  161. package/lib/design-tokens/js/tokens/functional/components/card/base.js +1 -1
  162. package/lib/design-tokens/js/tokens/functional/components/card/colors.js +1 -1
  163. package/lib/design-tokens/js/tokens/functional/components/comparison-table/comparison-table.js +1 -1
  164. package/lib/design-tokens/js/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
  165. package/lib/design-tokens/js/tokens/functional/components/faq/base.js +1 -1
  166. package/lib/design-tokens/js/tokens/functional/components/faq/colors.js +1 -1
  167. package/lib/design-tokens/js/tokens/functional/components/faq/faq.js +1 -1
  168. package/lib/design-tokens/js/tokens/functional/components/footer/colors.js +1 -1
  169. package/lib/design-tokens/js/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
  170. package/lib/design-tokens/js/tokens/functional/components/grid/colors.js +1 -1
  171. package/lib/design-tokens/js/tokens/functional/components/grid/grid.js +1 -1
  172. package/lib/design-tokens/js/tokens/functional/components/hero/base.js +1 -1
  173. package/lib/design-tokens/js/tokens/functional/components/icon/colors.js +1 -1
  174. package/lib/design-tokens/js/tokens/functional/components/ide/base.js +1 -1
  175. package/lib/design-tokens/js/tokens/functional/components/image/base.js +1 -1
  176. package/lib/design-tokens/js/tokens/functional/components/inline-link/base.js +1 -1
  177. package/lib/design-tokens/js/tokens/functional/components/inline-link/colors.js +1 -1
  178. package/lib/design-tokens/js/tokens/functional/components/label/colors.js +1 -1
  179. package/lib/design-tokens/js/tokens/functional/components/link/colors.js +1 -1
  180. package/lib/design-tokens/js/tokens/functional/components/logosuite/base.js +1 -1
  181. package/lib/design-tokens/js/tokens/functional/components/logosuite/colors.js +1 -1
  182. package/lib/design-tokens/js/tokens/functional/components/media-playlist/colors.js +1 -1
  183. package/lib/design-tokens/js/tokens/functional/components/pricing-options/colors.js +1 -1
  184. package/lib/design-tokens/js/tokens/functional/components/pricing-options/pricing-options.js +1 -1
  185. package/lib/design-tokens/js/tokens/functional/components/prose/base.js +1 -1
  186. package/lib/design-tokens/js/tokens/functional/components/river/base.js +1 -1
  187. package/lib/design-tokens/js/tokens/functional/components/river/river.js +1 -1
  188. package/lib/design-tokens/js/tokens/functional/components/section/section.js +1 -1
  189. package/lib/design-tokens/js/tokens/functional/components/statistic/base.js +1 -1
  190. package/lib/design-tokens/js/tokens/functional/components/sub-nav/base.js +1 -1
  191. package/lib/design-tokens/js/tokens/functional/components/tabs/base.js +1 -1
  192. package/lib/design-tokens/js/tokens/functional/components/tabs/colors.js +1 -1
  193. package/lib/design-tokens/js/tokens/functional/components/testimonial/base.js +1 -1
  194. package/lib/design-tokens/js/tokens/functional/components/testimonial/colors.js +1 -1
  195. package/lib/design-tokens/js/tokens/functional/components/text-cursor-animation/colors.js +1 -1
  196. package/lib/design-tokens/js/tokens/functional/components/timeline/base.js +1 -1
  197. package/lib/design-tokens/js/tokens/functional/components/timeline/colors.js +1 -1
  198. package/lib/design-tokens/js/tokens/functional/components/token/colors.js +1 -1
  199. package/lib/design-tokens/js/tokens/functional/components/tooltip/colors.js +1 -1
  200. package/lib/design-tokens/js/tokens/functional/components/video-player/base.js +1 -1
  201. package/lib/design-tokens/js/tokens/functional/size/border.js +1 -1
  202. package/lib/design-tokens/js/tokens/functional/size/breakpoints.js +1 -1
  203. package/lib/design-tokens/js/tokens/functional/size/size-coarse.js +1 -1
  204. package/lib/design-tokens/js/tokens/functional/size/size-fine.js +1 -1
  205. package/lib/design-tokens/js/tokens/functional/size/size.js +1 -1
  206. package/lib/design-tokens/js/tokens/functional/size/viewport.js +1 -1
  207. package/lib/design-tokens/js/tokens/functional/typography/typography-responsive.js +1 -1
  208. package/lib/design-tokens/js/tokens/functional/typography/typography.js +1 -1
  209. package/lib/design-tokens/scss/tokens/base/colors/light.scss +1 -1
  210. package/lib/design-tokens/scss/tokens/base/size/size.scss +1 -1
  211. package/lib/design-tokens/scss/tokens/base/typography/typography.scss +1 -1
  212. package/lib/design-tokens/scss/tokens/functional/animation/base.scss +1 -1
  213. package/lib/design-tokens/scss/tokens/functional/colors/global.scss +1 -1
  214. package/lib/design-tokens/scss/tokens/functional/components/bento/base.scss +1 -1
  215. package/lib/design-tokens/scss/tokens/functional/components/card/base.scss +1 -1
  216. package/lib/design-tokens/scss/tokens/functional/components/card/colors.scss +1 -1
  217. package/lib/design-tokens/scss/tokens/functional/components/comparison-table/comparison-table.scss +1 -1
  218. package/lib/design-tokens/scss/tokens/functional/components/eyebrow-banner/eyebrow-banner.scss +1 -1
  219. package/lib/design-tokens/scss/tokens/functional/components/faq/base.scss +1 -1
  220. package/lib/design-tokens/scss/tokens/functional/components/faq/colors.scss +1 -1
  221. package/lib/design-tokens/scss/tokens/functional/components/faq/faq.scss +1 -1
  222. package/lib/design-tokens/scss/tokens/functional/components/footer/colors.scss +1 -1
  223. package/lib/design-tokens/scss/tokens/functional/components/frosted-glass-vfx/base.scss +1 -1
  224. package/lib/design-tokens/scss/tokens/functional/components/grid/colors.scss +1 -1
  225. package/lib/design-tokens/scss/tokens/functional/components/grid/grid.scss +1 -1
  226. package/lib/design-tokens/scss/tokens/functional/components/hero/base.scss +1 -1
  227. package/lib/design-tokens/scss/tokens/functional/components/icon/colors.scss +1 -1
  228. package/lib/design-tokens/scss/tokens/functional/components/ide/base.scss +1 -1
  229. package/lib/design-tokens/scss/tokens/functional/components/image/base.scss +1 -1
  230. package/lib/design-tokens/scss/tokens/functional/components/inline-link/base.scss +1 -1
  231. package/lib/design-tokens/scss/tokens/functional/components/inline-link/colors.scss +1 -1
  232. package/lib/design-tokens/scss/tokens/functional/components/label/colors.scss +1 -1
  233. package/lib/design-tokens/scss/tokens/functional/components/link/colors.scss +1 -1
  234. package/lib/design-tokens/scss/tokens/functional/components/logosuite/base.scss +1 -1
  235. package/lib/design-tokens/scss/tokens/functional/components/logosuite/colors.scss +1 -1
  236. package/lib/design-tokens/scss/tokens/functional/components/media-playlist/colors.scss +1 -1
  237. package/lib/design-tokens/scss/tokens/functional/components/pricing-options/colors.scss +1 -1
  238. package/lib/design-tokens/scss/tokens/functional/components/pricing-options/pricing-options.scss +1 -1
  239. package/lib/design-tokens/scss/tokens/functional/components/prose/base.scss +1 -1
  240. package/lib/design-tokens/scss/tokens/functional/components/river/base.scss +1 -1
  241. package/lib/design-tokens/scss/tokens/functional/components/river/river.scss +1 -1
  242. package/lib/design-tokens/scss/tokens/functional/components/section/section.scss +1 -1
  243. package/lib/design-tokens/scss/tokens/functional/components/statistic/base.scss +1 -1
  244. package/lib/design-tokens/scss/tokens/functional/components/sub-nav/base.scss +1 -1
  245. package/lib/design-tokens/scss/tokens/functional/components/tabs/base.scss +1 -1
  246. package/lib/design-tokens/scss/tokens/functional/components/tabs/colors.scss +1 -1
  247. package/lib/design-tokens/scss/tokens/functional/components/testimonial/base.scss +1 -1
  248. package/lib/design-tokens/scss/tokens/functional/components/testimonial/colors.scss +1 -1
  249. package/lib/design-tokens/scss/tokens/functional/components/text-cursor-animation/colors.scss +1 -1
  250. package/lib/design-tokens/scss/tokens/functional/components/timeline/base.scss +1 -1
  251. package/lib/design-tokens/scss/tokens/functional/components/timeline/colors.scss +1 -1
  252. package/lib/design-tokens/scss/tokens/functional/components/token/colors.scss +1 -1
  253. package/lib/design-tokens/scss/tokens/functional/components/tooltip/colors.scss +1 -1
  254. package/lib/design-tokens/scss/tokens/functional/components/video-player/base.scss +1 -1
  255. package/lib/design-tokens/scss/tokens/functional/size/border.scss +1 -1
  256. package/lib/design-tokens/scss/tokens/functional/size/breakpoints.scss +1 -1
  257. package/lib/design-tokens/scss/tokens/functional/size/size-coarse.scss +1 -1
  258. package/lib/design-tokens/scss/tokens/functional/size/size-fine.scss +1 -1
  259. package/lib/design-tokens/scss/tokens/functional/size/size.scss +1 -1
  260. package/lib/design-tokens/scss/tokens/functional/size/viewport.scss +1 -1
  261. package/lib/design-tokens/scss/tokens/functional/typography/typography-responsive.scss +1 -1
  262. package/lib/design-tokens/scss/tokens/functional/typography/typography.scss +1 -1
  263. package/lib/design-tokens/ts/tokens/base/colors/light.d.ts +1 -1
  264. package/lib/design-tokens/ts/tokens/base/colors/light.js +1 -1
  265. package/lib/design-tokens/ts/tokens/base/size/size.d.ts +1 -1
  266. package/lib/design-tokens/ts/tokens/base/size/size.js +1 -1
  267. package/lib/design-tokens/ts/tokens/base/typography/typography.d.ts +1 -1
  268. package/lib/design-tokens/ts/tokens/base/typography/typography.js +1 -1
  269. package/lib/design-tokens/ts/tokens/functional/animation/base.d.ts +1 -1
  270. package/lib/design-tokens/ts/tokens/functional/animation/base.js +1 -1
  271. package/lib/design-tokens/ts/tokens/functional/colors/global.d.ts +1 -1
  272. package/lib/design-tokens/ts/tokens/functional/colors/global.js +1 -1
  273. package/lib/design-tokens/ts/tokens/functional/components/bento/base.d.ts +1 -1
  274. package/lib/design-tokens/ts/tokens/functional/components/bento/base.js +1 -1
  275. package/lib/design-tokens/ts/tokens/functional/components/card/base.d.ts +1 -1
  276. package/lib/design-tokens/ts/tokens/functional/components/card/base.js +1 -1
  277. package/lib/design-tokens/ts/tokens/functional/components/card/colors.d.ts +1 -1
  278. package/lib/design-tokens/ts/tokens/functional/components/card/colors.js +1 -1
  279. package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.d.ts +1 -1
  280. package/lib/design-tokens/ts/tokens/functional/components/comparison-table/comparison-table.js +1 -1
  281. package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.d.ts +1 -1
  282. package/lib/design-tokens/ts/tokens/functional/components/eyebrow-banner/eyebrow-banner.js +1 -1
  283. package/lib/design-tokens/ts/tokens/functional/components/faq/base.d.ts +1 -1
  284. package/lib/design-tokens/ts/tokens/functional/components/faq/base.js +1 -1
  285. package/lib/design-tokens/ts/tokens/functional/components/faq/colors.d.ts +1 -1
  286. package/lib/design-tokens/ts/tokens/functional/components/faq/colors.js +1 -1
  287. package/lib/design-tokens/ts/tokens/functional/components/faq/faq.d.ts +1 -1
  288. package/lib/design-tokens/ts/tokens/functional/components/faq/faq.js +1 -1
  289. package/lib/design-tokens/ts/tokens/functional/components/footer/colors.d.ts +1 -1
  290. package/lib/design-tokens/ts/tokens/functional/components/footer/colors.js +1 -1
  291. package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.d.ts +1 -1
  292. package/lib/design-tokens/ts/tokens/functional/components/frosted-glass-vfx/base.js +1 -1
  293. package/lib/design-tokens/ts/tokens/functional/components/grid/colors.d.ts +1 -1
  294. package/lib/design-tokens/ts/tokens/functional/components/grid/colors.js +1 -1
  295. package/lib/design-tokens/ts/tokens/functional/components/grid/grid.d.ts +1 -1
  296. package/lib/design-tokens/ts/tokens/functional/components/grid/grid.js +1 -1
  297. package/lib/design-tokens/ts/tokens/functional/components/hero/base.d.ts +1 -1
  298. package/lib/design-tokens/ts/tokens/functional/components/hero/base.js +1 -1
  299. package/lib/design-tokens/ts/tokens/functional/components/icon/colors.d.ts +1 -1
  300. package/lib/design-tokens/ts/tokens/functional/components/icon/colors.js +1 -1
  301. package/lib/design-tokens/ts/tokens/functional/components/ide/base.d.ts +1 -1
  302. package/lib/design-tokens/ts/tokens/functional/components/ide/base.js +1 -1
  303. package/lib/design-tokens/ts/tokens/functional/components/image/base.d.ts +1 -1
  304. package/lib/design-tokens/ts/tokens/functional/components/image/base.js +1 -1
  305. package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.d.ts +1 -1
  306. package/lib/design-tokens/ts/tokens/functional/components/inline-link/base.js +1 -1
  307. package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.d.ts +1 -1
  308. package/lib/design-tokens/ts/tokens/functional/components/inline-link/colors.js +1 -1
  309. package/lib/design-tokens/ts/tokens/functional/components/label/colors.d.ts +1 -1
  310. package/lib/design-tokens/ts/tokens/functional/components/label/colors.js +1 -1
  311. package/lib/design-tokens/ts/tokens/functional/components/link/colors.d.ts +1 -1
  312. package/lib/design-tokens/ts/tokens/functional/components/link/colors.js +1 -1
  313. package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.d.ts +1 -1
  314. package/lib/design-tokens/ts/tokens/functional/components/logosuite/base.js +1 -1
  315. package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.d.ts +1 -1
  316. package/lib/design-tokens/ts/tokens/functional/components/logosuite/colors.js +1 -1
  317. package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.d.ts +1 -1
  318. package/lib/design-tokens/ts/tokens/functional/components/media-playlist/colors.js +1 -1
  319. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.d.ts +1 -1
  320. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/colors.js +1 -1
  321. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.d.ts +1 -1
  322. package/lib/design-tokens/ts/tokens/functional/components/pricing-options/pricing-options.js +1 -1
  323. package/lib/design-tokens/ts/tokens/functional/components/prose/base.d.ts +1 -1
  324. package/lib/design-tokens/ts/tokens/functional/components/prose/base.js +1 -1
  325. package/lib/design-tokens/ts/tokens/functional/components/river/base.d.ts +1 -1
  326. package/lib/design-tokens/ts/tokens/functional/components/river/base.js +1 -1
  327. package/lib/design-tokens/ts/tokens/functional/components/river/river.d.ts +1 -1
  328. package/lib/design-tokens/ts/tokens/functional/components/river/river.js +1 -1
  329. package/lib/design-tokens/ts/tokens/functional/components/section/section.d.ts +1 -1
  330. package/lib/design-tokens/ts/tokens/functional/components/section/section.js +1 -1
  331. package/lib/design-tokens/ts/tokens/functional/components/statistic/base.d.ts +1 -1
  332. package/lib/design-tokens/ts/tokens/functional/components/statistic/base.js +1 -1
  333. package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.d.ts +1 -1
  334. package/lib/design-tokens/ts/tokens/functional/components/sub-nav/base.js +1 -1
  335. package/lib/design-tokens/ts/tokens/functional/components/tabs/base.d.ts +1 -1
  336. package/lib/design-tokens/ts/tokens/functional/components/tabs/base.js +1 -1
  337. package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.d.ts +1 -1
  338. package/lib/design-tokens/ts/tokens/functional/components/tabs/colors.js +1 -1
  339. package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.d.ts +1 -1
  340. package/lib/design-tokens/ts/tokens/functional/components/testimonial/base.js +1 -1
  341. package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.d.ts +1 -1
  342. package/lib/design-tokens/ts/tokens/functional/components/testimonial/colors.js +1 -1
  343. package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.d.ts +1 -1
  344. package/lib/design-tokens/ts/tokens/functional/components/text-cursor-animation/colors.js +1 -1
  345. package/lib/design-tokens/ts/tokens/functional/components/timeline/base.d.ts +1 -1
  346. package/lib/design-tokens/ts/tokens/functional/components/timeline/base.js +1 -1
  347. package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.d.ts +1 -1
  348. package/lib/design-tokens/ts/tokens/functional/components/timeline/colors.js +1 -1
  349. package/lib/design-tokens/ts/tokens/functional/components/token/colors.d.ts +1 -1
  350. package/lib/design-tokens/ts/tokens/functional/components/token/colors.js +1 -1
  351. package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.d.ts +1 -1
  352. package/lib/design-tokens/ts/tokens/functional/components/tooltip/colors.js +1 -1
  353. package/lib/design-tokens/ts/tokens/functional/components/video-player/base.d.ts +1 -1
  354. package/lib/design-tokens/ts/tokens/functional/components/video-player/base.js +1 -1
  355. package/lib/design-tokens/ts/tokens/functional/size/border.d.ts +1 -1
  356. package/lib/design-tokens/ts/tokens/functional/size/border.js +1 -1
  357. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.d.ts +1 -1
  358. package/lib/design-tokens/ts/tokens/functional/size/breakpoints.js +1 -1
  359. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.d.ts +1 -1
  360. package/lib/design-tokens/ts/tokens/functional/size/size-coarse.js +1 -1
  361. package/lib/design-tokens/ts/tokens/functional/size/size-fine.d.ts +1 -1
  362. package/lib/design-tokens/ts/tokens/functional/size/size-fine.js +1 -1
  363. package/lib/design-tokens/ts/tokens/functional/size/size.d.ts +1 -1
  364. package/lib/design-tokens/ts/tokens/functional/size/size.js +1 -1
  365. package/lib/design-tokens/ts/tokens/functional/size/viewport.d.ts +1 -1
  366. package/lib/design-tokens/ts/tokens/functional/size/viewport.js +1 -1
  367. package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.d.ts +1 -1
  368. package/lib/design-tokens/ts/tokens/functional/typography/typography-responsive.js +1 -1
  369. package/lib/design-tokens/ts/tokens/functional/typography/typography.d.ts +1 -1
  370. package/lib/design-tokens/ts/tokens/functional/typography/typography.js +1 -1
  371. package/lib/index.js +1 -1
  372. package/llms.txt +2 -2
  373. package/package.json +1 -1
@@ -64,17 +64,35 @@ render(<App />)
64
64
  />
65
65
  ```
66
66
 
67
+ ### Custom button labels
68
+
69
+ Use the `labels` prop to customize the visible text of the previous and next controls. When localizing content, remember to also set the matching `prevAriaLabel` and `nextAriaLabel` labels so that the accessible names stay in sync with the visible text.
70
+
71
+ ```jsx
72
+ <Pagination
73
+ pageCount={3}
74
+ currentPage={2}
75
+ labels={{
76
+ prev: 'Précédent',
77
+ next: 'Suivant',
78
+ prevAriaLabel: 'Page précédente',
79
+ nextAriaLabel: 'Page suivante',
80
+ }}
81
+ />
82
+ ```
83
+
67
84
  ## Component props
68
85
 
69
86
  ### Pagination `Required`
70
87
 
71
- | name | type | default | required | description |
72
- | ----------------------- | ---------------------------------------------------------------------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------- |
73
- | `pageCount` | `number` | | `true` | The total number of pages |
74
- | `currentPage` | `number` | | `true` | The current page number |
75
- | `onPageChange` | `(e: React.MouseEvent, n: number) => void` | | `false` | Callback function for when the page changes |
76
- | `hrefBuilder` | `(n: number) => string` | | `false` | Function to build the href for each page |
77
- | `pageAttributesBuilder` | `(n: number, page: PaginationPageType) => {[attributeName: string]: string}` | | `false` | Forward custom attributes to pagination items. |
78
- | `marginPageCount` | `number` | | `false` | Defines how many pages are to be displayed on the left and right of the component. Will be reduced on narrow viewports. |
79
- | `showPages` | `boolean` | | `false` | Whether to show the page numbers |
80
- | `surroundingPageCount` | `number` | | `false` | The number of pages to show on each side of the current page. Will be hidden on narrow viewports. |
88
+ | name | type | default | required | description |
89
+ | ----------------------- | -------------------------------------------------------------------------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------- |
90
+ | `pageCount` | `number` | | `true` | The total number of pages |
91
+ | `currentPage` | `number` | | `true` | The current page number |
92
+ | `onPageChange` | `(e: React.MouseEvent, n: number) => void` | | `false` | Callback function for when the page changes |
93
+ | `hrefBuilder` | `(n: number) => string` | | `false` | Function to build the href for each page |
94
+ | `pageAttributesBuilder` | `(n: number, page: PaginationPageType) => {[attributeName: string]: string}` | | `false` | Forward custom attributes to pagination items. |
95
+ | `marginPageCount` | `number` | | `false` | Defines how many pages are to be displayed on the left and right of the component. Will be reduced on narrow viewports. |
96
+ | `showPages` | `boolean` | | `false` | Whether to show the page numbers |
97
+ | `surroundingPageCount` | `number` | | `false` | The number of pages to show on each side of the current page. Will be hidden on narrow viewports. |
98
+ | `labels` | `{prev?: string; next?: string; prevAriaLabel?: string; nextAriaLabel?: string}` | | `false` | Custom text and accessible labels for the previous and next controls. Provide any subset. |
package/docs/index.md CHANGED
@@ -1,6 +1,6 @@
1
- # Primer Brand docs (v0.71.0)
1
+ # Primer Brand docs (v0.71.1-rc.1b68fd40)
2
2
 
3
- These docs are bundled with `@primer/react-brand@0.71.0` and match your installed version.
3
+ These docs are bundled with `@primer/react-brand@0.71.1-rc.1b68fd40` and match your installed version.
4
4
 
5
5
  New here? Start with [Getting started](getting-started/index.md) for installation, global
6
6
  stylesheet and font setup. Component directories are named after their import (e.g.
@@ -11,11 +11,17 @@ export type PaginationProps = {
11
11
  marginPageCount?: number;
12
12
  showPages?: boolean;
13
13
  surroundingPageCount?: number;
14
+ labels?: {
15
+ prev?: string;
16
+ next?: string;
17
+ prevAriaLabel?: string;
18
+ nextAriaLabel?: string;
19
+ };
14
20
  'data-testid'?: string;
15
21
  } & Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>;
16
22
  /**
17
23
  * Use Pagination to display a sequence of links that allow navigation to discrete, related pages.
18
24
  * @see https://primer.style/brand/components/Pagination
19
25
  */
20
- export declare const Pagination: React.MemoExoticComponent<({ id, className, pageCount, currentPage, onPageChange, hrefBuilder, pageAttributesBuilder, marginPageCount, showPages, surroundingPageCount, "aria-label": ariaLabel, "data-testid": testId, ...rest }: PaginationProps) => import("react/jsx-runtime").JSX.Element>;
26
+ export declare const Pagination: React.MemoExoticComponent<({ id, className, pageCount, currentPage, onPageChange, hrefBuilder, pageAttributesBuilder, marginPageCount, showPages, surroundingPageCount, labels, "aria-label": ariaLabel, "data-testid": testId, ...rest }: PaginationProps) => import("react/jsx-runtime").JSX.Element>;
21
27
  //# sourceMappingURL=Pagination.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../src/Pagination/Pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAA;AAM9C,OAAO,EAAuB,kBAAkB,EAAC,MAAM,SAAS,CAAA;AAKhE,MAAM,MAAM,eAAe,GAAG;IAE5B,SAAS,EAAE,MAAM,CAAA;IAEjB,WAAW,EAAE,MAAM,CAAA;IAEnB,YAAY,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAEvD,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,MAA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AAC,EAAE,MAAM,CAAA;QACb,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,aAAa,CAAC,EAAE,MAAM,CAAA;KACvB,CAAA;IACD,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAAA;AAS1D;;;GAGG;AACH,eAAO,MAAM,UAAU,6OAgBlB,eAAe,6CAsEnB,CAAA"}
@@ -7,59 +7,72 @@ import a from "./Pagination.module.js";
7
7
  import o, { memo as s, useCallback as c } from "react";
8
8
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
9
9
  //#region src/Pagination/Pagination.tsx
10
- var d = s(({ id: t, className: n, pageCount: s, currentPage: u, onPageChange: d, hrefBuilder: m = p, pageAttributesBuilder: h, marginPageCount: g = 1, showPages: _ = !0, surroundingPageCount: v = 2, "aria-label": y, "data-testid": b, ...x }) => {
11
- let { width: S } = r();
12
- S && S < 768 && (g = 1, v = 0);
13
- let C = o.useRef(null), w = c((e) => (t) => {
14
- d && d(t, e);
15
- }, [d]), T = o.useMemo(() => i(s, u, _, g, v).map((e) => /* @__PURE__ */ l(f, {
10
+ var d = {
11
+ prev: "Previous",
12
+ next: "Next",
13
+ prevAriaLabel: "Previous Page",
14
+ nextAriaLabel: "Next Page"
15
+ }, f = s(({ id: t, className: n, pageCount: s, currentPage: u, onPageChange: f, hrefBuilder: h = m, pageAttributesBuilder: g, marginPageCount: _ = 1, showPages: v = !0, surroundingPageCount: y = 2, labels: b, "aria-label": x, "data-testid": S, ...C }) => {
16
+ let { width: w } = r();
17
+ w && w < 768 && (_ = 1, y = 0);
18
+ let T = b?.prev ?? d.prev, E = b?.next ?? d.next, D = b?.prevAriaLabel ?? d.prevAriaLabel, O = b?.nextAriaLabel ?? d.nextAriaLabel, k = o.useRef(null), A = c((e) => (t) => {
19
+ f && f(t, e);
20
+ }, [f]), j = o.useMemo(() => i(s, u, v, _, y).map((e) => /* @__PURE__ */ l(p, {
16
21
  page: e,
17
- hrefBuilder: m,
18
- pageAttributesBuilder: h,
19
- onClick: w(e.num)
22
+ hrefBuilder: h,
23
+ pageAttributesBuilder: g,
24
+ prevLabel: T,
25
+ nextLabel: E,
26
+ prevAriaLabel: D,
27
+ nextAriaLabel: O,
28
+ onClick: A(e.num)
20
29
  }, `${e.type}-${e.num}`)), [
21
30
  s,
22
31
  u,
23
- _,
24
- g,
25
32
  v,
26
- m,
33
+ _,
34
+ y,
27
35
  h,
28
- w
36
+ g,
37
+ T,
38
+ E,
39
+ D,
40
+ O,
41
+ A
29
42
  ]);
30
43
  return /* @__PURE__ */ l("nav", {
31
- ref: C,
44
+ ref: k,
32
45
  id: t,
33
46
  className: e(a.Pagination, n),
34
- "data-testid": b,
35
- "aria-label": y || "Pagination",
36
- ...x,
47
+ "data-testid": S,
48
+ "aria-label": x || "Pagination",
49
+ ...C,
37
50
  children: /* @__PURE__ */ l("div", {
38
51
  className: e(a.Pagination__inner),
39
- children: T
52
+ children: j
40
53
  })
41
54
  });
42
- }), f = ({ page: r, hrefBuilder: i, pageAttributesBuilder: s, onClick: c }) => {
43
- let [d, f] = o.useState(!1), p = {
55
+ }), p = ({ page: r, hrefBuilder: i, pageAttributesBuilder: s, prevLabel: c, nextLabel: d, prevAriaLabel: f, nextAriaLabel: p, onClick: m }) => {
56
+ let [h, g] = o.useState(!1), _ = {
44
57
  role: "button",
45
58
  size: "small",
46
59
  variant: "subtle",
47
- onClick: r.disabled ? void 0 : c
48
- }, { className: m, ...h } = s?.(r.num, r) ?? {};
60
+ onClick: r.disabled ? void 0 : m
61
+ }, { className: v, ...y } = s?.(r.num, r) ?? {};
49
62
  switch (r.type) {
50
63
  case "PREV": return /* @__PURE__ */ l(n, {
51
- ...p,
64
+ ..._,
52
65
  as: "a",
53
66
  rel: "prev",
54
67
  href: r.disabled ? void 0 : i(r.num),
55
68
  "aria-disabled": r.disabled || void 0,
56
- "aria-label": "Previous Page",
57
- ...h,
58
- className: e(a.Pagination__controlItem, m),
59
- onMouseEnter: () => f(!0),
60
- onMouseLeave: () => f(!1),
61
- onFocus: () => f(!0),
62
- onBlur: () => f(!1),
69
+ "aria-label": f,
70
+ ...y,
71
+ className: e(a.Pagination__controlItem, v),
72
+ onMouseEnter: () => g(!0),
73
+ onMouseLeave: () => g(!1),
74
+ onFocus: () => g(!0),
75
+ onBlur: () => g(!1),
63
76
  children: /* @__PURE__ */ u("span", {
64
77
  className: a.Pagination__controlContent,
65
78
  children: [/* @__PURE__ */ l("span", {
@@ -67,71 +80,71 @@ var d = s(({ id: t, className: n, pageCount: s, currentPage: u, onPageChange: d,
67
80
  children: /* @__PURE__ */ l(t, {
68
81
  hidden: !0,
69
82
  reverse: !0,
70
- expanded: !r.disabled && d,
83
+ expanded: !r.disabled && h,
71
84
  className: a.Pagination__controlArrow
72
85
  })
73
86
  }), /* @__PURE__ */ l("span", {
74
87
  className: a.Pagination__controlText,
75
- children: "Previous"
88
+ children: c
76
89
  })]
77
90
  })
78
91
  });
79
92
  case "NEXT": return /* @__PURE__ */ l(n, {
80
- ...p,
93
+ ..._,
81
94
  as: "a",
82
95
  rel: "next",
83
96
  href: r.disabled ? void 0 : i(r.num),
84
97
  "aria-disabled": r.disabled || void 0,
85
- "aria-label": "Next Page",
86
- ...h,
87
- className: e(a.Pagination__controlItem, m),
88
- onMouseEnter: () => f(!0),
89
- onMouseLeave: () => f(!1),
90
- onFocus: () => f(!0),
91
- onBlur: () => f(!1),
98
+ "aria-label": p,
99
+ ...y,
100
+ className: e(a.Pagination__controlItem, v),
101
+ onMouseEnter: () => g(!0),
102
+ onMouseLeave: () => g(!1),
103
+ onFocus: () => g(!0),
104
+ onBlur: () => g(!1),
92
105
  children: /* @__PURE__ */ u("span", {
93
106
  className: a.Pagination__controlContent,
94
107
  children: [/* @__PURE__ */ l("span", {
95
108
  className: a.Pagination__controlText,
96
- children: "Next"
109
+ children: d
97
110
  }), /* @__PURE__ */ l("span", {
98
111
  className: e(a.Pagination__controlArrowWrapper, a["Pagination__controlArrowWrapper--next"]),
99
112
  children: /* @__PURE__ */ l(t, {
100
113
  hidden: !0,
101
- expanded: !r.disabled && d,
114
+ expanded: !r.disabled && h,
102
115
  className: a.Pagination__controlArrow
103
116
  })
104
117
  })]
105
118
  })
106
119
  });
107
120
  case "NUM": return /* @__PURE__ */ l(n, {
108
- ...p,
121
+ ..._,
109
122
  as: "a",
110
123
  variant: r.selected ? "primary" : "subtle",
111
- className: e(a.Pagination__pageItem, m),
124
+ className: e(a.Pagination__pageItem, v),
112
125
  href: i(r.num),
113
126
  "aria-label": `Page ${r.num}${r.precedesBreak ? "..." : ""}`,
114
127
  "aria-current": r.selected ? "page" : void 0,
115
- ...h,
128
+ ...y,
116
129
  children: r.num
117
130
  });
118
131
  case "BREAK": return /* @__PURE__ */ l(n, {
119
- ...p,
132
+ ..._,
120
133
  as: "a",
121
- className: e(a.Pagination__pageItem, m),
134
+ className: e(a.Pagination__pageItem, v),
122
135
  variant: "subtle",
123
136
  role: "presentation",
124
137
  href: void 0,
125
138
  onClick: void 0,
126
- ...h,
139
+ ...y,
127
140
  children: "…"
128
141
  });
129
142
  }
130
143
  };
131
- function p(e) {
144
+ function m(e) {
132
145
  return `#${e}`;
133
146
  }
134
147
  //#endregion
135
- export { d as Pagination };
148
+ export { f as Pagination };
136
149
 
137
150
  //# sourceMappingURL=Pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.js","names":[],"sources":["../../src/Pagination/Pagination.tsx"],"sourcesContent":["import React, {memo, useCallback} from 'react'\nimport {Button, useWindowSize} from '..'\n\nimport {clsx} from 'clsx'\n\nimport {ExpandableArrow} from '../ExpandableArrow'\nimport {buildPaginationModel, PaginationPageType} from './model'\n\n/** * Main Stylesheet (as a CSS Module) */\nimport styles from './Pagination.module.css'\n\nexport type PaginationProps = {\n /* The total number of pages */\n pageCount: number\n /* The current page number */\n currentPage: number\n /* Callback function for when the page changes */\n onPageChange?: (e: React.MouseEvent, n: number) => void\n /* Function to build the href for each page */\n hrefBuilder?: (n: number) => string\n /* Function to forward custom attributes for each pagination item */\n pageAttributesBuilder?: (n: number, page: PaginationPageType) => {[attributeName: string]: string}\n /* Defines how many pages are to be displayed on the left and right of the component */\n marginPageCount?: number\n /* Whether to show the page numbers */\n showPages?: boolean\n /* The number of pages to show on each side of the current page */\n surroundingPageCount?: number\n 'data-testid'?: string\n} & Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>\n\n/**\n * Use Pagination to display a sequence of links that allow navigation to discrete, related pages.\n * @see https://primer.style/brand/components/Pagination\n */\nexport const Pagination = memo(\n ({\n id,\n className,\n pageCount,\n currentPage,\n onPageChange,\n hrefBuilder = defaultHrefBuilder,\n pageAttributesBuilder,\n marginPageCount = 1,\n showPages = true,\n surroundingPageCount = 2,\n 'aria-label': ariaLabel,\n 'data-testid': testId,\n ...rest\n }: PaginationProps) => {\n // On mobile, limit the number of visible numbers\n const {width} = useWindowSize()\n if (width && width < 768) {\n marginPageCount = 1\n surroundingPageCount = 0\n }\n\n const navRef = React.useRef<HTMLElement>(null)\n\n const pageChange = useCallback(\n (n: number) => (e: React.MouseEvent) => {\n if (onPageChange) {\n onPageChange(e, n)\n }\n },\n [onPageChange],\n )\n\n const paginationItems = React.useMemo(() => {\n const model = buildPaginationModel(pageCount, currentPage, showPages, marginPageCount, surroundingPageCount)\n\n return model.map(page => {\n return (\n <PaginationItem\n key={`${page.type}-${page.num}`}\n page={page}\n hrefBuilder={hrefBuilder}\n pageAttributesBuilder={pageAttributesBuilder}\n onClick={pageChange(page.num)}\n />\n )\n })\n }, [\n pageCount,\n currentPage,\n showPages,\n marginPageCount,\n surroundingPageCount,\n hrefBuilder,\n pageAttributesBuilder,\n pageChange,\n ])\n\n return (\n <nav\n ref={navRef}\n id={id}\n className={clsx(styles.Pagination, className)}\n data-testid={testId}\n aria-label={ariaLabel || 'Pagination'}\n {...rest}\n >\n <div className={clsx(styles.Pagination__inner)}>{paginationItems}</div>\n </nav>\n )\n },\n)\n\ntype PaginationItemProps = {\n page: PaginationPageType\n hrefBuilder: (n: number) => string\n pageAttributesBuilder?: (n: number, page: PaginationPageType) => {[key: string]: string}\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n}\n\nconst PaginationItem = ({page, hrefBuilder, pageAttributesBuilder, onClick}: PaginationItemProps) => {\n const [isArrowExpanded, setIsArrowExpanded] = React.useState(false)\n\n const baseProps = {\n role: 'button',\n size: 'small' as const,\n variant: 'subtle' as const,\n onClick: page.disabled ? undefined : onClick,\n }\n\n const customProps = pageAttributesBuilder?.(page.num, page)\n const {className: customClassName, ...customAttributes} = customProps ?? {}\n\n switch (page.type) {\n case 'PREV': {\n return (\n <Button\n {...baseProps}\n as=\"a\"\n rel=\"prev\"\n href={page.disabled ? undefined : hrefBuilder(page.num)}\n aria-disabled={page.disabled || undefined}\n aria-label=\"Previous Page\"\n {...customAttributes}\n className={clsx(styles.Pagination__controlItem, customClassName)}\n onMouseEnter={() => setIsArrowExpanded(true)}\n onMouseLeave={() => setIsArrowExpanded(false)}\n onFocus={() => setIsArrowExpanded(true)}\n onBlur={() => setIsArrowExpanded(false)}\n >\n <span className={styles.Pagination__controlContent}>\n <span\n className={clsx(\n styles.Pagination__controlArrowWrapper,\n styles['Pagination__controlArrowWrapper--previous'],\n )}\n >\n <ExpandableArrow\n hidden\n reverse\n expanded={!page.disabled && isArrowExpanded}\n className={styles.Pagination__controlArrow}\n />\n </span>\n <span className={styles.Pagination__controlText}>Previous</span>\n </span>\n </Button>\n )\n }\n case 'NEXT': {\n return (\n <Button\n {...baseProps}\n as=\"a\"\n rel=\"next\"\n href={page.disabled ? undefined : hrefBuilder(page.num)}\n aria-disabled={page.disabled || undefined}\n aria-label=\"Next Page\"\n {...customAttributes}\n className={clsx(styles.Pagination__controlItem, customClassName)}\n onMouseEnter={() => setIsArrowExpanded(true)}\n onMouseLeave={() => setIsArrowExpanded(false)}\n onFocus={() => setIsArrowExpanded(true)}\n onBlur={() => setIsArrowExpanded(false)}\n >\n <span className={styles.Pagination__controlContent}>\n <span className={styles.Pagination__controlText}>Next</span>\n <span\n className={clsx(styles.Pagination__controlArrowWrapper, styles['Pagination__controlArrowWrapper--next'])}\n >\n <ExpandableArrow\n hidden\n expanded={!page.disabled && isArrowExpanded}\n className={styles.Pagination__controlArrow}\n />\n </span>\n </span>\n </Button>\n )\n }\n case 'NUM': {\n return (\n /**\n * Append \"...\" to the aria-label for pages that precede a break because screen readers will change the\n * tone the text is read in. This is a slightly nicer experience than skipping a bunch of numbers unexpectedly.\n */\n <Button\n {...baseProps}\n as=\"a\"\n variant={page.selected ? 'primary' : 'subtle'}\n className={clsx(styles.Pagination__pageItem, customClassName)}\n href={hrefBuilder(page.num)}\n aria-label={`Page ${page.num}${page.precedesBreak ? '...' : ''}`}\n aria-current={page.selected ? 'page' : undefined}\n {...customAttributes}\n >\n {page.num}\n </Button>\n )\n }\n case 'BREAK': {\n return (\n <Button\n {...baseProps}\n as=\"a\"\n className={clsx(styles.Pagination__pageItem, customClassName)}\n variant=\"subtle\"\n role=\"presentation\"\n href={undefined}\n onClick={undefined}\n {...customAttributes}\n >\n …\n </Button>\n )\n }\n }\n}\n\nfunction defaultHrefBuilder(pageNum: number) {\n return `#${pageNum}`\n}\n"],"mappings":";;;;;;;;;AAmCA,IAAa,IAAa,GACvB,EACC,OACA,cACA,cACA,gBACA,iBACA,iBAAc,GACd,0BACA,qBAAkB,GAClB,eAAY,IACZ,0BAAuB,GACvB,cAAc,GACd,eAAe,GACf,GAAG,QACkB;CAErB,IAAM,EAAC,aAAS,GAAe;AAC/B,CAAI,KAAS,IAAQ,QACnB,IAAkB,GAClB,IAAuB;CAGzB,IAAM,IAAS,EAAM,OAAoB,KAAK,EAExC,IAAa,GAChB,OAAe,MAAwB;AACtC,EAAI,KACF,EAAa,GAAG,EAAE;IAGtB,CAAC,EAAa,CACf,EAEK,IAAkB,EAAM,cACd,EAAqB,GAAW,GAAa,GAAW,GAAiB,EAEhF,CAAM,K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agination/Pagination.tsx"],"sourcesContent":["import React, {memo, useCallback} from 'react'\nimport {Button, useWindowSize} from '..'\n\nimport {clsx} from 'clsx'\n\nimport {ExpandableArrow} from '../ExpandableArrow'\nimport {buildPaginationModel, PaginationPageType} from './model'\n\n/** * Main Stylesheet (as a CSS Module) */\nimport styles from './Pagination.module.css'\n\nexport type PaginationProps = {\n /* The total number of pages */\n pageCount: number\n /* The current page number */\n currentPage: number\n /* Callback function for when the page changes */\n onPageChange?: (e: React.MouseEvent, n: number) => void\n /* Function to build the href for each page */\n hrefBuilder?: (n: number) => string\n /* Function to forward custom attributes for each pagination item */\n pageAttributesBuilder?: (n: number, page: PaginationPageType) => {[attributeName: string]: string}\n /* Defines how many pages are to be displayed on the left and right of the component */\n marginPageCount?: number\n /* Whether to show the page numbers */\n showPages?: boolean\n /* The number of pages to show on each side of the current page */\n surroundingPageCount?: number\n /* Custom text labels for the pagination controls. Use for localization. */\n labels?: {\n prev?: string\n next?: string\n prevAriaLabel?: string\n nextAriaLabel?: string\n }\n 'data-testid'?: string\n} & Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>\n\nconst defaultPaginationLabels = {\n prev: 'Previous',\n next: 'Next',\n prevAriaLabel: 'Previous Page',\n nextAriaLabel: 'Next Page',\n}\n\n/**\n * Use Pagination to display a sequence of links that allow navigation to discrete, related pages.\n * @see https://primer.style/brand/components/Pagination\n */\nexport const Pagination = memo(\n ({\n id,\n className,\n pageCount,\n currentPage,\n onPageChange,\n hrefBuilder = defaultHrefBuilder,\n pageAttributesBuilder,\n marginPageCount = 1,\n showPages = true,\n surroundingPageCount = 2,\n labels,\n 'aria-label': ariaLabel,\n 'data-testid': testId,\n ...rest\n }: PaginationProps) => {\n // On mobile, limit the number of visible numbers\n const {width} = useWindowSize()\n if (width && width < 768) {\n marginPageCount = 1\n surroundingPageCount = 0\n }\n\n const prevLabel = labels?.prev ?? defaultPaginationLabels.prev\n const nextLabel = labels?.next ?? defaultPaginationLabels.next\n const prevAriaLabel = labels?.prevAriaLabel ?? defaultPaginationLabels.prevAriaLabel\n const nextAriaLabel = labels?.nextAriaLabel ?? defaultPaginationLabels.nextAriaLabel\n\n const navRef = React.useRef<HTMLElement>(null)\n\n const pageChange = useCallback(\n (n: number) => (e: React.MouseEvent) => {\n if (onPageChange) {\n onPageChange(e, n)\n }\n },\n [onPageChange],\n )\n\n const paginationItems = React.useMemo(() => {\n const model = buildPaginationModel(pageCount, currentPage, showPages, marginPageCount, surroundingPageCount)\n\n return model.map(page => {\n return (\n <PaginationItem\n key={`${page.type}-${page.num}`}\n page={page}\n hrefBuilder={hrefBuilder}\n pageAttributesBuilder={pageAttributesBuilder}\n prevLabel={prevLabel}\n nextLabel={nextLabel}\n prevAriaLabel={prevAriaLabel}\n nextAriaLabel={nextAriaLabel}\n onClick={pageChange(page.num)}\n />\n )\n })\n }, [\n pageCount,\n currentPage,\n showPages,\n marginPageCount,\n surroundingPageCount,\n hrefBuilder,\n pageAttributesBuilder,\n prevLabel,\n nextLabel,\n prevAriaLabel,\n nextAriaLabel,\n pageChange,\n ])\n\n return (\n <nav\n ref={navRef}\n id={id}\n className={clsx(styles.Pagination, className)}\n data-testid={testId}\n aria-label={ariaLabel || 'Pagination'}\n {...rest}\n >\n <div className={clsx(styles.Pagination__inner)}>{paginationItems}</div>\n </nav>\n )\n },\n)\n\ntype PaginationItemProps = {\n page: PaginationPageType\n hrefBuilder: (n: number) => string\n pageAttributesBuilder?: (n: number, page: PaginationPageType) => {[key: string]: string}\n prevLabel: string\n nextLabel: string\n prevAriaLabel: string\n nextAriaLabel: string\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n}\n\nconst PaginationItem = ({\n page,\n hrefBuilder,\n pageAttributesBuilder,\n prevLabel,\n nextLabel,\n prevAriaLabel,\n nextAriaLabel,\n onClick,\n}: PaginationItemProps) => {\n const [isArrowExpanded, setIsArrowExpanded] = React.useState(false)\n\n const baseProps = {\n role: 'button',\n size: 'small' as const,\n variant: 'subtle' as const,\n onClick: page.disabled ? undefined : onClick,\n }\n\n const customProps = pageAttributesBuilder?.(page.num, page)\n const {className: customClassName, ...customAttributes} = customProps ?? {}\n\n switch (page.type) {\n case 'PREV': {\n return (\n <Button\n {...baseProps}\n as=\"a\"\n rel=\"prev\"\n href={page.disabled ? undefined : hrefBuilder(page.num)}\n aria-disabled={page.disabled || undefined}\n aria-label={prevAriaLabel}\n {...customAttributes}\n className={clsx(styles.Pagination__controlItem, customClassName)}\n onMouseEnter={() => setIsArrowExpanded(true)}\n onMouseLeave={() => setIsArrowExpanded(false)}\n onFocus={() => setIsArrowExpanded(true)}\n onBlur={() => setIsArrowExpanded(false)}\n >\n <span className={styles.Pagination__controlContent}>\n <span\n className={clsx(\n styles.Pagination__controlArrowWrapper,\n styles['Pagination__controlArrowWrapper--previous'],\n )}\n >\n <ExpandableArrow\n hidden\n reverse\n expanded={!page.disabled && isArrowExpanded}\n className={styles.Pagination__controlArrow}\n />\n </span>\n <span className={styles.Pagination__controlText}>{prevLabel}</span>\n </span>\n </Button>\n )\n }\n case 'NEXT': {\n return (\n <Button\n {...baseProps}\n as=\"a\"\n rel=\"next\"\n href={page.disabled ? undefined : hrefBuilder(page.num)}\n aria-disabled={page.disabled || undefined}\n aria-label={nextAriaLabel}\n {...customAttributes}\n className={clsx(styles.Pagination__controlItem, customClassName)}\n onMouseEnter={() => setIsArrowExpanded(true)}\n onMouseLeave={() => setIsArrowExpanded(false)}\n onFocus={() => setIsArrowExpanded(true)}\n onBlur={() => setIsArrowExpanded(false)}\n >\n <span className={styles.Pagination__controlContent}>\n <span className={styles.Pagination__controlText}>{nextLabel}</span>\n <span\n className={clsx(styles.Pagination__controlArrowWrapper, styles['Pagination__controlArrowWrapper--next'])}\n >\n <ExpandableArrow\n hidden\n expanded={!page.disabled && isArrowExpanded}\n className={styles.Pagination__controlArrow}\n />\n </span>\n </span>\n </Button>\n )\n }\n case 'NUM': {\n return (\n /**\n * Append \"...\" to the aria-label for pages that precede a break because screen readers will change the\n * tone the text is read in. This is a slightly nicer experience than skipping a bunch of numbers unexpectedly.\n */\n <Button\n {...baseProps}\n as=\"a\"\n variant={page.selected ? 'primary' : 'subtle'}\n className={clsx(styles.Pagination__pageItem, customClassName)}\n href={hrefBuilder(page.num)}\n aria-label={`Page ${page.num}${page.precedesBreak ? '...' : ''}`}\n aria-current={page.selected ? 'page' : undefined}\n {...customAttributes}\n >\n {page.num}\n </Button>\n )\n }\n case 'BREAK': {\n return (\n <Button\n {...baseProps}\n as=\"a\"\n className={clsx(styles.Pagination__pageItem, customClassName)}\n variant=\"subtle\"\n role=\"presentation\"\n href={undefined}\n onClick={undefined}\n {...customAttributes}\n >\n …\n </Button>\n )\n }\n }\n}\n\nfunction defaultHrefBuilder(pageNum: number) {\n return `#${pageNum}`\n}\n"],"mappings":";;;;;;;;;AAsCA,IAAM,IAA0B;CAC9B,MAAM;CACN,MAAM;CACN,eAAe;CACf,eAAe;CAChB,EAMY,IAAa,GACvB,EACC,OACA,cACA,cACA,gBACA,iBACA,iBAAc,GACd,0BACA,qBAAkB,GAClB,eAAY,IACZ,0BAAuB,GACvB,WACA,cAAc,GACd,eAAe,GACf,GAAG,QACkB;CAErB,IAAM,EAAC,aAAS,GAAe;AAC/B,CAAI,KAAS,IAAQ,QACnB,IAAkB,GAClB,IAAuB;CAGzB,IAAM,IAAY,GAAQ,QAAQ,EAAwB,MACpD,IAAY,GAAQ,QAAQ,EAAwB,MACpD,IAAgB,GAAQ,iBAAiB,EAAwB,eACjE,IAAgB,GAAQ,iBAAiB,EAAwB,eAEjE,IAAS,EAAM,OAAoB,KAAK,EAExC,IAAa,GAChB,OAAe,MAAwB;AACtC,EAAI,KACF,EAAa,GAAG,EAAE;IAGtB,CAAC,EAAa,CACf,EAEK,IAAkB,EAAM,cACd,EAAqB,GAAW,GAAa,GAAW,GAAiB,EAEhF,CAAM,KAAI,MAEb,kBAAC,GAAD;EAEQ;EACO;EACU;EACZ;EACA;EACI;EACA;EACf,SAAS,EAAW,EAAK,I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13
13
  surroundingPageCount?: number;
14
+ labels?: {
15
+ prev?: string;
16
+ next?: string;
17
+ prevAriaLabel?: string;
18
+ nextAriaLabel?: string;
19
+ };
14
20
  'data-testid'?: string;
15
21
  } & Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>;
16
22
  /**
17
23
  * Use Pagination to display a sequence of links that allow navigation to discrete, related pages.
18
24
  * @see https://primer.style/brand/components/Pagination
19
25
  */
20
- export declare const Pagination: React.MemoExoticComponent<({ id, className, pageCount, currentPage, onPageChange, hrefBuilder, pageAttributesBuilder, marginPageCount, showPages, surroundingPageCount, "aria-label": ariaLabel, "data-testid": testId, ...rest }: PaginationProps) => import("react/jsx-runtime").JSX.Element>;
26
+ export declare const Pagination: React.MemoExoticComponent<({ id, className, pageCount, currentPage, onPageChange, hrefBuilder, pageAttributesBuilder, marginPageCount, showPages, surroundingPageCount, labels, "aria-label": ariaLabel, "data-testid": testId, ...rest }: PaginationProps) => import("react/jsx-runtime").JSX.Element>;