@solexllc/usx-react 0.1.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 (359) hide show
  1. package/README.md +45 -0
  2. package/dist/index.cjs +6017 -0
  3. package/dist/index.js +6015 -0
  4. package/package.json +48 -0
  5. package/src/components/accordion/Accordion.jsx +170 -0
  6. package/src/components/accordion/accordion.django.html +47 -0
  7. package/src/components/accordion/accordion.html +304 -0
  8. package/src/components/accordion/config.json +31 -0
  9. package/src/components/alert/Alert.tsx +88 -0
  10. package/src/components/alert/alert.django.html +45 -0
  11. package/src/components/alert/alert.html +192 -0
  12. package/src/components/alert/config.json +70 -0
  13. package/src/components/attribution/Attribution.tsx +40 -0
  14. package/src/components/attribution/attribution.django.html +21 -0
  15. package/src/components/attribution/attribution.html +26 -0
  16. package/src/components/attribution/config.json +32 -0
  17. package/src/components/avatar/Avatar.tsx +85 -0
  18. package/src/components/avatar/avatar.django.html +27 -0
  19. package/src/components/avatar/avatar.html +101 -0
  20. package/src/components/avatar/config.json +59 -0
  21. package/src/components/avatar-group/AvatarGroup.tsx +43 -0
  22. package/src/components/avatar-group/avatar-group.django.html +8 -0
  23. package/src/components/avatar-group/avatar-group.html +208 -0
  24. package/src/components/avatar-group/config.json +60 -0
  25. package/src/components/back-to-top/BackToTop.tsx +60 -0
  26. package/src/components/back-to-top/back-to-top.django.html +38 -0
  27. package/src/components/back-to-top/back-to-top.html +107 -0
  28. package/src/components/back-to-top/config.json +44 -0
  29. package/src/components/banner/Banner.tsx +111 -0
  30. package/src/components/banner/banner.django.html +80 -0
  31. package/src/components/banner/banner.html +411 -0
  32. package/src/components/banner/config.json +47 -0
  33. package/src/components/block/Block.tsx +78 -0
  34. package/src/components/block/block.django.html +26 -0
  35. package/src/components/block/block.html +162 -0
  36. package/src/components/block/config.json +88 -0
  37. package/src/components/breadcrumb/Breadcrumb.tsx +83 -0
  38. package/src/components/breadcrumb/breadcrumb.django.html +24 -0
  39. package/src/components/breadcrumb/breadcrumb.html +108 -0
  40. package/src/components/breadcrumb/config.json +74 -0
  41. package/src/components/button/Button.tsx +121 -0
  42. package/src/components/button/button.django.html +58 -0
  43. package/src/components/button/button.html +363 -0
  44. package/src/components/button/config.json +103 -0
  45. package/src/components/button-group/ButtonGroup.tsx +33 -0
  46. package/src/components/button-group/button-group.django.html +9 -0
  47. package/src/components/button-group/button-group.html +159 -0
  48. package/src/components/button-group/config.json +25 -0
  49. package/src/components/calendar-date/CalendarDate.tsx +40 -0
  50. package/src/components/calendar-date/calendar-date.django.html +8 -0
  51. package/src/components/calendar-date/calendar-date.html +17 -0
  52. package/src/components/calendar-date/config.json +17 -0
  53. package/src/components/card/Card.tsx +137 -0
  54. package/src/components/card/card.django.html +40 -0
  55. package/src/components/card/card.html +67 -0
  56. package/src/components/card/config.json +115 -0
  57. package/src/components/card-group/CardGroup.tsx +23 -0
  58. package/src/components/card-group/card-group.django.html +6 -0
  59. package/src/components/card-group/card-group.html +164 -0
  60. package/src/components/card-group/config.json +21 -0
  61. package/src/components/carousel/Carousel.tsx +101 -0
  62. package/src/components/carousel/carousel.django.html +41 -0
  63. package/src/components/carousel/carousel.html +64 -0
  64. package/src/components/carousel/config.json +38 -0
  65. package/src/components/character-count/CharacterCount.tsx +77 -0
  66. package/src/components/character-count/character-count.django.html +19 -0
  67. package/src/components/character-count/character-count.html +110 -0
  68. package/src/components/character-count/config.json +78 -0
  69. package/src/components/checkbox/Checkbox.tsx +90 -0
  70. package/src/components/checkbox/checkbox.django.html +16 -0
  71. package/src/components/checkbox/checkbox.html +266 -0
  72. package/src/components/checkbox/config.json +71 -0
  73. package/src/components/checkbox-group/CheckboxGroup.tsx +67 -0
  74. package/src/components/checkbox-group/checkbox-group.django.html +12 -0
  75. package/src/components/checkbox-group/checkbox-group.html +36 -0
  76. package/src/components/checkbox-group/config.json +50 -0
  77. package/src/components/clickable/Clickable.tsx +78 -0
  78. package/src/components/clickable/clickable.django.html +5 -0
  79. package/src/components/clickable/clickable.html +133 -0
  80. package/src/components/clickable/config.json +26 -0
  81. package/src/components/code/Code.tsx +60 -0
  82. package/src/components/code/code.django.html +21 -0
  83. package/src/components/code/code.html +71 -0
  84. package/src/components/code/config.json +40 -0
  85. package/src/components/collection/Collection.tsx +99 -0
  86. package/src/components/collection/collection.django.html +48 -0
  87. package/src/components/collection/collection.html +384 -0
  88. package/src/components/collection/config.json +60 -0
  89. package/src/components/combobox/Combobox.tsx +114 -0
  90. package/src/components/combobox/combobox.django.html +61 -0
  91. package/src/components/combobox/combobox.html +509 -0
  92. package/src/components/combobox/config.json +80 -0
  93. package/src/components/copy-to-clipboard/CopyToClipboard.tsx +48 -0
  94. package/src/components/copy-to-clipboard/config.json +30 -0
  95. package/src/components/copy-to-clipboard/copy-to-clipboard.django.html +16 -0
  96. package/src/components/copy-to-clipboard/copy-to-clipboard.html +68 -0
  97. package/src/components/date-picker/DatePicker.jsx +83 -0
  98. package/src/components/date-picker/config.json +71 -0
  99. package/src/components/date-picker/date-picker.django.html +67 -0
  100. package/src/components/date-picker/date-picker.html +104 -0
  101. package/src/components/date-range-picker/DateRangePicker.jsx +113 -0
  102. package/src/components/date-range-picker/config.json +92 -0
  103. package/src/components/date-range-picker/date-range-picker.django.html +66 -0
  104. package/src/components/date-range-picker/date-range-picker.html +190 -0
  105. package/src/components/error-message/ErrorMessage.tsx +23 -0
  106. package/src/components/error-message/config.json +19 -0
  107. package/src/components/error-message/error-message.django.html +2 -0
  108. package/src/components/error-message/error-message.html +2 -0
  109. package/src/components/eyebrow/Eyebrow.tsx +15 -0
  110. package/src/components/eyebrow/config.json +15 -0
  111. package/src/components/eyebrow/eyebrow.django.html +4 -0
  112. package/src/components/eyebrow/eyebrow.html +4 -0
  113. package/src/components/fieldset/Fieldset.tsx +54 -0
  114. package/src/components/fieldset/config.json +47 -0
  115. package/src/components/fieldset/fieldset.django.html +22 -0
  116. package/src/components/fieldset/fieldset.html +17 -0
  117. package/src/components/file-input/FileInput.jsx +174 -0
  118. package/src/components/file-input/config.json +80 -0
  119. package/src/components/file-input/file-input.django.html +57 -0
  120. package/src/components/file-input/file-input.html +258 -0
  121. package/src/components/file-list/FileList.jsx +105 -0
  122. package/src/components/file-list/config.json +43 -0
  123. package/src/components/file-list/file-list.django.html +30 -0
  124. package/src/components/file-list/file-list.html +61 -0
  125. package/src/components/footer/Footer.tsx +365 -0
  126. package/src/components/footer/config.json +83 -0
  127. package/src/components/footer/footer.django.html +260 -0
  128. package/src/components/footer/footer.html +392 -0
  129. package/src/components/form-group/FormGroup.tsx +26 -0
  130. package/src/components/form-group/config.json +22 -0
  131. package/src/components/form-group/form-group.django.html +4 -0
  132. package/src/components/form-group/form-group.html +17 -0
  133. package/src/components/header/Branding.tsx +101 -0
  134. package/src/components/header/Header.tsx +229 -0
  135. package/src/components/header/HeaderBranding.jsx +4 -0
  136. package/src/components/header/config.json +58 -0
  137. package/src/components/header/header.django.html +194 -0
  138. package/src/components/header/header.html +823 -0
  139. package/src/components/hero/Hero.tsx +64 -0
  140. package/src/components/hero/config.json +70 -0
  141. package/src/components/hero/hero.django.html +22 -0
  142. package/src/components/hero/hero.html +75 -0
  143. package/src/components/hint/Hint.tsx +23 -0
  144. package/src/components/hint/config.json +19 -0
  145. package/src/components/hint/hint.django.html +2 -0
  146. package/src/components/hint/hint.html +2 -0
  147. package/src/components/icon/Icon.tsx +46 -0
  148. package/src/components/icon/config.json +60 -0
  149. package/src/components/icon/icon.django.html +26 -0
  150. package/src/components/icon/icon.html +289 -0
  151. package/src/components/icon/icons_list.json +247 -0
  152. package/src/components/icon-list/IconList.tsx +59 -0
  153. package/src/components/icon-list/config.json +86 -0
  154. package/src/components/icon-list/icon-list.django.html +17 -0
  155. package/src/components/icon-list/icon-list.html +227 -0
  156. package/src/components/identifier/Identifier.tsx +193 -0
  157. package/src/components/identifier/config.json +133 -0
  158. package/src/components/identifier/identifier.django.html +99 -0
  159. package/src/components/identifier/identifier.html +737 -0
  160. package/src/components/image/Image.tsx +106 -0
  161. package/src/components/image/config.json +64 -0
  162. package/src/components/image/image.django.html +62 -0
  163. package/src/components/image/image.html +53 -0
  164. package/src/components/in-page-nav/InPageNav.jsx +76 -0
  165. package/src/components/in-page-nav/config.json +69 -0
  166. package/src/components/in-page-nav/in-page-nav.django.html +28 -0
  167. package/src/components/in-page-nav/in-page-nav.html +183 -0
  168. package/src/components/indicator/Indicator.tsx +32 -0
  169. package/src/components/indicator/README.md +1 -0
  170. package/src/components/indicator/config.json +19 -0
  171. package/src/components/indicator/indicator.django.html +10 -0
  172. package/src/components/indicator/indicator.html +42 -0
  173. package/src/components/input/Input.tsx +85 -0
  174. package/src/components/input/config.json +73 -0
  175. package/src/components/input/input.django.html +55 -0
  176. package/src/components/input/input.html +59 -0
  177. package/src/components/label/Label.tsx +42 -0
  178. package/src/components/label/config.json +39 -0
  179. package/src/components/label/label.django.html +23 -0
  180. package/src/components/label/label.html +23 -0
  181. package/src/components/language-selector/LanguageSelector.jsx +224 -0
  182. package/src/components/language-selector/config.json +107 -0
  183. package/src/components/language-selector/language-selector.django.html +40 -0
  184. package/src/components/language-selector/language-selector.html +85 -0
  185. package/src/components/layout/Layout.tsx +131 -0
  186. package/src/components/layout/config.json +36 -0
  187. package/src/components/layout/layout.django.html +28 -0
  188. package/src/components/layout/layout.html +29 -0
  189. package/src/components/legend/Legend.tsx +34 -0
  190. package/src/components/legend/config.json +27 -0
  191. package/src/components/legend/legend.django.html +11 -0
  192. package/src/components/legend/legend.html +12 -0
  193. package/src/components/link/Link.tsx +45 -0
  194. package/src/components/link/config.json +39 -0
  195. package/src/components/link/link.django.html +8 -0
  196. package/src/components/link/link.html +47 -0
  197. package/src/components/list/List.tsx +82 -0
  198. package/src/components/list/_list-items.django.html +17 -0
  199. package/src/components/list/config.json +25 -0
  200. package/src/components/list/list.django.html +11 -0
  201. package/src/components/list/list.html +26 -0
  202. package/src/components/memorable-date/MemorableDate.jsx +167 -0
  203. package/src/components/memorable-date/config.json +104 -0
  204. package/src/components/memorable-date/memorable-date.django.html +86 -0
  205. package/src/components/memorable-date/memorable-date.html +275 -0
  206. package/src/components/misc-banner/MiscBanner.tsx +112 -0
  207. package/src/components/misc-banner/config.json +57 -0
  208. package/src/components/misc-banner/misc-banner.django.html +63 -0
  209. package/src/components/misc-banner/misc-banner.html +191 -0
  210. package/src/components/modal/Modal.tsx +71 -0
  211. package/src/components/modal/config.json +57 -0
  212. package/src/components/modal/modal.django.html +43 -0
  213. package/src/components/modal/modal.html +222 -0
  214. package/src/components/page/Page.jsx +34 -0
  215. package/src/components/page/config.json +34 -0
  216. package/src/components/page/page.django.html +5 -0
  217. package/src/components/page/page.html +23 -0
  218. package/src/components/pagination/Pagination.tsx +112 -0
  219. package/src/components/pagination/config.json +135 -0
  220. package/src/components/pagination/container/PaginationContainer.tsx +38 -0
  221. package/src/components/pagination/navigation/PaginationNavigation.tsx +219 -0
  222. package/src/components/pagination/navigation/pagination-navigation.django.html +64 -0
  223. package/src/components/pagination/pagination.django.html +48 -0
  224. package/src/components/pagination/pagination.html +613 -0
  225. package/src/components/pagination/step-options/PaginationStepOptions.tsx +43 -0
  226. package/src/components/pagination/step-options/pagination-step-options.django.html +7 -0
  227. package/src/components/pagination/summary/PaginationSummary.tsx +33 -0
  228. package/src/components/pagination/summary/pagination-summary.django.html +12 -0
  229. package/src/components/process-list/ProcessList.tsx +52 -0
  230. package/src/components/process-list/config.json +15 -0
  231. package/src/components/process-list/process-list.django.html +15 -0
  232. package/src/components/process-list/process-list.html +90 -0
  233. package/src/components/prose/Prose.tsx +32 -0
  234. package/src/components/prose/config.json +28 -0
  235. package/src/components/prose/prose.django.html +35 -0
  236. package/src/components/prose/prose.html +91 -0
  237. package/src/components/radio-buttons/RadioButtons.tsx +82 -0
  238. package/src/components/radio-buttons/config.json +57 -0
  239. package/src/components/radio-buttons/radio-buttons.django.html +28 -0
  240. package/src/components/radio-buttons/radio-buttons.html +189 -0
  241. package/src/components/range-slider/RangeSlider.jsx +84 -0
  242. package/src/components/range-slider/config.json +89 -0
  243. package/src/components/range-slider/range-slider.django.html +65 -0
  244. package/src/components/range-slider/range-slider.html +106 -0
  245. package/src/components/required/Required.tsx +25 -0
  246. package/src/components/required/config.json +20 -0
  247. package/src/components/required/required.django.html +2 -0
  248. package/src/components/required/required.html +6 -0
  249. package/src/components/search/Search.tsx +92 -0
  250. package/src/components/search/config.json +69 -0
  251. package/src/components/search/search.django.html +59 -0
  252. package/src/components/search/search.html +76 -0
  253. package/src/components/section/Section.tsx +28 -0
  254. package/src/components/section/config.json +27 -0
  255. package/src/components/section/section.django.html +5 -0
  256. package/src/components/section/section.html +16 -0
  257. package/src/components/select/Select.tsx +107 -0
  258. package/src/components/select/config.json +80 -0
  259. package/src/components/select/select.django.html +64 -0
  260. package/src/components/select/select.html +62 -0
  261. package/src/components/sidenav/SideNav.tsx +74 -0
  262. package/src/components/sidenav/config.json +45 -0
  263. package/src/components/sidenav/sidenav.django.html +29 -0
  264. package/src/components/sidenav/sidenav.html +84 -0
  265. package/src/components/site-alert/SiteAlert.tsx +101 -0
  266. package/src/components/site-alert/config.json +62 -0
  267. package/src/components/site-alert/site-alert.django.html +34 -0
  268. package/src/components/site-alert/site-alert.html +312 -0
  269. package/src/components/skipnav/Skipnav.tsx +41 -0
  270. package/src/components/skipnav/config.json +29 -0
  271. package/src/components/skipnav/skipnav.django.html +11 -0
  272. package/src/components/skipnav/skipnav.html +1 -0
  273. package/src/components/spinner/Spinner.tsx +46 -0
  274. package/src/components/spinner/config.json +44 -0
  275. package/src/components/spinner/spinner.django.html +8 -0
  276. package/src/components/spinner/spinner.html +219 -0
  277. package/src/components/status/Status.tsx +28 -0
  278. package/src/components/status/config.json +47 -0
  279. package/src/components/status/status.django.html +2 -0
  280. package/src/components/status/status.html +31 -0
  281. package/src/components/step-indicator/StepIndicator.tsx +80 -0
  282. package/src/components/step-indicator/config.json +54 -0
  283. package/src/components/step-indicator/step-indicator.django.html +29 -0
  284. package/src/components/step-indicator/step-indicator.html +243 -0
  285. package/src/components/summary-box/SummaryBox.tsx +41 -0
  286. package/src/components/summary-box/config.json +30 -0
  287. package/src/components/summary-box/summary-box.django.html +19 -0
  288. package/src/components/summary-box/summary-box.html +210 -0
  289. package/src/components/swap/Swap.tsx +47 -0
  290. package/src/components/swap/config.json +61 -0
  291. package/src/components/swap/swap.django.html +14 -0
  292. package/src/components/swap/swap.html +163 -0
  293. package/src/components/switch/Switch.tsx +73 -0
  294. package/src/components/switch/config.json +55 -0
  295. package/src/components/switch/switch.django.html +28 -0
  296. package/src/components/switch/switch.html +56 -0
  297. package/src/components/table/Table.tsx +334 -0
  298. package/src/components/table/TableBody.tsx +253 -0
  299. package/src/components/table/TableCell.tsx +37 -0
  300. package/src/components/table/TableContext.tsx +87 -0
  301. package/src/components/table/TableFoot.tsx +68 -0
  302. package/src/components/table/TableGroup.tsx +69 -0
  303. package/src/components/table/TableHead.tsx +139 -0
  304. package/src/components/table/TableRow.tsx +56 -0
  305. package/src/components/table/__pycache__/table_helper.cpython-312.pyc +0 -0
  306. package/src/components/table/config.json +297 -0
  307. package/src/components/table/hooks/useRowDetails.ts +34 -0
  308. package/src/components/table/hooks/useTableGroups.ts +61 -0
  309. package/src/components/table/hooks/useTableSelect.ts +82 -0
  310. package/src/components/table/hooks/useTableSort.ts +60 -0
  311. package/src/components/table/table-body.django.html +68 -0
  312. package/src/components/table/table-detail-row.django.html +14 -0
  313. package/src/components/table/table-foot.django.html +31 -0
  314. package/src/components/table/table-group.django.html +40 -0
  315. package/src/components/table/table-head.django.html +85 -0
  316. package/src/components/table/table-row.django.html +98 -0
  317. package/src/components/table/table.django.html +60 -0
  318. package/src/components/table/table.html +1186 -0
  319. package/src/components/table/table_helper.py +298 -0
  320. package/src/components/table/types.ts +68 -0
  321. package/src/components/tag/Tag.tsx +75 -0
  322. package/src/components/tag/config.json +54 -0
  323. package/src/components/tag/tag.django.html +39 -0
  324. package/src/components/tag/tag.html +45 -0
  325. package/src/components/tag-group/TagGroup.tsx +35 -0
  326. package/src/components/tag-group/config.json +24 -0
  327. package/src/components/tag-group/tag-group.django.html +11 -0
  328. package/src/components/tag-group/tag-group.html +36 -0
  329. package/src/components/task-list/TaskList.tsx +40 -0
  330. package/src/components/task-list/config.json +41 -0
  331. package/src/components/task-list/task-list.django.html +21 -0
  332. package/src/components/task-list/task-list.html +24 -0
  333. package/src/components/text-area/TextArea.tsx +78 -0
  334. package/src/components/text-area/config.json +78 -0
  335. package/src/components/text-area/text-area.django.html +53 -0
  336. package/src/components/text-area/text-area.html +59 -0
  337. package/src/components/theme-picker/ThemePicker.tsx +106 -0
  338. package/src/components/theme-picker/config.json +39 -0
  339. package/src/components/theme-picker/theme-picker.django.html +32 -0
  340. package/src/components/theme-picker/theme-picker.html +67 -0
  341. package/src/components/time-picker/TimePicker.jsx +87 -0
  342. package/src/components/time-picker/config.json +76 -0
  343. package/src/components/time-picker/time-picker.django.html +67 -0
  344. package/src/components/time-picker/time-picker.html +123 -0
  345. package/src/components/toggle/Toggle.tsx +80 -0
  346. package/src/components/toggle/config.json +69 -0
  347. package/src/components/toggle/toggle.django.html +19 -0
  348. package/src/components/toggle/toggle.html +85 -0
  349. package/src/components/tooltip/Tooltip.tsx +33 -0
  350. package/src/components/tooltip/config.json +33 -0
  351. package/src/components/tooltip/tooltip.django.html +5 -0
  352. package/src/components/tooltip/tooltip.html +57 -0
  353. package/src/components/villain/Villain.tsx +47 -0
  354. package/src/components/villain/config.json +44 -0
  355. package/src/components/villain/villain.django.html +19 -0
  356. package/src/components/villain/villain.html +39 -0
  357. package/src/declarations.d.ts +1 -0
  358. package/src/index.js +82 -0
  359. package/src/styles/core.scss +12 -0
@@ -0,0 +1,164 @@
1
+ <h3 class="site-preview-heading">Default card</h3>
2
+ <ul class="usa-card-group usx-card-group">
3
+ <li class="usa-card usx-card tablet:grid-col-6 widescreen:grid-col-4">
4
+ <div class="usa-card__container">
5
+ <div class="usa-card__header">
6
+ <h4 class="usa-card__heading">Card</h4>
7
+ </div>
8
+ <div class="usa-card__body">
9
+ <p>
10
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Facilis earum
11
+ tenetur quo cupiditate, eaque qui officia recusandae.
12
+ </p>
13
+ </div>
14
+ <div class="usa-card__footer">
15
+ <a href="#" class="usa-button usx-button usa-button--primary">Visit Florida Keys</a>
16
+ </div>
17
+ </div>
18
+ </li>
19
+ <li class="usa-card usx-card tablet:grid-col-6 widescreen:grid-col-4">
20
+ <div class="usa-card__container">
21
+ <div class="usa-card__header">
22
+ <h4 class="usa-card__heading">Card with Media</h4>
23
+ </div>
24
+ <div class="usa-card__media">
25
+ <div class="usa-card__img">
26
+ <img
27
+ src="https://designsystem.digital.gov/img/introducing-uswds-2-0/built-to-grow--alt.jpg"
28
+ alt="A placeholder image"
29
+ />
30
+ </div>
31
+ </div>
32
+ <div class="usa-card__body">
33
+ <p>
34
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Facilis earum
35
+ tenetur quo cupiditate, eaque qui officia recusandae.
36
+ </p>
37
+ </div>
38
+ <div class="usa-card__footer">
39
+ <a href="#" class="usa-button usx-button usa-button--primary">Visit Florida Keys</a>
40
+ </div>
41
+ </div>
42
+ </li>
43
+ <li class="usa-card usx-card tablet:grid-col-6 widescreen:grid-col-4 usa-card--header-first">
44
+ <div class="usa-card__container">
45
+ <div class="usa-card__header">
46
+ <h4 class="usa-card__heading">Media with header first</h4>
47
+ </div>
48
+ <div class="usa-card__media usa-card__media--exdent">
49
+ <div class="usa-card__img">
50
+ <img
51
+ src="https://designsystem.digital.gov/img/introducing-uswds-2-0/built-to-grow--alt.jpg"
52
+ alt="A placeholder image"
53
+ />
54
+ </div>
55
+ </div>
56
+ <div class="usa-card__body">
57
+ <p>
58
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore
59
+ possimus similique nemo odit doloremque laudantium?
60
+ </p>
61
+ </div>
62
+ <div class="usa-card__footer">
63
+ <a href="#" class="usa-button usx-button usa-button--primary">Visit Florida Keys</a>
64
+ </div>
65
+ </div>
66
+ </li>
67
+ <li class="usa-card usx-card tablet:grid-col-6 widescreen:grid-col-4">
68
+ <div class="usa-card__container">
69
+ <div class="usa-card__header">
70
+ <h4 class="usa-card__heading">Inset media</h4>
71
+ </div>
72
+ <div class="usa-card__media usa-card__media--inset">
73
+ <div class="usa-card__img">
74
+ <img
75
+ src="https://designsystem.digital.gov/img/introducing-uswds-2-0/built-to-grow--alt.jpg"
76
+ alt="A placeholder image"
77
+ />
78
+ </div>
79
+ </div>
80
+ <div class="usa-card__body">
81
+ <p>
82
+ Etiam vitae sodales metus. Fusce id orci dignissim, efficitur risus
83
+ eget, tempus odio. Donec lectus ante, auctor eget cursus sed,
84
+ convallis quis magna. Orci varius natoque penatibus et magnis dis
85
+ parturient montes, nascetur ridiculus mus. Mauris mattis tellus
86
+ bibendum aliquet malesuada.
87
+ </p>
88
+ </div>
89
+ <div class="usa-card__footer">
90
+ <a href="#" class="usa-button usx-button usa-button--primary">Visit Florida Keys</a>
91
+ </div>
92
+ </div>
93
+ </li>
94
+ <li class="usa-card usx-card tablet:grid-col-6 widescreen:grid-col-4">
95
+ <div class="usa-card__container">
96
+ <div class="usa-card__header">
97
+ <h4 class="usa-card__heading">Exdent media</h4>
98
+ </div>
99
+ <div class="usa-card__media usa-card__media--exdent">
100
+ <div class="usa-card__img">
101
+ <img
102
+ src="https://designsystem.digital.gov/img/introducing-uswds-2-0/built-to-grow--alt.jpg"
103
+ alt="A placeholder image"
104
+ />
105
+ </div>
106
+ </div>
107
+ <div class="usa-card__body">
108
+ <p>
109
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore
110
+ possimus similique nemo odit doloremque laudantium?
111
+ </p>
112
+ </div>
113
+ <div class="usa-card__footer">
114
+ <a href="#" class="usa-button usx-button usa-button--primary">Visit Florida Keys</a>
115
+ </div>
116
+ </div>
117
+ </li>
118
+ </ul>
119
+
120
+ <h3 class="site-preview-heading">Flag layout card</h3>
121
+ <ul class="usa-card-group usx-card-group">
122
+ <li class="usa-card usx-card usa-card--flag flex-1">
123
+ <div class="usa-card__container">
124
+ <div class="usa-card__header">
125
+ <h4 class="usa-card__heading">Default flag</h4>
126
+ </div>
127
+ <div class="usa-card__media">
128
+ <div class="usa-card__img">
129
+ <img
130
+ src="https://designsystem.digital.gov/img/introducing-uswds-2-0/built-to-grow--alt.jpg"
131
+ alt="A placeholder image"
132
+ />
133
+ </div>
134
+ </div>
135
+ <div class="usa-card__body">
136
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
137
+ </div>
138
+ <div class="usa-card__footer">
139
+ <a href="#" class="usa-button usx-button usa-button--primary">Visit Florida Keys</a>
140
+ </div>
141
+ </div>
142
+ </li>
143
+ <li class="usa-card usx-card usa-card--flag flex-1 usa-card--media-right">
144
+ <div class="usa-card__container">
145
+ <div class="usa-card__header">
146
+ <h4 class="usa-card__heading">Flag media right inset</h4>
147
+ </div>
148
+ <div class="usa-card__media usa-card__media--inset">
149
+ <div class="usa-card__img">
150
+ <img
151
+ src="https://designsystem.digital.gov/img/introducing-uswds-2-0/built-to-grow--alt.jpg"
152
+ alt="A placeholder image"
153
+ />
154
+ </div>
155
+ </div>
156
+ <div class="usa-card__body">
157
+ <p>Lorem ipsum dolor sit amet consectetur adipisicing elit.</p>
158
+ </div>
159
+ <div class="usa-card__footer">
160
+ <a href="#" class="usa-button usx-button usa-button--primary">Visit Florida Keys</a>
161
+ </div>
162
+ </div>
163
+ </li>
164
+ </ul>
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "card-group",
3
+ "template": "card-group/card-group.django.html",
4
+ "version": 1,
5
+ "props": {
6
+ "cardProps": {
7
+ "type": "array",
8
+ "description": "Array of cards rendered by the group.",
9
+ "items": {
10
+ "type": "object",
11
+ "description": "Card item.",
12
+ "component": "card",
13
+ "omit": ["tag"]
14
+ }
15
+ },
16
+ "className": {
17
+ "type": "string",
18
+ "description": "Additional classes"
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,101 @@
1
+ import React from 'react';
2
+ import ClassNames from 'classnames';
3
+
4
+ export interface SlideProps extends React.HTMLAttributes<HTMLElement> {
5
+ id?: string;
6
+ className?: string;
7
+ role?: string;
8
+ ariaRoledescription?: string;
9
+ ariaLabel?: string;
10
+ tabIndex?: number;
11
+ children?: React.ReactNode;
12
+ }
13
+
14
+ export function Slide({
15
+ id,
16
+ className = '',
17
+ role = 'group',
18
+ ariaRoledescription = 'slide',
19
+ ariaLabel,
20
+ tabIndex = 0,
21
+ children = null,
22
+ ...rest
23
+ }: SlideProps) {
24
+ const cls = ['usx-carousel__slide', className].filter(Boolean).join(' ');
25
+ return (
26
+ <section
27
+ id={id}
28
+ className={cls}
29
+ role={role}
30
+ aria-roledescription={ariaRoledescription}
31
+ aria-label={ariaLabel}
32
+ tabIndex={tabIndex}
33
+ {...rest}
34
+ >
35
+ {children}
36
+ </section>
37
+ );
38
+ }
39
+
40
+ export interface CarouselSlide {
41
+ content: React.ReactNode;
42
+ }
43
+
44
+ export interface CarouselProps extends React.HTMLAttributes<HTMLDivElement> {
45
+ id?: string;
46
+ slides?: CarouselSlide[];
47
+ ariaLabel?: string;
48
+ className?: string;
49
+ showDots?: boolean;
50
+ children?: React.ReactNode;
51
+ slideIds?: string[];
52
+ }
53
+
54
+ export default function Carousel({
55
+ id = 'carousel-1',
56
+ slides = [],
57
+ ariaLabel = 'Featured content',
58
+ className = '',
59
+ showDots = true,
60
+ children = null,
61
+ slideIds = [],
62
+ ...props
63
+ }: CarouselProps) {
64
+ const classes = ClassNames('usx-carousel', className);
65
+ const childArray = React.Children.toArray(children).filter(Boolean);
66
+ return (
67
+ <div className={classes} {...props} role="region" aria-roledescription="carousel" aria-label={ariaLabel}>
68
+ <div className="usx-carousel__viewport" tabIndex={-1}>
69
+ <div className="usx-carousel__track">
70
+ {childArray.length > 0 ? (
71
+ childArray
72
+ ) : slides.length > 0 ? (
73
+ slides.map((slide, i) => (
74
+ <Slide
75
+ id={`${id}-slide-${i + 1}`}
76
+ key={i}
77
+ className=""
78
+ ariaLabel={`${i + 1} of ${slides.length}`}
79
+ tabIndex={0}
80
+ >
81
+ {slide?.content || slide}
82
+ </Slide>
83
+ ))
84
+ ) : (
85
+ <p><em>No slides available.</em></p>
86
+ )}
87
+ </div>
88
+ </div>
89
+ {showDots && (
90
+ <div className="usx-carousel__dots" aria-label="Slide navigation">
91
+ {slides?.map((_, i) => (
92
+ <a key={i} href={`#${id}-slide-${i + 1}`} aria-label={`Go to slide ${i + 1}`} tabIndex={-1} />
93
+ ))}
94
+ {childArray.length > 0 && slideIds.length === childArray.length && slideIds.map((slideId, i) => (
95
+ <a key={i} href={slideId} aria-label={`Go to slide ${i + 1}`} tabIndex={-1} />
96
+ ))}
97
+ </div>
98
+ )}
99
+ </div>
100
+ );
101
+ }
@@ -0,0 +1,41 @@
1
+ {% load components %}
2
+
3
+ {# Django template for Carousel #}
4
+ <div class="usx-carousel {{ className|default:'' }}">
5
+ <div class="usx-carousel__viewport" tabindex="-1" role="region" aria-roledescription="carousel" aria-label="{{ ariaLabel|default:'Featured content' }}">
6
+ <div class="usx-carousel__track">
7
+ {% if children %}
8
+ {{ children|safe }}
9
+ {% elif slides %}
10
+ {% for slide in slides %}
11
+ <section id="{{ id }}-slide-{{ forloop.counter }}" class="usx-carousel__slide" role="group" aria-roledescription="slide" aria-label="{{ forloop.counter }} of {{ slides|length }}" tabindex="0">
12
+ {% if slide.content %}
13
+ {{ slide.content|safe }}
14
+ {% elif slide.src %}
15
+ {% image src=slide.src alt=slide.alt caption=slide.caption hideCaption=True objectFit=slide.objectFit className=slide.className %}{% endimage %}
16
+ {% else %}
17
+ {# Fallback: render the slide object/string directly #}
18
+ {{ slide|safe }}
19
+ {% endif %}
20
+ </section>
21
+ {% endfor %}
22
+ {% else %}
23
+ <p><em>No slides available.</em></p>
24
+ {% endif %}
25
+ </div>
26
+ </div>
27
+
28
+ {% if showDots %}
29
+ <div class="usx-carousel__dots" aria-label="Slide navigation">
30
+ {% if slides %}
31
+ {% for slide in slides %}
32
+ <a href="#{{ id }}-slide-{{ forloop.counter }}" aria-label="Go to slide {{ forloop.counter }}" tabindex="-1"></a>
33
+ {% endfor %}
34
+ {% elif slideIds %}
35
+ {% for slideId in slideIds %}
36
+ <a href="{{ slideId }}" aria-label="Go to slide {{ forloop.counter }}" tabindex="-1"></a>
37
+ {% endfor %}
38
+ {% endif %}
39
+ </div>
40
+ {% endif %}
41
+ </div>
@@ -0,0 +1,64 @@
1
+ <style>
2
+ .demo-card {
3
+ height: 200px;
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ font-size: 1.5rem;
8
+ background: #f0f0f0;
9
+ border-radius: 0.5rem;
10
+ }
11
+ </style>
12
+
13
+ <div
14
+ class="usx-carousel"
15
+ role="region"
16
+ aria-roledescription="carousel"
17
+ aria-label="Featured content"
18
+ >
19
+ <div class="usx-carousel__viewport">
20
+ <div class="usx-carousel__track">
21
+
22
+ <section
23
+ id="slide-1"
24
+ class="usx-carousel__slide"
25
+ role="group"
26
+ aria-roledescription="slide"
27
+ aria-label="1 of 3"
28
+ tabindex="0"
29
+ >
30
+ <div class="demo-card">Slide 1</div>
31
+ </section>
32
+
33
+ <section
34
+ id="slide-2"
35
+ class="usx-carousel__slide"
36
+ role="group"
37
+ aria-roledescription="slide"
38
+ aria-label="2 of 3"
39
+ tabindex="0"
40
+ >
41
+ <div class="demo-card">Slide 2</div>
42
+ </section>
43
+
44
+ <section
45
+ id="slide-3"
46
+ class="usx-carousel__slide"
47
+ role="group"
48
+ aria-roledescription="slide"
49
+ aria-label="3 of 3"
50
+ tabindex="0"
51
+ >
52
+ <div class="demo-card">Slide 3</div>
53
+ </section>
54
+
55
+ </div>
56
+ </div>
57
+
58
+ <!-- Navigation dots -->
59
+ <div class="usx-carousel__dots" aria-label="Slide navigation">
60
+ <a href="#slide-1" aria-label="Go to slide 1"></a>
61
+ <a href="#slide-2" aria-label="Go to slide 2"></a>
62
+ <a href="#slide-3" aria-label="Go to slide 3"></a>
63
+ </div>
64
+ </div>
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "carousel",
3
+ "template": "carousel/carousel.django.html",
4
+ "version": 1,
5
+ "props": {
6
+ "id": {
7
+ "type": "string",
8
+ "default": "carousel-1",
9
+ "description": "Base id for slides and anchors"
10
+ },
11
+ "slides": {
12
+ "type": "array",
13
+ "description": "Array of slide objects {content: string|node}"
14
+ },
15
+ "children": {
16
+ "type": "string",
17
+ "description": "Optional raw slide markup rendered directly inside the track."
18
+ },
19
+ "slideIds": {
20
+ "type": "array",
21
+ "description": "Anchor targets used for dot navigation when children are provided."
22
+ },
23
+ "ariaLabel": {
24
+ "type": "string",
25
+ "default": "Featured content",
26
+ "description": "Aria label for the carousel region"
27
+ },
28
+ "showDots": {
29
+ "type": "boolean",
30
+ "default": true,
31
+ "description": "Whether to render navigation dots"
32
+ },
33
+ "className": {
34
+ "type": "string",
35
+ "description": "Additional classes to add to the carousel"
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,77 @@
1
+ import React from 'react';
2
+ import ClassNames from 'classnames';
3
+ import FormGroup from '../form-group/FormGroup';
4
+ import Input from '../input/Input';
5
+ import TextArea from '../text-area/TextArea';
6
+
7
+ export interface CharacterCountProps {
8
+ id?: string;
9
+ label?: React.ReactNode;
10
+ max: number;
11
+ hint?: string;
12
+ error?: string | boolean | null;
13
+ success?: string | boolean | null;
14
+ disabled?: boolean;
15
+ required?: boolean;
16
+ screenReaderOnlyLabel?: boolean;
17
+ placeholder?: string;
18
+ textArea?: boolean;
19
+ className?: string;
20
+ [key: string]: unknown;
21
+ }
22
+
23
+ // Enhanced by @uswds/uswds/js/usa-character-count at runtime (call ONLY
24
+ // characterCount.init() in the consuming app/story, never .on()/.off() — see
25
+ // Combobox.tsx for why). That script moves the field's `maxlength` attribute
26
+ // to `data-maxlength`, hides this fallback message, and creates/updates the
27
+ // live status text and error state itself — React only renders the
28
+ // pre-enhancement markup the twig contract expects.
29
+ export default function CharacterCount({
30
+ id,
31
+ label = null,
32
+ max,
33
+ hint = null,
34
+ error = null,
35
+ success = null,
36
+ disabled = false,
37
+ required = false,
38
+ screenReaderOnlyLabel = false,
39
+ placeholder = '',
40
+ textArea = false,
41
+ className = '',
42
+ ...props
43
+ }: CharacterCountProps) {
44
+ const fieldId = id || `character-count-${Math.random().toString(36).substr(2, 9)}`;
45
+ const infoId = `${fieldId}-info`;
46
+ const hintId = hint ? `${fieldId}-hint` : undefined;
47
+ const errorId = error ? `${fieldId}-error` : undefined;
48
+ const successId = !error && success ? `${fieldId}-success` : undefined;
49
+
50
+ const outerClasses = ClassNames('usa-character-count', 'usx-character-count', className);
51
+
52
+ const fieldProps = {
53
+ id: fieldId,
54
+ label,
55
+ hint: hint ?? undefined,
56
+ required,
57
+ screenReaderOnlyLabel,
58
+ placeholder,
59
+ disabled,
60
+ error: error ?? undefined,
61
+ success: error ? undefined : (success ?? undefined),
62
+ maxLength: max,
63
+ formGroup: true,
64
+ className: 'usa-character-count__field',
65
+ 'aria-describedby': [infoId, hintId, errorId, successId].filter(Boolean).join(' '),
66
+ ...props,
67
+ };
68
+
69
+ return (
70
+ <div className={outerClasses}>
71
+ {textArea ? <TextArea {...fieldProps} /> : <Input {...fieldProps} />}
72
+ <span id={infoId} className="usa-character-count__message">
73
+ You can enter up to {max} characters
74
+ </span>
75
+ </div>
76
+ );
77
+ }
@@ -0,0 +1,19 @@
1
+ {% load components %}
2
+
3
+ {# Enhanced by @uswds/uswds/js/usa-character-count at runtime (call ONLY #}
4
+ {# characterCount.init(), never .on()/.off()) — that script moves the field's #}
5
+ {# maxlength attribute to data-maxlength, hides the fallback message below, #}
6
+ {# and manages the live count/over-limit state itself. #}
7
+ {% with id|default:"character-count" as field_id %}
8
+ <div class="usa-character-count usx-character-count{% if className %} {{ className }}{% endif %}">
9
+ {% if textArea %}
10
+ {% text_area id=field_id formGroup=True label=label hint=hint error=error success=success disabled=disabled required=required screenReaderOnlyLabel=screenReaderOnlyLabel placeholder=placeholder defaultValue=defaultValue maxlength=max describedBy=field_id|add:"-info" className="usa-character-count__field" %}{% endtext_area %}
11
+ {% else %}
12
+ {% input id=field_id formGroup=True label=label hint=hint error=error success=success disabled=disabled required=required screenReaderOnlyLabel=screenReaderOnlyLabel placeholder=placeholder value=defaultValue maxlength=max describedBy=field_id|add:"-info" className="usa-character-count__field" %}{% endinput %}
13
+ {% endif %}
14
+ <span id="{{ field_id }}-info" class="usa-character-count__message">
15
+ You can enter up to {{ max }} characters
16
+ </span>
17
+ </div>
18
+
19
+ {% endwith %}
@@ -0,0 +1,110 @@
1
+ <!-- Plain (unenhanced) usa-character-count markup — relies on -->
2
+ <!-- @uswds/uswds/js/usa-character-count at runtime (call ONLY -->
3
+ <!-- characterCount.init(), never .on()/.off()) to move `maxlength` to -->
4
+ <!-- `data-maxlength`, hide the fallback message below, and manage the live -->
5
+ <!-- count/over-limit state itself. -->
6
+
7
+ <!-- Default -->
8
+ <div class="usa-character-count usx-character-count">
9
+ <div class="usa-form-group usx-form-group">
10
+ <label class="usa-label usx-label" for="cc-1">Text input</label>
11
+ <input
12
+ class="usa-input usx-input usa-character-count__field"
13
+ id="cc-1"
14
+ maxlength="25"
15
+ aria-describedby="cc-1-info"
16
+ />
17
+ </div>
18
+ <span id="cc-1-info" class="usa-character-count__message">You can enter up to 25 characters</span>
19
+ </div>
20
+
21
+ <!-- WithHint -->
22
+ <div class="usa-character-count usx-character-count">
23
+ <div class="usa-form-group usx-form-group">
24
+ <label class="usa-label usx-label" for="cc-3">Text input with hint</label>
25
+ <span id="cc-3-hint" class="usa-hint">You can enter up to 25 characters.</span>
26
+ <input
27
+ class="usa-input usx-input usa-character-count__field"
28
+ id="cc-3"
29
+ maxlength="25"
30
+ aria-describedby="cc-3-info cc-3-hint"
31
+ />
32
+ </div>
33
+ <span id="cc-3-info" class="usa-character-count__message">You can enter up to 25 characters</span>
34
+ </div>
35
+
36
+ <!-- WithTextArea -->
37
+ <div class="usa-character-count usx-character-count">
38
+ <div class="usa-form-group usx-form-group">
39
+ <label class="usa-label usx-label" for="cc-4">Text area</label>
40
+ <textarea
41
+ class="usa-textarea usx-textarea usa-character-count__field"
42
+ id="cc-4"
43
+ maxlength="50"
44
+ aria-describedby="cc-4-info"
45
+ ></textarea>
46
+ </div>
47
+ <span id="cc-4-info" class="usa-character-count__message">You can enter up to 50 characters</span>
48
+ </div>
49
+
50
+ <!-- Required -->
51
+ <div class="usa-character-count usx-character-count">
52
+ <div class="usa-form-group usx-form-group">
53
+ <label class="usa-label usx-label" for="cc-6">
54
+ <abbr title="required" class="usx-required">*</abbr>Required field
55
+ </label>
56
+ <input
57
+ class="usa-input usx-input usa-character-count__field"
58
+ id="cc-6"
59
+ maxlength="25"
60
+ aria-describedby="cc-6-info"
61
+ required
62
+ />
63
+ </div>
64
+ <span id="cc-6-info" class="usa-character-count__message">You can enter up to 25 characters</span>
65
+ </div>
66
+
67
+ <!-- SuccessState -->
68
+ <div class="usa-character-count usx-character-count">
69
+ <div class="usa-form-group usx-form-group">
70
+ <label class="usa-label usx-label" for="cc-7">Success state</label>
71
+ <input
72
+ class="usa-input usx-input usa-character-count__field usa-input--success"
73
+ id="cc-7"
74
+ maxlength="25"
75
+ aria-describedby="cc-7-info cc-7-success"
76
+ />
77
+ <span id="cc-7-success" class="usa-success-message" role="status">Looks good!</span>
78
+ </div>
79
+ <span id="cc-7-info" class="usa-character-count__message">You can enter up to 25 characters</span>
80
+ </div>
81
+
82
+ <!-- Disabled -->
83
+ <div class="usa-character-count usx-character-count">
84
+ <div class="usa-form-group usx-form-group">
85
+ <label class="usa-label usx-label" for="cc-8">Disabled field</label>
86
+ <input
87
+ class="usa-input usx-input usa-character-count__field"
88
+ id="cc-8"
89
+ maxlength="25"
90
+ aria-describedby="cc-8-info"
91
+ disabled
92
+ />
93
+ </div>
94
+ <span id="cc-8-info" class="usa-character-count__message">You can enter up to 25 characters</span>
95
+ </div>
96
+
97
+ <!-- DefaultValueOverLimit -->
98
+ <div class="usa-character-count usx-character-count">
99
+ <div class="usa-form-group usx-form-group">
100
+ <label class="usa-label usx-label" for="cc-10">Pre-filled, already over the limit</label>
101
+ <input
102
+ class="usa-input usx-input usa-character-count__field"
103
+ id="cc-10"
104
+ maxlength="25"
105
+ aria-describedby="cc-10-info"
106
+ value="This default value is already way too long for the limit."
107
+ />
108
+ </div>
109
+ <span id="cc-10-info" class="usa-character-count__message">You can enter up to 25 characters</span>
110
+ </div>