@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
@@ -59,7 +59,15 @@
59
59
  <pre data-prefix="4"><code>&lt;/section&gt;</code></pre>
60
60
  </div>
61
61
  <span class="usx-tooltip"
62
- ><button type="button" class="usa-button usx-button usx-button--ghost usx-copy">
62
+ ><button
63
+ type="button"
64
+ class="usa-button usx-button usx-button--ghost usx-copy"
65
+ aria-label="Copy to clipboard"
66
+ data-usx-copy='&lt;section aria-label="Account &amp; settings"&gt;
67
+ &lt;h2&gt;Contact information&lt;/h2&gt;
68
+ &lt;p&gt;Use &amp;lt;Page&amp;gt; to define the page.&lt;/p&gt;
69
+ &lt;/section&gt;'
70
+ >
63
71
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
64
72
  <use href="/img/sprite.svg#content_copy"></use></svg
65
73
  ><svg
@@ -91,7 +99,18 @@
91
99
  <pre data-prefix="7"><code>&lt;/Layout&gt;</code></pre>
92
100
  </div>
93
101
  <span class="usx-tooltip"
94
- ><button type="button" class="usa-button usx-button usx-button--ghost usx-copy">
102
+ ><button
103
+ type="button"
104
+ class="usa-button usx-button usx-button--ghost usx-copy"
105
+ aria-label="Copy to clipboard"
106
+ data-usx-copy='&lt;Layout&gt;
107
+ &lt;Page title="Account"&gt;
108
+ &lt;Section title="Contact information"&gt;
109
+ &lt;ContactDetails user={currentUser} /&gt;
110
+ &lt;/Section&gt;
111
+ &lt;/Page&gt;
112
+ &lt;/Layout&gt;'
113
+ >
95
114
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
96
115
  <use href="/img/sprite.svg#content_copy"></use></svg
97
116
  ><svg
@@ -121,7 +140,18 @@
121
140
  <pre data-prefix="7"><code>&lt;/Layout&gt;</code></pre>
122
141
  </div>
123
142
  <span class="usx-tooltip"
124
- ><button type="button" class="usa-button usx-button usx-button--ghost usx-copy">
143
+ ><button
144
+ type="button"
145
+ class="usa-button usx-button usx-button--ghost usx-copy"
146
+ aria-label="Copy to clipboard"
147
+ data-usx-copy='&lt;Layout&gt;
148
+ &lt;Page title="Account"&gt;
149
+ &lt;Section title="Contact information"&gt;
150
+ &lt;ContactDetails user={currentUser} /&gt;
151
+ &lt;/Section&gt;
152
+ &lt;/Page&gt;
153
+ &lt;/Layout&gt;'
154
+ >
125
155
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
126
156
  <use href="/img/sprite.svg#content_copy"></use></svg
127
157
  ><svg
@@ -163,7 +193,14 @@
163
193
  <pre data-prefix="&gt;" class="text-success"><code>Done!</code></pre>
164
194
  </div>
165
195
  <span class="usx-tooltip"
166
- ><button type="button" class="usa-button usx-button usx-button--ghost usx-copy">
196
+ ><button
197
+ type="button"
198
+ class="usa-button usx-button usx-button--ghost usx-copy"
199
+ aria-label="Copy to clipboard"
200
+ data-usx-copy="npm install @solexllc/usx
201
+ installing...
202
+ Done!"
203
+ >
167
204
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
168
205
  <use href="/img/sprite.svg#content_copy"></use></svg
169
206
  ><svg
@@ -5,12 +5,6 @@ import Icon from '../icon/Icon';
5
5
  import Tooltip from '../tooltip/Tooltip';
6
6
  import type { TooltipProps } from '../tooltip/Tooltip';
7
7
 
8
- function copyTextToClipboard(text: string) {
9
- if (window.navigator.clipboard) {
10
- return window.navigator.clipboard.writeText(text);
11
- }
12
- }
13
-
14
8
  export interface CopyToClipboardProps {
15
9
  copyText?: string;
16
10
  label?: string | null;
@@ -30,7 +24,8 @@ export default function CopyToClipboard({
30
24
  <Button
31
25
  ghost={true}
32
26
  className={ClassNames('usx-copy', className)}
33
- onClick={() => copyTextToClipboard(copyText)}
27
+ extraAttributes={{ 'data-usx-copy': copyText }}
28
+ aria-label={label ? undefined : 'Copy to clipboard'}
34
29
  type="button"
35
30
  >
36
31
  <Icon name="content_copy" className="usx-copy__copy" staticBaseUrl={staticBaseUrl} />
@@ -3,7 +3,8 @@
3
3
  <button
4
4
  type="button"
5
5
  class="usa-button usx-button usx-button--ghost usx-copy"
6
- onclick="navigator.clipboard.writeText('Example text to copy')"
6
+ data-usx-copy="Example text to copy"
7
+ aria-label="Copy to clipboard"
7
8
  >
8
9
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
9
10
  <use href="img/sprite.svg#content_copy"></use>
@@ -24,7 +25,7 @@
24
25
  <button
25
26
  type="button"
26
27
  class="usa-button usx-button usx-button--ghost usx-copy"
27
- onclick="navigator.clipboard.writeText('Example text to copy')"
28
+ data-usx-copy="Example text to copy"
28
29
  >
29
30
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
30
31
  <use href="img/sprite.svg#content_copy"></use>
@@ -42,7 +43,8 @@
42
43
  <button
43
44
  type="button"
44
45
  class="usa-button usx-button usx-button--ghost usa-button--inverse usx-copy"
45
- onclick="navigator.clipboard.writeText('Example text to copy')"
46
+ data-usx-copy="Example text to copy"
47
+ aria-label="Copy to clipboard"
46
48
  >
47
49
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
48
50
  <use href="img/sprite.svg#content_copy"></use>
@@ -70,7 +72,7 @@
70
72
  <button
71
73
  type="button"
72
74
  class="usa-button usx-button usx-button--ghost usa-button--inverse usx-copy"
73
- onclick="navigator.clipboard.writeText('Example text to copy')"
75
+ data-usx-copy="Example text to copy"
74
76
  >
75
77
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
76
78
  <use href="img/sprite.svg#content_copy"></use>
@@ -1,7 +1,8 @@
1
1
  {# Django template for CopyToClipboard #}
2
2
  {% load usx_components %}
3
- {% with buttonClass=className|default:''|add:' usx-copy' escapedCopyText=copyText|default:''|escapejs %}
4
- {% dict onclick="navigator.clipboard.writeText('"|add:escapedCopyText|add:"')" as copyAttributes %}
3
+ {% with buttonClass=className|default:''|add:' usx-copy' %}
4
+ {% if label %}{% dict data_usx_copy=copyText|default:'' as copyAttributes %}
5
+ {% else %}{% dict data_usx_copy=copyText|default:'' aria_label='Copy to clipboard' as copyAttributes %}{% endif %}
5
6
  {% button ghost=True className=buttonClass extraAttributes=copyAttributes as copyButton %}
6
7
  {% icon name='content_copy' className="usx-copy__copy" staticBaseUrl=staticBaseUrl %}{% endicon %}
7
8
  {% icon name='check' className="usx-copy__check" staticBaseUrl=staticBaseUrl %}{% endicon %}
@@ -1,6 +1,11 @@
1
1
  <h3 class="site-preview-heading">Default</h3>
2
2
  <span class="usx-tooltip"
3
- ><button type="button" class="usa-button usx-button usx-button--ghost usx-copy">
3
+ ><button
4
+ type="button"
5
+ class="usa-button usx-button usx-button--ghost usx-copy"
6
+ aria-label="Copy to clipboard"
7
+ data-usx-copy="Example text to copy"
8
+ >
4
9
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
5
10
  <use href="/img/sprite.svg#content_copy"></use></svg
6
11
  ><svg class="usa-icon usx-icon usx-copy__check" aria-hidden="true" focusable="false" role="img">
@@ -13,7 +18,11 @@
13
18
  >
14
19
 
15
20
  <h3 class="site-preview-heading">With Text</h3>
16
- <button type="button" class="usa-button usx-button usx-button--ghost usx-copy">
21
+ <button
22
+ type="button"
23
+ class="usa-button usx-button usx-button--ghost usx-copy"
24
+ data-usx-copy="Example text to copy"
25
+ >
17
26
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
18
27
  <use href="/img/sprite.svg#content_copy"></use></svg
19
28
  ><svg class="usa-icon usx-icon usx-copy__check" aria-hidden="true" focusable="false" role="img">
@@ -27,6 +36,8 @@
27
36
  ><button
28
37
  type="button"
29
38
  class="usa-button usx-button usx-button--ghost usx-copy usa-button--inverse"
39
+ aria-label="Copy to clipboard"
40
+ data-usx-copy="Example text to copy"
30
41
  >
31
42
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
32
43
  <use href="/img/sprite.svg#content_copy"></use></svg
@@ -50,6 +61,7 @@
50
61
  <button
51
62
  type="button"
52
63
  class="usa-button usx-button usx-button--ghost usx-copy usa-button--inverse"
64
+ data-usx-copy="Example text to copy"
53
65
  >
54
66
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
55
67
  <use href="/img/sprite.svg#content_copy"></use></svg
@@ -789,7 +789,6 @@
789
789
  class="usa-input usx-input"
790
790
  id="django-searchable-paginated-search"
791
791
  placeholder="Search table"
792
- value=""
793
792
  />
794
793
  </div>
795
794
  <div class="usx-data-table-container--scrollable" tabindex="0">
@@ -12402,11 +12401,11 @@
12402
12401
  data-column-key="avatar"
12403
12402
  >
12404
12403
  <div class="usx-data-table__cell-content">
12405
- <a href="#" class="usx-avatar" aria-label="Ada Lovelace">
12404
+ <span class="usx-avatar" aria-label="Ada Lovelace">
12406
12405
  <span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
12407
12406
  >AL</span
12408
12407
  >
12409
- </a>
12408
+ </span>
12410
12409
  </div>
12411
12410
  </td>
12412
12411
 
@@ -12489,11 +12488,11 @@
12489
12488
  data-column-key="avatar"
12490
12489
  >
12491
12490
  <div class="usx-data-table__cell-content">
12492
- <a href="#" class="usx-avatar" aria-label="Grace Hopper">
12491
+ <span class="usx-avatar" aria-label="Grace Hopper">
12493
12492
  <span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
12494
12493
  >GH</span
12495
12494
  >
12496
- </a>
12495
+ </span>
12497
12496
  </div>
12498
12497
  </td>
12499
12498
 
@@ -10997,10 +10997,10 @@
10997
10997
  data-column-key="avatar"
10998
10998
  >
10999
10999
  <div class="usx-data-table__cell-content">
11000
- <a href="#" class="usx-avatar" aria-label="Ada Lovelace"
11000
+ <span class="usx-avatar" aria-label="Ada Lovelace"
11001
11001
  ><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
11002
11002
  >AL</span
11003
- ></a
11003
+ ></span
11004
11004
  >
11005
11005
  </div>
11006
11006
  </td>
@@ -11076,10 +11076,10 @@
11076
11076
  data-column-key="avatar"
11077
11077
  >
11078
11078
  <div class="usx-data-table__cell-content">
11079
- <a href="#" class="usx-avatar" aria-label="Grace Hopper"
11079
+ <span class="usx-avatar" aria-label="Grace Hopper"
11080
11080
  ><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
11081
11081
  >GH</span
11082
- ></a
11082
+ ></span
11083
11083
  >
11084
11084
  </div>
11085
11085
  </td>
@@ -119,8 +119,10 @@
119
119
  >
120
120
 
121
121
 
122
+
122
123
  <summary class="usx-summary"><span class="usx-summary-text">Services</span></summary>
123
124
 
125
+
124
126
  <div class="usx-details__content">
125
127
  <ul
126
128
  class="usx-tree usx-tree--padded"
@@ -305,11 +307,15 @@
305
307
 
306
308
  <span
307
309
 
310
+
311
+
308
312
  class=
309
313
  "
310
314
  usa-tag usx-tag
311
315
 
312
- bg-success
316
+
317
+ bg-success
318
+
313
319
 
314
320
 
315
321
 
@@ -503,11 +509,15 @@
503
509
 
504
510
  <span
505
511
 
512
+
513
+
506
514
  class=
507
515
  "
508
516
  usa-tag usx-tag
509
517
 
510
- bg-info
518
+
519
+ bg-info
520
+
511
521
 
512
522
 
513
523
 
@@ -539,13 +549,17 @@
539
549
 
540
550
  <span
541
551
 
552
+
553
+
542
554
  class=
543
555
  "
544
556
  usa-tag usx-tag
545
557
 
546
558
 
547
559
 
548
- usx-tag--outline
560
+
561
+ usx-tag--outline
562
+
549
563
 
550
564
  "
551
565
  >
@@ -789,11 +803,15 @@
789
803
 
790
804
  <span
791
805
 
806
+
807
+
792
808
  class=
793
809
  "
794
810
  usa-tag usx-tag
795
811
 
796
- bg-success
812
+
813
+ bg-success
814
+
797
815
 
798
816
 
799
817
 
@@ -822,11 +840,15 @@
822
840
 
823
841
  <span
824
842
 
843
+
844
+
825
845
  class=
826
846
  "
827
847
  usa-tag usx-tag
828
848
 
829
- bg-warning
849
+
850
+ bg-warning
851
+
830
852
 
831
853
 
832
854
 
@@ -855,11 +877,15 @@
855
877
 
856
878
  <span
857
879
 
880
+
881
+
858
882
  class=
859
883
  "
860
884
  usa-tag usx-tag
861
885
 
862
- bg-info
886
+
887
+ bg-info
888
+
863
889
 
864
890
 
865
891
 
@@ -969,7 +995,7 @@
969
995
 
970
996
 
971
997
  placeholder="Program name or keyword"
972
- value=""
998
+
973
999
 
974
1000
 
975
1001
 
@@ -992,6 +1018,7 @@
992
1018
 
993
1019
 
994
1020
 
1021
+
995
1022
  <div class="usa-form-group usx-form-group">
996
1023
 
997
1024
  <div class="usa-checkbox usx-checkbox">
@@ -1002,7 +1029,7 @@
1002
1029
 
1003
1030
  class="
1004
1031
 
1005
- usa-checkbox__label
1032
+ usa-checkbox__label
1006
1033
 
1007
1034
  "
1008
1035
 
@@ -1027,6 +1054,8 @@
1027
1054
 
1028
1055
 
1029
1056
 
1057
+
1058
+
1030
1059
  <div class="usa-form-group usx-form-group">
1031
1060
 
1032
1061
  <div class="usa-checkbox usx-checkbox">
@@ -1037,7 +1066,7 @@
1037
1066
 
1038
1067
  class="
1039
1068
 
1040
- usa-checkbox__label
1069
+ usa-checkbox__label
1041
1070
 
1042
1071
  "
1043
1072
 
@@ -1057,6 +1086,7 @@
1057
1086
 
1058
1087
 
1059
1088
 
1089
+
1060
1090
  </fieldset>
1061
1091
  </form>
1062
1092
  </div>
@@ -1151,7 +1181,7 @@
1151
1181
  id="django-drawer-service-search"
1152
1182
  class="usa-input usx-input"
1153
1183
  placeholder="Find a service"
1154
- value=""
1184
+
1155
1185
  type="search"
1156
1186
  name="q"
1157
1187
  />
@@ -1170,6 +1200,7 @@
1170
1200
 
1171
1201
 
1172
1202
 
1203
+
1173
1204
  "
1174
1205
 
1175
1206
 
@@ -1209,27 +1240,9 @@
1209
1240
 
1210
1241
 
1211
1242
 
1243
+
1212
1244
  </form>
1213
- <script data-id="drawer-service-search" data-on-submit="" data-search-key="q">
1214
- const data = document.currentScript.dataset;
1215
- const onSubmit = data.onSubmit;
1216
-
1217
- if (!!onSubmit) {
1218
- const id = data.id;
1219
- const searchKey = data.searchKey;
1220
- document.addEventListener("DOMContentLoaded", function() {
1221
- document.getElementById(`${id}-form`).onsubmit = function(e) {
1222
- e.preventDefault();
1223
- const formData = new FormData(e.target);
1224
- const query = formData.get(searchKey);
1225
- const func = eval(onSubmit);
1226
- func(query);
1227
- return false;
1228
- };
1229
- });
1230
- }
1231
-
1232
- </script>
1245
+
1233
1246
  </section>
1234
1247
 
1235
1248
  <nav aria-label="Service sections" class="margin-top-3">
@@ -1256,8 +1269,10 @@
1256
1269
  >
1257
1270
 
1258
1271
 
1272
+
1259
1273
  <summary class="usx-summary"><span class="usx-summary-text">Benefits and assistance</span></summary>
1260
1274
 
1275
+
1261
1276
  <div class="usx-details__content">
1262
1277
  <ul
1263
1278
  class="usx-tree usx-tree--padded"
@@ -1272,8 +1287,10 @@
1272
1287
  >
1273
1288
 
1274
1289
 
1290
+
1275
1291
  <summary class="usx-summary"><span class="usx-summary-text">Housing support</span></summary>
1276
1292
 
1293
+
1277
1294
  <div class="usx-details__content">
1278
1295
  <ul
1279
1296
  class="usx-tree usx-tree--padded"
@@ -1288,8 +1305,10 @@
1288
1305
  >
1289
1306
 
1290
1307
 
1308
+
1291
1309
  <summary class="usx-summary"><span class="usx-summary-text">Rental assistance</span></summary>
1292
1310
 
1311
+
1293
1312
  <div class="usx-details__content">
1294
1313
  <ul
1295
1314
  class="usx-tree usx-tree--padded"
@@ -1347,8 +1366,10 @@
1347
1366
  >
1348
1367
 
1349
1368
 
1369
+
1350
1370
  <summary class="usx-summary"><span class="usx-summary-text">Food assistance</span></summary>
1351
1371
 
1372
+
1352
1373
  <div class="usx-details__content">
1353
1374
  <ul
1354
1375
  class="usx-tree usx-tree--padded"
@@ -1396,8 +1417,10 @@
1396
1417
  >
1397
1418
 
1398
1419
 
1420
+
1399
1421
  <summary class="usx-summary"><span class="usx-summary-text">Records and permits</span></summary>
1400
1422
 
1423
+
1401
1424
  <div class="usx-details__content">
1402
1425
  <ul
1403
1426
  class="usx-tree usx-tree--padded"
@@ -5,10 +5,11 @@
5
5
  aria-labelledby="django-main-content-title"
6
6
  >
7
7
  <h1 id="django-main-content-title" class="usx-page__title">Page not found</h1>
8
+
8
9
  <div class="usx-page__content">
9
10
  <div class="usa-prose usx-prose usx-error-page__body">
10
11
  <p class="usa-intro usx-error-page__description margin-bottom-4">
11
- We're sorry, we can't find the page you're looking for.
12
+ We&#x27;re sorry, we can&#x27;t find the page you&#x27;re looking for.
12
13
  </p>
13
14
 
14
15
  <div class="usx-error-page__content">
@@ -65,8 +66,9 @@
65
66
  aria-labelledby="django-permission-denied-title"
66
67
  >
67
68
  <h1 id="django-permission-denied-title" class="usx-page__title">
68
- You don't have access to this page
69
+ You don&#x27;t have access to this page
69
70
  </h1>
71
+
70
72
  <div class="usx-page__content">
71
73
  <div class="usa-prose usx-prose usx-error-page__body">
72
74
  <p class="usa-intro usx-error-page__description margin-bottom-4">
@@ -130,6 +132,7 @@
130
132
  aria-labelledby="django-session-expired-title"
131
133
  >
132
134
  <h1 id="django-session-expired-title" class="usx-page__title">Your session has expired</h1>
135
+
133
136
  <div class="usx-page__content">
134
137
  <div class="usa-prose usx-prose usx-error-page__body">
135
138
  <p class="usa-intro usx-error-page__description margin-bottom-4">
@@ -162,8 +165,9 @@
162
165
  aria-labelledby="django-unexpected-error-title"
163
166
  >
164
167
  <h1 id="django-unexpected-error-title" class="usx-page__title">
165
- We couldn't complete your request
168
+ We couldn&#x27;t complete your request
166
169
  </h1>
170
+
167
171
  <div class="usx-page__content">
168
172
  <div class="usa-prose usx-prose usx-error-page__body">
169
173
  <p class="usa-intro usx-error-page__description margin-bottom-4">
@@ -236,6 +240,7 @@
236
240
  <h1 id="django-service-unavailable-title" class="usx-page__title">
237
241
  This service is temporarily unavailable
238
242
  </h1>
243
+
239
244
  <div class="usx-page__content">
240
245
  <div class="usa-prose usx-prose usx-error-page__body">
241
246
  <p class="usa-intro usx-error-page__description margin-bottom-4">
@@ -296,7 +301,10 @@
296
301
  class="usx-page usx-error-page"
297
302
  aria-labelledby="django-too-many-requests-title"
298
303
  >
299
- <h1 id="django-too-many-requests-title" class="usx-page__title">You've made too many requests</h1>
304
+ <h1 id="django-too-many-requests-title" class="usx-page__title">
305
+ You&#x27;ve made too many requests
306
+ </h1>
307
+
300
308
  <div class="usx-page__content">
301
309
  <div class="usa-prose usx-prose usx-error-page__body">
302
310
  <p class="usa-intro usx-error-page__description margin-bottom-4">
@@ -336,10 +344,11 @@
336
344
  <h1 id="django-client-page-fallback-title" class="usx-page__title">
337
345
  There is a problem with this page
338
346
  </h1>
347
+
339
348
  <div class="usx-page__content">
340
349
  <div class="usa-prose usx-prose usx-error-page__body">
341
350
  <p class="usa-intro usx-error-page__description margin-bottom-4">
342
- We couldn't display this page.
351
+ We couldn&#x27;t display this page.
343
352
  </p>
344
353
 
345
354
  <div class="usx-error-page__content">
@@ -392,6 +401,7 @@
392
401
  <h1 id="django-custom-recovery-content-title" class="usx-page__title">
393
402
  Your application could not be submitted
394
403
  </h1>
404
+
395
405
  <div class="usx-page__content">
396
406
  <div class="usa-prose usx-prose usx-error-page__body">
397
407
  <p class="usa-intro usx-error-page__description margin-bottom-4">
@@ -434,8 +444,9 @@
434
444
  aria-labelledby="django-unexpected-error-with-details-title"
435
445
  >
436
446
  <h1 id="django-unexpected-error-with-details-title" class="usx-page__title">
437
- We couldn't complete your request
447
+ We couldn&#x27;t complete your request
438
448
  </h1>
449
+
439
450
  <div class="usx-page__content">
440
451
  <div class="usa-prose usx-prose usx-error-page__body">
441
452
  <p class="usa-intro usx-error-page__description margin-bottom-4">
@@ -490,6 +501,7 @@ ValueError: A &lt;script&gt; tag &amp; an invalid record were rejected.</p>
490
501
  aria-labelledby="django-minimal-error-title"
491
502
  >
492
503
  <h1 id="django-minimal-error-title" class="usx-page__title">This page is unavailable</h1>
504
+
493
505
  <div class="usx-page__content">
494
506
  <div class="usa-prose usx-prose usx-error-page__body">
495
507
  <p class="usa-intro usx-error-page__description margin-bottom-4">Please try again later.</p>
@@ -515,10 +527,11 @@ ValueError: A &lt;script&gt; tag &amp; an invalid record were rejected.</p>
515
527
  aria-labelledby="django-cats-error-title"
516
528
  >
517
529
  <h1 id="django-cats-error-title" class="usx-page__title">Page not found</h1>
530
+
518
531
  <div class="usx-page__content">
519
532
  <div class="usa-prose usx-prose usx-error-page__body">
520
533
  <p class="usa-intro usx-error-page__description margin-bottom-4">
521
- We're sorry, we can't find the page you're looking for.
534
+ We&#x27;re sorry, we can&#x27;t find the page you&#x27;re looking for.
522
535
  </p>
523
536
 
524
537
  <div class="usx-image">
@@ -40,11 +40,6 @@
40
40
  <div class="usa-form-group usx-form-group">
41
41
  <label class="usa-label usx-label" for="django-lonely-input"> Lonely input </label>
42
42
 
43
- <input
44
- class="usa-input usx-input"
45
- id="django-lonely-input"
46
- placeholder="Type here..."
47
- value=""
48
- />
43
+ <input class="usa-input usx-input" id="django-lonely-input" placeholder="Type here..." />
49
44
  </div>
50
45
  </fieldset>
@@ -19,6 +19,7 @@ export interface FileListProps {
19
19
  hint?: React.ReactNode;
20
20
  onRemove?: ((entry: FileListEntry) => void) | null;
21
21
  disabled?: boolean;
22
+ slim?: boolean;
22
23
  className?: string;
23
24
  }
24
25
 
@@ -47,13 +48,13 @@ function getEntryDisplay(entry: FileListEntry) {
47
48
  // A standalone list of files with a per-row Delete action — used by
48
49
  // FileInput's managed-multiple mode (see FileInput.tsx), but reusable
49
50
  // anywhere a parent already owns the file array.
50
- export default function FileList({ files, hint = 'Selected files', onRemove = null, disabled = false, className = '' }: FileListProps) {
51
+ export default function FileList({ files, hint = 'Selected files', onRemove = null, disabled = false, slim = false, className = '' }: FileListProps) {
51
52
  if (!files || files.length === 0) return null;
52
53
 
53
54
  const lastEntry = getEntryDisplay(files[files.length - 1]);
54
55
 
55
56
  return (
56
- <div className={ClassNames('usx-file-input__list', 'margin-top-1', className)}>
57
+ <div className={ClassNames('usx-file-input__list', 'margin-top-1', slim && 'usx-file-list--slim', className)}>
57
58
  <span className="usa-sr-only" aria-live="polite">
58
59
  {`You have selected the file: ${lastEntry.name}.`}
59
60
  </span>
@@ -35,6 +35,11 @@
35
35
  "default": false,
36
36
  "description": "Hides every row's Delete button."
37
37
  },
38
+ "slim": {
39
+ "type": "boolean",
40
+ "default": false,
41
+ "description": "Uses compact row padding, text, and Delete button sizing, with file type and size inline after the name. The list width and element structure stay the same."
42
+ },
38
43
  "className": {
39
44
  "type": "string",
40
45
  "description": "Additional classes for the outer wrapper."