@solexllc/usx-react 0.10.0 → 0.12.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 (208) hide show
  1. package/README.md +16 -0
  2. package/dist/Popover-BzDCTuQM.cjs +984 -0
  3. package/dist/Popover-LToVWsWc.js +985 -0
  4. package/dist/chat.cjs +1391 -0
  5. package/dist/chat.js +1391 -0
  6. package/dist/index.cjs +4426 -5231
  7. package/dist/index.js +168 -970
  8. package/package.json +9 -5
  9. package/src/chat.js +15 -0
  10. package/src/components/avatar/Avatar.tsx +54 -16
  11. package/src/components/avatar/avatar.django-snapshot.html +112 -0
  12. package/src/components/avatar/avatar.django.html +2 -2
  13. package/src/components/avatar/avatar.html +25 -0
  14. package/src/components/avatar/avatar.react-snapshot.html +104 -0
  15. package/src/components/avatar/config.json +13 -15
  16. package/src/components/avatar-group/AvatarGroup.tsx +17 -15
  17. package/src/components/avatar-group/avatar-group.django-snapshot.html +22 -0
  18. package/src/components/avatar-group/avatar-group.django.html +1 -1
  19. package/src/components/avatar-group/avatar-group.react-snapshot.html +20 -0
  20. package/src/components/avatar-group/config.json +2 -2
  21. package/src/components/back-to-top/BackToTop.tsx +21 -57
  22. package/src/components/back-to-top/back-to-top.django-snapshot.html +101 -202
  23. package/src/components/back-to-top/back-to-top.django.html +11 -38
  24. package/src/components/back-to-top/back-to-top.html +22 -106
  25. package/src/components/back-to-top/back-to-top.react-snapshot.html +94 -148
  26. package/src/components/back-to-top/config.json +41 -10
  27. package/src/components/button/Button.tsx +12 -3
  28. package/src/components/button/button.django-snapshot.html +18 -0
  29. package/src/components/button/button.django.html +3 -2
  30. package/src/components/button/button.react-snapshot.html +16 -0
  31. package/src/components/button/config.json +11 -2
  32. package/src/components/callout/callout.django.html +1 -1
  33. package/src/components/callout/config.json +7 -16
  34. package/src/components/character-count/CharacterCount.tsx +2 -0
  35. package/src/components/character-count/character-count.react-snapshot.html +7 -0
  36. package/src/components/chat/Chat.tsx +575 -0
  37. package/src/components/chat/README.md +174 -0
  38. package/src/components/chat/avatarProps.ts +32 -0
  39. package/src/components/chat/chat.django-snapshot.html +23515 -0
  40. package/src/components/chat/chat.django.html +75 -0
  41. package/src/components/chat/chat.html +116 -0
  42. package/src/components/chat/chat.react-snapshot.html +16895 -0
  43. package/src/components/chat/config.json +1241 -0
  44. package/src/components/chat-attachment/ChatAttachment.tsx +39 -0
  45. package/src/components/chat-attachment/chat-attachment.django.html +24 -0
  46. package/src/components/chat-attachment/chat-attachment.html +10 -0
  47. package/src/components/chat-attachment/config.json +27 -0
  48. package/src/components/chat-attachments/ChatAttachments.tsx +17 -0
  49. package/src/components/chat-attachments/chat-attachments.django-snapshot.html +58 -0
  50. package/src/components/chat-attachments/chat-attachments.django.html +10 -0
  51. package/src/components/chat-attachments/chat-attachments.html +14 -0
  52. package/src/components/chat-attachments/chat-attachments.react-snapshot.html +46 -0
  53. package/src/components/chat-attachments/config.json +25 -0
  54. package/src/components/chat-bubble/ChatBubble.tsx +39 -0
  55. package/src/components/chat-bubble/ChatFormattedText.tsx +138 -0
  56. package/src/components/chat-bubble/chat-bubble.django-snapshot.html +128 -0
  57. package/src/components/chat-bubble/chat-bubble.django.html +19 -0
  58. package/src/components/chat-bubble/chat-bubble.html +1 -0
  59. package/src/components/chat-bubble/chat-bubble.react-snapshot.html +118 -0
  60. package/src/components/chat-bubble/config.json +70 -0
  61. package/src/components/chat-composer/ChatComposer.tsx +210 -0
  62. package/src/components/chat-composer/README.md +15 -0
  63. package/src/components/chat-composer/chat-composer.django-snapshot.html +575 -0
  64. package/src/components/chat-composer/chat-composer.django.html +77 -0
  65. package/src/components/chat-composer/chat-composer.html +44 -0
  66. package/src/components/chat-composer/chat-composer.react-snapshot.html +519 -0
  67. package/src/components/chat-composer/chat-formatting.django.html +59 -0
  68. package/src/components/chat-composer/config.json +137 -0
  69. package/src/components/chat-context/ChatContext.tsx +46 -0
  70. package/src/components/chat-context/chat-context.django-snapshot.html +35 -0
  71. package/src/components/chat-context/chat-context.django.html +20 -0
  72. package/src/components/chat-context/chat-context.html +9 -0
  73. package/src/components/chat-context/chat-context.react-snapshot.html +30 -0
  74. package/src/components/chat-context/config.json +36 -0
  75. package/src/components/chat-controls/ChatControls.tsx +67 -0
  76. package/src/components/chat-controls/chat-controls.django-snapshot.html +114 -0
  77. package/src/components/chat-controls/chat-controls.django.html +36 -0
  78. package/src/components/chat-controls/chat-controls.html +11 -0
  79. package/src/components/chat-controls/chat-controls.react-snapshot.html +107 -0
  80. package/src/components/chat-controls/config.json +67 -0
  81. package/src/components/chat-directory/ChatDirectory.tsx +168 -0
  82. package/src/components/chat-directory/chat-directory.django-snapshot.html +546 -0
  83. package/src/components/chat-directory/chat-directory.django.html +14 -0
  84. package/src/components/chat-directory/chat-directory.html +4 -0
  85. package/src/components/chat-directory/chat-directory.react-snapshot.html +471 -0
  86. package/src/components/chat-directory/config.json +242 -0
  87. package/src/components/chat-directory-item/ChatDirectoryItem.tsx +150 -0
  88. package/src/components/chat-directory-item/chat-directory-item.django-snapshot.html +281 -0
  89. package/src/components/chat-directory-item/chat-directory-item.django.html +38 -0
  90. package/src/components/chat-directory-item/chat-directory-item.html +9 -0
  91. package/src/components/chat-directory-item/chat-directory-item.react-snapshot.html +249 -0
  92. package/src/components/chat-directory-item/config.json +103 -0
  93. package/src/components/chat-history/ChatHistory.tsx +30 -0
  94. package/src/components/chat-history/chat-history.django-snapshot.html +113 -0
  95. package/src/components/chat-history/chat-history.django.html +20 -0
  96. package/src/components/chat-history/chat-history.html +9 -0
  97. package/src/components/chat-history/chat-history.react-snapshot.html +111 -0
  98. package/src/components/chat-history/config.json +24 -0
  99. package/src/components/chat-message/ChatMessage.tsx +148 -0
  100. package/src/components/chat-message/chat-message.django-snapshot.html +758 -0
  101. package/src/components/chat-message/chat-message.django.html +56 -0
  102. package/src/components/chat-message/chat-message.html +12 -0
  103. package/src/components/chat-message/chat-message.react-snapshot.html +627 -0
  104. package/src/components/chat-message/config.json +278 -0
  105. package/src/components/chat-message-actions/ChatMessageActions.tsx +133 -0
  106. package/src/components/chat-message-actions/chat-message-actions.django-snapshot.html +345 -0
  107. package/src/components/chat-message-actions/chat-message-actions.django.html +29 -0
  108. package/src/components/chat-message-actions/chat-message-actions.html +53 -0
  109. package/src/components/chat-message-actions/chat-message-actions.react-snapshot.html +295 -0
  110. package/src/components/chat-message-actions/config.json +121 -0
  111. package/src/components/chat-window/ChatWindow.tsx +133 -0
  112. package/src/components/chat-window/chat-window.django-snapshot.html +448 -0
  113. package/src/components/chat-window/chat-window.django.html +39 -0
  114. package/src/components/chat-window/chat-window.html +26 -0
  115. package/src/components/chat-window/chat-window.react-snapshot.html +286 -0
  116. package/src/components/chat-window/config.json +123 -0
  117. package/src/components/clickable/Clickable.tsx +19 -5
  118. package/src/components/clickable/clickable.django-snapshot.html +11 -2
  119. package/src/components/clickable/clickable.django.html +2 -0
  120. package/src/components/clickable/clickable.react-snapshot.html +10 -2
  121. package/src/components/clickable/config.json +4 -0
  122. package/src/components/code/code.django-snapshot.html +27 -22
  123. package/src/components/code/code.html +2 -2
  124. package/src/components/code/code.react-snapshot.html +43 -8
  125. package/src/components/copy-to-clipboard/CopyToClipboard.tsx +2 -7
  126. package/src/components/copy-to-clipboard/copy-to-clipboard.django-snapshot.html +6 -4
  127. package/src/components/copy-to-clipboard/copy-to-clipboard.django.html +3 -2
  128. package/src/components/copy-to-clipboard/copy-to-clipboard.react-snapshot.html +14 -2
  129. package/src/components/file-list/FileList.tsx +3 -2
  130. package/src/components/file-list/config.json +5 -0
  131. package/src/components/file-list/file-list.django-snapshot.html +63 -0
  132. package/src/components/file-list/file-list.django.html +1 -1
  133. package/src/components/file-list/file-list.react-snapshot.html +53 -0
  134. package/src/components/footer/footer.django-snapshot.html +0 -3
  135. package/src/components/header/header.django-snapshot.html +5 -167
  136. package/src/components/header/header.django.html +2 -2
  137. package/src/components/header/header.html +1 -11
  138. package/src/components/header/header.react-snapshot.html +3 -6
  139. package/src/components/hero/hero.django-snapshot.html +0 -20
  140. package/src/components/hero/hero.django.html +3 -3
  141. package/src/components/icon-list/IconList.tsx +10 -2
  142. package/src/components/icon-list/config.json +5 -1
  143. package/src/components/icon-list/icon-list.django-snapshot.html +39 -0
  144. package/src/components/icon-list/icon-list.django.html +2 -0
  145. package/src/components/icon-list/icon-list.react-snapshot.html +31 -0
  146. package/src/components/image/image.django.html +4 -4
  147. package/src/components/input/Input.tsx +1 -1
  148. package/src/components/input/config.json +2 -3
  149. package/src/components/input/input.django-snapshot.html +4 -21
  150. package/src/components/input/input.django.html +2 -2
  151. package/src/components/link/Link.tsx +7 -4
  152. package/src/components/link/config.json +2 -3
  153. package/src/components/link/link.django-snapshot.html +8 -0
  154. package/src/components/link/link.django.html +2 -2
  155. package/src/components/link/link.html +4 -1
  156. package/src/components/link/link.react-snapshot.html +8 -0
  157. package/src/components/list/List.tsx +10 -2
  158. package/src/components/list/config.json +5 -1
  159. package/src/components/list/list.django-snapshot.html +26 -0
  160. package/src/components/list/list.django.html +2 -0
  161. package/src/components/list/list.html +20 -0
  162. package/src/components/list/list.react-snapshot.html +20 -0
  163. package/src/components/memorable-date/memorable-date.django-snapshot.html +0 -8
  164. package/src/components/memorable-date/memorable-date.django.html +2 -2
  165. package/src/components/misc-banner/misc-banner.django-snapshot.html +12 -12
  166. package/src/components/misc-banner/misc-banner.django.html +4 -2
  167. package/src/components/page/Page.tsx +16 -0
  168. package/src/components/page/config.json +18 -1
  169. package/src/components/page/page.django-snapshot.html +74 -0
  170. package/src/components/page/page.django.html +8 -0
  171. package/src/components/page/page.html +60 -0
  172. package/src/components/page/page.react-snapshot.html +60 -0
  173. package/src/components/popover/Popover.tsx +60 -9
  174. package/src/components/popover/PopoverMenu.tsx +33 -15
  175. package/src/components/popover/config.json +88 -14
  176. package/src/components/popover/popover-menu.django.html +13 -2
  177. package/src/components/popover/popover.django-snapshot.html +229 -7
  178. package/src/components/popover/popover.django.html +3 -2
  179. package/src/components/popover/popover.react-snapshot.html +127 -4
  180. package/src/components/process-list/config.json +41 -3
  181. package/src/components/quote/Quote.tsx +9 -2
  182. package/src/components/search/Search.tsx +1 -1
  183. package/src/components/search/config.json +3 -4
  184. package/src/components/search/search.django-snapshot.html +262 -1684
  185. package/src/components/search/search.django.html +1 -20
  186. package/src/components/select/select.django-snapshot.html +7 -7
  187. package/src/components/select/select.react-snapshot.html +7 -7
  188. package/src/components/summary/Summary.tsx +4 -2
  189. package/src/components/summary/config.json +4 -0
  190. package/src/components/summary/summary.django.html +4 -4
  191. package/src/components/table/Table.tsx +58 -25
  192. package/src/components/table/config.json +61 -13
  193. package/src/components/tag/Tag.tsx +40 -7
  194. package/src/components/tag/config.json +18 -2
  195. package/src/components/tag/tag.django-snapshot.html +16 -1
  196. package/src/components/tag/tag.django.html +12 -6
  197. package/src/components/tag/tag.html +4 -0
  198. package/src/components/tag/tag.react-snapshot.html +16 -1
  199. package/src/components/tag-group/TagGroup.tsx +6 -9
  200. package/src/components/tag-group/config.json +4 -0
  201. package/src/components/tag-group/tag-group.django.html +1 -1
  202. package/src/components/theme-picker/ThemePicker.tsx +95 -52
  203. package/src/components/theme-picker/config.json +7 -4
  204. package/src/components/theme-picker/theme-picker-select.django.html +7 -0
  205. package/src/components/theme-picker/theme-picker.django-snapshot.html +101 -21
  206. package/src/components/theme-picker/theme-picker.django.html +22 -24
  207. package/src/components/theme-picker/theme-picker.html +86 -56
  208. package/src/components/theme-picker/theme-picker.react-snapshot.html +74 -18
@@ -146,7 +146,6 @@
146
146
  id="django-header-default-search"
147
147
  class="usa-input usx-input"
148
148
  placeholder="Search..."
149
- value=""
150
149
  type="search"
151
150
  name="q"
152
151
  />
@@ -162,25 +161,6 @@
162
161
  </svg>
163
162
  </button>
164
163
  </form>
165
- <script data-id="header-default-search" data-on-submit="" data-search-key="q">
166
- const data = document.currentScript.dataset;
167
- const onSubmit = data.onSubmit;
168
-
169
- if (!!onSubmit) {
170
- const id = data.id;
171
- const searchKey = data.searchKey;
172
- document.addEventListener('DOMContentLoaded', function () {
173
- document.getElementById(`${id}-form`).onsubmit = function (e) {
174
- e.preventDefault();
175
- const formData = new FormData(e.target);
176
- const query = formData.get(searchKey);
177
- const func = eval(onSubmit);
178
- func(query);
179
- return false;
180
- };
181
- });
182
- }
183
- </script>
184
164
  </section>
185
165
  </div>
186
166
  </div>
@@ -308,7 +288,6 @@
308
288
  id="django-header-basic-search"
309
289
  class="usa-input usx-input"
310
290
  placeholder="Search..."
311
- value=""
312
291
  type="search"
313
292
  name="q"
314
293
  />
@@ -324,25 +303,6 @@
324
303
  </svg>
325
304
  </button>
326
305
  </form>
327
- <script data-id="header-basic-search" data-on-submit="" data-search-key="q">
328
- const data = document.currentScript.dataset;
329
- const onSubmit = data.onSubmit;
330
-
331
- if (!!onSubmit) {
332
- const id = data.id;
333
- const searchKey = data.searchKey;
334
- document.addEventListener('DOMContentLoaded', function () {
335
- document.getElementById(`${id}-form`).onsubmit = function (e) {
336
- e.preventDefault();
337
- const formData = new FormData(e.target);
338
- const query = formData.get(searchKey);
339
- const func = eval(onSubmit);
340
- func(query);
341
- return false;
342
- };
343
- });
344
- }
345
- </script>
346
306
  </section>
347
307
  </div>
348
308
  </nav>
@@ -488,7 +448,6 @@
488
448
  id="django-header-basic-megamenu-search"
489
449
  class="usa-input usx-input"
490
450
  placeholder="Search..."
491
- value=""
492
451
  type="search"
493
452
  name="q"
494
453
  />
@@ -504,25 +463,6 @@
504
463
  </svg>
505
464
  </button>
506
465
  </form>
507
- <script data-id="header-basic-megamenu-search" data-on-submit="" data-search-key="q">
508
- const data = document.currentScript.dataset;
509
- const onSubmit = data.onSubmit;
510
-
511
- if (!!onSubmit) {
512
- const id = data.id;
513
- const searchKey = data.searchKey;
514
- document.addEventListener('DOMContentLoaded', function () {
515
- document.getElementById(`${id}-form`).onsubmit = function (e) {
516
- e.preventDefault();
517
- const formData = new FormData(e.target);
518
- const query = formData.get(searchKey);
519
- const func = eval(onSubmit);
520
- func(query);
521
- return false;
522
- };
523
- });
524
- }
525
- </script>
526
466
  </section>
527
467
  </div>
528
468
  </nav>
@@ -665,7 +605,6 @@
665
605
  id="django-header-extended-search"
666
606
  class="usa-input usx-input"
667
607
  placeholder="Search..."
668
- value=""
669
608
  type="search"
670
609
  name="q"
671
610
  />
@@ -681,25 +620,6 @@
681
620
  </svg>
682
621
  </button>
683
622
  </form>
684
- <script data-id="header-extended-search" data-on-submit="" data-search-key="q">
685
- const data = document.currentScript.dataset;
686
- const onSubmit = data.onSubmit;
687
-
688
- if (!!onSubmit) {
689
- const id = data.id;
690
- const searchKey = data.searchKey;
691
- document.addEventListener('DOMContentLoaded', function () {
692
- document.getElementById(`${id}-form`).onsubmit = function (e) {
693
- e.preventDefault();
694
- const formData = new FormData(e.target);
695
- const query = formData.get(searchKey);
696
- const func = eval(onSubmit);
697
- func(query);
698
- return false;
699
- };
700
- });
701
- }
702
- </script>
703
623
  </section>
704
624
  </div>
705
625
  </div>
@@ -857,7 +777,6 @@
857
777
  id="django-header-extended-megamenu-search"
858
778
  class="usa-input usx-input"
859
779
  placeholder="Search..."
860
- value=""
861
780
  type="search"
862
781
  name="q"
863
782
  />
@@ -873,25 +792,6 @@
873
792
  </svg>
874
793
  </button>
875
794
  </form>
876
- <script data-id="header-extended-megamenu-search" data-on-submit="" data-search-key="q">
877
- const data = document.currentScript.dataset;
878
- const onSubmit = data.onSubmit;
879
-
880
- if (!!onSubmit) {
881
- const id = data.id;
882
- const searchKey = data.searchKey;
883
- document.addEventListener('DOMContentLoaded', function () {
884
- document.getElementById(`${id}-form`).onsubmit = function (e) {
885
- e.preventDefault();
886
- const formData = new FormData(e.target);
887
- const query = formData.get(searchKey);
888
- const func = eval(onSubmit);
889
- func(query);
890
- return false;
891
- };
892
- });
893
- }
894
- </script>
895
795
  </section>
896
796
  </div>
897
797
  </div>
@@ -1019,7 +919,6 @@
1019
919
  id="django-header-menu-icon-search"
1020
920
  class="usa-input usx-input"
1021
921
  placeholder="Search..."
1022
- value=""
1023
922
  type="search"
1024
923
  name="q"
1025
924
  />
@@ -1035,25 +934,6 @@
1035
934
  </svg>
1036
935
  </button>
1037
936
  </form>
1038
- <script data-id="header-menu-icon-search" data-on-submit="" data-search-key="q">
1039
- const data = document.currentScript.dataset;
1040
- const onSubmit = data.onSubmit;
1041
-
1042
- if (!!onSubmit) {
1043
- const id = data.id;
1044
- const searchKey = data.searchKey;
1045
- document.addEventListener('DOMContentLoaded', function () {
1046
- document.getElementById(`${id}-form`).onsubmit = function (e) {
1047
- e.preventDefault();
1048
- const formData = new FormData(e.target);
1049
- const query = formData.get(searchKey);
1050
- const func = eval(onSubmit);
1051
- func(query);
1052
- return false;
1053
- };
1054
- });
1055
- }
1056
- </script>
1057
937
  </section>
1058
938
  </div>
1059
939
  </nav>
@@ -2143,7 +2023,6 @@
2143
2023
  id="django-header-maximal-search"
2144
2024
  class="usa-input usx-input"
2145
2025
  placeholder="Search..."
2146
- value=""
2147
2026
  type="search"
2148
2027
  name="q"
2149
2028
  />
@@ -2159,25 +2038,6 @@
2159
2038
  </svg>
2160
2039
  </button>
2161
2040
  </form>
2162
- <script data-id="header-maximal-search" data-on-submit="" data-search-key="q">
2163
- const data = document.currentScript.dataset;
2164
- const onSubmit = data.onSubmit;
2165
-
2166
- if (!!onSubmit) {
2167
- const id = data.id;
2168
- const searchKey = data.searchKey;
2169
- document.addEventListener('DOMContentLoaded', function () {
2170
- document.getElementById(`${id}-form`).onsubmit = function (e) {
2171
- e.preventDefault();
2172
- const formData = new FormData(e.target);
2173
- const query = formData.get(searchKey);
2174
- const func = eval(onSubmit);
2175
- func(query);
2176
- return false;
2177
- };
2178
- });
2179
- }
2180
- </script>
2181
2041
  </section>
2182
2042
  </div>
2183
2043
  </div>
@@ -3189,7 +3049,6 @@
3189
3049
  id="django-header-border-roles-search"
3190
3050
  class="usa-input usx-input"
3191
3051
  placeholder="Search..."
3192
- value=""
3193
3052
  type="search"
3194
3053
  name="q"
3195
3054
  />
@@ -3205,25 +3064,6 @@
3205
3064
  </svg>
3206
3065
  </button>
3207
3066
  </form>
3208
- <script data-id="header-border-roles-search" data-on-submit="" data-search-key="q">
3209
- const data = document.currentScript.dataset;
3210
- const onSubmit = data.onSubmit;
3211
-
3212
- if (!!onSubmit) {
3213
- const id = data.id;
3214
- const searchKey = data.searchKey;
3215
- document.addEventListener('DOMContentLoaded', function () {
3216
- document.getElementById(`${id}-form`).onsubmit = function (e) {
3217
- e.preventDefault();
3218
- const formData = new FormData(e.target);
3219
- const query = formData.get(searchKey);
3220
- const func = eval(onSubmit);
3221
- func(query);
3222
- return false;
3223
- };
3224
- });
3225
- }
3226
- </script>
3227
3067
  </section>
3228
3068
  </div>
3229
3069
  </div>
@@ -3378,25 +3218,23 @@
3378
3218
  aria-controls="django-theme-picker-panel"
3379
3219
  >
3380
3220
  <svg
3381
- class="usa-icon usx-theme-picker__icon"
3221
+ class="usa-icon usx-icon usx-theme-picker__icon"
3382
3222
  aria-hidden="true"
3383
3223
  focusable="false"
3384
- viewBox="0 0 24 24"
3224
+ role="img"
3385
3225
  >
3386
- <path
3387
- fill="currentColor"
3388
- d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"
3389
- />
3226
+ <use href="img/usx-sprite.svg#color_palette"></use>
3390
3227
  </svg>
3391
3228
  </button>
3392
3229
  <div id="django-theme-picker-panel" class="usx-theme-picker__panel">
3393
3230
  <label class="usa-label usx-label usa-sr-only" for="django-theme-picker"> Theme </label>
3394
3231
 
3395
- <select class="usa-select usx-select" id="django-theme-picker">
3232
+ <select id="django-theme-picker" class="usa-select usx-select">
3396
3233
  <option value="Aurora" selected>Light</option>
3397
3234
 
3398
3235
  <option value="Borealis">Dark</option>
3399
3236
  </select>
3237
+
3400
3238
  <button
3401
3239
  type="button"
3402
3240
  class="usa-button usx-button usa-button--primary usx-theme-picker__toggle"
@@ -103,7 +103,7 @@
103
103
  <div class="usx-nav__utility">
104
104
  {% if utilityContent %}{{ utilityContent|safe }}{% endif %}
105
105
  {% if searchProps %}
106
- {% search id=searchProps.id ariaLabel=searchProps.ariaLabel searchKey=searchProps.searchKey label=searchProps.label icon=searchProps.icon iconOnly=searchProps.iconOnly buttonVariant=searchProps.buttonVariant big=searchProps.big action=searchProps.action placeholder=searchProps.placeholder defaultValue=searchProps.defaultValue onSubmit=searchProps.onSubmit className=searchProps.className|default:'' %}{% endsearch %}
106
+ {% search id=searchProps.id ariaLabel=searchProps.ariaLabel searchKey=searchProps.searchKey label=searchProps.label icon=searchProps.icon iconOnly=searchProps.iconOnly buttonVariant=searchProps.buttonVariant big=searchProps.big action=searchProps.action placeholder=searchProps.placeholder defaultValue=searchProps|get_optional:'defaultValue' onSubmit=searchProps.onSubmit className=searchProps.className|default:'' %}{% endsearch %}
107
107
  {% endif %}
108
108
  </div>
109
109
  {% endif %}
@@ -183,7 +183,7 @@
183
183
  <div class="usx-nav__utility">
184
184
  {% if utilityContent %}{{ utilityContent|safe }}{% endif %}
185
185
  {% if searchProps %}
186
- {% search id=searchProps.id ariaLabel=searchProps.ariaLabel searchKey=searchProps.searchKey label=searchProps.label icon=searchProps.icon iconOnly=searchProps.iconOnly buttonVariant=searchProps.buttonVariant big=searchProps.big action=searchProps.action placeholder=searchProps.placeholder defaultValue=searchProps.defaultValue onSubmit=searchProps.onSubmit className=searchProps.className|default:'' %}{% endsearch %}
186
+ {% search id=searchProps.id ariaLabel=searchProps.ariaLabel searchKey=searchProps.searchKey label=searchProps.label icon=searchProps.icon iconOnly=searchProps.iconOnly buttonVariant=searchProps.buttonVariant big=searchProps.big action=searchProps.action placeholder=searchProps.placeholder defaultValue=searchProps|get_optional:'defaultValue' onSubmit=searchProps.onSubmit className=searchProps.className|default:'' %}{% endsearch %}
187
187
  {% endif %}
188
188
  </div>
189
189
  {% endif %}
@@ -2767,17 +2767,7 @@
2767
2767
  class="usa-button usx-button usx-button--ghost text-muted usx-theme-picker__trigger"
2768
2768
  aria-label="Theme"
2769
2769
  >
2770
- <svg
2771
- class="usa-icon usx-theme-picker__icon"
2772
- aria-hidden="true"
2773
- focusable="false"
2774
- viewBox="0 0 24 24"
2775
- >
2776
- <path
2777
- fill="currentColor"
2778
- d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"
2779
- ></path>
2780
- </svg>
2770
+ <svg class="usa-icon usx-icon usx-theme-picker__icon" aria-hidden="true" focusable="false" role="img"><use href="./img/usx-sprite.svg#color_palette"></use></svg>
2781
2771
  </button>
2782
2772
  </div>
2783
2773
  </div>
@@ -2657,15 +2657,12 @@
2657
2657
  aria-controls="react-theme-picker-panel"
2658
2658
  >
2659
2659
  <svg
2660
- class="usa-icon usx-theme-picker__icon"
2660
+ class="usa-icon usx-icon usx-theme-picker__icon"
2661
2661
  aria-hidden="true"
2662
2662
  focusable="false"
2663
- viewBox="0 0 24 24"
2663
+ role="img"
2664
2664
  >
2665
- <path
2666
- fill="currentColor"
2667
- d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"
2668
- ></path>
2665
+ <use href="/img/usx-sprite.svg#color_palette"></use>
2669
2666
  </svg>
2670
2667
  </button>
2671
2668
  <div id="react-theme-picker-panel" class="usx-theme-picker__panel">
@@ -133,7 +133,6 @@
133
133
  id="django-hero-search"
134
134
  class="usa-input usx-input"
135
135
  placeholder="Search..."
136
- value=""
137
136
  type="search"
138
137
  name="q"
139
138
  />
@@ -149,25 +148,6 @@
149
148
  </svg>
150
149
  </button>
151
150
  </form>
152
- <script data-id="hero-search" data-on-submit="" data-search-key="q">
153
- const data = document.currentScript.dataset;
154
- const onSubmit = data.onSubmit;
155
-
156
- if (!!onSubmit) {
157
- const id = data.id;
158
- const searchKey = data.searchKey;
159
- document.addEventListener('DOMContentLoaded', function () {
160
- document.getElementById(`${id}-form`).onsubmit = function (e) {
161
- e.preventDefault();
162
- const formData = new FormData(e.target);
163
- const query = formData.get(searchKey);
164
- const func = eval(onSubmit);
165
- func(query);
166
- return false;
167
- };
168
- });
169
- }
170
- </script>
171
151
  </section>
172
152
  </div>
173
153
  </div>
@@ -3,17 +3,17 @@
3
3
  <section
4
4
  class="usx-hero{% if overlay != False %} usx-hero--has-overlay{% endif %}{% if overlayOpacity or overlayOpacity == 0 %} usx-hero--custom-overlay{% endif %}{% if contentPosition == 'right' %} usx-hero--content-right{% elif contentPosition == 'center' %} usx-hero--content-center{% endif %}{% if boxed == False %} usx-hero--unboxed{% endif %}{% if secondaryContent %} usx-hero--split{% endif %}{% if className %} {{ className }}{% endif %}"
5
5
  aria-label="{% if ariaLabel %}{{ ariaLabel }}{% else %}Introduction{% endif %}"
6
- {% if backgroundImage or backgroundPosition or overlayOpacity or overlayOpacity == 0 %}style="{% if backgroundImage %}background-image: url('{{ backgroundImage }}');{% endif %}{% if backgroundPosition %}background-position: {{ backgroundPosition }};{% endif %}{% if overlayOpacity or overlayOpacity == 0 %}--hero-overlay-opacity: {{ overlayOpacity }};{% endif %}"{% endif %}
6
+ {% if backgroundImage or backgroundPosition or overlayOpacity or overlayOpacity == 0 %}style="{% if backgroundImage %}background-image:url('{{ backgroundImage }}'){% if backgroundPosition or overlayOpacity or overlayOpacity == 0 %};{% endif %}{% endif %}{% if backgroundPosition %}background-position:{{ backgroundPosition }}{% if overlayOpacity or overlayOpacity == 0 %};{% endif %}{% endif %}{% if overlayOpacity or overlayOpacity == 0 %}--hero-overlay-opacity:{{ overlayOpacity }}{% endif %}"{% endif %}
7
7
  >
8
8
  <div class="usx-hero__inner">
9
- <div class="usx-hero__callout"{% if calloutMaxWidth %} style="max-width: {{ calloutMaxWidth }};"{% endif %}>
9
+ <div class="usx-hero__callout"{% if calloutMaxWidth %} style="max-width:{{ calloutMaxWidth }}"{% endif %}>
10
10
  {% if headingAs == 'h2' %}<h2 class="usx-hero__heading">{% elif headingAs == 'h3' %}<h3 class="usx-hero__heading">{% elif headingAs == 'h4' %}<h4 class="usx-hero__heading">{% elif headingAs == 'h5' %}<h5 class="usx-hero__heading">{% else %}<h1 class="usx-hero__heading">{% endif %}
11
11
  {% if callout %}<span class="usx-hero__heading--alt">{{ callout }}</span>{% endif %}
12
12
  {{ title }}
13
13
  {% if headingAs == 'h2' %}</h2>{% elif headingAs == 'h3' %}</h3>{% elif headingAs == 'h4' %}</h4>{% elif headingAs == 'h5' %}</h5>{% else %}</h1>{% endif %}
14
14
  {% if paragraph %}<p class="usx-hero__paragraph">{{ paragraph }}</p>{% endif %}
15
15
  {% if searchProps %}
16
- {% search id=searchProps.id ariaLabel=searchProps.ariaLabel searchKey=searchProps.searchKey label=searchProps.label icon=searchProps.icon iconOnly=searchProps.iconOnly buttonVariant=searchProps.buttonVariant big=searchProps.big action=searchProps.action placeholder=searchProps.placeholder defaultValue=searchProps.defaultValue onSubmit=searchProps.onSubmit className=searchProps.className|default:'' %}{% endsearch %}
16
+ {% search id=searchProps.id ariaLabel=searchProps.ariaLabel searchKey=searchProps.searchKey label=searchProps.label icon=searchProps.icon iconOnly=searchProps.iconOnly buttonVariant=searchProps.buttonVariant big=searchProps.big action=searchProps.action placeholder=searchProps.placeholder defaultValue=searchProps|get_optional:'defaultValue' onSubmit=searchProps.onSubmit className=searchProps.className|default:'' %}{% endsearch %}
17
17
  {% elif buttonProps %}
18
18
  {% button props=buttonProps %}{{ buttonProps.children|safe }}{% endbutton %}
19
19
  {% endif %}
@@ -15,6 +15,7 @@ export interface IconListItem {
15
15
 
16
16
  export interface IconListProps extends React.HTMLAttributes<HTMLUListElement> {
17
17
  items?: IconListItem[];
18
+ caption?: string;
18
19
  primary?: boolean;
19
20
  size?: null | 'lg';
20
21
  className?: string;
@@ -27,7 +28,7 @@ function renderContent(content: string | React.ReactNode) {
27
28
  return content;
28
29
  }
29
30
 
30
- export default function IconList({ items = [], primary = false, size = null, className = '', ...props }: IconListProps) {
31
+ export default function IconList({ items = [], caption, primary = false, size = null, className = '', ...props }: IconListProps) {
31
32
  const classes = ClassNames(
32
33
  'usa-icon-list',
33
34
  'usx-icon-list',
@@ -36,7 +37,7 @@ export default function IconList({ items = [], primary = false, size = null, cla
36
37
  className,
37
38
  );
38
39
 
39
- return (
40
+ const list = (
40
41
  <ul className={classes} {...props}>
41
42
  {items.map((item, index) => (
42
43
  <li key={index} className={ClassNames('usa-icon-list__item', item.itemClassName)}>
@@ -56,4 +57,11 @@ export default function IconList({ items = [], primary = false, size = null, cla
56
57
  ))}
57
58
  </ul>
58
59
  );
60
+
61
+ return caption ? (
62
+ <figure className="usx-list-figure">
63
+ <figcaption className="usx-list-figure__caption">{caption}</figcaption>
64
+ {list}
65
+ </figure>
66
+ ) : list;
59
67
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "icon-list",
3
3
  "template": "icon-list/icon-list.django.html",
4
- "version": 1,
4
+ "version": 2,
5
5
  "default": {
6
6
  "items": [
7
7
  {
@@ -64,6 +64,10 @@
64
64
  }
65
65
  }
66
66
  },
67
+ "caption": {
68
+ "type": "string",
69
+ "description": "Optional label rendered in a figcaption before the icon list. Wraps the list in a figure when provided."
70
+ },
67
71
  "primary": {
68
72
  "type": "boolean",
69
73
  "default": false,
@@ -81,6 +81,45 @@
81
81
  </li>
82
82
  </ul>
83
83
 
84
+ <h3 class="site-preview-heading">Captioned</h3>
85
+ <figure class="usx-list-figure">
86
+ <figcaption class="usx-list-figure__caption">Health and safety guidance</figcaption>
87
+ <ul class="usa-icon-list usx-icon-list">
88
+ <li class="usa-icon-list__item">
89
+ <div class="usa-icon-list__icon text-green">
90
+ <svg class="usa-icon usx-icon text-green" aria-hidden="true" focusable="false" role="img">
91
+ <use href="img/sprite.svg#check_circle"></use>
92
+ </svg>
93
+ </div>
94
+ <div class="usa-icon-list__content">
95
+ <div>Wash your hands for 20 seconds with soap</div>
96
+ </div>
97
+ </li>
98
+
99
+ <li class="usa-icon-list__item">
100
+ <div class="usa-icon-list__icon text-green">
101
+ <svg class="usa-icon usx-icon text-green" aria-hidden="true" focusable="false" role="img">
102
+ <use href="img/sprite.svg#check_circle"></use>
103
+ </svg>
104
+ </div>
105
+ <div class="usa-icon-list__content">
106
+ <div>Stay six feet away from others</div>
107
+ </div>
108
+ </li>
109
+
110
+ <li class="usa-icon-list__item">
111
+ <div class="usa-icon-list__icon text-red">
112
+ <svg class="usa-icon usx-icon text-red" aria-hidden="true" focusable="false" role="img">
113
+ <use href="img/sprite.svg#cancel"></use>
114
+ </svg>
115
+ </div>
116
+ <div class="usa-icon-list__content">
117
+ <div>Avoid large gatherings</div>
118
+ </div>
119
+ </li>
120
+ </ul>
121
+ </figure>
122
+
84
123
  <h3 class="site-preview-heading">Rich Content</h3>
85
124
  <ul class="usa-icon-list usx-icon-list">
86
125
  <li class="usa-icon-list__item">
@@ -1,5 +1,6 @@
1
1
  {% load usx_components %}
2
2
 
3
+ {% if caption %}<figure class="usx-list-figure"><figcaption class="usx-list-figure__caption">{{ caption }}</figcaption>{% endif %}
3
4
  <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
5
  {% for item in items %}
5
6
  <li class="usa-icon-list__item{% if item.itemClassName %} {{ item.itemClassName }}{% endif %}">
@@ -15,3 +16,4 @@
15
16
  </li>
16
17
  {% endfor %}
17
18
  </ul>
19
+ {% if caption %}</figure>{% endif %}
@@ -64,6 +64,37 @@
64
64
  </li>
65
65
  </ul>
66
66
 
67
+ <h3 class="site-preview-heading">Captioned</h3>
68
+ <figure class="usx-list-figure">
69
+ <figcaption class="usx-list-figure__caption">Health and safety guidance</figcaption>
70
+ <ul class="usa-icon-list usx-icon-list">
71
+ <li class="usa-icon-list__item">
72
+ <div class="usa-icon-list__icon text-green">
73
+ <svg class="usa-icon usx-icon text-green" aria-hidden="true" focusable="false" role="img">
74
+ <use href="/img/sprite.svg#check_circle"></use>
75
+ </svg>
76
+ </div>
77
+ <div class="usa-icon-list__content"><div>Wash your hands for 20 seconds with soap</div></div>
78
+ </li>
79
+ <li class="usa-icon-list__item">
80
+ <div class="usa-icon-list__icon text-green">
81
+ <svg class="usa-icon usx-icon text-green" aria-hidden="true" focusable="false" role="img">
82
+ <use href="/img/sprite.svg#check_circle"></use>
83
+ </svg>
84
+ </div>
85
+ <div class="usa-icon-list__content"><div>Stay six feet away from others</div></div>
86
+ </li>
87
+ <li class="usa-icon-list__item">
88
+ <div class="usa-icon-list__icon text-red">
89
+ <svg class="usa-icon usx-icon text-red" aria-hidden="true" focusable="false" role="img">
90
+ <use href="/img/sprite.svg#cancel"></use>
91
+ </svg>
92
+ </div>
93
+ <div class="usa-icon-list__content"><div>Avoid large gatherings</div></div>
94
+ </li>
95
+ </ul>
96
+ </figure>
97
+
67
98
  <h3 class="site-preview-heading">Rich Content</h3>
68
99
  <ul class="usa-icon-list usx-icon-list">
69
100
  <li class="usa-icon-list__item">
@@ -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",