@primer/components 31.2.1-rc.7fa29a87 → 32.0.0-rc.7200a6a6

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 (544) hide show
  1. package/.github/workflows/release_canary.yml +1 -0
  2. package/CHANGELOG.md +66 -4
  3. package/dist/browser.esm.js +289 -351
  4. package/dist/browser.esm.js.map +1 -1
  5. package/dist/browser.umd.js +294 -356
  6. package/dist/browser.umd.js.map +1 -1
  7. package/docs/content/ActionList2.mdx +8 -7
  8. package/docs/content/Breadcrumbs.md +11 -16
  9. package/docs/content/Buttons.md +7 -17
  10. package/docs/content/CircleBadge.md +0 -10
  11. package/docs/content/CounterLabel.md +0 -10
  12. package/docs/content/Dialog.md +15 -18
  13. package/docs/content/Dialog2.mdx +1 -0
  14. package/docs/content/Dropdown.md +11 -18
  15. package/docs/content/FilterList.md +10 -17
  16. package/docs/content/FilteredSearch.md +4 -11
  17. package/docs/content/Flash.md +5 -14
  18. package/docs/content/FormGroup.md +9 -17
  19. package/docs/content/Header.md +14 -16
  20. package/docs/content/Label.md +32 -25
  21. package/docs/content/LabelGroup.md +4 -14
  22. package/docs/content/Link.md +8 -17
  23. package/docs/content/Overlay.mdx +1 -10
  24. package/docs/content/Pagehead.md +4 -13
  25. package/docs/content/Pagination.md +10 -19
  26. package/docs/content/Popover.md +11 -19
  27. package/docs/content/SelectMenu.md +50 -114
  28. package/docs/content/SideNav.md +15 -23
  29. package/docs/content/StateLabel.md +5 -14
  30. package/docs/content/StyledOcticon.md +7 -16
  31. package/docs/content/SubNav.md +19 -21
  32. package/docs/content/TabNav.md +10 -18
  33. package/docs/content/Timeline.md +34 -24
  34. package/docs/content/Tooltip.md +8 -17
  35. package/docs/content/Truncate.md +7 -16
  36. package/docs/content/UnderlineNav.md +13 -21
  37. package/lib/ActionList2/Group.d.ts +28 -2
  38. package/lib/ActionList2/Group.js +55 -6
  39. package/lib/ActionList2/Group.jsx +33 -4
  40. package/lib/ActionList2/List.d.ts +1 -1
  41. package/lib/Autocomplete/Autocomplete.d.ts +3 -3
  42. package/lib/Autocomplete/AutocompleteInput.d.ts +3 -3
  43. package/lib/Breadcrumbs.d.ts +8 -7
  44. package/lib/Breadcrumbs.js +7 -12
  45. package/lib/Breadcrumbs.jsx +3 -6
  46. package/lib/Button/Button.d.ts +2 -3
  47. package/lib/Button/Button.js +2 -6
  48. package/lib/Button/Button.jsx +1 -21
  49. package/lib/Button/ButtonBase.d.ts +5 -8
  50. package/lib/Button/ButtonBase.js +1 -5
  51. package/lib/Button/ButtonBase.jsx +0 -3
  52. package/lib/Button/ButtonClose.d.ts +3 -46
  53. package/lib/Button/ButtonClose.js +1 -1
  54. package/lib/Button/ButtonClose.jsx +0 -2
  55. package/lib/Button/ButtonDanger.d.ts +2 -3
  56. package/lib/Button/ButtonDanger.js +2 -6
  57. package/lib/Button/ButtonDanger.jsx +1 -21
  58. package/lib/Button/ButtonInvisible.d.ts +2 -3
  59. package/lib/Button/ButtonInvisible.js +2 -6
  60. package/lib/Button/ButtonInvisible.jsx +1 -21
  61. package/lib/Button/ButtonOutline.d.ts +2 -3
  62. package/lib/Button/ButtonOutline.js +2 -6
  63. package/lib/Button/ButtonOutline.jsx +1 -21
  64. package/lib/Button/ButtonPrimary.d.ts +2 -3
  65. package/lib/Button/ButtonPrimary.js +2 -6
  66. package/lib/Button/ButtonPrimary.jsx +1 -21
  67. package/lib/Button/ButtonTableList.d.ts +1 -2
  68. package/lib/Button/ButtonTableList.js +1 -1
  69. package/lib/Button/ButtonTableList.jsx +0 -3
  70. package/lib/CircleBadge.d.ts +4 -5
  71. package/lib/CircleBadge.js +1 -1
  72. package/lib/CircleBadge.jsx +0 -1
  73. package/lib/CircleOcticon.d.ts +1 -1
  74. package/lib/CounterLabel.d.ts +1 -2
  75. package/lib/CounterLabel.js +1 -1
  76. package/lib/CounterLabel.jsx +0 -1
  77. package/lib/Dialog/Dialog.d.ts +5 -9
  78. package/lib/Dialog/Dialog.js +17 -11
  79. package/lib/Dialog/Dialog.jsx +13 -7
  80. package/lib/Dialog.d.ts +4 -5
  81. package/lib/Dialog.js +1 -1
  82. package/lib/Dialog.jsx +0 -2
  83. package/lib/Dropdown.d.ts +10 -99
  84. package/lib/Dropdown.js +3 -3
  85. package/lib/Dropdown.jsx +0 -3
  86. package/lib/DropdownMenu/DropdownButton.d.ts +3 -47
  87. package/lib/DropdownMenu/DropdownButton.js +3 -1
  88. package/lib/DropdownMenu/DropdownButton.jsx +1 -1
  89. package/lib/FilterList.d.ts +264 -303
  90. package/lib/FilterList.js +2 -6
  91. package/lib/FilterList.jsx +2 -6
  92. package/lib/FilteredSearch.d.ts +1 -2
  93. package/lib/FilteredSearch.js +1 -1
  94. package/lib/FilteredSearch.jsx +0 -1
  95. package/lib/Flash.d.ts +1 -2
  96. package/lib/Flash.js +1 -1
  97. package/lib/Flash.jsx +0 -1
  98. package/lib/FormGroup.d.ts +4 -5
  99. package/lib/FormGroup.js +2 -2
  100. package/lib/FormGroup.jsx +0 -3
  101. package/lib/Header.d.ts +6 -7
  102. package/lib/Header.js +4 -4
  103. package/lib/Header.jsx +0 -7
  104. package/lib/Label.d.ts +1 -2
  105. package/lib/Label.js +2 -3
  106. package/lib/Label.jsx +1 -3
  107. package/lib/LabelGroup.d.ts +1 -2
  108. package/lib/LabelGroup.js +1 -1
  109. package/lib/LabelGroup.jsx +0 -1
  110. package/lib/Link.d.ts +1 -2
  111. package/lib/Link.js +1 -1
  112. package/lib/Link.jsx +0 -2
  113. package/lib/Overlay.d.ts +11 -10
  114. package/lib/Overlay.js +3 -4
  115. package/lib/Overlay.jsx +1 -3
  116. package/lib/Pagehead.d.ts +1 -2
  117. package/lib/Pagehead.js +1 -1
  118. package/lib/Pagehead.jsx +0 -1
  119. package/lib/Pagination/Pagination.js +1 -1
  120. package/lib/Pagination/Pagination.jsx +0 -2
  121. package/lib/Popover.d.ts +4 -5
  122. package/lib/Popover.js +4 -5
  123. package/lib/Popover.jsx +1 -9
  124. package/lib/Position.d.ts +4 -4
  125. package/lib/SelectMenu/SelectMenu.d.ts +21 -189
  126. package/lib/SelectMenu/SelectMenu.js +1 -3
  127. package/lib/SelectMenu/SelectMenu.jsx +0 -2
  128. package/lib/SelectMenu/SelectMenuDivider.d.ts +1 -2
  129. package/lib/SelectMenu/SelectMenuDivider.js +1 -1
  130. package/lib/SelectMenu/SelectMenuDivider.jsx +0 -1
  131. package/lib/SelectMenu/SelectMenuFilter.js +1 -1
  132. package/lib/SelectMenu/SelectMenuFilter.jsx +0 -1
  133. package/lib/SelectMenu/SelectMenuFooter.d.ts +1 -2
  134. package/lib/SelectMenu/SelectMenuFooter.js +1 -1
  135. package/lib/SelectMenu/SelectMenuFooter.jsx +0 -1
  136. package/lib/SelectMenu/SelectMenuHeader.d.ts +1 -2
  137. package/lib/SelectMenu/SelectMenuHeader.js +1 -1
  138. package/lib/SelectMenu/SelectMenuHeader.jsx +0 -2
  139. package/lib/SelectMenu/SelectMenuItem.d.ts +2 -3
  140. package/lib/SelectMenu/SelectMenuItem.js +1 -1
  141. package/lib/SelectMenu/SelectMenuItem.jsx +0 -1
  142. package/lib/SelectMenu/SelectMenuList.d.ts +1 -2
  143. package/lib/SelectMenu/SelectMenuList.js +1 -1
  144. package/lib/SelectMenu/SelectMenuList.jsx +0 -1
  145. package/lib/SelectMenu/SelectMenuLoadingAnimation.d.ts +2 -2
  146. package/lib/SelectMenu/SelectMenuLoadingAnimation.js +3 -1
  147. package/lib/SelectMenu/SelectMenuLoadingAnimation.jsx +2 -1
  148. package/lib/SelectMenu/SelectMenuModal.d.ts +2 -3
  149. package/lib/SelectMenu/SelectMenuModal.js +1 -1
  150. package/lib/SelectMenu/SelectMenuModal.jsx +0 -1
  151. package/lib/SelectMenu/SelectMenuTab.d.ts +1 -2
  152. package/lib/SelectMenu/SelectMenuTab.js +1 -1
  153. package/lib/SelectMenu/SelectMenuTab.jsx +0 -1
  154. package/lib/SelectMenu/SelectMenuTabPanel.d.ts +1 -2
  155. package/lib/SelectMenu/SelectMenuTabPanel.js +1 -1
  156. package/lib/SelectMenu/SelectMenuTabPanel.jsx +0 -1
  157. package/lib/SelectMenu/SelectMenuTabs.d.ts +1 -2
  158. package/lib/SelectMenu/SelectMenuTabs.js +1 -1
  159. package/lib/SelectMenu/SelectMenuTabs.jsx +0 -1
  160. package/lib/SideNav.d.ts +11 -8
  161. package/lib/SideNav.js +8 -15
  162. package/lib/SideNav.jsx +2 -6
  163. package/lib/StateLabel.d.ts +1 -2
  164. package/lib/StateLabel.js +6 -5
  165. package/lib/StateLabel.jsx +1 -2
  166. package/lib/StyledOcticon.d.ts +1 -2
  167. package/lib/StyledOcticon.js +1 -3
  168. package/lib/StyledOcticon.jsx +0 -2
  169. package/lib/SubNav.d.ts +5 -11
  170. package/lib/SubNav.js +7 -12
  171. package/lib/SubNav.jsx +4 -7
  172. package/lib/TabNav.d.ts +3 -4
  173. package/lib/TabNav.js +2 -2
  174. package/lib/TabNav.jsx +0 -2
  175. package/lib/TextInputWithTokens.d.ts +3 -3
  176. package/lib/Timeline.d.ts +19 -393
  177. package/lib/Timeline.js +16 -13
  178. package/lib/Timeline.jsx +9 -10
  179. package/lib/Token/Token.d.ts +1 -1
  180. package/lib/Tooltip.d.ts +1 -2
  181. package/lib/Tooltip.js +1 -1
  182. package/lib/Tooltip.jsx +1 -1
  183. package/lib/Truncate.d.ts +1 -2
  184. package/lib/Truncate.js +1 -3
  185. package/lib/Truncate.jsx +0 -3
  186. package/lib/UnderlineNav.d.ts +2 -3
  187. package/lib/UnderlineNav.js +2 -2
  188. package/lib/UnderlineNav.jsx +0 -2
  189. package/lib/__tests__/Breadcrumbs.test.js +4 -1
  190. package/lib/__tests__/Breadcrumbs.test.jsx +1 -1
  191. package/lib/__tests__/Breadcrumbs.types.test.d.ts +3 -0
  192. package/lib/__tests__/Breadcrumbs.types.test.js +25 -0
  193. package/lib/__tests__/Breadcrumbs.types.test.jsx +24 -0
  194. package/lib/__tests__/Button.test.js +6 -2
  195. package/lib/__tests__/Button.test.jsx +2 -2
  196. package/lib/__tests__/CircleBadge.types.test.d.ts +3 -0
  197. package/lib/__tests__/CircleBadge.types.test.js +28 -0
  198. package/lib/__tests__/CircleBadge.types.test.jsx +17 -0
  199. package/lib/__tests__/CounterLabel.types.test.d.ts +3 -0
  200. package/lib/__tests__/CounterLabel.types.test.js +28 -0
  201. package/lib/__tests__/CounterLabel.types.test.jsx +17 -0
  202. package/lib/__tests__/Dialog.types.test.d.ts +3 -0
  203. package/lib/__tests__/Dialog.types.test.js +28 -0
  204. package/lib/__tests__/Dialog.types.test.jsx +17 -0
  205. package/lib/__tests__/Dialog2.types.test.d.ts +3 -0
  206. package/lib/__tests__/Dialog2.types.test.js +31 -0
  207. package/lib/__tests__/Dialog2.types.test.jsx +17 -0
  208. package/lib/__tests__/Dropdown.types.test.d.ts +3 -0
  209. package/lib/__tests__/Dropdown.types.test.js +31 -0
  210. package/lib/__tests__/Dropdown.types.test.jsx +25 -0
  211. package/lib/__tests__/FilterList.types.test.d.ts +3 -0
  212. package/lib/__tests__/FilterList.types.test.js +27 -0
  213. package/lib/__tests__/FilterList.types.test.jsx +21 -0
  214. package/lib/__tests__/FilteredSearch.types.test.d.ts +3 -0
  215. package/lib/__tests__/FilteredSearch.types.test.js +28 -0
  216. package/lib/__tests__/FilteredSearch.types.test.jsx +17 -0
  217. package/lib/__tests__/Flash.types.test.d.ts +3 -0
  218. package/lib/__tests__/Flash.types.test.js +28 -0
  219. package/lib/__tests__/Flash.types.test.jsx +17 -0
  220. package/lib/__tests__/FormGroup.types.test.d.ts +3 -0
  221. package/lib/__tests__/FormGroup.types.test.js +28 -0
  222. package/lib/__tests__/FormGroup.types.test.jsx +17 -0
  223. package/lib/__tests__/Header.types.test.d.ts +3 -0
  224. package/lib/__tests__/Header.types.test.js +29 -0
  225. package/lib/__tests__/Header.types.test.jsx +23 -0
  226. package/lib/__tests__/Label.types.test.d.ts +3 -0
  227. package/lib/__tests__/Label.types.test.js +28 -0
  228. package/lib/__tests__/Label.types.test.jsx +17 -0
  229. package/lib/__tests__/LabelGroup.types.test.d.ts +3 -0
  230. package/lib/__tests__/LabelGroup.types.test.js +28 -0
  231. package/lib/__tests__/LabelGroup.types.test.jsx +17 -0
  232. package/lib/__tests__/Link.test.js +11 -5
  233. package/lib/__tests__/Link.test.jsx +5 -5
  234. package/lib/__tests__/Link.types.test.d.ts +3 -0
  235. package/lib/__tests__/Link.types.test.js +28 -0
  236. package/lib/__tests__/Link.types.test.jsx +17 -0
  237. package/lib/__tests__/Overlay.types.test.d.ts +3 -0
  238. package/lib/__tests__/Overlay.types.test.js +35 -0
  239. package/lib/__tests__/Overlay.types.test.jsx +18 -0
  240. package/lib/__tests__/Pagehead.types.test.d.ts +3 -0
  241. package/lib/__tests__/Pagehead.types.test.js +28 -0
  242. package/lib/__tests__/Pagehead.types.test.jsx +17 -0
  243. package/lib/__tests__/Pagination.types.test.d.ts +3 -0
  244. package/lib/__tests__/Pagination.types.test.js +33 -0
  245. package/lib/__tests__/Pagination.types.test.jsx +17 -0
  246. package/lib/__tests__/Popover.types.test.d.ts +3 -0
  247. package/lib/__tests__/Popover.types.test.js +27 -0
  248. package/lib/__tests__/Popover.types.test.jsx +21 -0
  249. package/lib/__tests__/SelectMenu.types.test.d.ts +3 -0
  250. package/lib/__tests__/SelectMenu.types.test.js +47 -0
  251. package/lib/__tests__/SelectMenu.types.test.jsx +41 -0
  252. package/lib/__tests__/SideNav.types.test.d.ts +3 -0
  253. package/lib/__tests__/SideNav.types.test.js +28 -0
  254. package/lib/__tests__/SideNav.types.test.jsx +17 -0
  255. package/lib/__tests__/StateLabel.types.test.d.ts +3 -0
  256. package/lib/__tests__/StateLabel.types.test.js +28 -0
  257. package/lib/__tests__/StateLabel.types.test.jsx +17 -0
  258. package/lib/__tests__/StyledOcticon.types.test.d.ts +3 -0
  259. package/lib/__tests__/StyledOcticon.types.test.js +32 -0
  260. package/lib/__tests__/StyledOcticon.types.test.jsx +18 -0
  261. package/lib/__tests__/SubNav.types.test.d.ts +3 -0
  262. package/lib/__tests__/SubNav.types.test.js +27 -0
  263. package/lib/__tests__/SubNav.types.test.jsx +27 -0
  264. package/lib/__tests__/TabNav.types.test.d.ts +3 -0
  265. package/lib/__tests__/TabNav.types.test.js +25 -0
  266. package/lib/__tests__/TabNav.types.test.jsx +24 -0
  267. package/lib/__tests__/Timeline.types.test.d.ts +3 -0
  268. package/lib/__tests__/Timeline.types.test.js +31 -0
  269. package/lib/__tests__/Timeline.types.test.jsx +33 -0
  270. package/lib/__tests__/Tooltip.types.test.d.ts +3 -0
  271. package/lib/__tests__/Tooltip.types.test.js +28 -0
  272. package/lib/__tests__/Tooltip.types.test.jsx +17 -0
  273. package/lib/__tests__/Truncate.types.test.d.ts +3 -0
  274. package/lib/__tests__/Truncate.types.test.js +31 -0
  275. package/lib/__tests__/Truncate.types.test.jsx +17 -0
  276. package/lib/__tests__/UnderlineNav.types.test.d.ts +3 -0
  277. package/lib/__tests__/UnderlineNav.types.test.js +25 -0
  278. package/lib/__tests__/UnderlineNav.types.test.jsx +24 -0
  279. package/lib/stories/ActionList2.stories.js +4 -3
  280. package/lib/stories/ActionMenu.stories.js +1 -3
  281. package/lib/stories/ConfirmationDialog.stories.js +16 -8
  282. package/lib/stories/Dialog.stories.js +6 -2
  283. package/lib/stories/useFocusTrap.stories.js +6 -2
  284. package/lib/stories/useFocusZone.stories.js +13 -5
  285. package/lib-esm/ActionList2/Group.d.ts +28 -2
  286. package/lib-esm/ActionList2/Group.js +52 -5
  287. package/lib-esm/ActionList2/List.d.ts +1 -1
  288. package/lib-esm/Autocomplete/Autocomplete.d.ts +3 -3
  289. package/lib-esm/Autocomplete/AutocompleteInput.d.ts +3 -3
  290. package/lib-esm/Breadcrumbs.d.ts +8 -7
  291. package/lib-esm/Breadcrumbs.js +8 -13
  292. package/lib-esm/Button/Button.d.ts +2 -3
  293. package/lib-esm/Button/Button.js +2 -2
  294. package/lib-esm/Button/ButtonBase.d.ts +5 -8
  295. package/lib-esm/Button/ButtonBase.js +1 -3
  296. package/lib-esm/Button/ButtonClose.d.ts +3 -46
  297. package/lib-esm/Button/ButtonClose.js +2 -2
  298. package/lib-esm/Button/ButtonDanger.d.ts +2 -3
  299. package/lib-esm/Button/ButtonDanger.js +2 -2
  300. package/lib-esm/Button/ButtonInvisible.d.ts +2 -3
  301. package/lib-esm/Button/ButtonInvisible.js +2 -2
  302. package/lib-esm/Button/ButtonOutline.d.ts +2 -3
  303. package/lib-esm/Button/ButtonOutline.js +2 -2
  304. package/lib-esm/Button/ButtonPrimary.d.ts +2 -3
  305. package/lib-esm/Button/ButtonPrimary.js +2 -2
  306. package/lib-esm/Button/ButtonTableList.d.ts +1 -2
  307. package/lib-esm/Button/ButtonTableList.js +2 -2
  308. package/lib-esm/CircleBadge.d.ts +4 -5
  309. package/lib-esm/CircleBadge.js +2 -2
  310. package/lib-esm/CircleOcticon.d.ts +1 -1
  311. package/lib-esm/CounterLabel.d.ts +1 -2
  312. package/lib-esm/CounterLabel.js +2 -2
  313. package/lib-esm/Dialog/Dialog.d.ts +5 -9
  314. package/lib-esm/Dialog/Dialog.js +12 -12
  315. package/lib-esm/Dialog.d.ts +4 -5
  316. package/lib-esm/Dialog.js +2 -2
  317. package/lib-esm/Dropdown.d.ts +10 -99
  318. package/lib-esm/Dropdown.js +4 -4
  319. package/lib-esm/DropdownMenu/DropdownButton.d.ts +3 -47
  320. package/lib-esm/DropdownMenu/DropdownButton.js +3 -1
  321. package/lib-esm/FilterList.d.ts +264 -303
  322. package/lib-esm/FilterList.js +3 -7
  323. package/lib-esm/FilteredSearch.d.ts +1 -2
  324. package/lib-esm/FilteredSearch.js +2 -2
  325. package/lib-esm/Flash.d.ts +1 -2
  326. package/lib-esm/Flash.js +2 -2
  327. package/lib-esm/FormGroup.d.ts +4 -5
  328. package/lib-esm/FormGroup.js +3 -3
  329. package/lib-esm/Header.d.ts +6 -7
  330. package/lib-esm/Header.js +5 -5
  331. package/lib-esm/Label.d.ts +1 -2
  332. package/lib-esm/Label.js +3 -4
  333. package/lib-esm/LabelGroup.d.ts +1 -2
  334. package/lib-esm/LabelGroup.js +2 -2
  335. package/lib-esm/Link.d.ts +1 -2
  336. package/lib-esm/Link.js +2 -2
  337. package/lib-esm/Overlay.d.ts +11 -10
  338. package/lib-esm/Overlay.js +2 -3
  339. package/lib-esm/Pagehead.d.ts +1 -2
  340. package/lib-esm/Pagehead.js +2 -2
  341. package/lib-esm/Pagination/Pagination.js +2 -2
  342. package/lib-esm/Popover.d.ts +4 -5
  343. package/lib-esm/Popover.js +4 -5
  344. package/lib-esm/Position.d.ts +4 -4
  345. package/lib-esm/SelectMenu/SelectMenu.d.ts +21 -189
  346. package/lib-esm/SelectMenu/SelectMenu.js +1 -2
  347. package/lib-esm/SelectMenu/SelectMenuDivider.d.ts +1 -2
  348. package/lib-esm/SelectMenu/SelectMenuDivider.js +2 -2
  349. package/lib-esm/SelectMenu/SelectMenuFilter.js +2 -2
  350. package/lib-esm/SelectMenu/SelectMenuFooter.d.ts +1 -2
  351. package/lib-esm/SelectMenu/SelectMenuFooter.js +2 -2
  352. package/lib-esm/SelectMenu/SelectMenuHeader.d.ts +1 -2
  353. package/lib-esm/SelectMenu/SelectMenuHeader.js +2 -2
  354. package/lib-esm/SelectMenu/SelectMenuItem.d.ts +2 -3
  355. package/lib-esm/SelectMenu/SelectMenuItem.js +2 -2
  356. package/lib-esm/SelectMenu/SelectMenuList.d.ts +1 -2
  357. package/lib-esm/SelectMenu/SelectMenuList.js +2 -2
  358. package/lib-esm/SelectMenu/SelectMenuLoadingAnimation.d.ts +2 -2
  359. package/lib-esm/SelectMenu/SelectMenuLoadingAnimation.js +3 -2
  360. package/lib-esm/SelectMenu/SelectMenuModal.d.ts +2 -3
  361. package/lib-esm/SelectMenu/SelectMenuModal.js +2 -2
  362. package/lib-esm/SelectMenu/SelectMenuTab.d.ts +1 -2
  363. package/lib-esm/SelectMenu/SelectMenuTab.js +2 -2
  364. package/lib-esm/SelectMenu/SelectMenuTabPanel.d.ts +1 -2
  365. package/lib-esm/SelectMenu/SelectMenuTabPanel.js +2 -2
  366. package/lib-esm/SelectMenu/SelectMenuTabs.d.ts +1 -2
  367. package/lib-esm/SelectMenu/SelectMenuTabs.js +2 -2
  368. package/lib-esm/SideNav.d.ts +11 -8
  369. package/lib-esm/SideNav.js +8 -16
  370. package/lib-esm/StateLabel.d.ts +1 -2
  371. package/lib-esm/StateLabel.js +7 -6
  372. package/lib-esm/StyledOcticon.d.ts +1 -2
  373. package/lib-esm/StyledOcticon.js +1 -2
  374. package/lib-esm/SubNav.d.ts +5 -11
  375. package/lib-esm/SubNav.js +8 -13
  376. package/lib-esm/TabNav.d.ts +3 -4
  377. package/lib-esm/TabNav.js +3 -3
  378. package/lib-esm/TextInputWithTokens.d.ts +3 -3
  379. package/lib-esm/Timeline.d.ts +19 -393
  380. package/lib-esm/Timeline.js +12 -13
  381. package/lib-esm/Token/Token.d.ts +1 -1
  382. package/lib-esm/Tooltip.d.ts +1 -2
  383. package/lib-esm/Tooltip.js +2 -2
  384. package/lib-esm/Truncate.d.ts +1 -2
  385. package/lib-esm/Truncate.js +1 -2
  386. package/lib-esm/UnderlineNav.d.ts +2 -3
  387. package/lib-esm/UnderlineNav.js +3 -3
  388. package/lib-esm/__tests__/Breadcrumbs.test.js +4 -1
  389. package/lib-esm/__tests__/Breadcrumbs.types.test.d.ts +3 -0
  390. package/lib-esm/__tests__/Breadcrumbs.types.test.js +12 -0
  391. package/lib-esm/__tests__/Button.test.js +6 -2
  392. package/lib-esm/__tests__/CircleBadge.types.test.d.ts +3 -0
  393. package/lib-esm/__tests__/CircleBadge.types.test.js +13 -0
  394. package/lib-esm/__tests__/CounterLabel.types.test.d.ts +3 -0
  395. package/lib-esm/__tests__/CounterLabel.types.test.js +13 -0
  396. package/lib-esm/__tests__/Dialog.types.test.d.ts +3 -0
  397. package/lib-esm/__tests__/Dialog.types.test.js +13 -0
  398. package/lib-esm/__tests__/Dialog2.types.test.d.ts +3 -0
  399. package/lib-esm/__tests__/Dialog2.types.test.js +16 -0
  400. package/lib-esm/__tests__/Dropdown.types.test.d.ts +3 -0
  401. package/lib-esm/__tests__/Dropdown.types.test.js +17 -0
  402. package/lib-esm/__tests__/FilterList.types.test.d.ts +3 -0
  403. package/lib-esm/__tests__/FilterList.types.test.js +13 -0
  404. package/lib-esm/__tests__/FilteredSearch.types.test.d.ts +3 -0
  405. package/lib-esm/__tests__/FilteredSearch.types.test.js +13 -0
  406. package/lib-esm/__tests__/Flash.types.test.d.ts +3 -0
  407. package/lib-esm/__tests__/Flash.types.test.js +13 -0
  408. package/lib-esm/__tests__/FormGroup.types.test.d.ts +3 -0
  409. package/lib-esm/__tests__/FormGroup.types.test.js +13 -0
  410. package/lib-esm/__tests__/Header.types.test.d.ts +3 -0
  411. package/lib-esm/__tests__/Header.types.test.js +15 -0
  412. package/lib-esm/__tests__/Label.types.test.d.ts +3 -0
  413. package/lib-esm/__tests__/Label.types.test.js +13 -0
  414. package/lib-esm/__tests__/LabelGroup.types.test.d.ts +3 -0
  415. package/lib-esm/__tests__/LabelGroup.types.test.js +13 -0
  416. package/lib-esm/__tests__/Link.test.js +11 -5
  417. package/lib-esm/__tests__/Link.types.test.d.ts +3 -0
  418. package/lib-esm/__tests__/Link.types.test.js +13 -0
  419. package/lib-esm/__tests__/Overlay.types.test.d.ts +3 -0
  420. package/lib-esm/__tests__/Overlay.types.test.js +20 -0
  421. package/lib-esm/__tests__/Pagehead.types.test.d.ts +3 -0
  422. package/lib-esm/__tests__/Pagehead.types.test.js +13 -0
  423. package/lib-esm/__tests__/Pagination.types.test.d.ts +3 -0
  424. package/lib-esm/__tests__/Pagination.types.test.js +18 -0
  425. package/lib-esm/__tests__/Popover.types.test.d.ts +3 -0
  426. package/lib-esm/__tests__/Popover.types.test.js +13 -0
  427. package/lib-esm/__tests__/SelectMenu.types.test.d.ts +3 -0
  428. package/lib-esm/__tests__/SelectMenu.types.test.js +33 -0
  429. package/lib-esm/__tests__/SideNav.types.test.d.ts +3 -0
  430. package/lib-esm/__tests__/SideNav.types.test.js +13 -0
  431. package/lib-esm/__tests__/StateLabel.types.test.d.ts +3 -0
  432. package/lib-esm/__tests__/StateLabel.types.test.js +13 -0
  433. package/lib-esm/__tests__/StyledOcticon.types.test.d.ts +3 -0
  434. package/lib-esm/__tests__/StyledOcticon.types.test.js +16 -0
  435. package/lib-esm/__tests__/SubNav.types.test.d.ts +3 -0
  436. package/lib-esm/__tests__/SubNav.types.test.js +14 -0
  437. package/lib-esm/__tests__/TabNav.types.test.d.ts +3 -0
  438. package/lib-esm/__tests__/TabNav.types.test.js +12 -0
  439. package/lib-esm/__tests__/Timeline.types.test.d.ts +3 -0
  440. package/lib-esm/__tests__/Timeline.types.test.js +18 -0
  441. package/lib-esm/__tests__/Tooltip.types.test.d.ts +3 -0
  442. package/lib-esm/__tests__/Tooltip.types.test.js +13 -0
  443. package/lib-esm/__tests__/Truncate.types.test.d.ts +3 -0
  444. package/lib-esm/__tests__/Truncate.types.test.js +16 -0
  445. package/lib-esm/__tests__/UnderlineNav.types.test.d.ts +3 -0
  446. package/lib-esm/__tests__/UnderlineNav.types.test.js +12 -0
  447. package/lib-esm/stories/ActionList2.stories.js +4 -3
  448. package/lib-esm/stories/ActionMenu.stories.js +1 -3
  449. package/lib-esm/stories/ConfirmationDialog.stories.js +16 -8
  450. package/lib-esm/stories/Dialog.stories.js +6 -2
  451. package/lib-esm/stories/useFocusTrap.stories.js +6 -2
  452. package/lib-esm/stories/useFocusZone.stories.js +13 -5
  453. package/package-lock.json +7 -7
  454. package/package.json +2 -2
  455. package/src/ActionList2/Group.tsx +76 -7
  456. package/src/ActionList2/List.tsx +1 -1
  457. package/src/Breadcrumbs.tsx +11 -11
  458. package/src/Button/Button.tsx +2 -3
  459. package/src/Button/ButtonBase.tsx +2 -6
  460. package/src/Button/ButtonClose.tsx +2 -6
  461. package/src/Button/ButtonDanger.tsx +2 -3
  462. package/src/Button/ButtonInvisible.tsx +2 -3
  463. package/src/Button/ButtonOutline.tsx +2 -3
  464. package/src/Button/ButtonPrimary.tsx +2 -3
  465. package/src/Button/ButtonTableList.tsx +2 -15
  466. package/src/CircleBadge.tsx +2 -4
  467. package/src/CounterLabel.tsx +2 -4
  468. package/src/Dialog/Dialog.tsx +22 -11
  469. package/src/Dialog.tsx +2 -6
  470. package/src/Dropdown.tsx +3 -7
  471. package/src/DropdownMenu/DropdownButton.tsx +1 -1
  472. package/src/FilterList.tsx +5 -11
  473. package/src/FilteredSearch.tsx +2 -3
  474. package/src/Flash.tsx +2 -4
  475. package/src/FormGroup.tsx +3 -6
  476. package/src/Header.tsx +4 -14
  477. package/src/Label.tsx +2 -5
  478. package/src/LabelGroup.tsx +2 -3
  479. package/src/Link.tsx +2 -6
  480. package/src/Overlay.tsx +13 -11
  481. package/src/Pagehead.tsx +2 -3
  482. package/src/Pagination/Pagination.tsx +3 -5
  483. package/src/Popover.tsx +3 -14
  484. package/src/SelectMenu/SelectMenu.tsx +1 -3
  485. package/src/SelectMenu/SelectMenuDivider.tsx +2 -3
  486. package/src/SelectMenu/SelectMenuFilter.tsx +2 -3
  487. package/src/SelectMenu/SelectMenuFooter.tsx +2 -3
  488. package/src/SelectMenu/SelectMenuHeader.tsx +2 -4
  489. package/src/SelectMenu/SelectMenuItem.tsx +2 -3
  490. package/src/SelectMenu/SelectMenuList.tsx +2 -3
  491. package/src/SelectMenu/SelectMenuLoadingAnimation.tsx +4 -3
  492. package/src/SelectMenu/SelectMenuModal.tsx +2 -4
  493. package/src/SelectMenu/SelectMenuTab.tsx +2 -3
  494. package/src/SelectMenu/SelectMenuTabPanel.tsx +2 -3
  495. package/src/SelectMenu/SelectMenuTabs.tsx +2 -3
  496. package/src/SideNav.tsx +11 -13
  497. package/src/StateLabel.tsx +3 -5
  498. package/src/StyledOcticon.tsx +1 -3
  499. package/src/SubNav.tsx +8 -13
  500. package/src/TabNav.tsx +3 -7
  501. package/src/Timeline.tsx +11 -12
  502. package/src/Tooltip.tsx +3 -3
  503. package/src/Truncate.tsx +0 -5
  504. package/src/UnderlineNav.tsx +3 -6
  505. package/src/__tests__/Breadcrumbs.test.tsx +1 -1
  506. package/src/__tests__/Breadcrumbs.types.test.tsx +22 -0
  507. package/src/__tests__/Button.test.tsx +2 -2
  508. package/src/__tests__/CircleBadge.types.test.tsx +11 -0
  509. package/src/__tests__/CounterLabel.types.test.tsx +11 -0
  510. package/src/__tests__/Dialog.types.test.tsx +11 -0
  511. package/src/__tests__/Dialog2.types.test.tsx +11 -0
  512. package/src/__tests__/Dropdown.types.test.tsx +21 -0
  513. package/src/__tests__/FilterList.types.test.tsx +17 -0
  514. package/src/__tests__/FilteredSearch.types.test.tsx +11 -0
  515. package/src/__tests__/Flash.types.test.tsx +11 -0
  516. package/src/__tests__/FormGroup.types.test.tsx +11 -0
  517. package/src/__tests__/Header.types.test.tsx +19 -0
  518. package/src/__tests__/Label.types.test.tsx +11 -0
  519. package/src/__tests__/LabelGroup.types.test.tsx +11 -0
  520. package/src/__tests__/Link.test.tsx +5 -5
  521. package/src/__tests__/Link.types.test.tsx +11 -0
  522. package/src/__tests__/Overlay.types.test.tsx +18 -0
  523. package/src/__tests__/Pagehead.types.test.tsx +11 -0
  524. package/src/__tests__/Pagination.types.test.tsx +11 -0
  525. package/src/__tests__/Popover.types.test.tsx +17 -0
  526. package/src/__tests__/SelectMenu.types.test.tsx +37 -0
  527. package/src/__tests__/SideNav.types.test.tsx +11 -0
  528. package/src/__tests__/StateLabel.types.test.tsx +11 -0
  529. package/src/__tests__/StyledOcticon.types.test.tsx +12 -0
  530. package/src/__tests__/SubNav.types.test.tsx +25 -0
  531. package/src/__tests__/TabNav.types.test.tsx +22 -0
  532. package/src/__tests__/Timeline.types.test.tsx +31 -0
  533. package/src/__tests__/Tooltip.types.test.tsx +11 -0
  534. package/src/__tests__/Truncate.types.test.tsx +11 -0
  535. package/src/__tests__/UnderlineNav.types.test.tsx +22 -0
  536. package/src/__tests__/__snapshots__/Label.test.tsx.snap +3 -4
  537. package/src/__tests__/__snapshots__/Link.test.tsx.snap +1 -2
  538. package/src/stories/ActionList2.stories.tsx +3 -3
  539. package/src/stories/ActionMenu.stories.tsx +1 -4
  540. package/src/stories/ConfirmationDialog.stories.tsx +4 -4
  541. package/src/stories/Dialog.stories.tsx +2 -2
  542. package/src/stories/useFocusTrap.stories.tsx +2 -2
  543. package/src/stories/useFocusZone.stories.tsx +4 -4
  544. package/stats.html +1 -1
@@ -13,10 +13,10 @@ The Timeline.Item component is used to display items on a vertical timeline, con
13
13
  <StyledOcticon icon={FlameIcon} />
14
14
  </Timeline.Badge>
15
15
  <Timeline.Body>
16
- <Link href="#" sx={{fontWeight: 'bold', color: "fg.default", mr: 1}} muted>
16
+ <Link href="#" sx={{fontWeight: 'bold', color: 'fg.default', mr: 1}} muted>
17
17
  Monalisa
18
18
  </Link>
19
- created one <Link href="#" sx={{fontWeight: 'bold', color: "fg.default", mr: 1}} muted>
19
+ created one <Link href="#" sx={{fontWeight: 'bold', color: 'fg.default', mr: 1}} muted>
20
20
  hot potato
21
21
  </Link>
22
22
  <Link href="#" color="fg.muted" muted>
@@ -50,20 +50,20 @@ of the child `StyledOcticon` if necessary.
50
50
  ```jsx live
51
51
  <Timeline>
52
52
  <Timeline.Item>
53
- <Timeline.Badge sx={{bg: "danger.emphasis"}}>
54
- <StyledOcticon icon={FlameIcon} sx={{color: "fg.onEmphasis"}} />
53
+ <Timeline.Badge sx={{bg: 'danger.emphasis'}}>
54
+ <StyledOcticon icon={FlameIcon} sx={{color: 'fg.onEmphasis'}} />
55
55
  </Timeline.Badge>
56
56
  <Timeline.Body>Background used when closed events occur</Timeline.Body>
57
57
  </Timeline.Item>
58
58
  <Timeline.Item>
59
- <Timeline.Badge sx={{bg: "danger.emphasis"}}>
59
+ <Timeline.Badge sx={{bg: 'danger.emphasis'}}>
60
60
  <StyledOcticon icon={FlameIcon} color="fg.onEmphasis" />
61
61
  </Timeline.Badge>
62
62
  <Timeline.Body>Background when opened or passed events occur</Timeline.Body>
63
63
  </Timeline.Item>
64
64
  <Timeline.Item>
65
- <Timeline.Badge sx={{bg: "danger.emphasis"}}>
66
- <StyledOcticon icon={FlameIcon} sx={{color: "fg.onEmphasis"}} />
65
+ <Timeline.Badge sx={{bg: 'danger.emphasis'}}>
66
+ <StyledOcticon icon={FlameIcon} sx={{color: 'fg.onEmphasis'}} />
67
67
  </Timeline.Badge>
68
68
  <Timeline.Body>Background used when pull requests are merged</Timeline.Body>
69
69
  </Timeline.Item>
@@ -98,41 +98,51 @@ To create a visual break in the timeline, use Timeline.Break. This adds a horizo
98
98
  ```jsx live
99
99
  <Timeline>
100
100
  <Timeline.Item>
101
- <Timeline.Badge sx={{bg: "danger.emphasis"}}>
101
+ <Timeline.Badge sx={{bg: 'danger.emphasis'}}>
102
102
  <StyledOcticon icon={FlameIcon} color="fg.onEmphasis" />
103
103
  </Timeline.Badge>
104
104
  <Timeline.Body>Background used when closed events occur</Timeline.Body>
105
105
  </Timeline.Item>
106
106
  <Timeline.Break />
107
107
  <Timeline.Item>
108
- <Timeline.Badge sx={{bg: "success.emphasis"}}>
109
- <StyledOcticon icon={FlameIcon} sx={{color: "fg.onEmphasis"}} />
108
+ <Timeline.Badge sx={{bg: 'success.emphasis'}}>
109
+ <StyledOcticon icon={FlameIcon} sx={{color: 'fg.onEmphasis'}} />
110
110
  </Timeline.Badge>
111
111
  <Timeline.Body>Background when opened or passed events occur</Timeline.Body>
112
112
  </Timeline.Item>
113
113
  </Timeline>
114
114
  ```
115
115
 
116
- ## System props
116
+ ## Component props
117
117
 
118
- <Note variant="warning">
118
+ ### Timeline
119
119
 
120
- System props are deprecated in all components except [Box](/Box). Please use the [`sx` prop](/overriding-styles) instead.
120
+ | Name | Type | Default | Description |
121
+ | :---------- | :---------------- | :-----: | :-------------------------------------------------------------------------------- |
122
+ | clipSidebar | Boolean | | Hides the sidebar above the first Timeline.Item and below the last Timeline.Item. |
123
+ | sx | SystemStyleObject | {} | Style to be applied to the component |
121
124
 
122
- </Note>
125
+ ### Timeline.Item
123
126
 
124
- Timeline and Timeline.Item components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props.
127
+ | Name | Type | Default | Description |
128
+ | :-------- | :---------------- | :-----: | :-------------------------------------------------------------------- |
129
+ | condensed | Boolean | | Reduces vertical padding and removes background from an item's badge. |
130
+ | sx | SystemStyleObject | {} | Style to be applied to the component |
125
131
 
126
- ## Component props
132
+ ### Timeline.Badge
127
133
 
128
- ### Timeline
134
+ | Name | Type | Default | Description |
135
+ | :--- | :---------------- | :-----: | :----------------------------------- |
136
+ | sx | SystemStyleObject | {} | Style to be applied to the component |
129
137
 
130
- | Prop name | Type | Description |
131
- | :---------- | :------ | :-------------------------------------------------------------------------------- |
132
- | clipSidebar | Boolean | Hides the sidebar above the first Timeline.Item and below the last Timeline.Item. |
138
+ ### Timeline.Body
133
139
 
134
- ### Timeline.Item
140
+ | Name | Type | Default | Description |
141
+ | :--- | :---------------- | :-----: | :----------------------------------- |
142
+ | sx | SystemStyleObject | {} | Style to be applied to the component |
143
+
144
+ ### Timeline.Break
135
145
 
136
- | Prop name | Type | Description |
137
- | :-------- | :------ | :-------------------------------------------------------------------- |
138
- | condensed | Boolean | Reduces vertical padding and removes background from an item's badge. |
146
+ | Name | Type | Default | Description |
147
+ | :--- | :---------------- | :-----: | :----------------------------------- |
148
+ | sx | SystemStyleObject | {} | Style to be applied to the component |
@@ -20,22 +20,13 @@ Before adding a tooltip, please consider: Is this information essential and nece
20
20
  </Box>
21
21
  ```
22
22
 
23
- ## System props
24
-
25
- <Note variant="warning">
26
-
27
- System props are deprecated in all components except [Box](/Box). Please use the [`sx` prop](/overriding-styles) instead.
28
-
29
- </Note>
30
-
31
- Tooltip components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props.
32
-
33
23
  ## Component props
34
24
 
35
- | Name | Type | Default | Description |
36
- | :--------- | :------ | :-----: | :------------------------------------------------------- | --------------------------------------------------------- |
37
- | align | String | | Can be either `left` or `right`. |
38
- | direction | String | | Can be one of `n`, `ne`, `e`, `se`, `s`, `sw`, `w`, `nw` | Sets where the tooltip renders in relation to the target. |
39
- | noDelay | Boolean | | When set to `true`, tooltip appears without any delay |
40
- | aria-label | String | | Text used in `aria-label` (for accessibility). |
41
- | wrap | Boolean | | Use `true` to allow text within tooltip to wrap. |
25
+ | Name | Type | Default | Description |
26
+ | :--------- | :---------------- | :-----: | :------------------------------------------------------------------------------------------------------------------ |
27
+ | align | String | | Can be either `left` or `right`. |
28
+ | direction | String | | Can be one of `n`, `ne`, `e`, `se`, `s`, `sw`, `w`, `nw`. Sets where the tooltip renders in relation to the target. |
29
+ | noDelay | Boolean | | When set to `true`, tooltip appears without any delay |
30
+ | aria-label | String | | Text used in `aria-label` (for accessibility). |
31
+ | wrap | Boolean | | Use `true` to allow text within tooltip to wrap. |
32
+ | sx | SystemStyleObject | {} | Style to be applied to the component |
@@ -44,21 +44,12 @@ You can use the `expandable` boolean prop to display the truncated text on hover
44
44
  </Truncate>
45
45
  ```
46
46
 
47
- ## System props
48
-
49
- <Note variant="warning">
50
-
51
- System props are deprecated in all components except [Box](/Box). Please use the [`sx` prop](/overriding-styles) instead.
52
-
53
- </Note>
54
-
55
- Truncate components get `TYPOGRAPHY` and `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props.
56
-
57
47
  ## Component props
58
48
 
59
- | Name | Type | Default | Description |
60
- | :--------- | :------ | :-----: | :----------------------------------------------------------- |
61
- | as | String | `div` | Sets the HTML tag for the component |
62
- | maxWidth | Number | 125 | Sets the max-width of the text |
63
- | inline | Boolean | false | displays text as inline block and vertical aligns to the top |
64
- | expandable | Boolean | false | allows the truncated text to be displayed on hover |
49
+ | Name | Type | Default | Description |
50
+ | :--------- | :---------------- | :-----: | :----------------------------------------------------------- |
51
+ | as | String | `div` | Sets the HTML tag for the component |
52
+ | maxWidth | Number | 125 | Sets the max-width of the text |
53
+ | inline | Boolean | false | displays text as inline block and vertical aligns to the top |
54
+ | expandable | Boolean | false | allows the truncated text to be displayed on hover |
55
+ | sx | SystemStyleObject | {} | Style to be applied to the component |
@@ -23,31 +23,23 @@ This ensures that the NavLink gets `activeClassName='selected'`
23
23
  </UnderlineNav>
24
24
  ```
25
25
 
26
- ## System props
27
-
28
- <Note variant="warning">
29
-
30
- System props are deprecated in all components except [Box](/Box). Please use the [`sx` prop](/overriding-styles) instead.
31
-
32
- </Note>
33
-
34
- UnderlineNav and UnderlineNav.Link components get `COMMON` system props. Read our [System Props](/system-props) doc page for a full list of available props.
35
-
36
26
  ## Component props
37
27
 
38
28
  ### UnderlineNav
39
29
 
40
- | Prop name | Type | Description |
41
- | :--------- | :------ | :------------------------------------------------------------------------------------- |
42
- | actions | Node | Place another element, such as a button, to the opposite side of the navigation items. |
43
- | align | String | Use `right` to have navigation items aligned right. |
44
- | full | Boolean | Used to make navigation fill the width of the container. |
45
- | aria-label | String | Used to set the `aria-label` on the top level `<nav>` element. |
30
+ | Name | Type | Default | Description |
31
+ | :--------- | :---------------- | :-----: | :------------------------------------------------------------------------------------- |
32
+ | actions | Node | | Place another element, such as a button, to the opposite side of the navigation items. |
33
+ | align | String | | Use `right` to have navigation items aligned right. |
34
+ | full | Boolean | | Used to make navigation fill the width of the container. |
35
+ | aria-label | String | | Used to set the `aria-label` on the top level `<nav>` element. |
36
+ | sx | SystemStyleObject | {} | Style to be applied to the component |
46
37
 
47
38
  ### UnderlineNav.Link
48
39
 
49
- | Prop name | Type | Description |
50
- | :-------- | :------ | :----------------------------------------------- |
51
- | as | String | sets the HTML tag for the component |
52
- | href | String | URL to be used for the Link |
53
- | selected | Boolean | Used to style the link as selected or unselected |
40
+ | Name | Type | Default | Description |
41
+ | :------- | :---------------- | :-----: | :----------------------------------------------- |
42
+ | as | String | | sets the HTML tag for the component |
43
+ | href | String | | URL to be used for the Link |
44
+ | selected | Boolean | | Used to style the link as selected or unselected |
45
+ | sx | SystemStyleObject | {} | Style to be applied to the component |
@@ -1,11 +1,37 @@
1
1
  import React from 'react';
2
2
  import { SxProp } from '../sx';
3
- import { HeaderProps } from './Header';
4
3
  import { ListProps } from './List';
5
- export declare type GroupProps = HeaderProps & SxProp & {
4
+ import { AriaRole } from '../utils/types';
5
+ export declare type GroupProps = {
6
+ /**
7
+ * Style variations. Usage is discretionary.
8
+ *
9
+ * - `"filled"` - Superimposed on a background, offset from nearby content
10
+ * - `"subtle"` - Relatively less offset from nearby content
11
+ */
12
+ variant?: 'subtle' | 'filled';
13
+ /**
14
+ * Primary text which names a `Group`.
15
+ */
16
+ title?: string;
17
+ /**
18
+ * Secondary text which provides additional information about a `Group`.
19
+ */
20
+ auxiliaryText?: string;
21
+ /**
22
+ * The ARIA role describing the function of the list inside `Group` component. `listbox` or `menu` are a common values.
23
+ */
24
+ role?: AriaRole;
25
+ } & SxProp & {
26
+ /**
27
+ * Whether multiple Items or a single Item can be selected in the Group. Overrides value on ActionList root.
28
+ */
6
29
  selectionVariant?: ListProps['selectionVariant'] | false;
7
30
  };
8
31
  declare type ContextProps = Pick<GroupProps, 'selectionVariant'>;
9
32
  export declare const GroupContext: React.Context<ContextProps>;
10
33
  export declare const Group: React.FC<GroupProps>;
34
+ export declare type HeaderProps = Pick<GroupProps, 'variant' | 'title' | 'auxiliaryText'> & {
35
+ labelId: string;
36
+ };
11
37
  export {};
@@ -7,9 +7,11 @@ exports.Group = exports.GroupContext = void 0;
7
7
 
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
 
10
+ var _ssr = require("@react-aria/ssr");
11
+
10
12
  var _Box = _interopRequireDefault(require("../Box"));
11
13
 
12
- var _Header = require("./Header");
14
+ var _List = require("./List");
13
15
 
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
17
 
@@ -21,12 +23,14 @@ exports.GroupContext = GroupContext;
21
23
 
22
24
  const Group = ({
23
25
  title,
24
- variant,
26
+ variant = 'subtle',
25
27
  auxiliaryText,
26
28
  selectionVariant,
29
+ role,
27
30
  sx = {},
28
31
  ...props
29
32
  }) => {
33
+ const labelId = (0, _ssr.useSSRSafeId)();
30
34
  return /*#__PURE__*/_react.default.createElement(_Box.default, _extends({
31
35
  as: "li",
32
36
  sx: {
@@ -37,10 +41,11 @@ const Group = ({
37
41
  // hide the ::marker inserted by browser's stylesheet
38
42
  ...sx
39
43
  }
40
- }, props), title && /*#__PURE__*/_react.default.createElement(_Header.Header, {
44
+ }, props), title && /*#__PURE__*/_react.default.createElement(Header, {
41
45
  title: title,
42
46
  variant: variant,
43
- auxiliaryText: auxiliaryText
47
+ auxiliaryText: auxiliaryText,
48
+ labelId: labelId
44
49
  }), /*#__PURE__*/_react.default.createElement(GroupContext.Provider, {
45
50
  value: {
46
51
  selectionVariant
@@ -49,9 +54,53 @@ const Group = ({
49
54
  as: "ul",
50
55
  sx: {
51
56
  paddingInlineStart: 0
52
- }
57
+ },
58
+ "aria-labelledby": title ? labelId : undefined,
59
+ role: role
53
60
  }, props.children)));
54
61
  };
55
62
 
56
63
  exports.Group = Group;
57
- Group.displayName = "Group";
64
+ Group.displayName = "Group";
65
+
66
+ /**
67
+ * Displays the name and description of a `Group`.
68
+ *
69
+ * For visual presentation only. It's hidden from screen readers.
70
+ */
71
+ const Header = ({
72
+ variant,
73
+ title,
74
+ auxiliaryText,
75
+ labelId,
76
+ ...props
77
+ }) => {
78
+ const {
79
+ variant: listVariant
80
+ } = _react.default.useContext(_List.ListContext);
81
+
82
+ const styles = {
83
+ paddingY: '6px',
84
+ paddingX: listVariant === 'full' ? 2 : 3,
85
+ fontSize: 0,
86
+ fontWeight: 'bold',
87
+ color: 'fg.muted',
88
+ ...(variant === 'filled' && {
89
+ backgroundColor: 'canvas.subtle',
90
+ marginX: 0,
91
+ marginBottom: 2,
92
+ borderTop: '1px solid',
93
+ borderBottom: '1px solid',
94
+ borderColor: 'neutral.muted'
95
+ })
96
+ };
97
+ return /*#__PURE__*/_react.default.createElement(_Box.default, _extends({
98
+ sx: styles,
99
+ role: "presentation",
100
+ "aria-hidden": "true"
101
+ }, props), /*#__PURE__*/_react.default.createElement("span", {
102
+ id: labelId
103
+ }, title), auxiliaryText && /*#__PURE__*/_react.default.createElement("span", null, auxiliaryText));
104
+ };
105
+
106
+ Header.displayName = "Header";
@@ -5,21 +5,50 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Group = exports.GroupContext = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
+ const ssr_1 = require("@react-aria/ssr");
8
9
  const Box_1 = __importDefault(require("../Box"));
9
- const Header_1 = require("./Header");
10
+ const List_1 = require("./List");
10
11
  exports.GroupContext = react_1.default.createContext({});
11
- const Group = ({ title, variant, auxiliaryText, selectionVariant, sx = {}, ...props }) => {
12
+ const Group = ({ title, variant = 'subtle', auxiliaryText, selectionVariant, role, sx = {}, ...props }) => {
13
+ const labelId = ssr_1.useSSRSafeId();
12
14
  return (<Box_1.default as="li" sx={{
13
15
  '&:not(:first-child)': { marginTop: 2 },
14
16
  listStyle: 'none',
15
17
  ...sx
16
18
  }} {...props}>
17
- {title && <Header_1.Header title={title} variant={variant} auxiliaryText={auxiliaryText}/>}
19
+ {title && <Header title={title} variant={variant} auxiliaryText={auxiliaryText} labelId={labelId}/>}
18
20
  <exports.GroupContext.Provider value={{ selectionVariant }}>
19
- <Box_1.default as="ul" sx={{ paddingInlineStart: 0 }}>
21
+ <Box_1.default as="ul" sx={{ paddingInlineStart: 0 }} aria-labelledby={title ? labelId : undefined} role={role}>
20
22
  {props.children}
21
23
  </Box_1.default>
22
24
  </exports.GroupContext.Provider>
23
25
  </Box_1.default>);
24
26
  };
25
27
  exports.Group = Group;
28
+ /**
29
+ * Displays the name and description of a `Group`.
30
+ *
31
+ * For visual presentation only. It's hidden from screen readers.
32
+ */
33
+ const Header = ({ variant, title, auxiliaryText, labelId, ...props }) => {
34
+ const { variant: listVariant } = react_1.default.useContext(List_1.ListContext);
35
+ const styles = {
36
+ paddingY: '6px',
37
+ paddingX: listVariant === 'full' ? 2 : 3,
38
+ fontSize: 0,
39
+ fontWeight: 'bold',
40
+ color: 'fg.muted',
41
+ ...(variant === 'filled' && {
42
+ backgroundColor: 'canvas.subtle',
43
+ marginX: 0,
44
+ marginBottom: 2,
45
+ borderTop: '1px solid',
46
+ borderBottom: '1px solid',
47
+ borderColor: 'neutral.muted'
48
+ })
49
+ };
50
+ return (<Box_1.default sx={styles} role="presentation" aria-hidden="true" {...props}>
51
+ <span id={labelId}>{title}</span>
52
+ {auxiliaryText && <span>{auxiliaryText}</span>}
53
+ </Box_1.default>);
54
+ };
@@ -20,7 +20,7 @@ export declare type ListProps = {
20
20
  */
21
21
  role?: AriaRole;
22
22
  } & SxProp;
23
- declare type ContextProps = Omit<ListProps, 'sx'>;
23
+ declare type ContextProps = Pick<ListProps, 'variant' | 'selectionVariant' | 'showDividers'>;
24
24
  export declare const ListContext: React.Context<ContextProps>;
25
25
  export declare const List: PolymorphicForwardRefComponent<"ul", ListProps>;
26
26
  export {};
@@ -20,7 +20,7 @@ declare const _default: React.FC<{
20
20
  } & {
21
21
  as?: string | React.ComponentType<any> | undefined;
22
22
  forwardedAs?: string | React.ComponentType<any> | undefined;
23
- }, string | number | symbol>, "maxWidth" | "minWidth" | "width" | "theme" | "block" | "icon" | "sx" | "variant" | "className" | "disabled" | "contrast"> & {
23
+ }, string | number | symbol>, "maxWidth" | "minWidth" | "width" | "theme" | "block" | "icon" | "variant" | "sx" | "className" | "disabled" | "contrast"> & {
24
24
  className?: string | undefined;
25
25
  icon?: React.ComponentType<{
26
26
  className?: string | undefined;
@@ -38,9 +38,9 @@ declare const _default: React.FC<{
38
38
  style?: React.CSSProperties | undefined;
39
39
  title?: string | undefined;
40
40
  block?: boolean | undefined;
41
- sx?: import("../sx").BetterSystemStyleObject | undefined;
42
41
  variant?: "small" | "large" | undefined;
43
42
  role?: React.AriaRole | undefined;
43
+ sx?: import("../sx").BetterSystemStyleObject | undefined;
44
44
  key?: React.Key | null | undefined;
45
45
  defaultChecked?: boolean | undefined;
46
46
  defaultValue?: string | number | readonly string[] | undefined;
@@ -295,7 +295,7 @@ declare const _default: React.FC<{
295
295
  contrast?: boolean | undefined;
296
296
  } & {
297
297
  theme?: any;
298
- }, "maxWidth" | "minWidth" | "width" | "theme" | "block" | "sx" | "variant" | "disabled" | "contrast">, string | number | symbol> & React.RefAttributes<HTMLInputElement>>, {
298
+ }, "maxWidth" | "minWidth" | "width" | "theme" | "block" | "variant" | "sx" | "disabled" | "contrast">, string | number | symbol> & React.RefAttributes<HTMLInputElement>>, {
299
299
  as?: React.ComponentType<any> | undefined;
300
300
  }>;
301
301
  Menu: typeof AutocompleteMenu;
@@ -12,7 +12,7 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
12
12
  } & {
13
13
  as?: string | React.ComponentType<any> | undefined;
14
14
  forwardedAs?: string | React.ComponentType<any> | undefined;
15
- }, string | number | symbol>, "maxWidth" | "minWidth" | "width" | "theme" | "block" | "icon" | "sx" | "variant" | "className" | "disabled" | "contrast"> & {
15
+ }, string | number | symbol>, "maxWidth" | "minWidth" | "width" | "theme" | "block" | "icon" | "variant" | "sx" | "className" | "disabled" | "contrast"> & {
16
16
  className?: string | undefined;
17
17
  icon?: React.ComponentType<{
18
18
  className?: string | undefined;
@@ -30,9 +30,9 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
30
30
  style?: React.CSSProperties | undefined;
31
31
  title?: string | undefined;
32
32
  block?: boolean | undefined;
33
- sx?: import("../sx").BetterSystemStyleObject | undefined;
34
33
  variant?: "small" | "large" | undefined;
35
34
  role?: React.AriaRole | undefined;
35
+ sx?: import("../sx").BetterSystemStyleObject | undefined;
36
36
  key?: React.Key | null | undefined;
37
37
  defaultChecked?: boolean | undefined;
38
38
  defaultValue?: string | number | readonly string[] | undefined;
@@ -287,6 +287,6 @@ declare const AutocompleteInput: PolymorphicForwardRefComponent<React.ForwardRef
287
287
  contrast?: boolean | undefined;
288
288
  } & {
289
289
  theme?: any;
290
- }, "maxWidth" | "minWidth" | "width" | "theme" | "block" | "sx" | "variant" | "disabled" | "contrast">, string | number | symbol> & React.RefAttributes<HTMLInputElement>>, InternalAutocompleteInputProps>;
290
+ }, "maxWidth" | "minWidth" | "width" | "theme" | "block" | "variant" | "sx" | "disabled" | "contrast">, string | number | symbol> & React.RefAttributes<HTMLInputElement>>, InternalAutocompleteInputProps>;
291
291
  export declare type AutocompleteInputProps = ComponentProps<typeof AutocompleteInput>;
292
292
  export default AutocompleteInput;
@@ -1,24 +1,25 @@
1
1
  import * as History from 'history';
2
2
  import React from 'react';
3
- import { SystemCommonProps, SystemFlexProps } from './constants';
4
3
  import { SxProp } from './sx';
5
4
  import { ComponentProps } from './utils/types';
6
- declare const BreadcrumbsBase: import("styled-components").StyledComponent<"nav", any, SystemFlexProps & SystemCommonProps & SxProp, never>;
7
- export declare type BreadcrumbsProps = ComponentProps<typeof BreadcrumbsBase>;
8
- declare function Breadcrumbs({ className, children, theme, ...rest }: React.PropsWithChildren<BreadcrumbsProps>): JSX.Element;
5
+ declare const BreadcrumbsBase: import("styled-components").StyledComponent<"nav", any, SxProp, never>;
6
+ export declare type BreadcrumbsProps = React.PropsWithChildren<{
7
+ className?: string;
8
+ } & SxProp>;
9
+ declare function Breadcrumbs({ className, children, sx: sxProp }: React.PropsWithChildren<BreadcrumbsProps>): JSX.Element;
9
10
  declare namespace Breadcrumbs {
10
11
  var displayName: string;
11
12
  }
12
13
  declare const BreadcrumbsItem: import("styled-components").StyledComponent<"a", any, {
13
14
  to?: History.LocationDescriptor<unknown> | undefined;
14
15
  selected?: boolean | undefined;
15
- } & SystemCommonProps & SxProp, never>;
16
+ } & SxProp, never>;
16
17
  export declare type BreadcrumbsItemProps = ComponentProps<typeof BreadcrumbsItem>;
17
18
  declare const _default: typeof Breadcrumbs & {
18
19
  Item: import("styled-components").StyledComponent<"a", any, {
19
20
  to?: History.LocationDescriptor<unknown> | undefined;
20
21
  selected?: boolean | undefined;
21
- } & SystemCommonProps & SxProp, never>;
22
+ } & SxProp, never>;
22
23
  };
23
24
  export default _default;
24
25
  /**
@@ -28,7 +29,7 @@ export declare const Breadcrumb: typeof Breadcrumbs & {
28
29
  Item: import("styled-components").StyledComponent<"a", any, {
29
30
  to?: History.LocationDescriptor<unknown> | undefined;
30
31
  selected?: boolean | undefined;
31
- } & SystemCommonProps & SxProp, never>;
32
+ } & SxProp, never>;
32
33
  };
33
34
  /**
34
35
  * @deprecated Use the `BreadcrumbsProps` type instead
@@ -19,8 +19,6 @@ var _sx = _interopRequireDefault(require("./sx"));
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
-
24
22
  const SELECTED_CLASS = 'selected';
25
23
 
26
24
  const Wrapper = _styledComponents.default.li.withConfig({
@@ -31,23 +29,20 @@ const Wrapper = _styledComponents.default.li.withConfig({
31
29
  const BreadcrumbsBase = _styledComponents.default.nav.withConfig({
32
30
  displayName: "Breadcrumbs__BreadcrumbsBase",
33
31
  componentId: "hwwoo0-1"
34
- })(["display:flex;justify-content:space-between;", ";", ";", ";"], _constants.COMMON, _constants.FLEX, _sx.default);
32
+ })(["display:flex;justify-content:space-between;", ";"], _sx.default);
35
33
 
36
34
  function Breadcrumbs({
37
35
  className,
38
36
  children,
39
- theme,
40
- ...rest
37
+ sx: sxProp
41
38
  }) {
42
- const wrappedChildren = _react.default.Children.map(children, child => /*#__PURE__*/_react.default.createElement(Wrapper, {
43
- theme: theme
44
- }, child));
39
+ const wrappedChildren = _react.default.Children.map(children, child => /*#__PURE__*/_react.default.createElement(Wrapper, null, child));
45
40
 
46
- return /*#__PURE__*/_react.default.createElement(BreadcrumbsBase, _extends({
41
+ return /*#__PURE__*/_react.default.createElement(BreadcrumbsBase, {
47
42
  className: className,
48
43
  "aria-label": "Breadcrumbs",
49
- theme: theme
50
- }, rest), /*#__PURE__*/_react.default.createElement(_Box.default, {
44
+ sx: sxProp
45
+ }, /*#__PURE__*/_react.default.createElement(_Box.default, {
51
46
  as: "ol",
52
47
  my: 0,
53
48
  pl: 0
@@ -63,7 +58,7 @@ const BreadcrumbsItem = _styledComponents.default.a.attrs(props => ({
63
58
  })).withConfig({
64
59
  displayName: "Breadcrumbs__BreadcrumbsItem",
65
60
  componentId: "hwwoo0-2"
66
- })(["color:", ";display:inline-block;font-size:", ";text-decoration:none;&:hover{text-decoration:underline;}&.selected{color:", ";pointer-events:none;}", " ", ";"], (0, _constants.get)('colors.accent.fg'), (0, _constants.get)('fontSizes.1'), (0, _constants.get)('colors.fg.default'), _constants.COMMON, _sx.default);
61
+ })(["color:", ";display:inline-block;font-size:", ";text-decoration:none;&:hover{text-decoration:underline;}&.selected{color:", ";pointer-events:none;}", ";"], (0, _constants.get)('colors.accent.fg'), (0, _constants.get)('fontSizes.1'), (0, _constants.get)('colors.fg.default'), _sx.default);
67
62
 
68
63
  Breadcrumbs.displayName = 'Breadcrumbs';
69
64
  BreadcrumbsItem.displayName = 'Breadcrumbs.Item';
@@ -34,13 +34,11 @@ const Wrapper = styled_components_1.default.li `
34
34
  const BreadcrumbsBase = styled_components_1.default.nav `
35
35
  display: flex;
36
36
  justify-content: space-between;
37
- ${constants_1.COMMON};
38
- ${constants_1.FLEX};
39
37
  ${sx_1.default};
40
38
  `;
41
- function Breadcrumbs({ className, children, theme, ...rest }) {
42
- const wrappedChildren = react_1.default.Children.map(children, child => <Wrapper theme={theme}>{child}</Wrapper>);
43
- return (<BreadcrumbsBase className={className} aria-label="Breadcrumbs" theme={theme} {...rest}>
39
+ function Breadcrumbs({ className, children, sx: sxProp }) {
40
+ const wrappedChildren = react_1.default.Children.map(children, child => <Wrapper>{child}</Wrapper>);
41
+ return (<BreadcrumbsBase className={className} aria-label="Breadcrumbs" sx={sxProp}>
44
42
  <Box_1.default as="ol" my={0} pl={0}>
45
43
  {wrappedChildren}
46
44
  </Box_1.default>
@@ -62,7 +60,6 @@ const BreadcrumbsItem = styled_components_1.default.a.attrs(props => ({
62
60
  color: ${constants_1.get('colors.fg.default')};
63
61
  pointer-events: none;
64
62
  }
65
- ${constants_1.COMMON}
66
63
  ${sx_1.default};
67
64
  `;
68
65
  Breadcrumbs.displayName = 'Breadcrumbs';
@@ -4,9 +4,8 @@ import { ComponentProps } from '../utils/types';
4
4
  declare const Button: import("styled-components").StyledComponent<"button", any, {
5
5
  as?: string | import("react").ComponentClass<any, any> | import("react").FunctionComponent<any> | undefined;
6
6
  variant?: "small" | "medium" | "large" | undefined;
7
- } & import("styled-system").FontSizeProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & {
7
+ } & {
8
8
  color?: string | undefined;
9
- fontSize?: import("styled-system").ResponsiveValue<string | number | symbol, Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> | undefined;
10
9
  translate?: "yes" | "no" | undefined;
11
10
  hidden?: boolean | undefined;
12
11
  children?: import("react").ReactNode;
@@ -279,6 +278,6 @@ declare const Button: import("styled-components").StyledComponent<"button", any,
279
278
  formTarget?: string | undefined;
280
279
  } & {
281
280
  theme?: any;
282
- } & import("styled-system").FontSizeProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("../constants").SystemCommonProps & import("../constants").SystemLayoutProps & SxProp, never>;
281
+ } & SxProp, never>;
283
282
  export declare type ButtonProps = ComponentProps<typeof Button>;
284
283
  export default Button;