@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,86 @@
1
+ {
2
+ "name": "icon-list",
3
+ "template": "icon-list/icon-list.django.html",
4
+ "version": 1,
5
+ "default": {
6
+ "items": [
7
+ {
8
+ "iconName": "check_circle",
9
+ "iconColor": "green",
10
+ "content": "Wash your hands for 20 seconds with soap"
11
+ },
12
+ {
13
+ "iconName": "check_circle",
14
+ "iconColor": "green",
15
+ "content": "Stay six feet away from others"
16
+ },
17
+ {
18
+ "iconName": "cancel",
19
+ "iconColor": "red",
20
+ "content": "Avoid large gatherings"
21
+ }
22
+ ]
23
+ },
24
+ "props": {
25
+ "items": {
26
+ "type": "array",
27
+ "description": "Array of icon list items.",
28
+ "items": {
29
+ "type": "object",
30
+ "description": "Icon list item.",
31
+ "properties": {
32
+ "iconName": {
33
+ "type": "string",
34
+ "description": "Name of the icon to display, from the USWDS sprite (passed as the icon's name prop)."
35
+ },
36
+ "iconColor": {
37
+ "type": "string",
38
+ "description": "Color of the icon (passed as the icon's color prop)."
39
+ },
40
+ "iconSize": {
41
+ "type": "number",
42
+ "description": "Size of the icon (passed as the icon's size prop)."
43
+ },
44
+ "iconClassName": {
45
+ "type": "string",
46
+ "description": "Additional classes for the icon."
47
+ },
48
+ "title": {
49
+ "type": "string",
50
+ "description": "Optional heading text for the item."
51
+ },
52
+ "content": {
53
+ "type": ["string", "slot"],
54
+ "description": "Item text or rich content."
55
+ },
56
+ "itemClassName": {
57
+ "type": "string",
58
+ "description": "Additional classes for the list item element."
59
+ },
60
+ "contentClassName": {
61
+ "type": "string",
62
+ "description": "Additional classes for the item's content container."
63
+ }
64
+ }
65
+ }
66
+ },
67
+ "primary": {
68
+ "type": "boolean",
69
+ "default": false,
70
+ "description": "Adds the usa-icon-list--primary modifier."
71
+ },
72
+ "size": {
73
+ "type": "select",
74
+ "options": [
75
+ null,
76
+ "lg"
77
+ ],
78
+ "default": null,
79
+ "description": "Optional list size modifier. Use lg for usa-icon-list--size-lg."
80
+ },
81
+ "className": {
82
+ "type": "string",
83
+ "description": "Additional classes"
84
+ }
85
+ }
86
+ }
@@ -0,0 +1,17 @@
1
+ {% load components %}
2
+
3
+ <ul class="usa-icon-list usx-icon-list{% if primary %} usa-icon-list--primary{% endif %}{% if size == 'lg' %} usa-icon-list--size-lg{% endif %}{% if className %} {{ className }}{% endif %}">
4
+ {% for item in items %}
5
+ <li class="usa-icon-list__item{% if item.itemClassName %} {{ item.itemClassName }}{% endif %}">
6
+ <div class="usa-icon-list__icon{% if item.iconColor %} text-{{ item.iconColor }}{% endif %}{% if item.iconClassName %} {{ item.iconClassName }}{% endif %}">
7
+ {% icon name=item.iconName color=item.iconColor size=item.iconSize className=item.iconClassName %}{% endicon %}
8
+ </div>
9
+ <div class="usa-icon-list__content{% if item.contentClassName %} {{ item.contentClassName }}{% endif %}">
10
+ {% if item.title %}
11
+ <h4 class="usa-icon-list__title">{{ item.title }}</h4>
12
+ {% endif %}
13
+ {{ item.content|safe }}
14
+ </div>
15
+ </li>
16
+ {% endfor %}
17
+ </ul>
@@ -0,0 +1,227 @@
1
+ <div class="grid-row grid-gap">
2
+ <div class="tablet:grid-col">
3
+ <h3 class="site-preview-heading border-top-1px border-base-light padding-top-1 margin-top-0">Default</h3>
4
+ <ul class="usa-icon-list usx-icon-list">
5
+ <li class="usa-icon-list__item">
6
+ <div class="usa-icon-list__icon text-green">
7
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
8
+ <use href="./img/sprite.svg#check_circle"></use>
9
+ </svg>
10
+ </div>
11
+ <div class="usa-icon-list__content">
12
+ Wash your hands for 20 seconds with soap
13
+ </div>
14
+ </li>
15
+ <li class="usa-icon-list__item">
16
+ <div class="usa-icon-list__icon text-green">
17
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
18
+ <use href="./img/sprite.svg#check_circle"></use>
19
+ </svg>
20
+ </div>
21
+ <div class="usa-icon-list__content">Stay six feet away from others</div>
22
+ </li>
23
+ <li class="usa-icon-list__item">
24
+ <div class="usa-icon-list__icon text-red">
25
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
26
+ <use href="./img/sprite.svg#cancel"></use>
27
+ </svg>
28
+ </div>
29
+ <div class="usa-icon-list__content">Avoid large gatherings</div>
30
+ </li>
31
+ </ul>
32
+ </div>
33
+ <div class="tablet:grid-col">
34
+ <h3 class="site-preview-heading border-top-1px border-base-light padding-top-1 tablet:margin-top-0">Simple content
35
+ </h3>
36
+ <p class="margin-bottom-2">Benefits of joining Global Entry program:</p>
37
+ <ul class="usa-icon-list usa-icon-list--primary">
38
+ <li class="usa-icon-list__item">
39
+ <div class="usa-icon-list__icon">
40
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
41
+ <use href="./img/sprite.svg#thumb_up_alt"></use>
42
+ </svg>
43
+ </div>
44
+ <div class="usa-icon-list__content">No processing lines</div>
45
+ </li>
46
+ <li class="usa-icon-list__item">
47
+ <div class="usa-icon-list__icon">
48
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
49
+ <use href="./img/sprite.svg#thumb_up_alt"></use>
50
+ </svg>
51
+ </div>
52
+ <div class="usa-icon-list__content">
53
+ Access to expedited entry benefits in other countries
54
+ </div>
55
+ </li>
56
+ <li class="usa-icon-list__item">
57
+ <div class="usa-icon-list__icon">
58
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
59
+ <use href="./img/sprite.svg#thumb_up_alt"></use>
60
+ </svg>
61
+ </div>
62
+ <div class="usa-icon-list__content">Available at major U.S. airports</div>
63
+ </li>
64
+ <li class="usa-icon-list__item">
65
+ <div class="usa-icon-list__icon">
66
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
67
+ <use href="./img/sprite.svg#thumb_up_alt"></use>
68
+ </svg>
69
+ </div>
70
+ <div class="usa-icon-list__content">Reduced wait times</div>
71
+ </li>
72
+ </ul>
73
+ </div>
74
+ </div>
75
+ <div class="grid-row grid-gap">
76
+ <div class="tablet:grid-col">
77
+ <h3 class="site-preview-heading border-top-1px border-base-light padding-top-1">Rich content</h3>
78
+ <ul class="usa-icon-list">
79
+ <li class="usa-icon-list__item">
80
+ <div class="usa-icon-list__icon">
81
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
82
+ <use href="./img/sprite.svg#check_circle"></use>
83
+ </svg>
84
+ </div>
85
+ <div class="usa-icon-list__content">
86
+ <h4 class="usa-icon-list__title">Donate cash when possible.</h4>
87
+ <p>
88
+ Financial contributions to recognized disaster relief organizations are
89
+ the fastest, most flexible and most effective method of donating.
90
+ Organizations on the ground know what items and quantities are needed,
91
+ often buy in bulk with discounts and, if possible, purchase through
92
+ businesses local to the disaster, which supports economic recovery.
93
+ </p>
94
+ </div>
95
+ </li>
96
+ <li class="usa-icon-list__item">
97
+ <div class="usa-icon-list__icon">
98
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
99
+ <use href="./img/sprite.svg#check_circle"></use>
100
+ </svg>
101
+ </div>
102
+ <div class="usa-icon-list__content">
103
+ <h4 class="usa-icon-list__title">Confirm what donations are needed.</h4>
104
+ <p>
105
+ Unneeded and unsolicited goods burden local organizations’ ability to
106
+ meet survivors’ confirmed needs, drawing away valuable volunteer labor,
107
+ transportation and warehouse space.
108
+ </p>
109
+ </div>
110
+ </li>
111
+ <li class="usa-icon-list__item">
112
+ <div class="usa-icon-list__icon">
113
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
114
+ <use href="./img/sprite.svg#check_circle"></use>
115
+ </svg>
116
+ </div>
117
+ <div class="usa-icon-list__content">
118
+ <h4 class="usa-icon-list__title">
119
+ Talk to trusted organizations about volunteering.
120
+ </h4>
121
+ <p>
122
+ Financial contributions to recognized disaster relief organizations are
123
+ the fastest, most flexible and most effective method of donating.
124
+ Organizations on the ground know what items and quantities are needed,
125
+ often buy in bulk with discounts and, if possible, purchase through
126
+ businesses local to the disaster, which supports economic recovery.
127
+ </p>
128
+ </div>
129
+ </li>
130
+ </ul>
131
+ </div>
132
+ <div class="tablet:grid-col">
133
+ <h3 class="site-preview-heading border-top-1px border-base-light padding-top-1">Custom size with rich content</h3>
134
+ <p class="margin-bottom-2">Here are a few easy ways you can help reduce energy use and costs while spending more
135
+ time at home.</p>
136
+ <ul class="usa-icon-list usa-icon-list--size-lg">
137
+ <li class="usa-icon-list__item">
138
+ <div class="usa-icon-list__icon text-green">
139
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
140
+ <use href="./img/sprite.svg#attach_money"></use>
141
+ </svg>
142
+ </div>
143
+ <div class="usa-icon-list__content">
144
+ <h4 class="usa-icon-list__title">Let the sun shine.</h4>
145
+ <p>
146
+ On sunny days, open your curtains to allow the sun to naturally warm the
147
+ rooms of your home without using electricity. Natural sunlight can also
148
+ lift your mood to help brighten your day. On warm days, close your
149
+ curtains to help keep your house cool.
150
+ </p>
151
+ </div>
152
+ </li>
153
+ <li class="usa-icon-list__item">
154
+ <div class="usa-icon-list__icon text-green">
155
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
156
+ <use href="./img/sprite.svg#attach_money"></use>
157
+ </svg>
158
+ </div>
159
+ <div class="usa-icon-list__content">
160
+ <h4 class="usa-icon-list__title">Adjust your schedule.</h4>
161
+ <p>
162
+ Instead of running high-energy-use appliances such as dishwashers and
163
+ clothes dryers during mid-afternoon or early evening hours, operate them
164
+ early in the morning or late at night. Some utilities charge less at
165
+ off-peak times, which will help reduce your costs.
166
+ </p>
167
+ </div>
168
+ </li>
169
+ <li class="usa-icon-list__item">
170
+ <div class="usa-icon-list__icon text-green">
171
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
172
+ <use href="./img/sprite.svg#attach_money"></use>
173
+ </svg>
174
+ </div>
175
+ <div class="usa-icon-list__content">
176
+ <h4 class="usa-icon-list__title">Fill it up.</h4>
177
+ <p>
178
+ Wash full loads, whether it’s clothes or dishes. Washing multiple small
179
+ loads means you’re using and heating more water, which can increase your
180
+ expenses. Using cold water for clothes washing can also help lower your
181
+ costs.
182
+ </p>
183
+ </div>
184
+ </li>
185
+ </ul>
186
+ </div>
187
+ </div>
188
+ <div class="grid-row grid-gap">
189
+ <div class="tablet:grid-col">
190
+ <h3 class="site-preview-heading border-top-1px border-base-light padding-top-1">Custom size</h3>
191
+ <ul class="usa-icon-list usa-icon-list--size-lg">
192
+ <li class="usa-icon-list__item">
193
+ <div class="usa-icon-list__icon text-blue">
194
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
195
+ <use href="./img/sprite.svg#help"></use>
196
+ </svg>
197
+ </div>
198
+ <div class="usa-icon-list__content">
199
+ <span class="text-bold">Timing.</span> Is now the right time to start a
200
+ business?
201
+ </div>
202
+ </li>
203
+ <li class="usa-icon-list__item">
204
+ <div class="usa-icon-list__icon text-blue">
205
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
206
+ <use href="./img/sprite.svg#help"></use>
207
+ </svg>
208
+ </div>
209
+ <div class="usa-icon-list__content">
210
+ <span class="text-bold">Funding.</span> Do I have enough money to launch a
211
+ business?
212
+ </div>
213
+ </li>
214
+ <li class="usa-icon-list__item">
215
+ <div class="usa-icon-list__icon text-blue">
216
+ <svg class="usa-icon usx-icon" aria-hidden="true" role="img">
217
+ <use href="./img/sprite.svg#help"></use>
218
+ </svg>
219
+ </div>
220
+ <div class="usa-icon-list__content">
221
+ <span class="text-bold">Need.</span> Will this business fill a real need
222
+ for my customers?
223
+ </div>
224
+ </li>
225
+ </ul>
226
+ </div>
227
+ </div>
@@ -0,0 +1,193 @@
1
+ import React from 'react';
2
+ import classNames from 'classnames';
3
+
4
+ const shapeClassMap = {
5
+ circle: 'usx-circle',
6
+ 'rounded-sm': 'usx-rounded-sm',
7
+ 'rounded-md': 'usx-rounded-md',
8
+ 'rounded-lg': 'usx-rounded-lg',
9
+ 'rounded-xl': 'usx-rounded-xl',
10
+ };
11
+
12
+ interface Agency {
13
+ name: string;
14
+ href?: string;
15
+ }
16
+
17
+ interface Logo {
18
+ href?: string;
19
+ src: string;
20
+ alt: string;
21
+ shape?: null | 'circle' | 'rounded-sm' | 'rounded-md' | 'rounded-lg' | 'rounded-xl';
22
+ imageClassName?: string;
23
+ }
24
+
25
+ interface RequiredLink {
26
+ href?: string;
27
+ label?: string;
28
+ }
29
+
30
+ type RequiredLinks = (string | RequiredLink)[];
31
+
32
+ export interface IdentifierProps {
33
+ domain?: string;
34
+ language?: 'en' | 'es';
35
+ parentAgencies?: Agency[];
36
+ logoProps?: Logo[];
37
+ logoShape?: null | 'circle' | 'rounded-sm' | 'rounded-md' | 'rounded-lg' | 'rounded-xl';
38
+ requiredLinks?: RequiredLinks;
39
+ taxpayerDisclaimer?: boolean;
40
+ overlapAvatars?: boolean;
41
+ className?: string;
42
+ }
43
+
44
+ const defaultRequiredLinks: Record<'en' | 'es', string[]> = {
45
+ en: [
46
+ 'About <Parent shortname>',
47
+ 'Accessibility statement',
48
+ 'FOIA requests',
49
+ 'No FEAR Act data',
50
+ 'Office of the Inspector General',
51
+ 'Performance reports',
52
+ 'Privacy policy',
53
+ ],
54
+ es: [
55
+ 'Acerca de <Parent shortname>',
56
+ 'Declaracion de accesibilidad',
57
+ 'Solicitud a traves de FOIA',
58
+ 'Datos de la ley No FEAR',
59
+ 'Oficina del Inspector General',
60
+ 'Informes de desempeno',
61
+ 'Politica de privacidad',
62
+ ],
63
+ };
64
+
65
+ const defaultUsaGov = {
66
+ en: {
67
+ text: 'Looking for U.S. government information and services?',
68
+ href: 'https://www.usa.gov/',
69
+ label: 'Visit USA.gov',
70
+ },
71
+ es: {
72
+ text: 'Necesita informacion y servicios del Gobierno?',
73
+ href: 'https://www.usa.gov/es/',
74
+ label: 'Visite USAGov en Espanol',
75
+ },
76
+ };
77
+
78
+ function renderDisclaimer({ language, parentAgencies, taxpayerDisclaimer }: { language: 'en' | 'es'; parentAgencies?: Agency[]; taxpayerDisclaimer?: boolean }) {
79
+ if (!parentAgencies || parentAgencies.length === 0) {
80
+ return null;
81
+ }
82
+ if (language === 'es') {
83
+ return (
84
+ <>
85
+ Un sitio web oficial de{' '}
86
+ {parentAgencies.map((agency, index) => (
87
+ <React.Fragment key={`${agency.name}-${index}`}>
88
+ {index > 0 ? ' y ' : ''}
89
+ <a href={agency.href || ''}>{agency.name}</a>
90
+ </React.Fragment>
91
+ ))}
92
+ {taxpayerDisclaimer ? ' . Producido y publicado con dinero de los contribuyentes de impuestos.' : ''}
93
+ </>
94
+ );
95
+ }
96
+ return (
97
+ <>
98
+ <span aria-hidden="true">An </span>official website of the{' '}
99
+ {parentAgencies.map((agency, index) => (
100
+ <React.Fragment key={`${agency.name}-${index}`}>
101
+ {index > 0 ? (index === parentAgencies.length - 1 ? ' and the ' : ', the ') : ''}
102
+ <a href={agency.href || ''}>{agency.name}</a>
103
+ </React.Fragment>
104
+ ))}
105
+ {taxpayerDisclaimer ? '. Produced and published at taxpayer expense.' : ''}
106
+ </>
107
+ );
108
+ }
109
+
110
+ export default function Identifier({
111
+ domain = 'domain.gov',
112
+ language = 'en',
113
+ parentAgencies = [],
114
+ logoProps = [],
115
+ logoShape = null,
116
+ requiredLinks,
117
+ taxpayerDisclaimer = false,
118
+ overlapAvatars = false,
119
+ className = '',
120
+ }: IdentifierProps) {
121
+ const classes = classNames('usa-identifier', 'usx-identifier', className);
122
+ const labels = {
123
+ masthead: language === 'es' ? 'Identificador de la agencia,' : 'Agency identifier,',
124
+ description: language === 'es' ? 'Descripcion de la agencia,' : 'Agency description,',
125
+ required: language === 'es' ? 'Enlaces importantes,' : 'Important links,',
126
+ usagov: language === 'es'
127
+ ? 'Informacion y servicios del Gobierno de EE. UU.,'
128
+ : 'U.S. government information and services,',
129
+ };
130
+ const links = requiredLinks || defaultRequiredLinks[language] || defaultRequiredLinks.en;
131
+ const usaGov = defaultUsaGov[language] || defaultUsaGov.en;
132
+ return (
133
+ <div className={classes}>
134
+ <section className="usa-identifier__section usa-identifier__section--masthead" aria-label={labels.masthead}>
135
+ <div className="usa-identifier__container">
136
+ {logoProps.length > 0 ? (
137
+ <div
138
+ className={classNames(
139
+ 'usa-identifier__logos',
140
+ 'usx-avatar-group',
141
+ overlapAvatars && 'usa-avatar-group--overlap',
142
+ )}
143
+ >
144
+ {logoProps.map((logo, index) => (
145
+ <a href={logo.href || ''} className="usa-identifier__logo usx-avatar" key={`${logo.alt}-${index}`}>
146
+ <img
147
+ className={classNames(
148
+ 'usa-identifier__logo-img',
149
+ shapeClassMap[logo.shape || logoShape || ''] || null,
150
+ logo.imageClassName,
151
+ )}
152
+ src={logo.src}
153
+ alt={logo.alt}
154
+ role="img"
155
+ />
156
+ </a>
157
+ ))}
158
+ </div>
159
+ ) : null}
160
+ <section className="usa-identifier__identity" aria-label={labels.description}>
161
+ <p className="usa-identifier__identity-domain">{domain}</p>
162
+ <p className="usa-identifier__identity-disclaimer">
163
+ {renderDisclaimer({ language, parentAgencies, taxpayerDisclaimer })}
164
+ </p>
165
+ </section>
166
+ </div>
167
+ </section>
168
+ <nav className="usa-identifier__section usa-identifier__section--required-links" aria-label={labels.required}>
169
+ <div className="usa-identifier__container">
170
+ <ul className="usa-identifier__required-links-list">
171
+ {links.map((link, index) => (
172
+ <li className="usa-identifier__required-links-item" key={typeof link === 'string' ? `${link}-${index}` : `${link.label || link}-${index}`}>
173
+ {typeof link === 'string' ? (
174
+ <span className="usa-identifier__required-link usa-link">{link}</span>
175
+ ) : (
176
+ <a href={link.href || ''} className="usa-identifier__required-link usa-link">
177
+ {link.label || link.href}
178
+ </a>
179
+ )}
180
+ </li>
181
+ ))}
182
+ </ul>
183
+ </div>
184
+ </nav>
185
+ <section className="usa-identifier__section usa-identifier__section--usagov" aria-label={labels.usagov}>
186
+ <div className="usa-identifier__container">
187
+ <div className="usa-identifier__usagov-description">{usaGov.text}</div>{' '}
188
+ <a href={usaGov.href} className="usa-link">{usaGov.label}</a>
189
+ </div>
190
+ </section>
191
+ </div>
192
+ );
193
+ }
@@ -0,0 +1,133 @@
1
+ {
2
+ "name": "identifier",
3
+ "template": "identifier/identifier.django.html",
4
+ "version": 1,
5
+ "default": {
6
+ "domain": "domain.gov",
7
+ "language": "en",
8
+ "parentAgencies": [
9
+ {
10
+ "name": "<Parent agency>",
11
+ "href": ""
12
+ }
13
+ ],
14
+ "logoProps": [
15
+ {
16
+ "href": "",
17
+ "src": "./lady_liberty.png",
18
+ "alt": "Statue of Liberty"
19
+ }
20
+ ],
21
+ "requiredLinks": [
22
+ {
23
+ "href": "",
24
+ "label": "About <Parent shortname>"
25
+ },
26
+ {
27
+ "href": "",
28
+ "label": "Accessibility statement"
29
+ },
30
+ {
31
+ "href": "",
32
+ "label": "FOIA requests"
33
+ },
34
+ {
35
+ "href": "",
36
+ "label": "No FEAR Act data"
37
+ },
38
+ {
39
+ "href": "",
40
+ "label": "Office of the Inspector General"
41
+ },
42
+ {
43
+ "href": "",
44
+ "label": "Performance reports"
45
+ },
46
+ {
47
+ "href": "",
48
+ "label": "Privacy policy"
49
+ }
50
+ ],
51
+ "taxpayerDisclaimer": false,
52
+ "overlapAvatars": false
53
+ },
54
+ "props": {
55
+ "domain": {
56
+ "type": "string",
57
+ "description": "Agency domain displayed in the identifier."
58
+ },
59
+ "language": {
60
+ "type": "select",
61
+ "options": [
62
+ "en",
63
+ "es"
64
+ ],
65
+ "description": "Language for labels and helper text."
66
+ },
67
+ "parentAgencies": {
68
+ "type": "array",
69
+ "description": "Array of parent agency links used in the disclaimer.",
70
+ "items": {
71
+ "type": "object",
72
+ "description": "Parent agency.",
73
+ "properties": {
74
+ "name": { "type": "string", "description": "Agency name." },
75
+ "href": { "type": "string", "description": "Link to the agency's site." }
76
+ }
77
+ }
78
+ },
79
+ "logoProps": {
80
+ "type": "array",
81
+ "description": "Array of avatar-style logos.",
82
+ "items": {
83
+ "type": "object",
84
+ "description": "Logo item. Mirrors the avatar component's props, restricted to the image variant.",
85
+ "component": "avatar",
86
+ "omit": ["variant", "value", "tooltip", "className", "contentClassName"],
87
+ "properties": {
88
+ "shape": {
89
+ "type": "select",
90
+ "options": [null, "circle", "rounded-sm", "rounded-md", "rounded-lg", "rounded-xl"],
91
+ "description": "Shape utility for the logo image, overriding logoShape for this item."
92
+ }
93
+ }
94
+ }
95
+ },
96
+ "requiredLinks": {
97
+ "type": "array",
98
+ "description": "Array of required footer links.",
99
+ "items": {
100
+ "type": ["string", "object"],
101
+ "description": "A link label string (uses the default href for that label), or a { href, label } object.",
102
+ "properties": {
103
+ "href": { "type": "string", "description": "Link URL." },
104
+ "label": { "type": "string", "description": "Link text." }
105
+ }
106
+ }
107
+ },
108
+ "taxpayerDisclaimer": {
109
+ "type": "boolean",
110
+ "description": "Appends the taxpayer disclaimer sentence to the identity disclaimer."
111
+ },
112
+ "overlapAvatars": {
113
+ "type": "boolean",
114
+ "description": "Apply overlap styling to avatar logos."
115
+ },
116
+ "logoShape": {
117
+ "type": "select",
118
+ "options": [
119
+ null,
120
+ "circle",
121
+ "rounded-sm",
122
+ "rounded-md",
123
+ "rounded-lg",
124
+ "rounded-xl"
125
+ ],
126
+ "description": "Default shape applied to all logos. Per-logo shape field takes precedence."
127
+ },
128
+ "className": {
129
+ "type": "string",
130
+ "description": "Additional classes"
131
+ }
132
+ }
133
+ }