@solexllc/usx-react 0.6.1 → 0.8.0

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 (476) hide show
  1. package/README.md +5 -8
  2. package/dist/index.cjs +879 -503
  3. package/dist/index.js +879 -503
  4. package/package.json +5 -5
  5. package/src/components/accordion/Accordion.tsx +7 -9
  6. package/src/components/accordion/accordion.django-snapshot.html +515 -0
  7. package/src/components/accordion/accordion.django.html +9 -25
  8. package/src/components/accordion/accordion.html +403 -193
  9. package/src/components/accordion/accordion.react-snapshot.html +475 -0
  10. package/src/components/accordion/config.json +29 -3
  11. package/src/components/alert/Alert.tsx +4 -3
  12. package/src/components/alert/alert.django-snapshot.html +175 -0
  13. package/src/components/alert/alert.django.html +14 -12
  14. package/src/components/alert/alert.html +112 -148
  15. package/src/components/alert/alert.react-snapshot.html +152 -0
  16. package/src/components/alert/config.json +5 -8
  17. package/src/components/attribution/attribution.django-snapshot.html +57 -0
  18. package/src/components/attribution/attribution.django.html +2 -2
  19. package/src/components/attribution/attribution.html +50 -21
  20. package/src/components/attribution/attribution.react-snapshot.html +49 -0
  21. package/src/components/attribution/config.json +4 -0
  22. package/src/components/avatar/Avatar.tsx +6 -15
  23. package/src/components/avatar/avatar.django-snapshot.html +131 -0
  24. package/src/components/avatar/avatar.django.html +9 -10
  25. package/src/components/avatar/avatar.html +86 -51
  26. package/src/components/avatar/avatar.react-snapshot.html +121 -0
  27. package/src/components/avatar/config.json +10 -3
  28. package/src/components/avatar-group/AvatarGroup.tsx +3 -3
  29. package/src/components/avatar-group/avatar-group.django-snapshot.html +278 -0
  30. package/src/components/avatar-group/avatar-group.django.html +3 -3
  31. package/src/components/avatar-group/avatar-group.html +5 -5
  32. package/src/components/avatar-group/avatar-group.react-snapshot.html +226 -0
  33. package/src/components/back-to-top/BackToTop.tsx +7 -2
  34. package/src/components/back-to-top/back-to-top.django-snapshot.html +339 -0
  35. package/src/components/back-to-top/back-to-top.django.html +6 -4
  36. package/src/components/back-to-top/back-to-top.react-snapshot.html +264 -0
  37. package/src/components/back-to-top/config.json +9 -0
  38. package/src/components/banner/banner.django-snapshot.html +329 -0
  39. package/src/components/banner/banner.django.html +2 -2
  40. package/src/components/banner/banner.html +87 -185
  41. package/src/components/banner/banner.react-snapshot.html +317 -0
  42. package/src/components/banner/config.json +3 -0
  43. package/src/components/breadcrumb/Breadcrumb.tsx +1 -1
  44. package/src/components/breadcrumb/breadcrumb.django-snapshot.html +103 -0
  45. package/src/components/breadcrumb/breadcrumb.django.html +5 -6
  46. package/src/components/breadcrumb/breadcrumb.html +45 -66
  47. package/src/components/breadcrumb/breadcrumb.react-snapshot.html +87 -0
  48. package/src/components/breadcrumb/config.json +2 -8
  49. package/src/components/button/Button.tsx +1 -0
  50. package/src/components/button/button.django-snapshot.html +558 -0
  51. package/src/components/button/button.django.html +4 -4
  52. package/src/components/button/button.html +363 -226
  53. package/src/components/button/button.react-snapshot.html +574 -0
  54. package/src/components/button/config.json +4 -0
  55. package/src/components/button-group/button-group.django-snapshot.html +129 -0
  56. package/src/components/button-group/button-group.django.html +1 -1
  57. package/src/components/button-group/button-group.react-snapshot.html +115 -0
  58. package/src/components/button-group/config.json +16 -0
  59. package/src/components/calendar-date/calendar-date.django-snapshot.html +7 -0
  60. package/src/components/calendar-date/calendar-date.django.html +1 -1
  61. package/src/components/calendar-date/calendar-date.react-snapshot.html +7 -0
  62. package/src/components/calendar-date/config.json +3 -0
  63. package/src/components/callout/Callout.tsx +2 -5
  64. package/src/components/callout/callout.django-snapshot.html +59 -0
  65. package/src/components/callout/callout.django.html +3 -3
  66. package/src/components/callout/callout.html +0 -5
  67. package/src/components/callout/callout.react-snapshot.html +57 -0
  68. package/src/components/callout/config.json +6 -7
  69. package/src/components/card/Card.tsx +8 -5
  70. package/src/components/card/card.django-snapshot.html +1198 -0
  71. package/src/components/card/card.django.html +5 -5
  72. package/src/components/card/card.html +1032 -35
  73. package/src/components/card/card.react-snapshot.html +1028 -0
  74. package/src/components/card/config.json +25 -4
  75. package/src/components/card-group/CardGroup.tsx +1 -1
  76. package/src/components/card-group/card-group.django-snapshot.html +514 -0
  77. package/src/components/card-group/card-group.django.html +2 -2
  78. package/src/components/card-group/card-group.html +388 -95
  79. package/src/components/card-group/card-group.react-snapshot.html +445 -0
  80. package/src/components/card-group/config.json +80 -2
  81. package/src/components/carousel/Carousel.tsx +45 -71
  82. package/src/components/carousel/carousel.django-snapshot.html +927 -0
  83. package/src/components/carousel/carousel.django.html +23 -47
  84. package/src/components/carousel/carousel.html +715 -32
  85. package/src/components/carousel/carousel.react-snapshot.html +762 -0
  86. package/src/components/carousel/config.json +43 -12
  87. package/src/components/character-count/CharacterCount.tsx +1 -3
  88. package/src/components/character-count/character-count.django-snapshot.html +402 -0
  89. package/src/components/character-count/character-count.django.html +1 -1
  90. package/src/components/character-count/character-count.html +231 -26
  91. package/src/components/character-count/character-count.react-snapshot.html +346 -0
  92. package/src/components/character-count/config.json +5 -0
  93. package/src/components/checkbox/Checkbox.tsx +7 -2
  94. package/src/components/checkbox/checkbox.django-snapshot.html +373 -0
  95. package/src/components/checkbox/checkbox.django.html +22 -3
  96. package/src/components/checkbox/checkbox.html +313 -241
  97. package/src/components/checkbox/checkbox.react-snapshot.html +313 -0
  98. package/src/components/checkbox/config.json +12 -1
  99. package/src/components/checkbox-group/CheckboxGroup.tsx +1 -0
  100. package/src/components/checkbox-group/checkbox-group.django-snapshot.html +372 -0
  101. package/src/components/checkbox-group/checkbox-group.django.html +2 -2
  102. package/src/components/checkbox-group/checkbox-group.html +346 -26
  103. package/src/components/checkbox-group/checkbox-group.react-snapshot.html +300 -0
  104. package/src/components/checkbox-group/config.json +24 -0
  105. package/src/components/clickable/clickable-bg-color-change.django.html +1 -0
  106. package/src/components/clickable/clickable-color-change.django.html +1 -0
  107. package/src/components/clickable/clickable-link.django.html +1 -0
  108. package/src/components/clickable/clickable.django-snapshot.html +221 -0
  109. package/src/components/clickable/clickable.django.html +6 -2
  110. package/src/components/clickable/clickable.html +168 -83
  111. package/src/components/clickable/clickable.react-snapshot.html +194 -0
  112. package/src/components/clickable/config.json +9 -7
  113. package/src/components/code/Code.tsx +4 -3
  114. package/src/components/code/code.django-snapshot.html +375 -0
  115. package/src/components/code/code.django.html +2 -2
  116. package/src/components/code/code.html +201 -38
  117. package/src/components/code/code.react-snapshot.html +249 -0
  118. package/src/components/code/config.json +22 -0
  119. package/src/components/collection/collection.django-snapshot.html +238 -0
  120. package/src/components/collection/collection.django.html +1 -1
  121. package/src/components/collection/collection.html +203 -379
  122. package/src/components/collection/collection.react-snapshot.html +200 -0
  123. package/src/components/collection/config.json +49 -0
  124. package/src/components/combobox/Combobox.tsx +1 -0
  125. package/src/components/combobox/combobox.django-snapshot.html +1302 -0
  126. package/src/components/combobox/combobox.django.html +3 -5
  127. package/src/components/combobox/combobox.html +21 -9
  128. package/src/components/combobox/combobox.react-snapshot.html +714 -0
  129. package/src/components/combobox/config.json +269 -2
  130. package/src/components/container/Container.tsx +3 -3
  131. package/src/components/container/config.json +9 -5
  132. package/src/components/container/container.django-snapshot.html +2820 -0
  133. package/src/components/container/container.django.html +2 -2
  134. package/src/components/container/container.html +2616 -80
  135. package/src/components/container/container.react-snapshot.html +2400 -0
  136. package/src/components/copy-to-clipboard/CopyToClipboard.tsx +2 -2
  137. package/src/components/copy-to-clipboard/config.json +8 -0
  138. package/src/components/copy-to-clipboard/copy-to-clipboard.django-snapshot.html +84 -0
  139. package/src/components/copy-to-clipboard/copy-to-clipboard.django.html +1 -1
  140. package/src/components/copy-to-clipboard/copy-to-clipboard.html +48 -20
  141. package/src/components/copy-to-clipboard/copy-to-clipboard.react-snapshot.html +60 -0
  142. package/src/components/date-picker/date-picker.django-snapshot.html +150 -0
  143. package/src/components/date-picker/date-picker.django.html +1 -1
  144. package/src/components/date-picker/date-picker.react-snapshot.html +122 -0
  145. package/src/components/date-range-picker/date-range-picker.django-snapshot.html +301 -0
  146. package/src/components/date-range-picker/date-range-picker.django.html +1 -1
  147. package/src/components/date-range-picker/date-range-picker.react-snapshot.html +246 -0
  148. package/src/components/details/Details.tsx +49 -0
  149. package/src/components/details/config.json +56 -0
  150. package/src/components/details/details.django-snapshot.html +238 -0
  151. package/src/components/details/details.django.html +10 -0
  152. package/src/components/details/details.html +215 -0
  153. package/src/components/details/details.react-snapshot.html +215 -0
  154. package/src/components/drawer/Drawer.tsx +125 -0
  155. package/src/components/drawer/config.json +97 -0
  156. package/src/components/drawer/drawer.django-snapshot.html +1711 -0
  157. package/src/components/drawer/drawer.django.html +34 -0
  158. package/src/components/drawer/drawer.html +1031 -0
  159. package/src/components/drawer/drawer.react-snapshot.html +1027 -0
  160. package/src/components/error-message/config.json +4 -0
  161. package/src/components/error-message/error-message.django-snapshot.html +12 -0
  162. package/src/components/error-message/error-message.html +15 -2
  163. package/src/components/error-message/error-message.react-snapshot.html +12 -0
  164. package/src/components/error-page/ErrorPage.tsx +169 -0
  165. package/src/components/error-page/config.json +153 -0
  166. package/src/components/error-page/error-page.django-snapshot.html +570 -0
  167. package/src/components/error-page/error-page.django.html +80 -0
  168. package/src/components/error-page/error-page.html +437 -0
  169. package/src/components/error-page/error-page.react-snapshot.html +467 -0
  170. package/src/components/eyebrow/config.json +3 -0
  171. package/src/components/eyebrow/eyebrow.django-snapshot.html +8 -0
  172. package/src/components/eyebrow/eyebrow.html +8 -4
  173. package/src/components/eyebrow/eyebrow.react-snapshot.html +8 -0
  174. package/src/components/fieldset/config.json +4 -0
  175. package/src/components/fieldset/fieldset.django-snapshot.html +50 -0
  176. package/src/components/fieldset/fieldset.django.html +2 -1
  177. package/src/components/fieldset/fieldset.html +33 -7
  178. package/src/components/fieldset/fieldset.react-snapshot.html +39 -0
  179. package/src/components/file-input/FileInput.tsx +2 -1
  180. package/src/components/file-input/_contents.django.html +29 -0
  181. package/src/components/file-input/config.json +7 -3
  182. package/src/components/file-input/file-input.django-snapshot.html +534 -0
  183. package/src/components/file-input/file-input.django.html +3 -50
  184. package/src/components/file-input/file-input.html +341 -102
  185. package/src/components/file-input/file-input.react-snapshot.html +440 -0
  186. package/src/components/file-list/config.json +2 -2
  187. package/src/components/file-list/file-list.django-snapshot.html +328 -0
  188. package/src/components/file-list/file-list.django.html +9 -6
  189. package/src/components/file-list/file-list.html +191 -7
  190. package/src/components/file-list/file-list.react-snapshot.html +276 -0
  191. package/src/components/footer/config.json +162 -1
  192. package/src/components/footer/footer.django-snapshot.html +1009 -0
  193. package/src/components/footer/footer.django.html +10 -7
  194. package/src/components/footer/footer.html +611 -232
  195. package/src/components/footer/footer.react-snapshot.html +796 -0
  196. package/src/components/form-group/config.json +3 -0
  197. package/src/components/form-group/form-group.django-snapshot.html +50 -0
  198. package/src/components/form-group/form-group.django.html +1 -1
  199. package/src/components/form-group/form-group.react-snapshot.html +43 -0
  200. package/src/components/header/Header.tsx +3 -3
  201. package/src/components/header/branding.django.html +14 -0
  202. package/src/components/header/config.json +73 -0
  203. package/src/components/header/header.django-snapshot.html +3395 -0
  204. package/src/components/header/header.django.html +9 -5
  205. package/src/components/header/header.html +2553 -611
  206. package/src/components/header/header.react-snapshot.html +2675 -0
  207. package/src/components/hero/Hero.tsx +4 -4
  208. package/src/components/hero/config.json +7 -6
  209. package/src/components/hero/hero.django-snapshot.html +409 -0
  210. package/src/components/hero/hero.django.html +5 -5
  211. package/src/components/hero/hero.html +299 -38
  212. package/src/components/hero/hero.react-snapshot.html +353 -0
  213. package/src/components/hint/config.json +4 -0
  214. package/src/components/hint/hint.django-snapshot.html +7 -0
  215. package/src/components/hint/hint.html +7 -2
  216. package/src/components/hint/hint.react-snapshot.html +7 -0
  217. package/src/components/icon/Icon.tsx +14 -12
  218. package/src/components/icon/config.json +7 -15
  219. package/src/components/icon/icon.django-snapshot.html +69 -0
  220. package/src/components/icon/icon.django.html +4 -10
  221. package/src/components/icon/icon.html +90 -90
  222. package/src/components/icon/icon.react-snapshot.html +69 -0
  223. package/src/components/icon-list/icon-list.django-snapshot.html +244 -0
  224. package/src/components/icon-list/icon-list.django.html +2 -2
  225. package/src/components/icon-list/icon-list.react-snapshot.html +215 -0
  226. package/src/components/identifier/Identifier.tsx +1 -1
  227. package/src/components/identifier/config.json +1 -1
  228. package/src/components/identifier/identifier.django-snapshot.html +1129 -0
  229. package/src/components/identifier/identifier.django.html +3 -3
  230. package/src/components/identifier/identifier.html +484 -256
  231. package/src/components/identifier/identifier.react-snapshot.html +959 -0
  232. package/src/components/image/Image.tsx +2 -2
  233. package/src/components/image/config.json +4 -0
  234. package/src/components/image/image.django-snapshot.html +166 -0
  235. package/src/components/image/image.django.html +5 -11
  236. package/src/components/image/image.html +144 -29
  237. package/src/components/image/image.react-snapshot.html +150 -0
  238. package/src/components/in-page-nav/InPageNav.tsx +4 -3
  239. package/src/components/in-page-nav/config.json +5 -11
  240. package/src/components/in-page-nav/in-page-nav.django-snapshot.html +228 -0
  241. package/src/components/in-page-nav/in-page-nav.django.html +4 -4
  242. package/src/components/in-page-nav/in-page-nav.react-snapshot.html +228 -0
  243. package/src/components/indicator/config.json +8 -0
  244. package/src/components/indicator/indicator.django-snapshot.html +57 -0
  245. package/src/components/indicator/indicator.html +25 -23
  246. package/src/components/indicator/indicator.react-snapshot.html +44 -0
  247. package/src/components/input/config.json +18 -1
  248. package/src/components/input/input.django-snapshot.html +121 -0
  249. package/src/components/input/input.django.html +16 -8
  250. package/src/components/input/input.react-snapshot.html +94 -0
  251. package/src/components/label/Label.tsx +4 -1
  252. package/src/components/label/config.json +7 -0
  253. package/src/components/label/label.django-snapshot.html +22 -0
  254. package/src/components/label/label.django.html +4 -1
  255. package/src/components/label/label.html +15 -16
  256. package/src/components/label/label.react-snapshot.html +22 -0
  257. package/src/components/language-selector/config.json +9 -13
  258. package/src/components/language-selector/language-selector.django-snapshot.html +183 -0
  259. package/src/components/language-selector/language-selector.django.html +3 -3
  260. package/src/components/language-selector/language-selector.html +74 -25
  261. package/src/components/language-selector/language-selector.react-snapshot.html +169 -0
  262. package/src/components/layout/Layout.tsx +12 -1
  263. package/src/components/layout/config.json +8 -0
  264. package/src/components/layout/layout.django-snapshot.html +987 -0
  265. package/src/components/layout/layout.django.html +2 -2
  266. package/src/components/layout/layout.html +991 -21
  267. package/src/components/layout/layout.react-snapshot.html +876 -0
  268. package/src/components/legend/config.json +3 -0
  269. package/src/components/legend/legend.django-snapshot.html +13 -0
  270. package/src/components/legend/legend.django.html +1 -1
  271. package/src/components/legend/legend.html +10 -9
  272. package/src/components/legend/legend.react-snapshot.html +13 -0
  273. package/src/components/link/Link.tsx +3 -1
  274. package/src/components/link/config.json +9 -1
  275. package/src/components/link/link.django-snapshot.html +45 -0
  276. package/src/components/link/link.django.html +2 -2
  277. package/src/components/link/link.react-snapshot.html +45 -0
  278. package/src/components/list/config.json +7 -0
  279. package/src/components/list/list.django-snapshot.html +61 -0
  280. package/src/components/list/list.django.html +1 -1
  281. package/src/components/list/list.html +45 -25
  282. package/src/components/list/list.react-snapshot.html +46 -0
  283. package/src/components/memorable-date/config.json +1 -2
  284. package/src/components/memorable-date/memorable-date.django-snapshot.html +536 -0
  285. package/src/components/memorable-date/memorable-date.django.html +3 -1
  286. package/src/components/memorable-date/memorable-date.react-snapshot.html +437 -0
  287. package/src/components/misc-banner/MiscBanner.tsx +16 -10
  288. package/src/components/misc-banner/config.json +22 -4
  289. package/src/components/misc-banner/misc-banner.django-snapshot.html +370 -0
  290. package/src/components/misc-banner/misc-banner.django.html +15 -15
  291. package/src/components/misc-banner/misc-banner.react-snapshot.html +332 -0
  292. package/src/components/modal/config.json +22 -0
  293. package/src/components/modal/modal.django-snapshot.html +252 -0
  294. package/src/components/modal/modal.django.html +5 -9
  295. package/src/components/modal/modal.react-snapshot.html +229 -0
  296. package/src/components/page/Page.tsx +17 -5
  297. package/src/components/page/config.json +23 -2
  298. package/src/components/page/page.django-snapshot.html +44 -0
  299. package/src/components/page/page.django.html +5 -3
  300. package/src/components/page/page.html +29 -8
  301. package/src/components/page/page.react-snapshot.html +44 -0
  302. package/src/components/pagination/Pagination.tsx +49 -55
  303. package/src/components/pagination/config.json +58 -9
  304. package/src/components/pagination/navigation/PaginationNavigation.tsx +24 -34
  305. package/src/components/pagination/navigation/pagination-navigation.django.html +16 -23
  306. package/src/components/pagination/pagination.django-snapshot.html +2078 -0
  307. package/src/components/pagination/pagination.django.html +14 -4
  308. package/src/components/pagination/pagination.html +907 -305
  309. package/src/components/pagination/pagination.react-snapshot.html +1738 -0
  310. package/src/components/pagination/step-options/PaginationStepOptions.tsx +2 -8
  311. package/src/components/pagination/step-options/pagination-step-options.django.html +1 -1
  312. package/src/components/popover/Popover.tsx +114 -0
  313. package/src/components/popover/PopoverMenu.tsx +80 -0
  314. package/src/components/popover/config.json +130 -0
  315. package/src/components/popover/popover-menu.django.html +35 -0
  316. package/src/components/popover/popover.django-snapshot.html +1201 -0
  317. package/src/components/popover/popover.django.html +11 -0
  318. package/src/components/popover/popover.html +1081 -0
  319. package/src/components/popover/popover.react-snapshot.html +1101 -0
  320. package/src/components/process-list/ProcessList.tsx +6 -21
  321. package/src/components/process-list/config.json +18 -2
  322. package/src/components/process-list/process-list.django-snapshot.html +90 -0
  323. package/src/components/process-list/process-list.django.html +2 -2
  324. package/src/components/process-list/process-list.react-snapshot.html +78 -0
  325. package/src/components/prose/Prose.tsx +3 -3
  326. package/src/components/prose/config.json +6 -2
  327. package/src/components/prose/prose.django-snapshot.html +250 -0
  328. package/src/components/prose/prose.django.html +3 -3
  329. package/src/components/prose/prose.html +244 -85
  330. package/src/components/prose/prose.react-snapshot.html +250 -0
  331. package/src/components/quote/Quote.tsx +2 -2
  332. package/src/components/quote/config.json +6 -4
  333. package/src/components/quote/quote.django-snapshot.html +348 -0
  334. package/src/components/quote/quote.django.html +2 -2
  335. package/src/components/quote/quote.html +2 -7
  336. package/src/components/quote/quote.react-snapshot.html +322 -0
  337. package/src/components/radio-buttons/RadioButtons.tsx +15 -13
  338. package/src/components/radio-buttons/config.json +23 -0
  339. package/src/components/radio-buttons/radio-buttons.django-snapshot.html +760 -0
  340. package/src/components/radio-buttons/radio-buttons.django.html +12 -4
  341. package/src/components/radio-buttons/radio-buttons.html +623 -127
  342. package/src/components/radio-buttons/radio-buttons.react-snapshot.html +592 -0
  343. package/src/components/range-slider/RangeSlider.tsx +1 -1
  344. package/src/components/range-slider/range-slider.django-snapshot.html +157 -0
  345. package/src/components/range-slider/range-slider.django.html +1 -1
  346. package/src/components/range-slider/range-slider.react-snapshot.html +134 -0
  347. package/src/components/required/config.json +6 -3
  348. package/src/components/required/required.django-snapshot.html +5 -0
  349. package/src/components/required/required.html +3 -4
  350. package/src/components/required/required.react-snapshot.html +5 -0
  351. package/src/components/search/Search.tsx +6 -9
  352. package/src/components/search/config.json +5 -3
  353. package/src/components/search/search.django-snapshot.html +1795 -0
  354. package/src/components/search/search.django.html +7 -6
  355. package/src/components/search/search.html +336 -54
  356. package/src/components/search/search.react-snapshot.html +393 -0
  357. package/src/components/section/Section.tsx +3 -3
  358. package/src/components/section/config.json +12 -4
  359. package/src/components/section/section.django-snapshot.html +87 -0
  360. package/src/components/section/section.django.html +6 -6
  361. package/src/components/section/section.html +73 -11
  362. package/src/components/section/section.react-snapshot.html +78 -0
  363. package/src/components/select/Select.tsx +1 -0
  364. package/src/components/select/config.json +18 -0
  365. package/src/components/select/select.django-snapshot.html +146 -0
  366. package/src/components/select/select.django.html +1 -1
  367. package/src/components/select/select.html +112 -58
  368. package/src/components/select/select.react-snapshot.html +104 -0
  369. package/src/components/sidenav/config.json +17 -0
  370. package/src/components/sidenav/sidenav.django-snapshot.html +94 -0
  371. package/src/components/sidenav/sidenav.django.html +2 -2
  372. package/src/components/sidenav/sidenav.react-snapshot.html +55 -0
  373. package/src/components/site-alert/SiteAlert.tsx +10 -38
  374. package/src/components/site-alert/config.json +10 -3
  375. package/src/components/site-alert/site-alert.django-snapshot.html +400 -0
  376. package/src/components/site-alert/site-alert.django.html +1 -1
  377. package/src/components/site-alert/site-alert.react-snapshot.html +332 -0
  378. package/src/components/skipnav/config.json +3 -0
  379. package/src/components/skipnav/skipnav.django-snapshot.html +40 -0
  380. package/src/components/skipnav/skipnav.django.html +1 -1
  381. package/src/components/skipnav/skipnav.html +40 -1
  382. package/src/components/skipnav/skipnav.react-snapshot.html +33 -0
  383. package/src/components/spinner/Spinner.tsx +1 -0
  384. package/src/components/spinner/config.json +7 -0
  385. package/src/components/spinner/spinner.django-snapshot.html +299 -0
  386. package/src/components/spinner/spinner.django.html +1 -1
  387. package/src/components/spinner/spinner.html +143 -23
  388. package/src/components/spinner/spinner.react-snapshot.html +302 -0
  389. package/src/components/status/config.json +1 -0
  390. package/src/components/status/status.django-snapshot.html +71 -0
  391. package/src/components/status/status.react-snapshot.html +71 -0
  392. package/src/components/step-indicator/StepIndicator.tsx +4 -4
  393. package/src/components/step-indicator/config.json +22 -2
  394. package/src/components/step-indicator/step-indicator.django-snapshot.html +224 -0
  395. package/src/components/step-indicator/step-indicator.django.html +3 -3
  396. package/src/components/step-indicator/step-indicator.html +26 -68
  397. package/src/components/step-indicator/step-indicator.react-snapshot.html +204 -0
  398. package/src/components/summary/Summary.tsx +54 -0
  399. package/src/components/summary/config.json +56 -0
  400. package/src/components/summary/summary.django-snapshot.html +36 -0
  401. package/src/components/summary/summary.django.html +11 -0
  402. package/src/components/summary/summary.html +17 -0
  403. package/src/components/summary/summary.react-snapshot.html +36 -0
  404. package/src/components/summary-box/config.json +5 -0
  405. package/src/components/summary-box/summary-box.django-snapshot.html +188 -0
  406. package/src/components/summary-box/summary-box.react-snapshot.html +177 -0
  407. package/src/components/swap/config.json +3 -3
  408. package/src/components/swap/swap.django-snapshot.html +110 -0
  409. package/src/components/swap/swap.html +99 -154
  410. package/src/components/swap/swap.react-snapshot.html +100 -0
  411. package/src/components/switch/config.json +3 -0
  412. package/src/components/switch/switch.django-snapshot.html +73 -0
  413. package/src/components/switch/switch.django.html +6 -8
  414. package/src/components/switch/switch.react-snapshot.html +73 -0
  415. package/src/components/table/Table.tsx +27 -11
  416. package/src/components/table/TableBody.tsx +12 -9
  417. package/src/components/table/config.json +46 -1
  418. package/src/components/table/table-detail-row.django.html +1 -1
  419. package/src/components/table/table-foot.django.html +1 -1
  420. package/src/components/table/table-head.django.html +1 -1
  421. package/src/components/table/table.django-snapshot.html +1970 -0
  422. package/src/components/table/table.html +2168 -988
  423. package/src/components/table/table.react-snapshot.html +2166 -0
  424. package/src/components/tag/config.json +3 -0
  425. package/src/components/tag/tag.django-snapshot.html +109 -0
  426. package/src/components/tag/tag.django.html +4 -4
  427. package/src/components/tag/tag.html +73 -17
  428. package/src/components/tag/tag.react-snapshot.html +99 -0
  429. package/src/components/tag-group/config.json +24 -0
  430. package/src/components/tag-group/tag-group.django-snapshot.html +25 -0
  431. package/src/components/tag-group/tag-group.django.html +1 -1
  432. package/src/components/tag-group/tag-group.react-snapshot.html +17 -0
  433. package/src/components/task-list/config.json +33 -0
  434. package/src/components/task-list/task-list.django-snapshot.html +273 -0
  435. package/src/components/task-list/task-list.django.html +1 -1
  436. package/src/components/task-list/task-list.html +252 -15
  437. package/src/components/task-list/task-list.react-snapshot.html +252 -0
  438. package/src/components/text-area/TextArea.tsx +1 -1
  439. package/src/components/text-area/config.json +5 -0
  440. package/src/components/text-area/text-area.django-snapshot.html +127 -0
  441. package/src/components/text-area/text-area.django.html +3 -3
  442. package/src/components/text-area/text-area.react-snapshot.html +108 -0
  443. package/src/components/theme-picker/ThemePicker.tsx +45 -60
  444. package/src/components/theme-picker/config.json +54 -2
  445. package/src/components/theme-picker/theme-picker.django-snapshot.html +109 -0
  446. package/src/components/theme-picker/theme-picker.django.html +8 -8
  447. package/src/components/theme-picker/theme-picker.html +26 -8
  448. package/src/components/theme-picker/theme-picker.react-snapshot.html +94 -0
  449. package/src/components/time-picker/TimePicker.tsx +15 -9
  450. package/src/components/time-picker/config.json +2 -2
  451. package/src/components/time-picker/time-picker.django-snapshot.html +190 -0
  452. package/src/components/time-picker/time-picker.django.html +2 -2
  453. package/src/components/time-picker/time-picker.html +7 -7
  454. package/src/components/time-picker/time-picker.react-snapshot.html +157 -0
  455. package/src/components/toggle/_option.django.html +21 -0
  456. package/src/components/toggle/config.json +23 -2
  457. package/src/components/toggle/toggle.django-snapshot.html +419 -0
  458. package/src/components/toggle/toggle.django.html +10 -21
  459. package/src/components/toggle/toggle.html +365 -311
  460. package/src/components/toggle/toggle.react-snapshot.html +419 -0
  461. package/src/components/tooltip/Tooltip.tsx +2 -2
  462. package/src/components/tooltip/config.json +6 -1
  463. package/src/components/tooltip/tooltip.django-snapshot.html +57 -0
  464. package/src/components/tooltip/tooltip.django.html +1 -1
  465. package/src/components/tooltip/tooltip.react-snapshot.html +62 -0
  466. package/src/components/tree/Tree.tsx +91 -0
  467. package/src/components/tree/_tree-items.django.html +15 -0
  468. package/src/components/tree/config.json +105 -0
  469. package/src/components/tree/tree.django-snapshot.html +525 -0
  470. package/src/components/tree/tree.django.html +5 -0
  471. package/src/components/tree/tree.html +432 -0
  472. package/src/components/tree/tree.react-snapshot.html +432 -0
  473. package/src/components/villain/config.json +9 -0
  474. package/src/components/villain/villain.django-snapshot.html +44 -0
  475. package/src/components/villain/villain.react-snapshot.html +35 -0
  476. package/src/index.js +6 -0
package/dist/index.cjs CHANGED
@@ -77,7 +77,7 @@
77
77
  expanded = false,
78
78
  headingClassName,
79
79
  contentClassName,
80
- headingLevel = "h3",
80
+ headingAs = "h3",
81
81
  handleToggle
82
82
  }) {
83
83
  const headingClasses = ClassNames("usa-accordion__heading", headingClassName);
@@ -86,7 +86,7 @@
86
86
  "usa-prose",
87
87
  contentClassName
88
88
  );
89
- const Heading = headingLevel;
89
+ const Heading = headingAs;
90
90
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
91
91
  /* @__PURE__ */ jsxRuntime.jsx(Heading, { id: `${id}-heading`, className: headingClasses, children: /* @__PURE__ */ jsxRuntime.jsx(
92
92
  "button",
@@ -95,7 +95,6 @@
95
95
  className: "usa-accordion__button",
96
96
  "aria-expanded": expanded,
97
97
  "aria-controls": `${id}-content`,
98
- "data-testid": `accordionButton_${id}`,
99
98
  onClick: handleToggle,
100
99
  children: title
101
100
  }
@@ -105,7 +104,6 @@
105
104
  {
106
105
  id: `${id}-content`,
107
106
  "aria-labelledby": `${id}-heading`,
108
- "data-testid": `accordionItem_${id}`,
109
107
  className: contentClasses,
110
108
  hidden: !expanded,
111
109
  children: content
@@ -118,7 +116,7 @@
118
116
  bordered = false,
119
117
  items = [],
120
118
  multiselectable = false,
121
- headingLevel = "h3",
119
+ headingAs = "h3",
122
120
  iconPosition,
123
121
  className = "",
124
122
  headingClassName = "",
@@ -143,7 +141,7 @@
143
141
  AccordionItem,
144
142
  {
145
143
  ...item,
146
- headingLevel,
144
+ headingAs,
147
145
  headingClassName,
148
146
  contentClassName
149
147
  },
@@ -163,21 +161,28 @@
163
161
  function Icon({
164
162
  name,
165
163
  source = "uswds",
166
- size = 2,
164
+ size,
167
165
  color,
168
- alt = name + " icon",
166
+ alt,
169
167
  staticBaseUrl,
170
168
  staticUrlPrefix,
171
169
  className = "",
172
170
  ...props2
173
171
  }) {
174
172
  const spritePrefix = staticUrlPrefix ?? getAssetUrl(`img/${source === "usx" ? "usx-sprite.svg" : "sprite.svg"}#`, staticBaseUrl);
173
+ const classes = ClassNames(
174
+ "usa-icon",
175
+ "usx-icon",
176
+ size ? size === 1 ? "usx-icon--size-1" : "usa-icon--size-" + size : "",
177
+ color ? "text-" + color : "",
178
+ className
179
+ );
175
180
  return /* @__PURE__ */ jsxRuntime.jsx(
176
181
  "svg",
177
182
  {
178
- className: "usa-icon " + (size ? size === 1 ? "usx-icon--size-1" : "usa-icon--size-" + size : "") + " " + (color ? "text-" + color : "") + " " + className,
179
- "aria-hidden": "true",
180
- "aria-label": alt,
183
+ className: classes,
184
+ "aria-hidden": alt ? void 0 : "true",
185
+ "aria-label": alt || void 0,
181
186
  focusable: "false",
182
187
  role: "img",
183
188
  ...props2,
@@ -218,14 +223,37 @@
218
223
  } else if (ariaLabel) {
219
224
  accessibilityProps["aria-label"] = ariaLabel;
220
225
  } else if (resolvedRole === "region") {
221
- accessibilityProps["aria-label"] = heading || `${normalizedVariant} alert`;
226
+ const label = heading || (normalizedVariant ? `${normalizedVariant} alert` : void 0);
227
+ if (label) accessibilityProps["aria-label"] = label;
222
228
  }
223
229
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, ...accessibilityProps, ...props2, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usa-alert__body", children: [
224
230
  !slim && heading ? /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "usa-alert__heading", children: heading }) : null,
225
- children ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usa-alert__text", children }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "usa-alert__text", children: text }),
231
+ children ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usa-alert__text", children }) : text ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "usa-alert__text", children: text }) : null,
226
232
  onDismiss && /* @__PURE__ */ jsxRuntime.jsx("button", { className: "usx-alert__dismiss", "aria-label": "Dismiss alert", onClick: onDismiss, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close", size: 3, staticBaseUrl }) })
227
233
  ] }) });
228
234
  }
235
+ const Tooltip = ({
236
+ label,
237
+ position = "right",
238
+ children,
239
+ className = "",
240
+ bodyClassName = "",
241
+ ...props2
242
+ }) => {
243
+ const validPositions = ["top", "bottom", "left", "right"];
244
+ const normalizedPosition = validPositions.includes(position) ? position : "right";
245
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: ClassNames("usx-tooltip", className), ...props2, children: [
246
+ children,
247
+ /* @__PURE__ */ jsxRuntime.jsx(
248
+ "span",
249
+ {
250
+ className: ClassNames("usa-tooltip__body", `usa-tooltip__body--${normalizedPosition}`, bodyClassName),
251
+ role: "tooltip",
252
+ children: label
253
+ }
254
+ )
255
+ ] });
256
+ };
229
257
  const shapeClassMap = {
230
258
  circle: "usx-circle",
231
259
  "rounded-sm": "usx-rounded-sm",
@@ -240,7 +268,7 @@
240
268
  variant = "image",
241
269
  value = null,
242
270
  shape = null,
243
- tooltip = null,
271
+ tooltipProps = null,
244
272
  className = "",
245
273
  imageClassName = "",
246
274
  contentClassName = "",
@@ -262,15 +290,9 @@
262
290
  shape ? shapeClassMap[shape] : "usx-circle",
263
291
  contentClassName
264
292
  );
265
- const avatarContent = isInitialsVariant ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: contentClasses, children: value }) : isIconVariant ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: contentClasses, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: value, alt: alt || `${value} icon` }) }) : /* @__PURE__ */ jsxRuntime.jsx("img", { className: imgClasses, src: src || void 0, alt: alt || void 0, role: "img", ...props2 });
293
+ const avatarContent = isInitialsVariant ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: contentClasses, children: value }) : isIconVariant ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: contentClasses, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: value, alt: alt ? void 0 : `${value} icon` }) }) : /* @__PURE__ */ jsxRuntime.jsx("img", { className: imgClasses, src: src || void 0, alt: alt || void 0, role: "img", ...props2 });
266
294
  const avatar = /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: wrapperClasses, "aria-label": isInitialsVariant || isIconVariant ? alt || void 0 : void 0, children: avatarContent });
267
- if (tooltip) {
268
- return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "usx-tooltip", children: [
269
- avatar,
270
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usa-tooltip__body usa-tooltip__body--right", role: "tooltip", children: tooltip })
271
- ] });
272
- }
273
- return avatar;
295
+ return tooltipProps ? /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { ...tooltipProps, children: avatar }) : avatar;
274
296
  }
275
297
  function Attribution({
276
298
  avatarProps = null,
@@ -295,8 +317,8 @@
295
317
  function AvatarGroup({ avatarProps = [], overlap = false, stacked = false, className = "", ...props2 }) {
296
318
  const classes = ClassNames(
297
319
  "usx-avatar-group",
298
- overlap && "usa-avatar-group--overlap",
299
- stacked && "usa-avatar-group--stacked",
320
+ overlap && "usx-avatar-group--overlap",
321
+ stacked && "usx-avatar-group--stacked",
300
322
  className
301
323
  );
302
324
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, ...props2, children: avatarProps.map((avatar, index) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -307,7 +329,7 @@
307
329
  alt: avatar.alt,
308
330
  value: avatar.initials,
309
331
  shape: avatar.shape,
310
- tooltip: avatar.tooltip,
332
+ tooltipProps: avatar.tooltipProps,
311
333
  className: avatar.className,
312
334
  imageClassName: avatar.imageClassName,
313
335
  contentClassName: avatar.initialsClassName
@@ -317,6 +339,7 @@
317
339
  }
318
340
  function BackToTop({
319
341
  label = "Back to top",
342
+ ariaLabel = "Back to top",
320
343
  href = void 0,
321
344
  variant = null,
322
345
  iconPosition = "right",
@@ -325,6 +348,7 @@
325
348
  onClick = void 0,
326
349
  ...props2
327
350
  }) {
351
+ const accessibleName = label ? void 0 : ariaLabel;
328
352
  const icon = /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "arrow_upward", size: iconSize, className: ClassNames(
329
353
  iconPosition === "left" ? "margin-right-05" : "margin-left-05"
330
354
  ) });
@@ -335,7 +359,7 @@
335
359
  "flex-align-center",
336
360
  className
337
361
  );
338
- return /* @__PURE__ */ jsxRuntime.jsxs("a", { className: linkClasses, href, ...props2, children: [
362
+ return /* @__PURE__ */ jsxRuntime.jsxs("a", { className: linkClasses, href, "aria-label": accessibleName, ...props2, children: [
339
363
  iconPosition === "left" && icon,
340
364
  label,
341
365
  iconPosition === "right" && icon
@@ -353,6 +377,7 @@
353
377
  {
354
378
  type: "button",
355
379
  className: buttonClasses,
380
+ "aria-label": accessibleName,
356
381
  onClick: onClick || (() => window.scrollTo({ top: 0, behavior: "smooth" })),
357
382
  ...props2,
358
383
  children: [
@@ -484,7 +509,7 @@
484
509
  }) {
485
510
  if (!items || items.length === 0) {
486
511
  const classes = ClassNames("usx-breadcrumb", className);
487
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, ...props2, children: children || "Breadcrumb" });
512
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, ...props2, children });
488
513
  }
489
514
  const navClasses = ClassNames(
490
515
  "usa-breadcrumb",
@@ -540,6 +565,7 @@
540
565
  ] });
541
566
  };
542
567
  function Label({
568
+ id,
543
569
  htmlFor,
544
570
  required = false,
545
571
  error = false,
@@ -558,8 +584,9 @@
558
584
  return /* @__PURE__ */ jsxRuntime.jsxs(
559
585
  "label",
560
586
  {
587
+ id: id || void 0,
561
588
  className: classOverride ? className : classes,
562
- ...htmlFor ? { htmlFor } : {},
589
+ htmlFor: htmlFor || void 0,
563
590
  ...props2,
564
591
  children: [
565
592
  required && /* @__PURE__ */ jsxRuntime.jsx(Required, {}),
@@ -586,7 +613,8 @@
586
613
  source: "usx",
587
614
  size,
588
615
  color,
589
- staticBaseUrl
616
+ staticBaseUrl,
617
+ staticUrlPrefix
590
618
  }
591
619
  ),
592
620
  screenReaderLabel && /* @__PURE__ */ jsxRuntime.jsx(Label, { screenReaderOnly: true, children: screenReaderLabel }),
@@ -668,6 +696,7 @@
668
696
  type,
669
697
  className: classes,
670
698
  disabled,
699
+ "aria-disabled": disabled ? "true" : void 0,
671
700
  ...onClick ? { onClick } : {},
672
701
  ...buttonProps,
673
702
  ...extraAttributes,
@@ -728,10 +757,9 @@
728
757
  content,
729
758
  backgroundColor,
730
759
  textColor,
731
- element = "div",
760
+ as: Element = "div",
732
761
  ...props2
733
762
  }) {
734
- const Element = element;
735
763
  return /* @__PURE__ */ jsxRuntime.jsx(
736
764
  Element,
737
765
  {
@@ -852,8 +880,8 @@
852
880
  ] }) : /* @__PURE__ */ jsxRuntime.jsx("img", { src: getAssetUrl(src, staticBaseUrl), srcSet: srcSet ? getAssetSrcSet(srcSet, staticBaseUrl) : void 0, alt, style, ...props2 });
853
881
  if (caption) {
854
882
  return /* @__PURE__ */ jsxRuntime.jsxs("figure", { className: classes, style, children: [
855
- imgElement,
856
- /* @__PURE__ */ jsxRuntime.jsx("figcaption", { className: captionClasses, "aria-hidden": hideCaption, children: caption })
883
+ href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href, children: imgElement }) : imgElement,
884
+ /* @__PURE__ */ jsxRuntime.jsx("figcaption", { className: captionClasses, children: caption })
857
885
  ] });
858
886
  }
859
887
  const Element = href ? "a" : "div";
@@ -867,61 +895,50 @@
867
895
  }
868
896
  );
869
897
  }
870
- function Slide({
871
- id,
872
- className = "",
873
- role = "group",
874
- ariaRoledescription = "slide",
875
- ariaLabel,
876
- tabIndex = 0,
877
- children = null,
878
- ...rest
879
- }) {
880
- const cls = ClassNames("usx-carousel__slide", className);
881
- return /* @__PURE__ */ jsxRuntime.jsx(
882
- "section",
883
- {
884
- id,
885
- className: cls,
886
- role,
887
- "aria-roledescription": ariaRoledescription,
888
- "aria-label": ariaLabel,
889
- tabIndex,
890
- ...rest,
891
- children
892
- }
898
+ function flattenChildren(children) {
899
+ return React.Children.toArray(children).flatMap(
900
+ (child) => React.isValidElement(child) && child.type === React.Fragment ? flattenChildren(child.props.children) : [child]
893
901
  );
894
902
  }
895
903
  function Carousel({
896
- id = "carousel-1",
897
904
  slides = [],
898
905
  ariaLabel = "Featured content",
899
- className = "",
900
906
  showDots = true,
901
- children = null,
902
- slideIds = [],
907
+ statusClassName,
908
+ children,
909
+ className,
910
+ extraAttributes,
911
+ role = "region",
903
912
  ...props2
904
913
  }) {
905
- var _a;
906
- const classes = ClassNames("usx-carousel", className);
907
- const childArray = React.Children.toArray(children).filter(Boolean);
908
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes, ...props2, role: "region", "aria-roledescription": "carousel", "aria-label": ariaLabel, children: [
909
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-carousel__viewport", tabIndex: -1, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-carousel__track", children: childArray.length > 0 ? childArray : slides.length > 0 ? slides.map((slide, i) => /* @__PURE__ */ jsxRuntime.jsx(
910
- Slide,
911
- {
912
- id: `${id}-slide-${i + 1}`,
913
- className: "",
914
- ariaLabel: `${i + 1} of ${slides.length}`,
915
- tabIndex: 0,
916
- children: (slide == null ? void 0 : slide.content) || slide
917
- },
918
- i
919
- )) : /* @__PURE__ */ jsxRuntime.jsx("p", { children: /* @__PURE__ */ jsxRuntime.jsx("em", { children: "No slides available." }) }) }) }),
920
- showDots && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usx-carousel__dots", "aria-label": "Slide navigation", children: [
921
- (_a = childArray.length > 0 ? childArray : slides) == null ? void 0 : _a.map((_, i) => /* @__PURE__ */ jsxRuntime.jsx("a", { href: `#${id}-slide-${i + 1}`, "aria-label": `Go to slide ${i + 1}`, tabIndex: -1 }, i)),
922
- childArray.length > 0 && slideIds.length === childArray.length && slideIds.map((slideId, i) => /* @__PURE__ */ jsxRuntime.jsx("a", { href: slideId, "aria-label": `Go to slide ${i + 1}`, tabIndex: -1 }, i))
923
- ] })
924
- ] });
914
+ const childSlides = flattenChildren(children);
915
+ const items = childSlides.length ? childSlides.map((content) => ({ content })) : slides;
916
+ const count = items.length;
917
+ return /* @__PURE__ */ jsxRuntime.jsx(
918
+ "div",
919
+ {
920
+ ...props2,
921
+ className: ClassNames("usx-carousel", className),
922
+ role,
923
+ "aria-roledescription": "carousel",
924
+ "aria-label": ariaLabel,
925
+ "data-show-dots": showDots ? void 0 : "false",
926
+ "data-status-class-name": statusClassName,
927
+ ...extraAttributes,
928
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-carousel__viewport", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-carousel__track", "aria-live": "polite", tabIndex: count > 1 ? 0 : void 0, children: count ? items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
929
+ "div",
930
+ {
931
+ className: "usx-carousel__slide",
932
+ role: "group",
933
+ "aria-roledescription": "slide",
934
+ "aria-label": item.label || `${index + 1} of ${count}`,
935
+ children: item.content
936
+ },
937
+ index
938
+ )) : /* @__PURE__ */ jsxRuntime.jsx("p", { children: "No slides available." }) }) })
939
+ },
940
+ `${count}-${showDots}-${statusClassName ?? ""}`
941
+ );
925
942
  }
926
943
  function Card({
927
944
  title,
@@ -937,7 +954,8 @@
937
954
  showCarouselDots = true,
938
955
  children,
939
956
  className = "",
940
- tag: RootTag = "div",
957
+ containerClassName = "",
958
+ as: RootTag = "div",
941
959
  ...props2
942
960
  }) {
943
961
  const cardClasses = ClassNames(
@@ -957,14 +975,15 @@
957
975
  "usa-card__media--exdent": mediaExdent
958
976
  }
959
977
  );
960
- const hasStructuredContent = title || description || tagProps || buttonProps || imageProps;
978
+ const hasStructuredContent = title || description || (tagProps == null ? void 0 : tagProps.length) || (buttonProps == null ? void 0 : buttonProps.length) || (imageProps == null ? void 0 : imageProps.length);
961
979
  const shouldRenderStructured = hasStructuredContent && !children;
962
980
  const hasImages = imageProps && imageProps.length > 0;
963
981
  const useCarousel = imageProps && imageProps.length > 1;
964
982
  const media = useCarousel ? /* @__PURE__ */ jsxRuntime.jsx(
965
983
  Carousel,
966
984
  {
967
- id: `${props2.id || "card"}-carousel`,
985
+ ariaLabel: `${title || props2.id || "Card"} images`,
986
+ role: "group",
968
987
  showDots: showCarouselDots,
969
988
  className: "usx-card__carousel",
970
989
  slides: imageProps == null ? void 0 : imageProps.map((img, index) => ({
@@ -972,7 +991,7 @@
972
991
  }))
973
992
  }
974
993
  ) : hasImages ? /* @__PURE__ */ jsxRuntime.jsx(Image, { hideCaption: true, ...imageProps[0], className: ClassNames("usa-card__img", imageProps[0].className) }) : null;
975
- return /* @__PURE__ */ jsxRuntime.jsx(RootTag, { className: cardClasses, ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usa-card__container", children: shouldRenderStructured ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
994
+ return /* @__PURE__ */ jsxRuntime.jsx(RootTag, { className: cardClasses, ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: ClassNames("usa-card__container", containerClassName), children: shouldRenderStructured ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
976
995
  title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usa-card__header", children: /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "usa-card__heading", children: title }) }),
977
996
  media && /* @__PURE__ */ jsxRuntime.jsx("div", { className: mediaClasses, children: media }),
978
997
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usa-card__body", children: [
@@ -988,7 +1007,7 @@
988
1007
  "usx-card-group",
989
1008
  className
990
1009
  );
991
- return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: classes, ...props2, children: cardProps.map((card, index) => /* @__PURE__ */ jsxRuntime.jsx(Card, { ...card, tag: "li" }, index)) });
1010
+ return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: classes, ...props2, children: cardProps.map((card, index) => /* @__PURE__ */ jsxRuntime.jsx(Card, { ...card, as: "li" }, index)) });
992
1011
  }
993
1012
  function Hint({
994
1013
  id,
@@ -1105,7 +1124,7 @@
1105
1124
  className: classes,
1106
1125
  placeholder,
1107
1126
  disabled,
1108
- defaultValue,
1127
+ defaultValue: props2.value === void 0 ? defaultValue : void 0,
1109
1128
  ...required ? { required: true } : {},
1110
1129
  "aria-describedby": describedByParts.length ? describedByParts.join(" ") : void 0,
1111
1130
  "aria-invalid": hasError ? "true" : void 0,
@@ -1134,7 +1153,6 @@
1134
1153
  const infoId = `${fieldId}-info`;
1135
1154
  const hintId = hint ? `${fieldId}-hint` : void 0;
1136
1155
  const errorId = error ? `${fieldId}-error` : void 0;
1137
- const successId = !error && success ? `${fieldId}-success` : void 0;
1138
1156
  const outerClasses = ClassNames("usa-character-count", "usx-character-count", className);
1139
1157
  const fieldProps = {
1140
1158
  id: fieldId,
@@ -1149,7 +1167,7 @@
1149
1167
  maxLength: max,
1150
1168
  formGroup: true,
1151
1169
  className: "usa-character-count__field",
1152
- "aria-describedby": [infoId, hintId, errorId, successId].filter(Boolean).join(" "),
1170
+ "aria-describedby": [infoId, hintId, errorId].filter(Boolean).join(" "),
1153
1171
  ...props2
1154
1172
  };
1155
1173
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: outerClasses, children: [
@@ -1177,6 +1195,7 @@
1177
1195
  className = "",
1178
1196
  onChange,
1179
1197
  required = false,
1198
+ formGroup = true,
1180
1199
  ...props2
1181
1200
  }) {
1182
1201
  const hasError = !!error;
@@ -1191,7 +1210,7 @@
1191
1210
  "usa-checkbox__input",
1192
1211
  { "usa-checkbox__input--tile": tile }
1193
1212
  );
1194
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1213
+ const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1195
1214
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: divClasses, ...props2, children: [
1196
1215
  /* @__PURE__ */ jsxRuntime.jsx(
1197
1216
  "input",
@@ -1201,7 +1220,7 @@
1201
1220
  type: "checkbox",
1202
1221
  name,
1203
1222
  value,
1204
- "aria-label": ariaLabel,
1223
+ "aria-label": ariaLabel || void 0,
1205
1224
  defaultChecked: checked,
1206
1225
  disabled,
1207
1226
  required,
@@ -1215,6 +1234,7 @@
1215
1234
  ] }),
1216
1235
  hasError ? /* @__PURE__ */ jsxRuntime.jsx(ErrorMessage, { children: error }) : hasSuccess ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usa-success-message text-success", role: "status", children: success }) : null
1217
1236
  ] });
1237
+ return formGroup ? /* @__PURE__ */ jsxRuntime.jsx(FormGroup, { error: hasError, children: content }) : content;
1218
1238
  }
1219
1239
  function Legend({
1220
1240
  text,
@@ -1291,7 +1311,8 @@
1291
1311
  tile,
1292
1312
  small,
1293
1313
  ...opt,
1294
- id
1314
+ id,
1315
+ formGroup: false
1295
1316
  },
1296
1317
  id
1297
1318
  );
@@ -1329,28 +1350,6 @@
1329
1350
  Clickable.Link = ClickableLink;
1330
1351
  Clickable.ColorChange = ClickableColorChange;
1331
1352
  Clickable.BgColorChange = ClickableBgColorChange;
1332
- const Tooltip = ({
1333
- label,
1334
- position = "top",
1335
- children,
1336
- className = "",
1337
- bodyClassName = "",
1338
- ...props2
1339
- }) => {
1340
- const validPositions = ["top", "bottom", "left", "right"];
1341
- const normalizedPosition = validPositions.includes(position) ? position : "top";
1342
- return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: ClassNames("usx-tooltip", className), ...props2, children: [
1343
- children,
1344
- /* @__PURE__ */ jsxRuntime.jsx(
1345
- "span",
1346
- {
1347
- className: ClassNames("usa-tooltip__body", `usa-tooltip__body--${normalizedPosition}`, bodyClassName),
1348
- role: "tooltip",
1349
- children: label
1350
- }
1351
- )
1352
- ] });
1353
- };
1354
1353
  function copyTextToClipboard(text) {
1355
1354
  if (window.navigator.clipboard) {
1356
1355
  return window.navigator.clipboard.writeText(text);
@@ -1371,8 +1370,8 @@
1371
1370
  onClick: () => copyTextToClipboard(copyText),
1372
1371
  type: "button",
1373
1372
  children: [
1374
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "content_copy", size: 0, className: "usx-copy__copy", staticBaseUrl }),
1375
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "check", size: 0, className: "usx-copy__check", staticBaseUrl }),
1373
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "content_copy", className: "usx-copy__copy", staticBaseUrl }),
1374
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "check", className: "usx-copy__check", staticBaseUrl }),
1376
1375
  label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "margin-left-1", children: label })
1377
1376
  ]
1378
1377
  }
@@ -1391,12 +1390,12 @@
1391
1390
  }
1392
1391
  );
1393
1392
  }
1394
- function Code({ lines = [], allowHtml = false, copyText = null, staticBaseUrl, className = "" }) {
1393
+ function Code({ lines = [], allowHtml = false, copyText = null, staticBaseUrl, className = "", contentClassName = "" }) {
1395
1394
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ClassNames("usx-mockup-code", className), children: [
1396
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-mockup-code__content", children: lines.map((line, i) => /* @__PURE__ */ jsxRuntime.jsx(
1395
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: ClassNames("usx-mockup-code__content", contentClassName), children: lines.map((line, i) => /* @__PURE__ */ jsxRuntime.jsx(
1397
1396
  "pre",
1398
1397
  {
1399
- ...line.prefix != null ? { "data-prefix": line.prefix } : {},
1398
+ "data-prefix": line.prefix != null ? line.prefix : void 0,
1400
1399
  className: line.className || void 0,
1401
1400
  children: allowHtml ? /* @__PURE__ */ jsxRuntime.jsx("code", { dangerouslySetInnerHTML: { __html: line.code } }) : /* @__PURE__ */ jsxRuntime.jsx("code", { children: line.code })
1402
1401
  },
@@ -1492,6 +1491,7 @@
1492
1491
  name,
1493
1492
  disabled,
1494
1493
  required,
1494
+ "aria-describedby": [hintId, errorId].filter(Boolean).join(" ") || void 0,
1495
1495
  onChange: handleChange,
1496
1496
  ...props2,
1497
1497
  children: options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value, children: opt.label }, opt.value))
@@ -1502,7 +1502,7 @@
1502
1502
  ] });
1503
1503
  return formGroup ? /* @__PURE__ */ jsxRuntime.jsx(FormGroup, { error: !!error, children: content }) : content;
1504
1504
  }
1505
- const props = { "element": { "type": "select", "description": "Root HTML element. Use a heading or accessible label for named sections and navigation; list roots require list-item children.", "options": ["div", "section", "article", "aside", "nav", "ul", "ol", "li"], "default": "div" }, "gridContainer": { "type": "select", "description": "Opt-in centered USWDS page-width container with side padding. Default uses the USX themed grid-container; named sizes use USWDS widths. Usually wrap a gridRow inside this container rather than combining them.", "options": ["default", "card", "card-lg", "mobile", "mobile-lg", "tablet", "tablet-lg", "desktop", "desktop-lg", "widescreen"] }, "gridRow": { "type": "boolean", "description": "Use a wrapping USWDS grid row. Nest Containers with column settings as direct children. Omitted leaves the container unstyled.", "default": false }, "display": { "type": "select", "description": "Display mode. Choose flex or inline-flex to enable direction, wrap, alignment, and gap. Flow-root contains floated children; none hides the container and its descendants.", "options": ["block", "flex", "inline", "inline-block", "inline-flex", "none", "flow-root"] }, "direction": { "type": "select", "description": "Direction of flex children. Requires display flex or inline-flex (or gridRow). Reverse directions change visual order only, not reading or keyboard order.", "options": ["row", "column", "row-reverse", "column-reverse"] }, "wrap": { "type": "select", "description": "Whether flex children wrap onto new lines. Set wrap for a flexible toolbar; omitted uses normal CSS behavior.", "options": ["wrap", "nowrap", "wrap-reverse"] }, "justify": { "type": "select", "description": "Distribute children along the main flex axis.", "options": ["start", "end", "center", "space-between", "space-around", "space-evenly"] }, "align": { "type": "select", "description": "Align children across the flex axis.", "options": ["start", "end", "center", "stretch", "baseline"] }, "alignSelf": { "type": "select", "description": "Override this container’s alignment as a child of a flex parent. Auto restores parent alignment.", "options": ["auto", "start", "end", "center", "stretch", "baseline"] }, "flex": { "type": "select", "description": "Size this container as a flex child: auto uses its content size, fill shares available space, none keeps its size. Use column instead when this is a USWDS grid column.", "options": ["auto", "fill", "none"] }, "gap": { "type": "select", "description": "Space between flex children using USWDS spacing tokens (1 = 8px, 05 = 4px). Use gutters instead on gridRow: CSS gap adds to percentage column widths.", "options": ["0", "2px", "05", "1", "2", "3", "4", "5", "6"] }, "column": { "type": "select", "description": "Width of this container inside a gridRow: 1–12 columns, auto for content width, or fill for equal shares. Set 12 at the base to stack on small screens, then override at larger breakpoints.", "options": ["auto", "fill", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"] }, "offset": { "type": "select", "description": "Offset this grid column by 1–12 columns. Use none to reset an earlier offset.", "options": ["none", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"] }, "gutters": { "type": "select", "description": "Horizontal USWDS grid gutters; requires gridRow. Use 2 with a desktop override of 4 for standard responsive spacing; 0 removes gutters. Rows use negative margins, so nest them in a gridContainer or another padded parent.", "options": ["sm", "md", "lg", "0", "2px", "05", "1", "2", "3", "4", "5", "6"] }, "float": { "type": "select", "description": "Float this container so surrounding content wraps around it. Float has no effect on flex children; use a flow-root parent to contain floats.", "options": ["none", "left", "right"] }, "responsive": { "type": "object", "description": "Mobile-first overrides keyed by mobileLg, tablet, and desktop. Omitted fields keep the smaller-screen setting; use explicit values (none, 0, row, etc.) to reset. Breakpoints match precompiled USWDS and do not follow USX page-layout theme breakpoints.", "properties": { "mobileLg": { "type": "object", "description": "Layout overrides at 30em / 480px and wider (pixel equivalent assumes 16px browser default).", "component": "container", "omit": ["element", "gridContainer", "gridRow", "responsive", "children", "content", "className", "id", "role", "ariaLabel", "ariaLabelledby"] }, "tablet": { "type": "object", "description": "Layout overrides at 40em / 640px and wider (pixel equivalent assumes 16px browser default).", "component": "container", "omit": ["element", "gridContainer", "gridRow", "responsive", "children", "content", "className", "id", "role", "ariaLabel", "ariaLabelledby"] }, "desktop": { "type": "object", "description": "Layout overrides at 64em / 1024px and wider (pixel equivalent assumes 16px browser default).", "component": "container", "omit": ["element", "gridContainer", "gridRow", "responsive", "children", "content", "className", "id", "role", "ariaLabel", "ariaLabelledby"] } } }, "children": { "type": "slot", "description": "Grouped content rendered directly, with no child wrappers or reordering. Takes precedence over content unless null or undefined." }, "content": { "type": "slot", "description": "Fallback grouped content when children is null or undefined." }, "className": { "type": "string", "description": "Additional CSS classes for spacing, decoration, or layouts beyond these controls." }, "id": { "type": "string", "description": "HTML identifier for links and accessible references." }, "role": { "type": "string", "description": "Optional ARIA role; prefer an appropriate semantic element." }, "ariaLabel": { "type": "string", "description": "Accessible name when a visible label is not available." }, "ariaLabelledby": { "type": "string", "description": "ID of the visible heading or label that names this container." } };
1505
+ const props = { "as": { "type": "select", "description": "Root HTML element. Use a heading or accessible label for named sections and navigation; list roots require list-item children.", "options": ["div", "section", "article", "aside", "nav", "ul", "ol", "li"], "default": "div" }, "gridContainer": { "type": "select", "description": "Opt-in centered USWDS page-width container with side padding. Default uses the USX themed grid-container; named sizes use USWDS widths. Usually wrap a gridRow inside this container rather than combining them.", "options": ["default", "card", "card-lg", "mobile", "mobile-lg", "tablet", "tablet-lg", "desktop", "desktop-lg", "widescreen"] }, "gridRow": { "type": "boolean", "description": "Use a wrapping USWDS grid row. Nest Containers with column settings as direct children. Omitted leaves the container unstyled.", "default": false }, "display": { "type": "select", "description": "Display mode. Choose flex or inline-flex to enable direction, wrap, alignment, and gap. Flow-root contains floated children; none hides the container and its descendants.", "options": ["block", "flex", "inline", "inline-block", "inline-flex", "none", "flow-root"] }, "direction": { "type": "select", "description": "Direction of flex children. Requires display flex or inline-flex (or gridRow). Reverse directions change visual order only, not reading or keyboard order.", "options": ["row", "column", "row-reverse", "column-reverse"] }, "wrap": { "type": "select", "description": "Whether flex children wrap onto new lines. Set wrap for a flexible toolbar; omitted uses normal CSS behavior.", "options": ["wrap", "nowrap", "wrap-reverse"] }, "justify": { "type": "select", "description": "Distribute children along the main flex axis.", "options": ["start", "end", "center", "space-between", "space-around", "space-evenly"] }, "align": { "type": "select", "description": "Align children across the flex axis.", "options": ["start", "end", "center", "stretch", "baseline"] }, "alignSelf": { "type": "select", "description": "Override this container’s alignment as a child of a flex parent. Auto restores parent alignment.", "options": ["auto", "start", "end", "center", "stretch", "baseline"] }, "flex": { "type": "select", "description": "Size this container as a flex child: auto uses its content size, fill shares available space, none keeps its size. Use column instead when this is a USWDS grid column.", "options": ["auto", "fill", "none"] }, "gap": { "type": "select", "description": "Space between flex children using USWDS spacing tokens (1 = 8px, 05 = 4px). Use gutters instead on gridRow: CSS gap adds to percentage column widths.", "options": ["0", "2px", "05", "1", "2", "3", "4", "5", "6"] }, "column": { "type": "select", "description": "Width of this container inside a gridRow: 1–12 columns, auto for content width, or fill for equal shares. Set 12 at the base to stack on small screens, then override at larger breakpoints.", "options": ["auto", "fill", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"] }, "offset": { "type": "select", "description": "Offset this grid column by 1–12 columns. Use none to reset an earlier offset.", "options": ["none", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"] }, "gutters": { "type": "select", "description": "Horizontal USWDS grid gutters; requires gridRow. Use 2 with a desktop override of 4 for standard responsive spacing; 0 removes gutters. Rows use negative margins, so nest them in a gridContainer or another padded parent.", "options": ["sm", "md", "lg", "0", "2px", "05", "1", "2", "3", "4", "5", "6"] }, "float": { "type": "select", "description": "Float this container so surrounding content wraps around it. Float has no effect on flex children; use a flow-root parent to contain floats.", "options": ["none", "left", "right"] }, "responsive": { "type": "object", "description": "Mobile-first overrides keyed by mobileLg, tablet, and desktop. Omitted fields keep the smaller-screen setting; use explicit values (none, 0, row, etc.) to reset. Breakpoints match precompiled USWDS and do not follow USX page-layout theme breakpoints.", "properties": { "mobileLg": { "type": "object", "description": "Layout overrides at 30em / 480px and wider (pixel equivalent assumes 16px browser default).", "component": "container", "omit": ["as", "gridContainer", "gridRow", "responsive", "children", "content", "className", "id", "role", "ariaLabel", "ariaLabelledby"] }, "tablet": { "type": "object", "description": "Layout overrides at 40em / 640px and wider (pixel equivalent assumes 16px browser default).", "component": "container", "omit": ["as", "gridContainer", "gridRow", "responsive", "children", "content", "className", "id", "role", "ariaLabel", "ariaLabelledby"] }, "desktop": { "type": "object", "description": "Layout overrides at 64em / 1024px and wider (pixel equivalent assumes 16px browser default).", "component": "container", "omit": ["as", "gridContainer", "gridRow", "responsive", "children", "content", "className", "id", "role", "ariaLabel", "ariaLabelledby"] } } }, "children": { "type": "slot", "description": "Grouped content rendered directly, with no child wrappers or reordering. Takes precedence over content unless null or undefined." }, "content": { "type": "slot", "description": "Fallback grouped content when children is null or undefined." }, "className": { "type": "string", "description": "Additional CSS classes for spacing, decoration, or layouts beyond these controls." }, "id": { "type": "string", "description": "HTML identifier for links and accessible references." }, "role": { "type": "string", "description": "Optional ARIA role; prefer an appropriate semantic element." }, "ariaLabel": { "type": "string", "description": "Accessible name when a visible label is not available." }, "ariaLabelledby": { "type": "string", "description": "ID of the visible heading or label that names this container." } };
1506
1506
  const config = {
1507
1507
  props
1508
1508
  };
@@ -1535,7 +1535,7 @@
1535
1535
  });
1536
1536
  }
1537
1537
  function Container({
1538
- element = "div",
1538
+ as = "div",
1539
1539
  gridContainer,
1540
1540
  gridRow = false,
1541
1541
  display,
@@ -1559,7 +1559,7 @@
1559
1559
  ariaLabel,
1560
1560
  ariaLabelledby
1561
1561
  }) {
1562
- const Element = config.props.element.options.includes(element) ? element : "div";
1562
+ const Element = config.props.as.options.includes(as) ? as : "div";
1563
1563
  const classes = ClassNames(
1564
1564
  "usx-container",
1565
1565
  gridContainer && config.props.gridContainer.options.includes(gridContainer) ? gridContainer === "default" ? "grid-container" : `grid-container-${gridContainer}` : null,
@@ -1720,12 +1720,140 @@
1720
1720
  }
1721
1721
  );
1722
1722
  }
1723
- function Eyebrow({ children = null, className = "", ...props2 }) {
1724
- const classes = ClassNames("usx-eyebrow", className);
1725
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: classes, ...props2, children });
1723
+ function Summary({
1724
+ label = "Details",
1725
+ children,
1726
+ ariaLabel,
1727
+ className = "",
1728
+ textClassName = "",
1729
+ markerColor = void 0,
1730
+ underlineColor = void 0,
1731
+ noUnderline = false,
1732
+ noMarker = false,
1733
+ unstyled = false
1734
+ }) {
1735
+ if (unstyled) {
1736
+ return /* @__PURE__ */ jsxRuntime.jsx("summary", { className: className || void 0, "aria-label": ariaLabel, children: children ?? label });
1737
+ }
1738
+ const summaryClassNames = ClassNames(
1739
+ "usx-summary",
1740
+ { [`marker-${markerColor}`]: markerColor && !noMarker },
1741
+ { "usx-summary--no-marker": noMarker },
1742
+ { "usx-summary--no-underline": noUnderline },
1743
+ className
1744
+ );
1745
+ const summaryTextClassNames = ClassNames(
1746
+ "usx-summary-text",
1747
+ { [`underline-${underlineColor}`]: !noUnderline && underlineColor },
1748
+ textClassName
1749
+ );
1750
+ return /* @__PURE__ */ jsxRuntime.jsx("summary", { className: summaryClassNames, "aria-label": ariaLabel, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: summaryTextClassNames, children: children ?? (label || "Details") }) });
1751
+ }
1752
+ function Details({
1753
+ summaryProps = {},
1754
+ text = "",
1755
+ children = null,
1756
+ open = false,
1757
+ name,
1758
+ contentBorderColor = void 0,
1759
+ noContentBorder = false,
1760
+ className = "",
1761
+ contentClassName = ""
1762
+ }) {
1763
+ const detailsClassName = ClassNames(
1764
+ "usx-details",
1765
+ { "usx-details--borderless": noContentBorder },
1766
+ className
1767
+ );
1768
+ const compositeContentClassName = ClassNames(
1769
+ "usx-details__content",
1770
+ { [`border-${contentBorderColor}`]: !noContentBorder && contentBorderColor },
1771
+ contentClassName
1772
+ );
1773
+ return /* @__PURE__ */ jsxRuntime.jsxs("details", { className: detailsClassName, open: open || void 0, name, children: [
1774
+ /* @__PURE__ */ jsxRuntime.jsx(Summary, { ...summaryProps }),
1775
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: compositeContentClassName, children: children ?? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "usx-details__text", children: text }) })
1776
+ ] });
1777
+ }
1778
+ function Drawer({
1779
+ id,
1780
+ label,
1781
+ heading,
1782
+ children,
1783
+ trigger,
1784
+ triggerAriaLabel,
1785
+ side = "inline-end",
1786
+ size = "default",
1787
+ description,
1788
+ footer,
1789
+ rounded = false,
1790
+ actionRequired = false,
1791
+ closeLabel = "Close",
1792
+ focusHeading = true,
1793
+ disabled = false,
1794
+ className,
1795
+ triggerClassName,
1796
+ panelClassName,
1797
+ ...props2
1798
+ }) {
1799
+ const opener = { commandfor: id, command: "show-modal" };
1800
+ const closer = { commandfor: id, command: "close" };
1801
+ const dismissal = {
1802
+ closedby: actionRequired ? "none" : void 0
1803
+ };
1804
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...props2, className: ClassNames("usx-drawer", className), children: [
1805
+ /* @__PURE__ */ jsxRuntime.jsx(
1806
+ "button",
1807
+ {
1808
+ type: "button",
1809
+ className: triggerClassName || void 0,
1810
+ "aria-haspopup": "dialog",
1811
+ "aria-controls": id,
1812
+ "aria-label": triggerAriaLabel,
1813
+ disabled,
1814
+ ...opener,
1815
+ children: trigger ?? label
1816
+ }
1817
+ ),
1818
+ /* @__PURE__ */ jsxRuntime.jsxs(
1819
+ "dialog",
1820
+ {
1821
+ id,
1822
+ className: ClassNames(
1823
+ "usx-drawer__panel",
1824
+ { "usx-drawer__panel--rounded": rounded },
1825
+ panelClassName
1826
+ ),
1827
+ "data-side": side,
1828
+ "data-size": size,
1829
+ ...dismissal,
1830
+ "aria-labelledby": `${id}-heading`,
1831
+ "aria-describedby": description ? `${id}-description` : void 0,
1832
+ children: [
1833
+ !actionRequired && /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "usx-drawer__close", ...closer, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close", size: 3, alt: closeLabel }) }),
1834
+ /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "usx-drawer__header", children: [
1835
+ /* @__PURE__ */ jsxRuntime.jsx(
1836
+ "h2",
1837
+ {
1838
+ id: `${id}-heading`,
1839
+ className: "usx-drawer__heading",
1840
+ tabIndex: focusHeading ? -1 : void 0,
1841
+ autoFocus: focusHeading,
1842
+ children: heading
1843
+ }
1844
+ ),
1845
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { id: `${id}-description`, className: "usx-drawer__description", children: description })
1846
+ ] }),
1847
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-drawer__body", children }),
1848
+ footer && /* @__PURE__ */ jsxRuntime.jsx("footer", { className: "usx-drawer__footer", children: footer })
1849
+ ]
1850
+ }
1851
+ )
1852
+ ] });
1726
1853
  }
1727
1854
  function Link({
1728
1855
  href = "javascript:void(0);",
1856
+ text,
1729
1857
  children,
1730
1858
  visited = false,
1731
1859
  external = false,
@@ -1750,10 +1878,154 @@
1750
1878
  target: newTab || external ? "_blank" : void 0,
1751
1879
  rel: newTab || external ? "noreferrer noopener" : void 0,
1752
1880
  ...props2,
1753
- children
1881
+ children: children ?? text
1882
+ }
1883
+ );
1884
+ }
1885
+ function Page({
1886
+ id = void 0,
1887
+ title = "Page title",
1888
+ titleId = void 0,
1889
+ eyebrow = null,
1890
+ as: Element = "main",
1891
+ children = null,
1892
+ content = null,
1893
+ tabIndex = void 0,
1894
+ ariaLabelledby = void 0,
1895
+ className = "",
1896
+ ...props2
1897
+ }) {
1898
+ const classes = ClassNames("usx-page", className);
1899
+ const pageContent = children || content;
1900
+ const labelledBy = ariaLabelledby || titleId || void 0;
1901
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1902
+ Element,
1903
+ {
1904
+ id,
1905
+ className: classes,
1906
+ tabIndex,
1907
+ "aria-labelledby": labelledBy,
1908
+ ...props2,
1909
+ children: [
1910
+ /* @__PURE__ */ jsxRuntime.jsxs("h1", { id: titleId, className: "usx-page__title", children: [
1911
+ eyebrow ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usx-eyebrow", children: eyebrow }) : null,
1912
+ title
1913
+ ] }),
1914
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-page__content", children: pageContent })
1915
+ ]
1754
1916
  }
1755
1917
  );
1756
1918
  }
1919
+ const validElements = ["div", "article", "section", "main"];
1920
+ const Prose = ({
1921
+ as = "div",
1922
+ content,
1923
+ children,
1924
+ className = "",
1925
+ ...props2
1926
+ }) => {
1927
+ const Element = validElements.includes(as) ? as : "div";
1928
+ return /* @__PURE__ */ jsxRuntime.jsx(
1929
+ Element,
1930
+ {
1931
+ className: `usa-prose usx-prose ${className}`,
1932
+ ...props2,
1933
+ ...content ? { dangerouslySetInnerHTML: { __html: content } } : {},
1934
+ children: children ? children : null
1935
+ }
1936
+ );
1937
+ };
1938
+ const DEFAULT_TITLE = "We couldn’t complete your request";
1939
+ const DEFAULT_DESCRIPTION = "We’re sorry. Please try again later.";
1940
+ function ErrorPage({
1941
+ id = "main-content",
1942
+ title = DEFAULT_TITLE,
1943
+ description = DEFAULT_DESCRIPTION,
1944
+ guidance = "",
1945
+ actions = [],
1946
+ supportHeading = "",
1947
+ supportText = "",
1948
+ supportLinks = [],
1949
+ cats = false,
1950
+ catAlt = "",
1951
+ errorCode,
1952
+ errorCodeLabel = "Error code",
1953
+ referenceId = "",
1954
+ referenceLabel = "Reference ID",
1955
+ detailsProps = null,
1956
+ children = null,
1957
+ className = ""
1958
+ }) {
1959
+ const pageId = id || "main-content";
1960
+ const pageTitle = title || DEFAULT_TITLE;
1961
+ const pageDescription = description || DEFAULT_DESCRIPTION;
1962
+ const titleId = `${pageId}-title`;
1963
+ const supportHeadingId = `${pageId}-support-heading`;
1964
+ const pageActions = Array.isArray(actions) ? actions : [];
1965
+ const pageSupportLinks = Array.isArray(supportLinks) ? supportLinks : [];
1966
+ const hasSupport = Boolean(supportHeading || supportText || pageSupportLinks.length);
1967
+ const hasErrorCode = errorCode !== void 0 && errorCode !== null && errorCode !== "";
1968
+ const hasMeta = hasErrorCode || Boolean(referenceId);
1969
+ const catImageAlt = catAlt || `Cat illustration for HTTP error ${errorCode}`;
1970
+ const classes = ClassNames("usx-error-page", className);
1971
+ return /* @__PURE__ */ jsxRuntime.jsxs(Page, { id: pageId, title: pageTitle, titleId, className: classes, children: [
1972
+ /* @__PURE__ */ jsxRuntime.jsxs(Prose, { className: "usx-error-page__body", children: [
1973
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "usa-intro usx-error-page__description margin-bottom-4", children: pageDescription }),
1974
+ cats && Boolean(errorCode) && /* @__PURE__ */ jsxRuntime.jsx(Image, { src: `https://http.cat/${errorCode}`, alt: catImageAlt }),
1975
+ (guidance || children) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usx-error-page__content", children: [
1976
+ guidance && /* @__PURE__ */ jsxRuntime.jsx("p", { children: guidance }),
1977
+ children
1978
+ ] })
1979
+ ] }),
1980
+ pageActions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(ButtonGroup, { buttonProps: pageActions, className: "usx-error-page__actions" }),
1981
+ /* @__PURE__ */ jsxRuntime.jsxs(Prose, { className: "usx-error-page__body", children: [
1982
+ hasSupport && /* @__PURE__ */ jsxRuntime.jsxs(
1983
+ "section",
1984
+ {
1985
+ className: "usx-error-page__support",
1986
+ ...supportHeading ? { "aria-labelledby": supportHeadingId } : {},
1987
+ children: [
1988
+ supportHeading && /* @__PURE__ */ jsxRuntime.jsx("h2", { id: supportHeadingId, className: "usx-error-page__support-heading", children: supportHeading }),
1989
+ supportText && /* @__PURE__ */ jsxRuntime.jsx("p", { children: supportText }),
1990
+ pageSupportLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "usx-error-page__support-links", children: pageSupportLinks.map(({ label, ...linkProps }, index) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { ...linkProps, children: label }) }, index)) })
1991
+ ]
1992
+ }
1993
+ ),
1994
+ hasMeta && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usx-error-page__meta text-base font-body-2xs", children: [
1995
+ hasErrorCode && /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
1996
+ /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
1997
+ errorCodeLabel || "Error code",
1998
+ ":"
1999
+ ] }),
2000
+ " ",
2001
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usx-error-page__meta-value", children: errorCode })
2002
+ ] }),
2003
+ referenceId && /* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
2004
+ /* @__PURE__ */ jsxRuntime.jsxs("strong", { children: [
2005
+ referenceLabel || "Reference ID",
2006
+ ":"
2007
+ ] }),
2008
+ " ",
2009
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usx-error-page__meta-value", children: referenceId })
2010
+ ] })
2011
+ ] }),
2012
+ detailsProps && /* @__PURE__ */ jsxRuntime.jsx(
2013
+ Details,
2014
+ {
2015
+ ...detailsProps,
2016
+ className: ClassNames(
2017
+ "usx-error-page__details font-family-mono font-mono-sm",
2018
+ detailsProps.className
2019
+ )
2020
+ }
2021
+ )
2022
+ ] })
2023
+ ] });
2024
+ }
2025
+ function Eyebrow({ children = null, className = "", ...props2 }) {
2026
+ const classes = ClassNames("usx-eyebrow", className);
2027
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: classes, ...props2, children });
2028
+ }
1757
2029
  function formatFileSize(bytes) {
1758
2030
  if (bytes < 1024) return `${bytes} B`;
1759
2031
  const kb = bytes / 1024;
@@ -1884,9 +2156,12 @@
1884
2156
  commonLabel,
1885
2157
  commonHint,
1886
2158
  commonError,
1887
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-file-input__add-only", children: /* @__PURE__ */ jsxRuntime.jsx(
2159
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-file-input__add-only", "data-usx-file-list-hint": typeof fileListHint === "string" && fileListHint ? fileListHint : "Selected files", children: /* @__PURE__ */ jsxRuntime.jsx(
1888
2160
  "input",
1889
2161
  {
2162
+ ref: (node) => {
2163
+ if (node) node.usxReactManaged = true;
2164
+ },
1890
2165
  className: ClassNames("usa-file-input", "usx-file-input", className),
1891
2166
  id,
1892
2167
  type: "file",
@@ -2134,12 +2409,9 @@
2134
2409
  onSubmit(query);
2135
2410
  }
2136
2411
  };
2137
- const iconClasses = ClassNames(
2138
- "usa-search__submit-icon",
2139
- {
2140
- "display-inline-block": iconOnly
2141
- }
2142
- );
2412
+ const iconClasses = ClassNames("usa-search__submit-icon", {
2413
+ "display-inline-block": iconOnly
2414
+ });
2143
2415
  const formClasses = ClassNames(
2144
2416
  "usa-search",
2145
2417
  {
@@ -2164,7 +2436,7 @@
2164
2436
  id,
2165
2437
  label,
2166
2438
  screenReaderOnlyLabel: true,
2167
- placeholder,
2439
+ placeholder: placeholder ?? "",
2168
2440
  defaultValue,
2169
2441
  type: "search",
2170
2442
  name: searchKey,
@@ -2173,7 +2445,7 @@
2173
2445
  ),
2174
2446
  /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: buttonVariant, type: "submit", children: [
2175
2447
  !iconOnly && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usa-search__submit-text", children: label }),
2176
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: icon, className: iconClasses, "aria-hidden": "true", alt: label })
2448
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: icon, className: iconClasses, alt: iconOnly ? label : void 0 })
2177
2449
  ] })
2178
2450
  ]
2179
2451
  }
@@ -2195,7 +2467,7 @@
2195
2467
  }) {
2196
2468
  const navClasses = ClassNames("usa-nav__primary", "usa-accordion");
2197
2469
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2198
- /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "usa-nav__close", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close" }) }),
2470
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "usa-nav__close", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close", size: 3 }) }),
2199
2471
  /* @__PURE__ */ jsxRuntime.jsx("ul", { className: navClasses, children: navSections.map((section, index) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "usa-nav__primary-item", children: section.href ? /* @__PURE__ */ jsxRuntime.jsxs(
2200
2472
  "a",
2201
2473
  {
@@ -2303,7 +2575,7 @@
2303
2575
  ] });
2304
2576
  if (extended) {
2305
2577
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2306
- /* @__PURE__ */ jsxRuntime.jsx("header", { className: headerClasses, ...props2, children: navbar }),
2578
+ /* @__PURE__ */ jsxRuntime.jsx("header", { id, className: headerClasses, ...props2, children: navbar }),
2307
2579
  /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Primary navigation", className: navClasses, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usa-nav__inner", children: [
2308
2580
  /* @__PURE__ */ jsxRuntime.jsx(
2309
2581
  PrimaryNav,
@@ -2335,7 +2607,7 @@
2335
2607
  ] }) })
2336
2608
  ] });
2337
2609
  }
2338
- return /* @__PURE__ */ jsxRuntime.jsx("header", { className: headerClasses, ...props2, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usa-nav-container", children: [
2610
+ return /* @__PURE__ */ jsxRuntime.jsx("header", { id, className: headerClasses, ...props2, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usa-nav-container", children: [
2339
2611
  navbar,
2340
2612
  /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Primary navigation", className: navClasses, children: /* @__PURE__ */ jsxRuntime.jsx(
2341
2613
  PrimaryNav,
@@ -2363,7 +2635,7 @@
2363
2635
  contentPosition = "left",
2364
2636
  boxed = true,
2365
2637
  calloutMaxWidth,
2366
- headingLevel = "h1",
2638
+ headingAs = "h1",
2367
2639
  secondaryContent = null,
2368
2640
  overlay = true,
2369
2641
  overlayOpacity,
@@ -2372,9 +2644,9 @@
2372
2644
  style,
2373
2645
  ...props2
2374
2646
  }) {
2375
- const Heading = headingLevel;
2647
+ const Heading = headingAs;
2376
2648
  const secondaryHeadings = { h1: "h2", h2: "h3", h3: "h4", h4: "h5", h5: "h6" };
2377
- const SecondaryHeading = secondaryHeadings[headingLevel];
2649
+ const SecondaryHeading = secondaryHeadings[headingAs];
2378
2650
  const classes = ClassNames(
2379
2651
  "usx-hero",
2380
2652
  overlay && "usx-hero--has-overlay",
@@ -2407,7 +2679,7 @@
2407
2679
  ] })
2408
2680
  ] }) });
2409
2681
  }
2410
- function renderContent$1(content) {
2682
+ function renderContent(content) {
2411
2683
  if (typeof content === "string") {
2412
2684
  return /* @__PURE__ */ jsxRuntime.jsx("div", { dangerouslySetInnerHTML: { __html: content } });
2413
2685
  }
@@ -2433,7 +2705,7 @@
2433
2705
  ) }),
2434
2706
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ClassNames("usa-icon-list__content", item.contentClassName), children: [
2435
2707
  item.title ? /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "usa-icon-list__title", children: item.title }) : null,
2436
- renderContent$1(item.content)
2708
+ renderContent(item.content)
2437
2709
  ] })
2438
2710
  ] }, index)) });
2439
2711
  }
@@ -2529,7 +2801,7 @@
2529
2801
  className: ClassNames(
2530
2802
  "usa-identifier__logos",
2531
2803
  "usx-avatar-group",
2532
- overlapAvatars && "usa-avatar-group--overlap"
2804
+ overlapAvatars && "usx-avatar-group--overlap"
2533
2805
  ),
2534
2806
  children: avatarProps.map((avatar, index) => /* @__PURE__ */ React.createElement(
2535
2807
  Avatar,
@@ -2560,7 +2832,7 @@
2560
2832
  id = "in-page-nav",
2561
2833
  headingElements = "h2 h3",
2562
2834
  mainContentSelector = null,
2563
- titleHeadingLevel = "h4",
2835
+ titleAs = "h4",
2564
2836
  titleText = "On this page",
2565
2837
  scrollOffset = 0,
2566
2838
  rootMargin = "0px 0px 0px 0px",
@@ -2582,7 +2854,7 @@
2582
2854
  className: ClassNames("usa-in-page-nav", "usx-in-page-nav", className),
2583
2855
  "data-heading-elements": headingElements,
2584
2856
  "data-main-content-selector": resolvedSelector,
2585
- "data-title-heading-level": titleHeadingLevel,
2857
+ "data-title-heading-level": titleAs,
2586
2858
  "data-title-text": titleText,
2587
2859
  "data-scroll-offset": scrollOffset,
2588
2860
  "data-root-margin": rootMargin,
@@ -2784,6 +3056,7 @@
2784
3056
  expandLeftSidebar,
2785
3057
  expandRightSidebar,
2786
3058
  expandable = false,
3059
+ onToggleExpanded,
2787
3060
  className = "",
2788
3061
  ...props2
2789
3062
  }) {
@@ -2793,6 +3066,11 @@
2793
3066
  { "usx-expanded": expandable && expanded },
2794
3067
  className
2795
3068
  );
3069
+ const toggleExpanded = (event) => {
3070
+ event.preventDefault();
3071
+ setExpanded(!expanded);
3072
+ onToggleExpanded == null ? void 0 : onToggleExpanded(!expanded);
3073
+ };
2796
3074
  const expandButton = expandable ? /* @__PURE__ */ jsxRuntime.jsxs(
2797
3075
  Button,
2798
3076
  {
@@ -2801,8 +3079,9 @@
2801
3079
  type: "button",
2802
3080
  "aria-label": expanded ? "Contract" : "Expand",
2803
3081
  "aria-expanded": expanded,
3082
+ "data-usx-layout-toggle": true,
2804
3083
  className: "usx-layout__expand-button",
2805
- onClick: () => setExpanded((value) => !value),
3084
+ onClick: toggleExpanded,
2806
3085
  children: [
2807
3086
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { source: "usx", name: "expand", size: 3, className: "usx-layout__expand-icon usx-layout__expand-icon--expand" }),
2808
3087
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { source: "usx", name: "contract", size: 3, className: "usx-layout__expand-icon usx-layout__expand-icon--contract" })
@@ -2896,6 +3175,7 @@
2896
3175
  name,
2897
3176
  className: combinedSelectClasses,
2898
3177
  disabled,
3178
+ required: required || void 0,
2899
3179
  defaultValue,
2900
3180
  "aria-describedby": describedByParts.length ? describedByParts.join(" ") : void 0,
2901
3181
  "aria-invalid": hasError ? true : void 0,
@@ -3032,8 +3312,8 @@
3032
3312
  function MiscBanner({
3033
3313
  children = null,
3034
3314
  className = "",
3035
- tone = "beta",
3036
- badgeText = "beta",
3315
+ color = "beta",
3316
+ badgeText,
3037
3317
  message = "Welcome to the beta website!",
3038
3318
  casualLinkText,
3039
3319
  casualLinkHref,
@@ -3042,11 +3322,15 @@
3042
3322
  importantLinkHref,
3043
3323
  importantLinkIcon = "undo",
3044
3324
  showReturnLink = true,
3325
+ id,
3045
3326
  ...props2
3046
3327
  }) {
3047
- const menuId = React.useId();
3048
- const toggleId = React.useId();
3049
- const classes = ClassNames("usx-misc-banner", `bg-${tone}`, className);
3328
+ const instanceId = React.useId();
3329
+ const baseId = id || instanceId;
3330
+ const bannerColor = color || "beta";
3331
+ const toggleId = `${baseId}-dropdown-toggle`;
3332
+ const menuId = `${baseId}-dropdown`;
3333
+ const classes = ClassNames("usx-misc-banner", `bg-${bannerColor}`, className);
3050
3334
  const mobileLinks = [];
3051
3335
  const hasLearnMoreLink = showLearnMore && Boolean(casualLinkText);
3052
3336
  const hasReturnLink = showReturnLink && Boolean(importantLinkText);
@@ -3063,7 +3347,7 @@
3063
3347
  });
3064
3348
  }
3065
3349
  const content = children || /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3066
- /* @__PURE__ */ jsxRuntime.jsx("strong", { className: `usx-misc-banner__badge text-${tone}`, children: badgeText }),
3350
+ badgeText ? /* @__PURE__ */ jsxRuntime.jsx("strong", { className: `usx-misc-banner__badge text-${bannerColor}`, children: badgeText }) : null,
3067
3351
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "usx-misc-banner__text", children: [
3068
3352
  message,
3069
3353
  hasLearnMoreLink ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -3072,7 +3356,7 @@
3072
3356
  ] }) : null
3073
3357
  ] }),
3074
3358
  hasReturnLink ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usx-misc-banner__return-text", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { className: "usa-link usx-misc-banner__link", href: importantLinkHref, children: [
3075
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: importantLinkIcon, size: 1, className: "usx-icon--size-1" }),
3359
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: importantLinkIcon, size: 1 }),
3076
3360
  " ",
3077
3361
  importantLinkText
3078
3362
  ] }) }) : null,
@@ -3092,33 +3376,14 @@
3092
3376
  htmlFor: toggleId,
3093
3377
  "aria-controls": menuId,
3094
3378
  "aria-label": "Toggle banner links",
3095
- children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "expand_more", size: 4, className: "usx-icon" })
3379
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "expand_more", size: 4 })
3096
3380
  }
3097
3381
  ),
3098
3382
  /* @__PURE__ */ jsxRuntime.jsx("div", { id: menuId, className: "usx-misc-banner__dropdown-content", children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "usa-list", children: mobileLinks.map((link) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "usa-list__item", children: /* @__PURE__ */ jsxRuntime.jsx("a", { className: "usa-link usx-misc-banner__link", href: link.href, children: link.text }) }, `${link.href}-${link.text}`)) }) })
3099
3383
  ] }) : null
3100
3384
  ] });
3101
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-misc-banner__content grid-container", children: content }) });
3385
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { id, className: classes, ...props2, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-misc-banner__content grid-container", children: content }) });
3102
3386
  }
3103
- const validElements = ["div", "article", "section", "main"];
3104
- const Prose = ({
3105
- containerElement = "div",
3106
- content,
3107
- children,
3108
- className = "",
3109
- ...props2
3110
- }) => {
3111
- const Element = validElements.includes(containerElement) ? containerElement : "div";
3112
- return /* @__PURE__ */ jsxRuntime.jsx(
3113
- Element,
3114
- {
3115
- className: `usa-prose usx-prose ${className}`,
3116
- ...props2,
3117
- ...content ? { dangerouslySetInnerHTML: { __html: content } } : {},
3118
- children: children ? children : null
3119
- }
3120
- );
3121
- };
3122
3387
  function Modal({
3123
3388
  id = "usx-modal",
3124
3389
  heading,
@@ -3166,27 +3431,6 @@
3166
3431
  }
3167
3432
  );
3168
3433
  }
3169
- function Page({
3170
- id = void 0,
3171
- title = "Page title",
3172
- eyebrow = null,
3173
- element = "main",
3174
- children = null,
3175
- content = null,
3176
- className = "",
3177
- ...props2
3178
- }) {
3179
- const classes = ClassNames("usx-page", className);
3180
- const pageContent = children || content;
3181
- const Element = element;
3182
- return /* @__PURE__ */ jsxRuntime.jsxs(Element, { id, className: classes, ...props2, children: [
3183
- /* @__PURE__ */ jsxRuntime.jsxs("h1", { className: "usx-page__title", children: [
3184
- eyebrow ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usx-eyebrow", children: eyebrow }) : null,
3185
- title
3186
- ] }),
3187
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-page__content", children: pageContent })
3188
- ] });
3189
- }
3190
3434
  function getPageItems(currentPage, totalPages) {
3191
3435
  const page = (p) => ({ type: "page", page: p });
3192
3436
  const ellipsis = (key) => ({ type: "ellipsis", key });
@@ -3235,153 +3479,147 @@
3235
3479
  function PaginationNavigation({
3236
3480
  currentPage,
3237
3481
  totalPages,
3238
- onPageChange,
3482
+ pageSize = 10,
3483
+ totalItems,
3239
3484
  ariaLabel = "Pagination",
3240
3485
  prevLabel = "Previous",
3241
3486
  nextLabel = "Next",
3242
3487
  hideLinkText = false,
3243
3488
  arrowsOnly = false,
3489
+ pageUrlPrefix,
3244
3490
  className = ""
3245
3491
  }) {
3246
3492
  const unbounded = totalPages === void 0 || totalPages === null;
3247
3493
  const items = unbounded ? getUnboundedPageItems(currentPage) : getPageItems(currentPage, totalPages);
3248
3494
  const isFirstPage = currentPage === 1;
3249
3495
  const isLastPage = !unbounded && currentPage === totalPages;
3250
- const lastClickTime = React.useRef(0);
3251
- const handlePage = (page) => (e) => {
3252
- e.preventDefault();
3253
- if (e.detail > 1) return;
3254
- if (page !== currentPage) onPageChange(page);
3255
- };
3256
- const handlePrev = (e) => {
3257
- e.preventDefault();
3258
- if (e.timeStamp - lastClickTime.current < 50) return;
3259
- lastClickTime.current = e.timeStamp;
3260
- if (!isFirstPage) onPageChange((prev) => Math.max(prev - 1, 1));
3261
- };
3262
- const handleNext = (e) => {
3263
- e.preventDefault();
3264
- if (e.timeStamp - lastClickTime.current < 50) return;
3265
- lastClickTime.current = e.timeStamp;
3266
- if (!isLastPage) onPageChange((prev) => unbounded ? prev + 1 : Math.min(prev + 1, totalPages));
3267
- };
3496
+ const hrefFor = (page) => pageUrlPrefix ? `${pageUrlPrefix}${page}` : "#";
3268
3497
  const navClasses = ClassNames(
3269
3498
  "usa-pagination",
3270
3499
  "usx-pagination__nav",
3271
3500
  { "usx-pagination__arrows-only": arrowsOnly },
3272
3501
  className
3273
3502
  );
3274
- return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": ariaLabel, className: navClasses, children: /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "usa-pagination__list", children: [
3275
- /* @__PURE__ */ jsxRuntime.jsx(
3276
- "li",
3277
- {
3278
- className: ClassNames(
3279
- "usa-pagination__item",
3280
- "usa-pagination__arrow"
3281
- ),
3282
- children: /* @__PURE__ */ jsxRuntime.jsxs(
3283
- "a",
3503
+ return /* @__PURE__ */ jsxRuntime.jsx(
3504
+ "nav",
3505
+ {
3506
+ "aria-label": ariaLabel,
3507
+ className: navClasses,
3508
+ "data-usx-pagination-current-page": currentPage,
3509
+ "data-usx-pagination-page-size": pageSize,
3510
+ "data-usx-pagination-total-items": totalItems ?? "",
3511
+ children: /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "usa-pagination__list", children: [
3512
+ /* @__PURE__ */ jsxRuntime.jsx(
3513
+ "li",
3284
3514
  {
3285
- href: "#",
3286
3515
  className: ClassNames(
3287
- "usa-pagination__link",
3288
- "usa-pagination__previous-page",
3289
- isFirstPage && "display-none",
3290
- hideLinkText && "padding-1 margin-0"
3516
+ "usa-pagination__item",
3517
+ "usa-pagination__arrow"
3291
3518
  ),
3292
- "aria-label": `${prevLabel} page`,
3293
- "aria-disabled": isFirstPage ? "true" : void 0,
3294
- tabIndex: isFirstPage ? -1 : void 0,
3295
- onClick: isFirstPage ? (e) => e.preventDefault() : handlePrev,
3296
- children: [
3297
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "navigate_before" }),
3298
- /* @__PURE__ */ jsxRuntime.jsx(
3299
- "span",
3300
- {
3301
- className: ClassNames(
3302
- "usa-pagination__link-text",
3303
- hideLinkText && "usa-sr-only"
3304
- ),
3305
- children: prevLabel
3306
- }
3307
- )
3308
- ]
3519
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
3520
+ "a",
3521
+ {
3522
+ href: isFirstPage ? "#" : hrefFor(currentPage - 1),
3523
+ "data-usx-pagination-page": currentPage - 1,
3524
+ className: ClassNames(
3525
+ "usa-pagination__link",
3526
+ "usa-pagination__previous-page",
3527
+ isFirstPage && "display-none",
3528
+ hideLinkText && "padding-1 margin-0"
3529
+ ),
3530
+ "aria-label": `${prevLabel} page`,
3531
+ "aria-disabled": isFirstPage ? "true" : void 0,
3532
+ tabIndex: isFirstPage ? -1 : void 0,
3533
+ children: [
3534
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "navigate_before" }),
3535
+ /* @__PURE__ */ jsxRuntime.jsx(
3536
+ "span",
3537
+ {
3538
+ className: ClassNames(
3539
+ "usa-pagination__link-text",
3540
+ hideLinkText && "usa-sr-only"
3541
+ ),
3542
+ children: prevLabel
3543
+ }
3544
+ )
3545
+ ]
3546
+ }
3547
+ )
3309
3548
  }
3310
- )
3311
- }
3312
- ),
3313
- !arrowsOnly && items.map((item, index) => {
3314
- if (item.type === "ellipsis") {
3315
- return /* @__PURE__ */ jsxRuntime.jsx(
3316
- "li",
3317
- {
3318
- className: "usa-pagination__item usa-pagination__overflow",
3319
- "aria-hidden": "true",
3320
- children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: "…" })
3321
- },
3322
- item.key || `ellipsis-${index}`
3323
- );
3324
- }
3325
- const isCurrent = item.page === currentPage;
3326
- return /* @__PURE__ */ jsxRuntime.jsx("li", { className: "usa-pagination__item usa-pagination__page-no", children: /* @__PURE__ */ jsxRuntime.jsx(
3327
- "a",
3328
- {
3329
- href: "#",
3330
- className: ClassNames(
3331
- "usa-pagination__button",
3332
- isCurrent && "usa-current"
3333
- ),
3334
- "aria-label": `Page ${item.page}`,
3335
- "aria-current": isCurrent ? "page" : void 0,
3336
- onClick: handlePage(item.page),
3337
- children: item.page
3338
- }
3339
- ) }, item.page);
3340
- }),
3341
- /* @__PURE__ */ jsxRuntime.jsx(
3342
- "li",
3343
- {
3344
- className: ClassNames(
3345
- "usa-pagination__item",
3346
- "usa-pagination__arrow"
3347
3549
  ),
3348
- children: /* @__PURE__ */ jsxRuntime.jsxs(
3349
- "a",
3550
+ !arrowsOnly && items.map((item, index) => {
3551
+ if (item.type === "ellipsis") {
3552
+ return /* @__PURE__ */ jsxRuntime.jsx(
3553
+ "li",
3554
+ {
3555
+ className: "usa-pagination__item usa-pagination__overflow",
3556
+ "aria-hidden": "true",
3557
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: "…" })
3558
+ },
3559
+ item.key || `ellipsis-${index}`
3560
+ );
3561
+ }
3562
+ const isCurrent = item.page === currentPage;
3563
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { className: "usa-pagination__item usa-pagination__page-no", children: /* @__PURE__ */ jsxRuntime.jsx(
3564
+ "a",
3565
+ {
3566
+ href: hrefFor(item.page),
3567
+ "data-usx-pagination-page": item.page,
3568
+ className: ClassNames(
3569
+ "usa-pagination__button",
3570
+ isCurrent && "usa-current"
3571
+ ),
3572
+ "aria-label": `Page ${item.page}`,
3573
+ "aria-current": isCurrent ? "page" : void 0,
3574
+ children: item.page
3575
+ }
3576
+ ) }, item.page);
3577
+ }),
3578
+ /* @__PURE__ */ jsxRuntime.jsx(
3579
+ "li",
3350
3580
  {
3351
- href: "#",
3352
3581
  className: ClassNames(
3353
- "usa-pagination__link",
3354
- "usa-pagination__next-page",
3355
- isLastPage && "display-none",
3356
- hideLinkText && "padding-1 margin-0"
3582
+ "usa-pagination__item",
3583
+ "usa-pagination__arrow"
3357
3584
  ),
3358
- "aria-label": `${nextLabel} page`,
3359
- "aria-disabled": isLastPage ? "true" : void 0,
3360
- tabIndex: isLastPage ? -1 : void 0,
3361
- onClick: isLastPage ? (e) => e.preventDefault() : handleNext,
3362
- children: [
3363
- /* @__PURE__ */ jsxRuntime.jsx(
3364
- "span",
3365
- {
3366
- className: ClassNames(
3367
- "usa-pagination__link-text",
3368
- hideLinkText && "usa-sr-only"
3585
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
3586
+ "a",
3587
+ {
3588
+ href: isLastPage ? "#" : hrefFor(currentPage + 1),
3589
+ "data-usx-pagination-page": currentPage + 1,
3590
+ className: ClassNames(
3591
+ "usa-pagination__link",
3592
+ "usa-pagination__next-page",
3593
+ isLastPage && "display-none",
3594
+ hideLinkText && "padding-1 margin-0"
3595
+ ),
3596
+ "aria-label": `${nextLabel} page`,
3597
+ "aria-disabled": isLastPage ? "true" : void 0,
3598
+ tabIndex: isLastPage ? -1 : void 0,
3599
+ children: [
3600
+ /* @__PURE__ */ jsxRuntime.jsx(
3601
+ "span",
3602
+ {
3603
+ className: ClassNames(
3604
+ "usa-pagination__link-text",
3605
+ hideLinkText && "usa-sr-only"
3606
+ ),
3607
+ children: nextLabel
3608
+ }
3369
3609
  ),
3370
- children: nextLabel
3371
- }
3372
- ),
3373
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "navigate_next" })
3374
- ]
3610
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "navigate_next" })
3611
+ ]
3612
+ }
3613
+ )
3375
3614
  }
3376
3615
  )
3377
- }
3378
- )
3379
- ] }) });
3616
+ ] })
3617
+ }
3618
+ );
3380
3619
  }
3381
3620
  function PaginationStepOptions({
3382
3621
  pageSize,
3383
3622
  pageSizeOptions = [10, 25, 50, 100],
3384
- onPageSizeChange,
3385
3623
  label = "Items per page",
3386
3624
  id = "pagination-step-options",
3387
3625
  className = ""
@@ -3390,19 +3628,16 @@
3390
3628
  "usx-pagination__step-options",
3391
3629
  className
3392
3630
  );
3393
- const handleChange = (e) => {
3394
- onPageSizeChange(Number(e.target.value));
3395
- };
3396
3631
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, children: /* @__PURE__ */ jsxRuntime.jsx(
3397
3632
  Select,
3398
3633
  {
3399
3634
  id,
3400
3635
  label,
3401
- value: pageSize,
3402
- onChange: handleChange,
3636
+ defaultValue: String(pageSize),
3403
3637
  formGroup: false,
3404
3638
  options: pageSizeOptions.map((size) => ({ value: String(size), label: String(size) }))
3405
- }
3639
+ },
3640
+ pageSize
3406
3641
  ) });
3407
3642
  }
3408
3643
  function PaginationSummary({
@@ -3450,13 +3685,15 @@
3450
3685
  ] });
3451
3686
  }
3452
3687
  function Pagination({
3688
+ renderPart,
3453
3689
  initialPage = 1,
3454
3690
  initialPageSize = 10,
3691
+ currentPage: page,
3692
+ pageSize: size,
3455
3693
  pageSizeOptions = [10, 25, 50, 100],
3694
+ stepOptionsId,
3456
3695
  totalItems,
3457
3696
  unbounded = false,
3458
- onPageChange,
3459
- onPageSizeChange,
3460
3697
  ariaLabel = "Pagination",
3461
3698
  prevLabel = "Previous",
3462
3699
  nextLabel = "Next",
@@ -3465,77 +3702,166 @@
3465
3702
  showSummary = true,
3466
3703
  hideLinkText = true,
3467
3704
  arrowsOnly = false,
3705
+ pageUrlPrefix,
3468
3706
  className = ""
3469
3707
  }) {
3470
- const [currentPage, setCurrentPage] = React.useState(initialPage);
3471
- const [pageSize, setPageSize] = React.useState(initialPageSize);
3708
+ const currentPage = page ?? initialPage;
3709
+ const pageSize = size ?? initialPageSize;
3472
3710
  const totalPages = totalItems !== void 0 && !unbounded ? Math.ceil(totalItems / pageSize) : void 0;
3473
3711
  const displaySummary = showSummary !== void 0 ? showSummary : totalItems !== void 0;
3474
- const handlePageChange = (pageOrFn) => {
3475
- setCurrentPage((prev) => {
3476
- const next = typeof pageOrFn === "function" ? pageOrFn(prev) : pageOrFn;
3477
- onPageChange == null ? void 0 : onPageChange(next, pageSize);
3478
- return next;
3479
- });
3480
- };
3481
- const handlePageSizeChange = (size) => {
3482
- const newTotalPages = totalItems ? Math.ceil(totalItems / size) : void 0;
3483
- const newPage = newTotalPages ? Math.min(currentPage, newTotalPages) : 1;
3484
- setPageSize(size);
3485
- setCurrentPage(newPage);
3486
- onPageSizeChange == null ? void 0 : onPageSizeChange(size, newPage);
3487
- onPageChange == null ? void 0 : onPageChange(newPage, size);
3488
- };
3489
3712
  const classes = ClassNames("usx-pagination", className);
3713
+ const navigation = /* @__PURE__ */ jsxRuntime.jsx(
3714
+ PaginationNavigation,
3715
+ {
3716
+ currentPage,
3717
+ totalPages,
3718
+ pageSize,
3719
+ totalItems,
3720
+ ariaLabel,
3721
+ prevLabel,
3722
+ nextLabel,
3723
+ hideLinkText,
3724
+ arrowsOnly,
3725
+ pageUrlPrefix
3726
+ }
3727
+ );
3728
+ const stepOptions = /* @__PURE__ */ jsxRuntime.jsx(
3729
+ PaginationStepOptions,
3730
+ {
3731
+ pageSize,
3732
+ pageSizeOptions,
3733
+ id: stepOptionsId
3734
+ }
3735
+ );
3736
+ const summary = typeof totalItems === "number" ? /* @__PURE__ */ jsxRuntime.jsx(
3737
+ PaginationSummary,
3738
+ {
3739
+ currentPage,
3740
+ pageSize,
3741
+ totalItems,
3742
+ itemLabel
3743
+ }
3744
+ ) : null;
3745
+ if (renderPart === "navigation") return navigation;
3746
+ if (renderPart === "step-options") return stepOptions;
3747
+ if (renderPart === "summary") return summary;
3490
3748
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, children: /* @__PURE__ */ jsxRuntime.jsx(
3491
3749
  PaginationContainer,
3492
3750
  {
3493
- summary: displaySummary && typeof totalItems === "number" ? /* @__PURE__ */ jsxRuntime.jsx(
3494
- PaginationSummary,
3495
- {
3496
- currentPage,
3497
- pageSize,
3498
- totalItems,
3499
- itemLabel
3500
- }
3501
- ) : null,
3502
- navigation: /* @__PURE__ */ jsxRuntime.jsx(
3503
- PaginationNavigation,
3751
+ summary: displaySummary ? summary : null,
3752
+ navigation,
3753
+ stepOptions: showStepOptions ? stepOptions : null
3754
+ }
3755
+ ) });
3756
+ }
3757
+ function PopoverMenu({ items, prefix, panelShape, className, ...props2 }) {
3758
+ const generatedPrefix = React.useId();
3759
+ const base = prefix ?? generatedPrefix;
3760
+ return /* @__PURE__ */ jsxRuntime.jsx("ul", { ...props2, className: ClassNames("usx-popover__menu", className), children: items.map((item, index) => {
3761
+ const id = item.id ?? `${base}-${index}`;
3762
+ return /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
3763
+ item.type === "details" && /* @__PURE__ */ jsxRuntime.jsx(
3764
+ Popover,
3504
3765
  {
3505
- currentPage,
3506
- totalPages,
3507
- onPageChange: handlePageChange,
3508
- ariaLabel,
3509
- prevLabel,
3510
- nextLabel,
3511
- hideLinkText,
3512
- arrowsOnly
3766
+ id,
3767
+ summaryProps: {
3768
+ ...item.summaryProps,
3769
+ className: ClassNames(item.summaryProps.className, "usx-popover__menu-item")
3770
+ },
3771
+ name: base,
3772
+ side: "right",
3773
+ panelShape,
3774
+ menuItems: item.items
3513
3775
  }
3514
3776
  ),
3515
- stepOptions: showStepOptions ? /* @__PURE__ */ jsxRuntime.jsx(
3516
- PaginationStepOptions,
3777
+ item.type === "link" && /* @__PURE__ */ jsxRuntime.jsx(
3778
+ Link,
3517
3779
  {
3518
- pageSize,
3519
- pageSizeOptions,
3520
- onPageSizeChange: handlePageSizeChange
3780
+ href: item.href,
3781
+ text: item.text,
3782
+ className: "usx-no-visited usx-popover__menu-item"
3521
3783
  }
3522
- ) : null
3523
- }
3524
- ) });
3784
+ ),
3785
+ item.type === "text" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usx-popover__menu-item", children: item.text })
3786
+ ] }, id);
3787
+ }) });
3525
3788
  }
3526
- function renderContent(content) {
3527
- if (typeof content === "string") {
3528
- return /* @__PURE__ */ jsxRuntime.jsx("div", { dangerouslySetInnerHTML: { __html: content } });
3529
- }
3530
- return content;
3789
+ function Popover({
3790
+ id,
3791
+ side = "bottom",
3792
+ align = "start",
3793
+ panelShape = "rounded",
3794
+ defaultOpen = false,
3795
+ menuItems,
3796
+ showClose = false,
3797
+ closeLabel = "Close",
3798
+ panelHeading,
3799
+ headingAs = "h2",
3800
+ scrollable = false,
3801
+ className,
3802
+ summaryProps,
3803
+ panelClassName,
3804
+ contentClassName,
3805
+ children,
3806
+ ...props2
3807
+ }) {
3808
+ const [initiallyOpen] = React.useState(defaultOpen);
3809
+ const composedSummaryProps = { ...summaryProps, label: (summaryProps == null ? void 0 : summaryProps.label) ?? "Open panel" };
3810
+ const Heading = headingAs;
3811
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3812
+ "details",
3813
+ {
3814
+ ...props2,
3815
+ className: ClassNames("usx-popover", className),
3816
+ open: initiallyOpen || void 0,
3817
+ "data-side": side,
3818
+ "data-align": align,
3819
+ children: [
3820
+ /* @__PURE__ */ jsxRuntime.jsx(Summary, { unstyled: true, ...composedSummaryProps }),
3821
+ /* @__PURE__ */ jsxRuntime.jsxs(
3822
+ "div",
3823
+ {
3824
+ id,
3825
+ className: ClassNames("usx-popover__panel", {
3826
+ "usx-popover__panel--square": panelShape === "square"
3827
+ }, panelClassName),
3828
+ children: [
3829
+ panelHeading && /* @__PURE__ */ jsxRuntime.jsx(Heading, { className: "usx-popover__panel-heading", children: panelHeading }),
3830
+ menuItems && /* @__PURE__ */ jsxRuntime.jsx(PopoverMenu, { items: menuItems, prefix: id, panelShape }),
3831
+ children && /* @__PURE__ */ jsxRuntime.jsx(
3832
+ "div",
3833
+ {
3834
+ className: ClassNames(
3835
+ "usx-popover__panel-content",
3836
+ { "usx-popover__scroll": scrollable },
3837
+ contentClassName
3838
+ ),
3839
+ children
3840
+ }
3841
+ ),
3842
+ showClose && /* @__PURE__ */ jsxRuntime.jsx(
3843
+ Button,
3844
+ {
3845
+ variant: "unstyled",
3846
+ className: "usx-popover__panel-close",
3847
+ "data-usx-popover-close": id,
3848
+ children: closeLabel
3849
+ }
3850
+ )
3851
+ ]
3852
+ }
3853
+ )
3854
+ ]
3855
+ }
3856
+ );
3531
3857
  }
3532
3858
  const ProcessList = ({ items = [], className = "", ...props2 }) => {
3533
3859
  const classes = ClassNames("usa-process-list", "usx-process-list", className);
3534
3860
  return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: classes, ...props2, children: items.map((item, index) => {
3535
- const HeadingTag = item.headingTag || "h4";
3861
+ const Heading = item.headingAs || "h4";
3536
3862
  return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: ClassNames("usa-process-list__item", item.className), children: [
3537
- /* @__PURE__ */ jsxRuntime.jsx(HeadingTag, { className: ClassNames("usa-process-list__heading", item.headingClassName), children: item.heading }),
3538
- item.body && (typeof item.body === "string" || item.bodyClassName ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: ClassNames(item.bodyClassName), children: renderContent(item.body) }) : renderContent(item.body))
3863
+ /* @__PURE__ */ jsxRuntime.jsx(Heading, { className: ClassNames("usa-process-list__heading", item.headingClassName), children: item.heading }),
3864
+ item.body && (item.bodyClassName ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: item.bodyClassName, children: item.body }) : item.body)
3539
3865
  ] }, index);
3540
3866
  }) });
3541
3867
  };
@@ -3553,7 +3879,7 @@
3553
3879
  const isVertical = (calloutProps == null ? void 0 : calloutProps.orientation) === "vertical";
3554
3880
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ClassNames("usx-quote", isVertical && "usx-quote--vertical", className), ...props2, children: [
3555
3881
  !isVertical && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "format_quote", size: 4, className: "usx-quote__icon" }),
3556
- /* @__PURE__ */ jsxRuntime.jsx(Callout, { ...calloutProps, element: "div", children: /* @__PURE__ */ jsxRuntime.jsxs("figure", { className: "usx-quote__body", children: [
3882
+ /* @__PURE__ */ jsxRuntime.jsx(Callout, { ...calloutProps, as: "div", children: /* @__PURE__ */ jsxRuntime.jsxs("figure", { className: "usx-quote__body", children: [
3557
3883
  /* @__PURE__ */ jsxRuntime.jsxs(
3558
3884
  "blockquote",
3559
3885
  {
@@ -3581,42 +3907,46 @@
3581
3907
  hint = null,
3582
3908
  error = null,
3583
3909
  name = "radio-group",
3910
+ id: groupId,
3584
3911
  options = [],
3585
3912
  defaultValue = void 0,
3586
3913
  className = "",
3587
3914
  ...props2
3588
3915
  }) => {
3589
- const classes = ClassNames(
3590
- "usa-radio",
3591
- "usx-radio",
3592
- { "usx-radio--small": small },
3593
- className
3594
- );
3595
- const inputClasses = ClassNames(
3596
- "usa-radio__input",
3597
- { "usa-radio__input--tile": tile }
3598
- );
3599
- return /* @__PURE__ */ jsxRuntime.jsx(FormGroup, { error: !!error, children: /* @__PURE__ */ jsxRuntime.jsx(Fieldset, { legend, required, hint, error, ...props2, children: options.map((opt, idx) => {
3600
- const id = opt.id || `${name}-${idx}`;
3601
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes, children: [
3602
- /* @__PURE__ */ jsxRuntime.jsx(
3603
- "input",
3604
- {
3605
- className: inputClasses,
3606
- id,
3607
- type: "radio",
3608
- name,
3609
- value: opt.value,
3610
- defaultChecked: defaultValue === opt.value || !!opt.checked,
3611
- disabled: !!opt.disabled
3612
- }
3613
- ),
3614
- /* @__PURE__ */ jsxRuntime.jsxs(Label, { className: "usa-radio__label", classOverride: true, htmlFor: id, children: [
3615
- opt.label,
3616
- opt.description ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usa-checkbox__label-description", children: opt.description }) : null
3617
- ] })
3618
- ] }, id);
3619
- }) }) });
3916
+ const classes = ClassNames("usa-radio", "usx-radio", { "usx-radio--small": small }, className);
3917
+ const inputClasses = ClassNames("usa-radio__input", { "usa-radio__input--tile": tile });
3918
+ return /* @__PURE__ */ jsxRuntime.jsx(FormGroup, { error: !!error, children: /* @__PURE__ */ jsxRuntime.jsx(
3919
+ Fieldset,
3920
+ {
3921
+ id: groupId,
3922
+ legend,
3923
+ required,
3924
+ hint,
3925
+ error,
3926
+ ...props2,
3927
+ children: options.map((opt, idx) => {
3928
+ const id = opt.id || `${groupId || name}-${idx}`;
3929
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes, children: [
3930
+ /* @__PURE__ */ jsxRuntime.jsx(
3931
+ "input",
3932
+ {
3933
+ className: inputClasses,
3934
+ id,
3935
+ type: "radio",
3936
+ name,
3937
+ value: opt.value,
3938
+ defaultChecked: defaultValue === opt.value || !!opt.checked,
3939
+ disabled: !!opt.disabled
3940
+ }
3941
+ ),
3942
+ /* @__PURE__ */ jsxRuntime.jsxs(Label, { className: "usa-radio__label", classOverride: true, htmlFor: id, children: [
3943
+ opt.label,
3944
+ opt.description ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usa-checkbox__label-description", children: opt.description }) : null
3945
+ ] })
3946
+ ] }, id);
3947
+ })
3948
+ }
3949
+ ) });
3620
3950
  };
3621
3951
  function RangeSlider({
3622
3952
  id = "range-slider",
@@ -3632,7 +3962,7 @@
3632
3962
  value,
3633
3963
  defaultValue,
3634
3964
  textUnit = null,
3635
- textPreposition = null,
3965
+ textPreposition = "of",
3636
3966
  formGroup = true,
3637
3967
  className = "",
3638
3968
  ...props2
@@ -3669,7 +3999,7 @@
3669
3999
  }
3670
4000
  const Section = ({
3671
4001
  title = "",
3672
- headingLevel = "h2",
4002
+ headingAs = "h2",
3673
4003
  children = null,
3674
4004
  content = null,
3675
4005
  className = "",
@@ -3677,7 +4007,7 @@
3677
4007
  }) => {
3678
4008
  const classes = ClassNames("usx-section", className);
3679
4009
  const sectionContent = children || content;
3680
- const Heading = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(headingLevel) ? headingLevel : "h2";
4010
+ const Heading = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(headingAs) ? headingAs : "h2";
3681
4011
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: classes, ...props2, children: [
3682
4012
  title ? /* @__PURE__ */ jsxRuntime.jsx(Heading, { className: "usx-section__title", children: title }) : null,
3683
4013
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usx-section__content", children: sectionContent })
@@ -3742,16 +4072,6 @@
3742
4072
  onDismiss && "usa-site-alert--dismissible",
3743
4073
  className
3744
4074
  );
3745
- const alertClasses = ClassNames(
3746
- "usa-alert",
3747
- `usa-alert--${alertVariant}`,
3748
- "usx-alert",
3749
- `usx-alert--${alertVariant}`,
3750
- slim && "usa-alert--slim",
3751
- slim && "usx-alert--slim",
3752
- noIcon && "usa-alert--no-icon",
3753
- noIcon && "usx-alert--no-icon"
3754
- );
3755
4075
  return /* @__PURE__ */ jsxRuntime.jsx(
3756
4076
  "section",
3757
4077
  {
@@ -3760,19 +4080,7 @@
3760
4080
  "aria-label": ariaLabelledby ? void 0 : ariaLabel,
3761
4081
  "aria-labelledby": ariaLabelledby,
3762
4082
  ...props2,
3763
- children: alertContent ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: alertClasses, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usa-alert__body usx-alert__body", children: [
3764
- alertHeading && /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "usa-alert__heading usx-alert__heading", children: alertHeading }),
3765
- alertContent,
3766
- onDismiss && /* @__PURE__ */ jsxRuntime.jsx(
3767
- "button",
3768
- {
3769
- className: "usx-alert__dismiss",
3770
- "aria-label": "Close alert",
3771
- onClick: onDismiss,
3772
- children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close", size: 3, "aria-hidden": "true", focusable: "false" })
3773
- }
3774
- )
3775
- ] }) }) : /* @__PURE__ */ jsxRuntime.jsx(
4083
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3776
4084
  Alert,
3777
4085
  {
3778
4086
  heading: alertHeading,
@@ -3780,7 +4088,8 @@
3780
4088
  variant: alertVariant,
3781
4089
  slim,
3782
4090
  noIcon,
3783
- onDismiss
4091
+ onDismiss,
4092
+ children: alertContent
3784
4093
  }
3785
4094
  )
3786
4095
  }
@@ -3829,7 +4138,7 @@
3829
4138
  steps = [],
3830
4139
  currentStep = 1,
3831
4140
  variant = "",
3832
- headingTag: HeadingTag = "h4",
4141
+ headingAs: Heading = "h4",
3833
4142
  className = "",
3834
4143
  ...props2
3835
4144
  }) => {
@@ -3869,7 +4178,7 @@
3869
4178
  index
3870
4179
  );
3871
4180
  }) }),
3872
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usa-step-indicator__header", children: /* @__PURE__ */ jsxRuntime.jsxs(HeadingTag, { className: "usa-step-indicator__heading", children: [
4181
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "usa-step-indicator__header", children: /* @__PURE__ */ jsxRuntime.jsxs(Heading, { className: "usa-step-indicator__heading", children: [
3873
4182
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "usa-step-indicator__heading-counter", children: [
3874
4183
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usa-sr-only", children: "Step" }),
3875
4184
  " ",
@@ -4264,18 +4573,22 @@
4264
4573
  selected ? "checked" : "unchecked"
4265
4574
  ) }, "__selection__");
4266
4575
  const detailToggleCell = hasRowDetails ? /* @__PURE__ */ jsxRuntime.jsx("td", { className: "usx-table__cell usx-table__cell--detail-toggle", onClick: handleToggleDetail, children: /* @__PURE__ */ jsxRuntime.jsx(
4267
- "button",
4576
+ Button,
4268
4577
  {
4269
- type: "button",
4578
+ variant: "inverse",
4579
+ ghost: true,
4270
4580
  className: ClassNames(
4271
- "usa-button usa-button--unstyled",
4272
- "usx-table__detail-toggle",
4273
- "width-full",
4274
- isExpanded && "usx-table__detail-toggle--expanded"
4581
+ "usx-table__detail-toggle"
4275
4582
  ),
4276
4583
  "aria-expanded": isExpanded,
4277
4584
  "aria-label": expandLabel ? typeof expandLabel === "function" ? expandLabel(row) : expandLabel : `${isExpanded ? "Collapse" : "Expand"} row details`,
4278
- children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: isExpanded ? "expand_less" : "expand_more", "aria-hidden": "true" })
4585
+ iconProps: [
4586
+ {
4587
+ name: isExpanded ? "expand_less" : "expand_more",
4588
+ "aria-hidden": "true",
4589
+ size: 3
4590
+ }
4591
+ ]
4279
4592
  }
4280
4593
  ) }, "__detail-toggle__") : null;
4281
4594
  const dataCells = visibleCols.map((col) => {
@@ -4728,25 +5041,44 @@
4728
5041
  return /* @__PURE__ */ jsxRuntime.jsxs(TableContext.Provider, { value: contextValue, children: [
4729
5042
  wrapped,
4730
5043
  isPaginated && /* @__PURE__ */ jsxRuntime.jsx(
4731
- Pagination,
5044
+ "div",
4732
5045
  {
4733
- initialPage: 1,
4734
- initialPageSize: pageSize,
4735
- totalItems,
4736
- onPageChange: (page) => {
5046
+ onClick: (event) => {
4737
5047
  var _a;
5048
+ const link = event.target.closest("[data-usx-pagination-page]");
5049
+ if (!link || link.getAttribute("aria-disabled") === "true") return;
5050
+ event.preventDefault();
5051
+ const page = Number(link.dataset.usxPaginationPage);
5052
+ if (!Number.isInteger(page) || page < 1 || page === currentPage) return;
4738
5053
  setCurrentPage(page);
4739
5054
  if (isServerSide) (_a = paginateConfig.onPageChange) == null ? void 0 : _a.call(paginateConfig, page, pageSize);
4740
5055
  },
4741
- onPageSizeChange: (size, page) => {
5056
+ onChange: (event) => {
5057
+ var _a;
5058
+ const target = event.target;
5059
+ if (!(target instanceof HTMLSelectElement)) return;
5060
+ const select = target;
5061
+ if (!select.matches(".usx-pagination__step-options select")) return;
5062
+ const size = Number(select.value);
5063
+ if (!Number.isInteger(size) || size < 1) return;
5064
+ const page = Math.min(currentPage, Math.max(1, Math.ceil(totalItems / size)));
4742
5065
  setPageSize(size);
4743
5066
  setCurrentPage(page);
5067
+ if (isServerSide) (_a = paginateConfig.onPageChange) == null ? void 0 : _a.call(paginateConfig, page, size);
4744
5068
  },
4745
- ...paginateConfig.pageSizeOptions ? { pageSizeOptions: paginateConfig.pageSizeOptions } : {},
4746
- ...paginateConfig.showStepOptions !== void 0 ? { showStepOptions: paginateConfig.showStepOptions } : {},
4747
- ...paginateConfig.showSummary !== void 0 ? { showSummary: paginateConfig.showSummary } : {}
4748
- },
4749
- `${sortState.key}-${sortState.direction}`
5069
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5070
+ Pagination,
5071
+ {
5072
+ currentPage,
5073
+ pageSize,
5074
+ totalItems,
5075
+ ...paginateConfig.pageSizeOptions ? { pageSizeOptions: paginateConfig.pageSizeOptions } : {},
5076
+ ...paginateConfig.showStepOptions !== void 0 ? { showStepOptions: paginateConfig.showStepOptions } : {},
5077
+ ...paginateConfig.showSummary !== void 0 ? { showSummary: paginateConfig.showSummary } : {}
5078
+ },
5079
+ `${sortState.key}-${sortState.direction}`
5080
+ )
5081
+ }
4750
5082
  )
4751
5083
  ] });
4752
5084
  }
@@ -4794,60 +5126,62 @@
4794
5126
  className = ""
4795
5127
  }) {
4796
5128
  var _a;
4797
- const [open, setOpen] = React.useState(false);
4798
- const [activeTheme, setActiveTheme] = React.useState(defaultValue ?? ((_a = themes[0]) == null ? void 0 : _a.value) ?? "");
4799
- const currentValue = value ?? activeTheme;
4800
- const handleChange = (e) => {
4801
- const next = e.target.value;
4802
- if (value === void 0) {
4803
- setActiveTheme(next);
4804
- }
4805
- onChange == null ? void 0 : onChange(next);
4806
- };
4807
- const selectId = id || `theme-picker-${Math.random().toString(36).substr(2, 9)}`;
4808
- const classes = ClassNames("usx-theme-picker", { "usx-theme-picker--open": open }, className);
4809
- const themeOptions = themes.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: option.value, children: option.label }, option.value));
4810
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes, children: open ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "usx-theme-picker__panel", children: [
4811
- /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: selectId, screenReaderOnly: true, children: label }),
4812
- /* @__PURE__ */ jsxRuntime.jsx(
4813
- "select",
4814
- {
4815
- id: selectId,
4816
- name,
4817
- className: "usa-select usx-select",
4818
- value: currentValue,
4819
- onChange: handleChange,
4820
- children: themeOptions
4821
- }
4822
- ),
5129
+ const selectId = id || "theme-picker";
5130
+ const selection = value !== void 0 ? { value } : { defaultValue: defaultValue ?? ((_a = themes[0]) == null ? void 0 : _a.value) };
5131
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ClassNames("usx-theme-picker", className), children: [
4823
5132
  /* @__PURE__ */ jsxRuntime.jsx(
4824
5133
  "button",
4825
5134
  {
4826
5135
  type: "button",
4827
- className: "usa-button usx-button usa-button--primary usx-theme-picker__toggle",
4828
- "aria-label": "Confirm theme",
4829
- onClick: () => setOpen(false),
4830
- children: /* @__PURE__ */ jsxRuntime.jsx(
4831
- Icon,
4832
- {
4833
- name: "close"
4834
- }
4835
- )
5136
+ className: "usa-button usx-button usx-button--ghost usx-theme-picker__trigger",
5137
+ "aria-label": label,
5138
+ "aria-expanded": "false",
5139
+ "aria-controls": `${selectId}-panel`,
5140
+ children: /* @__PURE__ */ jsxRuntime.jsx(PaletteIcon, {})
4836
5141
  }
4837
- )
4838
- ] }) : /* @__PURE__ */ jsxRuntime.jsx(
4839
- "button",
4840
- {
4841
- type: "button",
4842
- className: "usa-button usx-button usx-button--ghost text-muted usx-theme-picker__trigger",
4843
- "aria-label": label,
4844
- onClick: () => setOpen(true),
4845
- children: /* @__PURE__ */ jsxRuntime.jsx(PaletteIcon, {})
4846
- }
4847
- ) });
5142
+ ),
5143
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { id: `${selectId}-panel`, className: "usx-theme-picker__panel", children: [
5144
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: selectId, screenReaderOnly: true, children: label }),
5145
+ /* @__PURE__ */ jsxRuntime.jsx(
5146
+ "select",
5147
+ {
5148
+ id: selectId,
5149
+ name,
5150
+ className: "usa-select usx-select",
5151
+ ...selection,
5152
+ onChange: (event) => onChange == null ? void 0 : onChange(event.target.value),
5153
+ children: themes.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: option.value, children: option.label }, option.value))
5154
+ }
5155
+ ),
5156
+ /* @__PURE__ */ jsxRuntime.jsx(
5157
+ "button",
5158
+ {
5159
+ type: "button",
5160
+ className: "usa-button usx-button usa-button--primary usx-theme-picker__toggle",
5161
+ "aria-label": "Confirm theme",
5162
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close", className: "usx-theme-picker__icon" })
5163
+ }
5164
+ )
5165
+ ] })
5166
+ ] });
4848
5167
  }
4849
5168
  function PaletteIcon() {
4850
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "usa-icon usx-theme-picker__icon", "aria-hidden": "true", focusable: "false", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "currentColor", d: "M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z" }) });
5169
+ return /* @__PURE__ */ jsxRuntime.jsx(
5170
+ "svg",
5171
+ {
5172
+ className: "usa-icon usx-theme-picker__icon",
5173
+ "aria-hidden": "true",
5174
+ focusable: "false",
5175
+ viewBox: "0 0 24 24",
5176
+ children: /* @__PURE__ */ jsxRuntime.jsx(
5177
+ "path",
5178
+ {
5179
+ fill: "currentColor",
5180
+ d: "M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"
5181
+ }
5182
+ )
5183
+ }
5184
+ );
4851
5185
  }
4852
5186
  function TimePicker({
4853
5187
  id = "appointment-time",
@@ -4870,6 +5204,17 @@
4870
5204
  const hintId = hint ? `${id}-hint` : void 0;
4871
5205
  const errorId = error ? `${id}-error` : void 0;
4872
5206
  const describedBy = [label ? labelId : void 0, hintId, errorId].filter(Boolean).join(" ") || void 0;
5207
+ const containerClasses = ClassNames(
5208
+ "usa-time-picker",
5209
+ "usx-time-picker",
5210
+ { "usx-combo-box--error": !!error },
5211
+ className
5212
+ );
5213
+ const inputClasses = ClassNames(
5214
+ "usa-input",
5215
+ "usx-input",
5216
+ { "usa-input--error": !!error }
5217
+ );
4873
5218
  const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4874
5219
  label && /* @__PURE__ */ jsxRuntime.jsx(Label, { id: labelId, htmlFor: id, required, error: !!error, children: label }),
4875
5220
  hint && /* @__PURE__ */ jsxRuntime.jsx(Hint, { id: hintId, children: hint }),
@@ -4877,19 +5222,14 @@
4877
5222
  /* @__PURE__ */ jsxRuntime.jsx(
4878
5223
  "div",
4879
5224
  {
4880
- className: ClassNames(
4881
- "usa-time-picker",
4882
- "usx-time-picker",
4883
- { "usx-combo-box--error": !!error },
4884
- className
4885
- ),
5225
+ className: containerClasses,
4886
5226
  ...minTime ? { "data-min-time": minTime } : {},
4887
5227
  ...maxTime ? { "data-max-time": maxTime } : {},
4888
5228
  ...step ? { "data-step": step } : {},
4889
5229
  children: /* @__PURE__ */ jsxRuntime.jsx(
4890
5230
  "input",
4891
5231
  {
4892
- className: `usa-input usx-input${error ? " usa-input--error" : ""}`,
5232
+ className: inputClasses,
4893
5233
  id,
4894
5234
  name: name || id,
4895
5235
  type: "text",
@@ -4983,6 +5323,36 @@
4983
5323
  }
4984
5324
  );
4985
5325
  }
5326
+ function Tree({ items, variant = "default", className, ...props2 }) {
5327
+ const treeClassNames = ClassNames(
5328
+ "usx-tree",
5329
+ { [`usx-tree--${variant}`]: variant !== "default" },
5330
+ className
5331
+ );
5332
+ return /* @__PURE__ */ jsxRuntime.jsx("ul", { ...props2, className: treeClassNames, children: items.map((item, index) => {
5333
+ switch (item.type) {
5334
+ case "link": {
5335
+ const { type, ...linkProps } = item;
5336
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { ...linkProps }) }, index);
5337
+ }
5338
+ case "details": {
5339
+ const { type, items: nestedItems, className: detailsClassName, ...detailsProps } = item;
5340
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { children: nestedItems ? /* @__PURE__ */ jsxRuntime.jsx(
5341
+ Details,
5342
+ {
5343
+ ...detailsProps,
5344
+ className: ClassNames("usx-tree__branch", detailsClassName),
5345
+ children: /* @__PURE__ */ jsxRuntime.jsx(Tree, { items: nestedItems, variant })
5346
+ }
5347
+ ) : /* @__PURE__ */ jsxRuntime.jsx(Details, { ...detailsProps, className: detailsClassName }) }, index);
5348
+ }
5349
+ case "text":
5350
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "usx-tree__label", children: item.text }) }, index);
5351
+ default:
5352
+ return null;
5353
+ }
5354
+ }) });
5355
+ }
4986
5356
  const Villain = ({
4987
5357
  title = "",
4988
5358
  callout = "",
@@ -5028,7 +5398,10 @@
5028
5398
  exports2.CopyToClipboard = CopyToClipboard;
5029
5399
  exports2.DatePicker = DatePicker;
5030
5400
  exports2.DateRangePicker = DateRangePicker;
5401
+ exports2.Details = Details;
5402
+ exports2.Drawer = Drawer;
5031
5403
  exports2.ErrorMessage = ErrorMessage;
5404
+ exports2.ErrorPage = ErrorPage;
5032
5405
  exports2.Eyebrow = Eyebrow;
5033
5406
  exports2.Fieldset = Fieldset;
5034
5407
  exports2.FileInput = FileInput;
@@ -5056,6 +5429,7 @@
5056
5429
  exports2.Modal = Modal;
5057
5430
  exports2.Page = Page;
5058
5431
  exports2.Pagination = Pagination;
5432
+ exports2.Popover = Popover;
5059
5433
  exports2.ProcessList = ProcessList;
5060
5434
  exports2.Prose = Prose;
5061
5435
  exports2.Quote = Quote;
@@ -5071,6 +5445,7 @@
5071
5445
  exports2.Spinner = Spinner;
5072
5446
  exports2.Status = Status;
5073
5447
  exports2.StepIndicator = StepIndicator;
5448
+ exports2.Summary = Summary;
5074
5449
  exports2.SummaryBox = SummaryBox;
5075
5450
  exports2.Swap = Swap;
5076
5451
  exports2.Switch = Switch;
@@ -5083,6 +5458,7 @@
5083
5458
  exports2.TimePicker = TimePicker;
5084
5459
  exports2.Toggle = Toggle;
5085
5460
  exports2.Tooltip = Tooltip;
5461
+ exports2.Tree = Tree;
5086
5462
  exports2.Villain = Villain;
5087
5463
  Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
5088
5464
  }));