@solexllc/usx-react 0.11.0 → 1.0.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 (240) hide show
  1. package/README.md +31 -0
  2. package/dist/Popover-Bg4-2-cU.cjs +987 -0
  3. package/dist/Popover-CqHczzNE.js +988 -0
  4. package/dist/chat.cjs +1396 -0
  5. package/dist/chat.js +1396 -0
  6. package/dist/index.cjs +4412 -5247
  7. package/dist/index.js +140 -972
  8. package/package.json +9 -5
  9. package/src/chat.js +15 -0
  10. package/src/components/accordion/Accordion.tsx +9 -57
  11. package/src/components/accordion/accordion.django.html +10 -20
  12. package/src/components/accordion/config.json +8 -2
  13. package/src/components/accordion-item/AccordionItem.tsx +54 -0
  14. package/src/components/accordion-item/accordion-item.django.html +19 -0
  15. package/src/components/accordion-item/accordion-item.html +8 -0
  16. package/src/components/accordion-item/config.json +55 -0
  17. package/src/components/alert/alert.django-snapshot.html +4 -4
  18. package/src/components/avatar/Avatar.tsx +54 -16
  19. package/src/components/avatar/avatar.django-snapshot.html +118 -2
  20. package/src/components/avatar/avatar.django.html +2 -2
  21. package/src/components/avatar/avatar.html +25 -0
  22. package/src/components/avatar/avatar.react-snapshot.html +110 -3
  23. package/src/components/avatar/config.json +17 -17
  24. package/src/components/avatar-group/AvatarGroup.tsx +17 -15
  25. package/src/components/avatar-group/avatar-group.django-snapshot.html +196 -174
  26. package/src/components/avatar-group/avatar-group.django.html +1 -1
  27. package/src/components/avatar-group/avatar-group.react-snapshot.html +216 -165
  28. package/src/components/avatar-group/config.json +14 -8
  29. package/src/components/back-to-top/BackToTop.tsx +21 -57
  30. package/src/components/back-to-top/back-to-top.django-snapshot.html +101 -202
  31. package/src/components/back-to-top/back-to-top.django.html +11 -38
  32. package/src/components/back-to-top/back-to-top.html +22 -106
  33. package/src/components/back-to-top/back-to-top.react-snapshot.html +94 -148
  34. package/src/components/back-to-top/config.json +41 -10
  35. package/src/components/banner/banner.django-snapshot.html +2 -2
  36. package/src/components/button/Button.tsx +15 -3
  37. package/src/components/button/button.django-snapshot.html +82 -0
  38. package/src/components/button/button.django.html +5 -2
  39. package/src/components/button/button.react-snapshot.html +80 -0
  40. package/src/components/button/config.json +17 -3
  41. package/src/components/callout/callout.django.html +1 -1
  42. package/src/components/callout/config.json +7 -16
  43. package/src/components/card/card.django-snapshot.html +43 -0
  44. package/src/components/card/card.react-snapshot.html +36 -0
  45. package/src/components/character-count/CharacterCount.tsx +2 -0
  46. package/src/components/character-count/character-count.react-snapshot.html +7 -0
  47. package/src/components/chat/Chat.tsx +575 -0
  48. package/src/components/chat/README.md +174 -0
  49. package/src/components/chat/avatarProps.ts +32 -0
  50. package/src/components/chat/chat.django-snapshot.html +23579 -0
  51. package/src/components/chat/chat.django.html +75 -0
  52. package/src/components/chat/chat.html +116 -0
  53. package/src/components/chat/chat.react-snapshot.html +16895 -0
  54. package/src/components/chat/config.json +1241 -0
  55. package/src/components/chat-attachment/ChatAttachment.tsx +39 -0
  56. package/src/components/chat-attachment/chat-attachment.django.html +24 -0
  57. package/src/components/chat-attachment/chat-attachment.html +10 -0
  58. package/src/components/chat-attachment/config.json +27 -0
  59. package/src/components/chat-attachments/ChatAttachments.tsx +17 -0
  60. package/src/components/chat-attachments/chat-attachments.django-snapshot.html +58 -0
  61. package/src/components/chat-attachments/chat-attachments.django.html +10 -0
  62. package/src/components/chat-attachments/chat-attachments.html +14 -0
  63. package/src/components/chat-attachments/chat-attachments.react-snapshot.html +46 -0
  64. package/src/components/chat-attachments/config.json +25 -0
  65. package/src/components/chat-bubble/ChatBubble.tsx +39 -0
  66. package/src/components/chat-bubble/ChatFormattedText.tsx +138 -0
  67. package/src/components/chat-bubble/chat-bubble.django-snapshot.html +128 -0
  68. package/src/components/chat-bubble/chat-bubble.django.html +19 -0
  69. package/src/components/chat-bubble/chat-bubble.html +1 -0
  70. package/src/components/chat-bubble/chat-bubble.react-snapshot.html +118 -0
  71. package/src/components/chat-bubble/config.json +70 -0
  72. package/src/components/chat-composer/ChatComposer.tsx +213 -0
  73. package/src/components/chat-composer/README.md +15 -0
  74. package/src/components/chat-composer/chat-composer.django-snapshot.html +575 -0
  75. package/src/components/chat-composer/chat-composer.django.html +77 -0
  76. package/src/components/chat-composer/chat-composer.html +44 -0
  77. package/src/components/chat-composer/chat-composer.react-snapshot.html +519 -0
  78. package/src/components/chat-composer/chat-formatting.django.html +59 -0
  79. package/src/components/chat-composer/config.json +137 -0
  80. package/src/components/chat-context/ChatContext.tsx +46 -0
  81. package/src/components/chat-context/chat-context.django-snapshot.html +35 -0
  82. package/src/components/chat-context/chat-context.django.html +20 -0
  83. package/src/components/chat-context/chat-context.html +9 -0
  84. package/src/components/chat-context/chat-context.react-snapshot.html +30 -0
  85. package/src/components/chat-context/config.json +36 -0
  86. package/src/components/chat-controls/ChatControls.tsx +67 -0
  87. package/src/components/chat-controls/chat-controls.django-snapshot.html +114 -0
  88. package/src/components/chat-controls/chat-controls.django.html +36 -0
  89. package/src/components/chat-controls/chat-controls.html +11 -0
  90. package/src/components/chat-controls/chat-controls.react-snapshot.html +107 -0
  91. package/src/components/chat-controls/config.json +67 -0
  92. package/src/components/chat-directory/ChatDirectory.tsx +168 -0
  93. package/src/components/chat-directory/chat-directory.django-snapshot.html +546 -0
  94. package/src/components/chat-directory/chat-directory.django.html +14 -0
  95. package/src/components/chat-directory/chat-directory.html +4 -0
  96. package/src/components/chat-directory/chat-directory.react-snapshot.html +471 -0
  97. package/src/components/chat-directory/config.json +242 -0
  98. package/src/components/chat-directory-item/ChatDirectoryItem.tsx +150 -0
  99. package/src/components/chat-directory-item/chat-directory-item.django-snapshot.html +281 -0
  100. package/src/components/chat-directory-item/chat-directory-item.django.html +38 -0
  101. package/src/components/chat-directory-item/chat-directory-item.html +9 -0
  102. package/src/components/chat-directory-item/chat-directory-item.react-snapshot.html +249 -0
  103. package/src/components/chat-directory-item/config.json +103 -0
  104. package/src/components/chat-history/ChatHistory.tsx +30 -0
  105. package/src/components/chat-history/chat-history.django-snapshot.html +113 -0
  106. package/src/components/chat-history/chat-history.django.html +20 -0
  107. package/src/components/chat-history/chat-history.html +9 -0
  108. package/src/components/chat-history/chat-history.react-snapshot.html +111 -0
  109. package/src/components/chat-history/config.json +24 -0
  110. package/src/components/chat-message/ChatMessage.tsx +148 -0
  111. package/src/components/chat-message/chat-message.django-snapshot.html +758 -0
  112. package/src/components/chat-message/chat-message.django.html +56 -0
  113. package/src/components/chat-message/chat-message.html +12 -0
  114. package/src/components/chat-message/chat-message.react-snapshot.html +627 -0
  115. package/src/components/chat-message/config.json +278 -0
  116. package/src/components/chat-message-actions/ChatMessageActions.tsx +133 -0
  117. package/src/components/chat-message-actions/chat-message-actions.django-snapshot.html +345 -0
  118. package/src/components/chat-message-actions/chat-message-actions.django.html +29 -0
  119. package/src/components/chat-message-actions/chat-message-actions.html +53 -0
  120. package/src/components/chat-message-actions/chat-message-actions.react-snapshot.html +295 -0
  121. package/src/components/chat-message-actions/config.json +121 -0
  122. package/src/components/chat-window/ChatWindow.tsx +135 -0
  123. package/src/components/chat-window/chat-window.django-snapshot.html +450 -0
  124. package/src/components/chat-window/chat-window.django.html +39 -0
  125. package/src/components/chat-window/chat-window.html +26 -0
  126. package/src/components/chat-window/chat-window.react-snapshot.html +286 -0
  127. package/src/components/chat-window/config.json +123 -0
  128. package/src/components/checkbox/checkbox.django-snapshot.html +2 -2
  129. package/src/components/clickable/Clickable.tsx +19 -5
  130. package/src/components/clickable/clickable.django-snapshot.html +11 -2
  131. package/src/components/clickable/clickable.django.html +2 -0
  132. package/src/components/clickable/clickable.react-snapshot.html +10 -2
  133. package/src/components/clickable/config.json +4 -0
  134. package/src/components/code/code.django-snapshot.html +25 -18
  135. package/src/components/code/code.react-snapshot.html +41 -4
  136. package/src/components/copy-to-clipboard/CopyToClipboard.tsx +2 -7
  137. package/src/components/copy-to-clipboard/copy-to-clipboard.django-snapshot.html +6 -4
  138. package/src/components/copy-to-clipboard/copy-to-clipboard.django.html +3 -2
  139. package/src/components/copy-to-clipboard/copy-to-clipboard.react-snapshot.html +14 -2
  140. package/src/components/data-table/data-table.django-snapshot.html +4 -5
  141. package/src/components/data-table/data-table.react-snapshot.html +4 -4
  142. package/src/components/drawer/drawer.django-snapshot.html +53 -30
  143. package/src/components/error-page/error-page.django-snapshot.html +20 -7
  144. package/src/components/fieldset/fieldset.django-snapshot.html +1 -6
  145. package/src/components/file-list/FileList.tsx +3 -2
  146. package/src/components/file-list/config.json +5 -0
  147. package/src/components/file-list/file-list.django-snapshot.html +63 -0
  148. package/src/components/file-list/file-list.django.html +1 -1
  149. package/src/components/file-list/file-list.react-snapshot.html +53 -0
  150. package/src/components/footer/footer.django-snapshot.html +0 -3
  151. package/src/components/form-group/form-group.django-snapshot.html +0 -2
  152. package/src/components/header/header.django-snapshot.html +3 -163
  153. package/src/components/header/header.django.html +2 -2
  154. package/src/components/header/header.html +1 -1
  155. package/src/components/header/header.react-snapshot.html +3 -3
  156. package/src/components/hero/hero.django-snapshot.html +0 -20
  157. package/src/components/hero/hero.django.html +3 -3
  158. package/src/components/identifier/config.json +4 -2
  159. package/src/components/identifier/identifier.django-snapshot.html +13 -16
  160. package/src/components/identifier/identifier.react-snapshot.html +13 -15
  161. package/src/components/image/image.django-snapshot.html +6 -6
  162. package/src/components/image/image.django.html +4 -4
  163. package/src/components/input/Input.tsx +1 -1
  164. package/src/components/input/config.json +2 -3
  165. package/src/components/input/input.django-snapshot.html +4 -21
  166. package/src/components/input/input.django.html +2 -2
  167. package/src/components/layout/layout.django-snapshot.html +2 -0
  168. package/src/components/link/Link.tsx +7 -4
  169. package/src/components/link/config.json +2 -3
  170. package/src/components/link/link.django-snapshot.html +8 -0
  171. package/src/components/link/link.django.html +2 -2
  172. package/src/components/link/link.html +4 -1
  173. package/src/components/link/link.react-snapshot.html +8 -0
  174. package/src/components/memorable-date/memorable-date.django-snapshot.html +0 -8
  175. package/src/components/memorable-date/memorable-date.django.html +2 -2
  176. package/src/components/misc-banner/misc-banner.django-snapshot.html +12 -12
  177. package/src/components/misc-banner/misc-banner.django.html +4 -2
  178. package/src/components/modal/Modal.tsx +4 -3
  179. package/src/components/modal/config.json +3 -2
  180. package/src/components/modal/modal.django-snapshot.html +70 -14
  181. package/src/components/modal/modal.django.html +7 -9
  182. package/src/components/modal/modal.html +4 -4
  183. package/src/components/modal/modal.react-snapshot.html +64 -4
  184. package/src/components/page/Page.tsx +10 -7
  185. package/src/components/page/page.django-snapshot.html +5 -8
  186. package/src/components/page/page.django.html +2 -2
  187. package/src/components/page/page.html +1 -2
  188. package/src/components/page/page.react-snapshot.html +5 -8
  189. package/src/components/pagination/navigation/PaginationNavigation.tsx +2 -0
  190. package/src/components/pagination/navigation/pagination-navigation.django.html +2 -0
  191. package/src/components/pagination/pagination.django-snapshot.html +62 -0
  192. package/src/components/pagination/pagination.django.html +3 -1
  193. package/src/components/pagination/pagination.html +46 -0
  194. package/src/components/pagination/pagination.react-snapshot.html +48 -0
  195. package/src/components/pagination/summary/PaginationSummary.tsx +1 -1
  196. package/src/components/pagination/summary/pagination-summary.django.html +1 -1
  197. package/src/components/popover/Popover.tsx +61 -9
  198. package/src/components/popover/PopoverMenu.tsx +33 -15
  199. package/src/components/popover/config.json +88 -14
  200. package/src/components/popover/popover-menu.django.html +13 -2
  201. package/src/components/popover/popover.django-snapshot.html +265 -7
  202. package/src/components/popover/popover.django.html +3 -2
  203. package/src/components/popover/popover.react-snapshot.html +154 -4
  204. package/src/components/process-list/config.json +41 -3
  205. package/src/components/quote/Quote.tsx +9 -2
  206. package/src/components/search/Search.tsx +1 -1
  207. package/src/components/search/config.json +3 -4
  208. package/src/components/search/search.django-snapshot.html +262 -1684
  209. package/src/components/search/search.django.html +1 -20
  210. package/src/components/section/Section.tsx +3 -1
  211. package/src/components/select/select.django-snapshot.html +7 -7
  212. package/src/components/select/select.react-snapshot.html +7 -7
  213. package/src/components/site-alert/site-alert.django-snapshot.html +8 -8
  214. package/src/components/summary/Summary.tsx +4 -2
  215. package/src/components/summary/config.json +4 -0
  216. package/src/components/summary/summary.django.html +4 -4
  217. package/src/components/swap/Swap.tsx +35 -3
  218. package/src/components/swap/config.json +28 -1
  219. package/src/components/swap/swap.django-snapshot.html +29 -7
  220. package/src/components/swap/swap.django.html +15 -1
  221. package/src/components/swap/swap.react-snapshot.html +34 -4
  222. package/src/components/table/Table.tsx +58 -25
  223. package/src/components/table/config.json +61 -13
  224. package/src/components/tag/Tag.tsx +40 -7
  225. package/src/components/tag/config.json +18 -2
  226. package/src/components/tag/tag.django-snapshot.html +16 -1
  227. package/src/components/tag/tag.django.html +12 -6
  228. package/src/components/tag/tag.html +4 -0
  229. package/src/components/tag/tag.react-snapshot.html +16 -1
  230. package/src/components/tag-group/TagGroup.tsx +6 -9
  231. package/src/components/tag-group/config.json +4 -0
  232. package/src/components/tag-group/tag-group.django.html +1 -1
  233. package/src/components/theme-picker/ThemePicker.tsx +48 -42
  234. package/src/components/theme-picker/config.json +27 -29
  235. package/src/components/theme-picker/theme-picker-select.django.html +1 -1
  236. package/src/components/theme-picker/theme-picker.django-snapshot.html +283 -78
  237. package/src/components/theme-picker/theme-picker.django.html +24 -11
  238. package/src/components/theme-picker/theme-picker.html +155 -54
  239. package/src/components/theme-picker/theme-picker.react-snapshot.html +265 -67
  240. package/src/index.js +1 -0
@@ -6,14 +6,11 @@
6
6
  >
7
7
  <div class="usa-identifier__container">
8
8
  <div class="usa-identifier__logos usx-avatar-group">
9
- <a href="" class="usx-avatar usa-identifier__logo">
10
- <img
11
- class="usx-avatar__img usa-identifier__logo-img"
12
- src="./lady_liberty.png"
13
- alt="Statue of Liberty"
14
- role="img"
15
- />
16
- </a>
9
+ <span class="usx-avatar usa-identifier__logo" aria-label="Statue of Liberty">
10
+ <span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
11
+ >SL</span
12
+ >
13
+ </span>
17
14
  </div>
18
15
 
19
16
  <section class="usa-identifier__identity" aria-label="Agency description,">
@@ -88,14 +85,14 @@
88
85
  >
89
86
  <div class="usa-identifier__container">
90
87
  <div class="usa-identifier__logos usx-avatar-group">
91
- <a href="" class="usx-avatar usa-identifier__logo">
88
+ <span class="usx-avatar usa-identifier__logo">
92
89
  <img
93
90
  class="usx-avatar__img usa-identifier__logo-img"
94
91
  src="./lady_liberty.png"
95
92
  alt="Statue of Liberty"
96
93
  role="img"
97
94
  />
98
- </a>
95
+ </span>
99
96
  </div>
100
97
 
101
98
  <section class="usa-identifier__identity" aria-label="Descripcion de la agencia,">
@@ -527,14 +524,14 @@
527
524
  >
528
525
  <div class="usa-identifier__container">
529
526
  <div class="usa-identifier__logos usx-avatar-group">
530
- <a href="" class="usx-avatar usa-identifier__logo">
527
+ <span class="usx-avatar usa-identifier__logo">
531
528
  <img
532
529
  class="usx-avatar__img usa-identifier__logo-img"
533
530
  src="./lady_liberty.png"
534
531
  alt="Statue of Liberty"
535
532
  role="img"
536
533
  />
537
- </a>
534
+ </span>
538
535
  </div>
539
536
 
540
537
  <section class="usa-identifier__identity" aria-label="Agency description,">
@@ -611,14 +608,14 @@
611
608
  >
612
609
  <div class="usa-identifier__container">
613
610
  <div class="usa-identifier__logos usx-avatar-group">
614
- <a href="" class="usx-avatar usa-identifier__logo">
611
+ <span class="usx-avatar usa-identifier__logo">
615
612
  <img
616
613
  class="usx-avatar__img usa-identifier__logo-img"
617
614
  src="./lady_liberty.png"
618
615
  alt="Statue of Liberty"
619
616
  role="img"
620
617
  />
621
- </a>
618
+ </span>
622
619
  </div>
623
620
 
624
621
  <section class="usa-identifier__identity" aria-label="Descripcion de la agencia,">
@@ -855,14 +852,14 @@
855
852
  >
856
853
  <div class="usa-identifier__container">
857
854
  <div class="usa-identifier__logos usx-avatar-group">
858
- <a href="" class="usx-avatar usa-identifier__logo height-auto">
855
+ <span class="usx-avatar usa-identifier__logo height-auto">
859
856
  <img
860
857
  class="usx-avatar__img usx-rounded-lg usa-identifier__logo-img"
861
858
  src="./lady_liberty.png"
862
859
  alt="Statue of Liberty"
863
860
  role="img"
864
861
  />
865
- </a>
862
+ </span>
866
863
 
867
864
  <a href="#agency" class="usx-avatar usa-identifier__logo" aria-label="United States">
868
865
  <span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
@@ -6,13 +6,11 @@
6
6
  >
7
7
  <div class="usa-identifier__container">
8
8
  <div class="usa-identifier__logos usx-avatar-group">
9
- <a href="" class="usx-avatar usa-identifier__logo"
10
- ><img
11
- class="usx-avatar__img usa-identifier__logo-img"
12
- src="./lady_liberty.png"
13
- alt="Statue of Liberty"
14
- role="img"
15
- /></a>
9
+ <span class="usx-avatar usa-identifier__logo" aria-label="Statue of Liberty"
10
+ ><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
11
+ >SL</span
12
+ ></span
13
+ >
16
14
  </div>
17
15
  <section class="usa-identifier__identity" aria-label="Agency description,">
18
16
  <p class="usa-identifier__identity-domain">domain.gov</p>
@@ -78,13 +76,13 @@
78
76
  >
79
77
  <div class="usa-identifier__container">
80
78
  <div class="usa-identifier__logos usx-avatar-group">
81
- <a href="" class="usx-avatar usa-identifier__logo"
79
+ <span class="usx-avatar usa-identifier__logo"
82
80
  ><img
83
81
  class="usx-avatar__img usa-identifier__logo-img"
84
82
  src="./lady_liberty.png"
85
83
  alt="Statue of Liberty"
86
84
  role="img"
87
- /></a>
85
+ /></span>
88
86
  </div>
89
87
  <section class="usa-identifier__identity" aria-label="Descripcion de la agencia,">
90
88
  <p class="usa-identifier__identity-domain">domain.gov</p>
@@ -606,13 +604,13 @@
606
604
  >
607
605
  <div class="usa-identifier__container">
608
606
  <div class="usa-identifier__logos usx-avatar-group">
609
- <a href="" class="usx-avatar usa-identifier__logo"
607
+ <span class="usx-avatar usa-identifier__logo"
610
608
  ><img
611
609
  class="usx-avatar__img usa-identifier__logo-img"
612
610
  src="./lady_liberty.png"
613
611
  alt="Statue of Liberty"
614
612
  role="img"
615
- /></a>
613
+ /></span>
616
614
  </div>
617
615
  <section class="usa-identifier__identity" aria-label="Agency description,">
618
616
  <p class="usa-identifier__identity-domain">domain.gov</p>
@@ -678,13 +676,13 @@
678
676
  >
679
677
  <div class="usa-identifier__container">
680
678
  <div class="usa-identifier__logos usx-avatar-group">
681
- <a href="" class="usx-avatar usa-identifier__logo"
679
+ <span class="usx-avatar usa-identifier__logo"
682
680
  ><img
683
681
  class="usx-avatar__img usa-identifier__logo-img"
684
682
  src="./lady_liberty.png"
685
683
  alt="Statue of Liberty"
686
684
  role="img"
687
- /></a>
685
+ /></span>
688
686
  </div>
689
687
  <section class="usa-identifier__identity" aria-label="Descripcion de la agencia,">
690
688
  <p class="usa-identifier__identity-domain">domain.gov</p>
@@ -886,12 +884,12 @@
886
884
  >
887
885
  <div class="usa-identifier__container">
888
886
  <div class="usa-identifier__logos usx-avatar-group">
889
- <a href="" class="usx-avatar usa-identifier__logo height-auto"
887
+ <span class="usx-avatar usa-identifier__logo height-auto"
890
888
  ><img
891
889
  class="usx-avatar__img usx-rounded-lg usa-identifier__logo-img"
892
890
  src="./lady_liberty.png"
893
891
  alt="Statue of Liberty"
894
- role="img" /></a
892
+ role="img" /></span
895
893
  ><a href="#agency" class="usx-avatar usa-identifier__logo" aria-label="United States"
896
894
  ><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
897
895
  >US</span
@@ -127,8 +127,8 @@
127
127
 
128
128
  <figcaption class="usx-image--caption">
129
129
  This container is wider than the image, and the image is taller than the container. With
130
- 'contain', the image will scale to fit within the container while maintaining its aspect
131
- ratio, which may result in empty space on the sides or top/bottom of the image.
130
+ &#x27;contain&#x27;, the image will scale to fit within the container while maintaining its
131
+ aspect ratio, which may result in empty space on the sides or top/bottom of the image.
132
132
  </figcaption>
133
133
  </figure>
134
134
  </div>
@@ -143,8 +143,8 @@
143
143
 
144
144
  <figcaption class="usx-image--caption">
145
145
  This container is wider than the image, and the image is taller than the container. With
146
- 'fill', the image will stretch to fill the entire container, which may distort the aspect
147
- ratio of the image.
146
+ &#x27;fill&#x27;, the image will stretch to fill the entire container, which may distort the
147
+ aspect ratio of the image.
148
148
  </figcaption>
149
149
  </figure>
150
150
  </div>
@@ -159,8 +159,8 @@
159
159
 
160
160
  <figcaption class="usx-image--caption">
161
161
  This container is wider than the image, and the image is taller than the container. With
162
- 'cover', the image will scale to cover the entire container while maintaining its aspect
163
- ratio, which may result in some cropping of the image.
162
+ &#x27;cover&#x27;, the image will scale to cover the entire container while maintaining its
163
+ aspect ratio, which may result in some cropping of the image.
164
164
  </figcaption>
165
165
  </figure>
166
166
  </div>
@@ -17,11 +17,11 @@
17
17
  {% if source.sizes %}sizes="{{ source.sizes }}"{% endif %}
18
18
  />
19
19
  {% endfor %}
20
- <img src="{% asset_url src.fallback staticBaseUrl %}"{% if imageSrcSet %} srcset="{{ imageSrcSet }}"{% endif %}{% if alt %} alt="{{ alt }}"{% endif %}
20
+ <img src="{% asset_url src.fallback staticBaseUrl %}"{% if imageSrcSet %} srcset="{{ imageSrcSet }}"{% endif %}{% if alt != None %} alt="{{ alt }}"{% endif %}
21
21
  {% if maxWidth or maxHeight %}style="{% if maxWidth %}max-width: {{ maxWidth }};{% if not maxHeight %} height: auto;{% endif %}{% endif %}{% if maxHeight %} max-height: {{ maxHeight }};{% if not maxWidth %} width: auto;{% endif %}{% endif %}"{% endif %} />
22
22
  </picture>
23
23
  {% elif src %}
24
- <img src="{% asset_url src staticBaseUrl %}"{% if imageSrcSet %} srcset="{{ imageSrcSet }}"{% endif %}{% if alt %} alt="{{ alt }}"{% endif %}
24
+ <img src="{% asset_url src staticBaseUrl %}"{% if imageSrcSet %} srcset="{{ imageSrcSet }}"{% endif %}{% if alt != None %} alt="{{ alt }}"{% endif %}
25
25
  {% if maxWidth or maxHeight %}style="{% if maxWidth %}max-width: {{ maxWidth }};{% if not maxHeight %} height: auto;{% endif %}{% endif %}{% if maxHeight %} max-height: {{ maxHeight }};{% if not maxWidth %} width: auto;{% endif %}{% endif %}"{% endif %} />
26
26
  {% else %}
27
27
  Image
@@ -45,11 +45,11 @@
45
45
  {% if source.sizes %}sizes="{{ source.sizes }}"{% endif %}
46
46
  />
47
47
  {% endfor %}
48
- <img src="{% asset_url src.fallback staticBaseUrl %}"{% if imageSrcSet %} srcset="{{ imageSrcSet }}"{% endif %}{% if alt %} alt="{{ alt }}"{% endif %}
48
+ <img src="{% asset_url src.fallback staticBaseUrl %}"{% if imageSrcSet %} srcset="{{ imageSrcSet }}"{% endif %}{% if alt != None %} alt="{{ alt }}"{% endif %}
49
49
  {% if maxWidth or maxHeight %}style="{% if maxWidth %}max-width: {{ maxWidth }};{% if not maxHeight %} height: auto;{% endif %}{% endif %}{% if maxHeight %} max-height: {{ maxHeight }};{% if not maxWidth %} width: auto;{% endif %}{% endif %}"{% endif %} />
50
50
  </picture>
51
51
  {% elif src %}
52
- <img src="{% asset_url src staticBaseUrl %}"{% if imageSrcSet %} srcset="{{ imageSrcSet }}"{% endif %}{% if alt %} alt="{{ alt }}"{% endif %}
52
+ <img src="{% asset_url src staticBaseUrl %}"{% if imageSrcSet %} srcset="{{ imageSrcSet }}"{% endif %}{% if alt != None %} alt="{{ alt }}"{% endif %}
53
53
  {% if maxWidth or maxHeight %}style="{% if maxWidth %}max-width: {{ maxWidth }};{% if not maxHeight %} height: auto;{% endif %}{% endif %}{% if maxHeight %} max-height: {{ maxHeight }};{% if not maxWidth %} width: auto;{% endif %}{% endif %}"{% endif %} />
54
54
  {% else %}
55
55
  Image
@@ -63,7 +63,7 @@ export default function Input({
63
63
  required,
64
64
  'aria-describedby': describedByParts.length ? describedByParts.join(' ') : undefined,
65
65
  'aria-invalid': hasError ? true : undefined,
66
- ...(value !== undefined ? { value } : { defaultValue }),
66
+ ...(value != null ? { value } : { defaultValue }),
67
67
  ...props,
68
68
  };
69
69
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "input",
3
3
  "template": "input/input.django.html",
4
- "version": 3,
4
+ "version": 4,
5
5
  "default": {
6
6
  "id": "example-input-1",
7
7
  "label": "Text input label",
@@ -88,8 +88,7 @@
88
88
  },
89
89
  "defaultValue": {
90
90
  "type": "string",
91
- "default": null,
92
- "description": "Initial input value; editable by the user."
91
+ "description": "Initial input value when value is omitted or null. Empty strings remain explicit values."
93
92
  },
94
93
  "value": {
95
94
  "type": "string",
@@ -2,7 +2,7 @@
2
2
  <div class="usa-form-group usx-form-group">
3
3
  <label class="usa-label usx-label" for="django-example-input-1"> Text input label </label>
4
4
 
5
- <input class="usa-input usx-input" id="django-example-input-1" placeholder="Type here" value="" />
5
+ <input class="usa-input usx-input" id="django-example-input-1" placeholder="Type here" />
6
6
  </div>
7
7
 
8
8
  <h3 class="site-preview-heading">With Hint</h3>
@@ -17,7 +17,6 @@
17
17
  class="usa-input usx-input"
18
18
  id="django-example-input-2"
19
19
  placeholder="Type here"
20
- value=""
21
20
  aria-describedby="django-example-input-2-hint"
22
21
  />
23
22
  </div>
@@ -28,13 +27,7 @@
28
27
  <abbr title="Required" class="usx-required">*</abbr> Required input
29
28
  </label>
30
29
 
31
- <input
32
- class="usa-input usx-input"
33
- id="django-example-input-3"
34
- placeholder="Type here"
35
- value=""
36
- required
37
- />
30
+ <input class="usa-input usx-input" id="django-example-input-3" placeholder="Type here" required />
38
31
  </div>
39
32
 
40
33
  <h3 class="site-preview-heading">Screen Reader Only Label</h3>
@@ -43,7 +36,7 @@
43
36
  Visually hidden label
44
37
  </label>
45
38
 
46
- <input class="usa-input usx-input" id="django-example-input-4" placeholder="Search…" value="" />
39
+ <input class="usa-input usx-input" id="django-example-input-4" placeholder="Search…" />
47
40
  </div>
48
41
 
49
42
  <h3 class="site-preview-heading">Error State</h3>
@@ -60,7 +53,6 @@
60
53
  class="usa-input usx-input usa-input--error"
61
54
  id="django-example-input-5"
62
55
  placeholder="Type here"
63
- value=""
64
56
  aria-describedby="django-example-input-5-error"
65
57
  aria-invalid="true"
66
58
  />
@@ -76,7 +68,6 @@
76
68
  class="usa-input usx-input usa-input--error"
77
69
  id="django-example-input-6"
78
70
  placeholder="Type here"
79
- value=""
80
71
  aria-invalid="true"
81
72
  />
82
73
  </div>
@@ -89,7 +80,6 @@
89
80
  class="usa-input usx-input usa-input--success"
90
81
  id="django-example-input-7"
91
82
  placeholder="Type here"
92
- value=""
93
83
  />
94
84
  </div>
95
85
 
@@ -103,7 +93,6 @@
103
93
  class="usa-input usx-input usa-input--success"
104
94
  id="django-example-input-8"
105
95
  placeholder="Type here"
106
- value=""
107
96
  />
108
97
  </div>
109
98
 
@@ -111,13 +100,7 @@
111
100
  <div class="usa-form-group usx-form-group">
112
101
  <label class="usa-label usx-label" for="django-example-input-9"> Disabled input </label>
113
102
 
114
- <input
115
- class="usa-input usx-input"
116
- id="django-example-input-9"
117
- placeholder="Type here"
118
- value=""
119
- disabled
120
- />
103
+ <input class="usa-input usx-input" id="django-example-input-9" placeholder="Type here" disabled />
121
104
  </div>
122
105
 
123
106
  <h3 class="site-preview-heading">Value</h3>
@@ -21,7 +21,7 @@
21
21
  {% if type %}type="{{ type }}" {% endif %}
22
22
  {% if autoComplete %}autocomplete="{{ autoComplete }}" {% endif %}
23
23
  placeholder="{% if placeholder is None %}Type here{% else %}{{ placeholder }}{% endif %}"
24
- value="{% if value is not None %}{{ value }}{% else %}{{ defaultValue|default:'' }}{% endif %}"
24
+ {% if value != None %}value="{{ value }}"{% elif defaultValue != None %}value="{{ defaultValue }}"{% endif %}
25
25
  {% if maxlength %}maxlength="{{ maxlength }}" {% endif %}
26
26
  {% if hint or describedBy or error and error != "true" and error != True and error != "false" %}aria-describedby="{% if describedBy %}{{ describedBy }} {% endif %}{% if hint %}{{ field_id }}-hint {% endif %}{% if error and error != "true" and error != True and error != "false" %}{{ field_id }}-error {% endif %}"
27
27
  {% endif %}
@@ -48,7 +48,7 @@
48
48
  {% if type %}type="{{ type }}" {% endif %}
49
49
  {% if autoComplete %}autocomplete="{{ autoComplete }}" {% endif %}
50
50
  placeholder="{% if placeholder is None %}Type here{% else %}{{ placeholder }}{% endif %}"
51
- value="{% if value is not None %}{{ value }}{% else %}{{ defaultValue|default:'' }}{% endif %}"
51
+ {% if value != None %}value="{{ value }}"{% elif defaultValue != None %}value="{{ defaultValue }}"{% endif %}
52
52
  {% if maxlength %}maxlength="{{ maxlength }}" {% endif %}
53
53
  {% if hint or describedBy or error and error != "true" and error != True and error != "false" %}aria-describedby="{% if describedBy %}{{ describedBy }} {% endif %}{% if hint %}{{ field_id }}-hint {% endif %}{% if error and error != "true" and error != True and error != "false" %}{{ field_id }}-error {% endif %}"
54
54
  {% endif %}
@@ -521,6 +521,7 @@
521
521
 
522
522
  <section class="usx-page bg-surface-1">
523
523
  <h1 class="usx-page__title">H1 Page heading</h1>
524
+
524
525
  <div class="usx-page__content">
525
526
  <div class="usa-prose">
526
527
  <h2>H2 Section heading</h2>
@@ -561,6 +562,7 @@
561
562
 
562
563
  <section class="usx-page bg-surface-1">
563
564
  <h1 class="usx-page__title">H1 Page heading</h1>
565
+
564
566
  <div class="usx-page__content">
565
567
  <div class="usa-prose">
566
568
  <h2>H2 Section heading</h2>
@@ -1,8 +1,11 @@
1
1
  import React, { AnchorHTMLAttributes, ReactNode } from 'react';
2
2
  import classNames from 'classnames';
3
3
 
4
- export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
5
- href?: string;
4
+ export interface LinkProps extends Omit<
5
+ AnchorHTMLAttributes<HTMLAnchorElement>,
6
+ 'download' | 'type' | 'onClick'
7
+ > {
8
+ href: string;
6
9
  text?: string;
7
10
  children?: ReactNode;
8
11
  visited?: boolean;
@@ -14,7 +17,7 @@ export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
14
17
  }
15
18
 
16
19
  export default function Link({
17
- href = 'javascript:void(0);',
20
+ href,
18
21
  text,
19
22
  children,
20
23
  visited = false,
@@ -30,7 +33,7 @@ export default function Link({
30
33
  visited && 'usx-link--visited',
31
34
  external && 'usa-link--external',
32
35
  alt && 'usa-link--alt',
33
- className,
36
+ className
34
37
  );
35
38
 
36
39
  return (
@@ -3,8 +3,7 @@
3
3
  "template": "link/link.django.html",
4
4
  "version": 2,
5
5
  "required": [
6
- "href",
7
- "children"
6
+ "href"
8
7
  ],
9
8
  "default": {
10
9
  "href": "https://google.com/",
@@ -13,7 +12,7 @@
13
12
  "props": {
14
13
  "href": {
15
14
  "type": "string",
16
- "description": "Link destination URL."
15
+ "description": "Link destination URL. Link always renders an anchor."
17
16
  },
18
17
  "text": {
19
18
  "type": "string",
@@ -1,6 +1,14 @@
1
1
  <h3 class="site-preview-heading">Default</h3>
2
2
  <a href="https://google.com/" class="usa-link usx-link">Google</a>
3
3
 
4
+ <h3 class="site-preview-heading">Tag used as a link</h3>
5
+ <a
6
+ href="#related-topics"
7
+ class="usa-tag usx-tag usa-link usx-link usx-no-visited usx-tag--interactive usx-tag--outline"
8
+ >
9
+ Browse related topics
10
+ </a>
11
+
4
12
  <h3 class="site-preview-heading">Visited</h3>
5
13
  <a href="javascript:void(0);" class="usa-link usx-link usx-link--visited">a visited link</a>
6
14
 
@@ -2,7 +2,7 @@
2
2
  {% load usx_components %}
3
3
 
4
4
  <a
5
- href="{{ href|default:'javascript:void(0);' }}"
5
+ href="{{ href }}"
6
6
  class="usa-link usx-link{% if visited %} usx-link--visited{% endif %}{% if external %} usa-link--external{% endif %}{% if alt %} usa-link--alt{% endif %}{% if className %} {{ className }}{% endif %}"
7
- {% if newTab or external %}target="_blank" rel="noreferrer noopener"{% endif %}
7
+ {% if newTab or external %}target="_blank" rel="noreferrer noopener"{% elif rel %}rel="{{ rel }}"{% endif %}
8
8
  >{% if children %}{{ children|safe }}{% else %}{{ text|safe }}{% endif %}</a>
@@ -44,4 +44,7 @@
44
44
  >
45
45
  is an alternate external text link on a dark background.
46
46
  </p>
47
- </div>
47
+ </div>
48
+
49
+ <p><button type="button" class="usa-link usx-link">Show more details</button></p>
50
+ <p><a href="#related-topics" class="usa-link usx-link usx-no-visited usa-tag usx-tag usx-tag--outline usx-tag--interactive">Browse related topics</a></p>
@@ -1,6 +1,14 @@
1
1
  <h3 class="site-preview-heading">Default</h3>
2
2
  <a href="https://google.com/" class="usa-link usx-link">Google</a>
3
3
 
4
+ <h3 class="site-preview-heading">Tag used as a link</h3>
5
+ <a
6
+ href="#related-topics"
7
+ class="usa-tag usx-tag usx-tag--outline usa-link usx-link usx-no-visited usx-tag--interactive"
8
+ >
9
+ Browse related topics</a
10
+ >
11
+
4
12
  <h3 class="site-preview-heading">Visited</h3>
5
13
  <a href="javascript:void(0);" class="usa-link usx-link usx-link--visited">a visited link</a>
6
14
 
@@ -43,7 +43,6 @@
43
43
  class="usa-input usx-input"
44
44
  id="django-memorable-date-day"
45
45
  name="memorable-date-day"
46
- value=""
47
46
  maxlength="2"
48
47
  pattern="[0-9]*"
49
48
  placeholder=""
@@ -63,7 +62,6 @@
63
62
  class="usa-input usx-input"
64
63
  id="django-memorable-date-year"
65
64
  name="memorable-date-year"
66
- value=""
67
65
  minlength="4"
68
66
  maxlength="4"
69
67
  pattern="[0-9]*"
@@ -128,7 +126,6 @@
128
126
  class="usa-input usx-input"
129
127
  id="django-memorable-date-disabled-day"
130
128
  name="memorable-date-disabled-day"
131
- value=""
132
129
  maxlength="2"
133
130
  pattern="[0-9]*"
134
131
  placeholder=""
@@ -149,7 +146,6 @@
149
146
  class="usa-input usx-input"
150
147
  id="django-memorable-date-disabled-year"
151
148
  name="memorable-date-disabled-year"
152
- value=""
153
149
  minlength="4"
154
150
  maxlength="4"
155
151
  pattern="[0-9]*"
@@ -217,7 +213,6 @@
217
213
  class="usa-input usx-input"
218
214
  id="django-memorable-date-aria-disabled-day"
219
215
  name="memorable-date-aria-disabled-day"
220
- value=""
221
216
  maxlength="2"
222
217
  pattern="[0-9]*"
223
218
  placeholder=""
@@ -240,7 +235,6 @@
240
235
  class="usa-input usx-input"
241
236
  id="django-memorable-date-aria-disabled-year"
242
237
  name="memorable-date-aria-disabled-year"
243
- value=""
244
238
  minlength="4"
245
239
  maxlength="4"
246
240
  pattern="[0-9]*"
@@ -310,7 +304,6 @@
310
304
  class="usa-input usx-input"
311
305
  id="django-memorable-date-required-day"
312
306
  name="memorable-date-required-day"
313
- value=""
314
307
  maxlength="2"
315
308
  pattern="[0-9]*"
316
309
  placeholder=""
@@ -333,7 +326,6 @@
333
326
  class="usa-input usx-input"
334
327
  id="django-memorable-date-required-year"
335
328
  name="memorable-date-required-year"
336
- value=""
337
329
  minlength="4"
338
330
  maxlength="4"
339
331
  pattern="[0-9]*"
@@ -44,7 +44,7 @@
44
44
  class="usa-input usx-input{% if error %} usa-input--error{% endif %}"
45
45
  id="{{ day_id }}"
46
46
  name="{{ dayName|default:day_id }}"
47
- value="{% if day is not None %}{{ day }}{% else %}{{ defaultDay|default:'' }}{% endif %}"
47
+ {% if day != None %}value="{{ day }}"{% elif defaultDay != None %}value="{{ defaultDay }}"{% endif %}
48
48
  maxlength="2"
49
49
  pattern="[0-9]*"
50
50
  placeholder=""
@@ -65,7 +65,7 @@
65
65
  class="usa-input usx-input{% if error %} usa-input--error{% endif %}"
66
66
  id="{{ year_id }}"
67
67
  name="{{ yearName|default:year_id }}"
68
- value="{% if year is not None %}{{ year }}{% else %}{{ defaultYear|default:'' }}{% endif %}"
68
+ {% if year != None %}value="{{ year }}"{% elif defaultYear != None %}value="{{ defaultYear }}"{% endif %}
69
69
  minlength="4"
70
70
  maxlength="4"
71
71
  pattern="[0-9]*"