@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
@@ -0,0 +1,286 @@
1
+ <h3 class="site-preview-heading">Default</h3>
2
+ <div>
3
+ <details
4
+ class="usx-popover usx-chat"
5
+ open=""
6
+ data-side="bottom"
7
+ data-align="start"
8
+ data-usx-popover-dismiss-on-outside="false"
9
+ >
10
+ <summary>Open chat</summary>
11
+ <div
12
+ id="react-example-window-default"
13
+ class="usx-popover__panel usx-popover__panel--square usx-chat__panel"
14
+ >
15
+ <header class="usx-popover__header usx-chat__header">
16
+ <div class="usx-popover__header-content">
17
+ <h2
18
+ id="react-example-window-default-title"
19
+ class="usx-popover__panel-heading"
20
+ tabindex="-1"
21
+ >
22
+ Support
23
+ </h2>
24
+ </div>
25
+ <div class="usx-popover__header-right-actions">
26
+ <button
27
+ type="button"
28
+ class="usa-button usx-button usa-button--unstyled usx-button--tight usx-popover__header-action usx-popover__header-close"
29
+ aria-label="Close chat"
30
+ data-usx-popover-close="react-example-window-default"
31
+ >
32
+ <svg class="usa-icon usx-icon" aria-hidden="true" focusable="false" role="img">
33
+ <use href="/img/sprite.svg#close"></use>
34
+ </svg>
35
+ </button>
36
+ </div>
37
+ </header>
38
+ <div class="usx-popover__panel-content usx-chat__popover-content">
39
+ <section
40
+ class="usx-chat__window"
41
+ aria-labelledby="react-example-window-default-title"
42
+ data-chat-view="conversation"
43
+ >
44
+ <span class="usx-chat__copy-status usa-sr-only" role="status" aria-live="polite"></span>
45
+ <p class="usx-chat__status">Usually replies within a day.</p>
46
+ <ol class="usx-chat__messages">
47
+ <li data-message-id="example-message" data-sender-name="Avery">
48
+ <div class="usx-chat__bubble"><p>Your appointment is confirmed.</p></div>
49
+ </li>
50
+ </ol>
51
+ </section>
52
+ </div>
53
+ </div>
54
+ </details>
55
+ </div>
56
+
57
+ <h3 class="site-preview-heading">Inbox</h3>
58
+ <div>
59
+ <details
60
+ class="usx-popover usx-chat"
61
+ open=""
62
+ data-side="bottom"
63
+ data-align="start"
64
+ data-usx-popover-dismiss-on-outside="false"
65
+ >
66
+ <summary>Open chat</summary>
67
+ <div
68
+ id="react-example-window-inbox"
69
+ class="usx-popover__panel usx-popover__panel--square usx-chat__panel"
70
+ >
71
+ <header class="usx-popover__header usx-chat__header">
72
+ <div class="usx-popover__header-content">
73
+ <h2
74
+ id="react-example-window-inbox-title"
75
+ class="usx-popover__panel-heading"
76
+ tabindex="-1"
77
+ >
78
+ Messages
79
+ </h2>
80
+ </div>
81
+ <div class="usx-popover__header-right-actions">
82
+ <button
83
+ type="button"
84
+ class="usa-button usx-button usa-button--unstyled usx-button--tight usx-popover__header-action"
85
+ aria-label="New message"
86
+ data-usx-chat-new=""
87
+ >
88
+ <svg class="usa-icon usx-icon" aria-hidden="true" focusable="false" role="img">
89
+ <use href="/img/sprite.svg#add"></use>
90
+ </svg></button
91
+ ><button
92
+ type="button"
93
+ class="usa-button usx-button usa-button--unstyled usx-button--tight usx-popover__header-action usx-popover__header-close"
94
+ aria-label="Close chat"
95
+ data-usx-popover-close="react-example-window-inbox"
96
+ >
97
+ <svg class="usa-icon usx-icon" aria-hidden="true" focusable="false" role="img">
98
+ <use href="/img/sprite.svg#close"></use>
99
+ </svg>
100
+ </button>
101
+ </div>
102
+ </header>
103
+ <div class="usx-popover__panel-content usx-chat__popover-content">
104
+ <section
105
+ class="usx-chat__window"
106
+ aria-labelledby="react-example-window-inbox-title"
107
+ data-chat-view="inbox"
108
+ >
109
+ <span class="usx-chat__copy-status usa-sr-only" role="status" aria-live="polite"></span>
110
+ <ol class="usx-chat__messages">
111
+ <li data-message-id="example-message" data-sender-name="Avery">
112
+ <div class="usx-chat__bubble"><p>Your appointment is confirmed.</p></div>
113
+ </li>
114
+ </ol>
115
+ </section>
116
+ </div>
117
+ </div>
118
+ </details>
119
+ </div>
120
+
121
+ <h3 class="site-preview-heading">Thread</h3>
122
+ <div>
123
+ <details
124
+ class="usx-popover usx-chat"
125
+ open=""
126
+ data-side="bottom"
127
+ data-align="start"
128
+ data-usx-popover-dismiss-on-outside="false"
129
+ >
130
+ <summary>Open chat</summary>
131
+ <div
132
+ id="react-example-window-thread"
133
+ class="usx-popover__panel usx-popover__panel--square usx-chat__panel"
134
+ >
135
+ <header class="usx-popover__header usx-chat__header">
136
+ <div class="usx-popover__header-left-actions">
137
+ <button
138
+ type="button"
139
+ class="usa-button usx-button usa-button--unstyled usx-button--tight usx-popover__header-action"
140
+ aria-label="Back to conversation"
141
+ data-usx-chat-back=""
142
+ >
143
+ <svg class="usa-icon usx-icon" aria-hidden="true" focusable="false" role="img">
144
+ <use href="/img/sprite.svg#arrow_back"></use>
145
+ </svg>
146
+ </button>
147
+ </div>
148
+ <div class="usx-popover__header-content">
149
+ <h2
150
+ id="react-example-window-thread-title"
151
+ class="usx-popover__panel-heading"
152
+ tabindex="-1"
153
+ >
154
+ Thread
155
+ </h2>
156
+ </div>
157
+ <div class="usx-popover__header-right-actions">
158
+ <details class="usx-popover usx-chat__actions" data-side="bottom" data-align="end">
159
+ <summary
160
+ class="usa-button usx-button usa-button--unstyled usx-button--tight usx-popover__header-action"
161
+ aria-label="Conversation actions"
162
+ >
163
+ <svg class="usa-icon usx-icon" aria-hidden="true" focusable="false" role="img">
164
+ <use href="/img/sprite.svg#more_vert"></use>
165
+ </svg>
166
+ </summary>
167
+ <div
168
+ id="react-example-window-thread-conversation-actions"
169
+ class="usx-popover__panel usx-popover__panel--square usx-chat__actions-menu"
170
+ >
171
+ <ul class="usx-popover__menu">
172
+ <li>
173
+ <button data-usx-chat-copy="" type="button" class="usx-popover__menu-item">
174
+ <svg class="usa-icon usx-icon" aria-hidden="true" focusable="false" role="img">
175
+ <use href="/img/sprite.svg#content_copy"></use></svg
176
+ >Copy conversation
177
+ </button>
178
+ </li>
179
+ <li>
180
+ <button
181
+ data-usx-chat-directory-action="leave-group"
182
+ data-usx-chat-conversation-id="support"
183
+ type="button"
184
+ class="usx-popover__menu-item"
185
+ >
186
+ Leave group
187
+ </button>
188
+ </li>
189
+ <li>
190
+ <button
191
+ data-usx-chat-directory-action="delete-history"
192
+ data-usx-chat-conversation-id="support"
193
+ type="button"
194
+ class="usx-popover__menu-item"
195
+ disabled=""
196
+ >
197
+ Delete chat history
198
+ </button>
199
+ </li>
200
+ </ul>
201
+ </div>
202
+ </details>
203
+ <button
204
+ type="button"
205
+ class="usa-button usx-button usa-button--unstyled usx-button--tight usx-popover__header-action usx-popover__header-close"
206
+ aria-label="Close chat"
207
+ data-usx-popover-close="react-example-window-thread"
208
+ >
209
+ <svg class="usa-icon usx-icon" aria-hidden="true" focusable="false" role="img">
210
+ <use href="/img/sprite.svg#close"></use>
211
+ </svg>
212
+ </button>
213
+ </div>
214
+ </header>
215
+ <div class="usx-popover__panel-content usx-chat__popover-content">
216
+ <section
217
+ class="usx-chat__window"
218
+ aria-labelledby="react-example-window-thread-title"
219
+ data-chat-view="thread"
220
+ >
221
+ <span class="usx-chat__copy-status usa-sr-only" role="status" aria-live="polite"></span>
222
+ <p class="usx-chat__status">In Application support</p>
223
+ <ol class="usx-chat__messages">
224
+ <li data-message-id="example-message" data-sender-name="Avery">
225
+ <div class="usx-chat__bubble"><p>Your appointment is confirmed.</p></div>
226
+ </li>
227
+ </ol>
228
+ </section>
229
+ </div>
230
+ </div>
231
+ </details>
232
+ </div>
233
+
234
+ <h3 class="site-preview-heading">Closed</h3>
235
+ <div>
236
+ <details
237
+ class="usx-popover usx-chat"
238
+ data-side="bottom"
239
+ data-align="start"
240
+ data-usx-popover-dismiss-on-outside="false"
241
+ >
242
+ <summary class="host-window-launcher"><span>Contact support</span></summary>
243
+ <div
244
+ id="react-example-window-closed"
245
+ class="usx-popover__panel usx-popover__panel--square usx-chat__panel"
246
+ >
247
+ <header class="usx-popover__header usx-chat__header">
248
+ <div class="usx-popover__header-content">
249
+ <h2
250
+ id="react-example-window-closed-title"
251
+ class="usx-popover__panel-heading"
252
+ tabindex="-1"
253
+ >
254
+ Support
255
+ </h2>
256
+ </div>
257
+ <div class="usx-popover__header-right-actions">
258
+ <button
259
+ type="button"
260
+ class="usa-button usx-button usa-button--unstyled usx-button--tight usx-popover__header-action usx-popover__header-close"
261
+ aria-label="Close chat"
262
+ data-usx-popover-close="react-example-window-closed"
263
+ >
264
+ <svg class="usa-icon usx-icon" aria-hidden="true" focusable="false" role="img">
265
+ <use href="/img/sprite.svg#close"></use>
266
+ </svg>
267
+ </button>
268
+ </div>
269
+ </header>
270
+ <div class="usx-popover__panel-content usx-chat__popover-content">
271
+ <section
272
+ class="usx-chat__window"
273
+ aria-labelledby="react-example-window-closed-title"
274
+ data-chat-view="conversation"
275
+ >
276
+ <span class="usx-chat__copy-status usa-sr-only" role="status" aria-live="polite"></span>
277
+ <ol class="usx-chat__messages">
278
+ <li data-message-id="example-message" data-sender-name="Avery">
279
+ <div class="usx-chat__bubble"><p>Your appointment is confirmed.</p></div>
280
+ </li>
281
+ </ol>
282
+ </section>
283
+ </div>
284
+ </div>
285
+ </details>
286
+ </div>
@@ -0,0 +1,123 @@
1
+ {
2
+ "name": "chat-window",
3
+ "template": "chat-window/chat-window.django.html",
4
+ "version": 1,
5
+ "default": {
6
+ "id": "chat-window-example",
7
+ "title": "Support",
8
+ "defaultOpen": true,
9
+ "status": "Usually replies within a day."
10
+ },
11
+ "props": {
12
+ "id": {
13
+ "type": "string",
14
+ "description": "Unique Popover panel ID and prefix for chat controls."
15
+ },
16
+ "title": {
17
+ "type": "string",
18
+ "description": "Conversation heading inside the chat panel.",
19
+ "default": "Chat"
20
+ },
21
+ "status": {
22
+ "type": "string",
23
+ "description": "Optional status line below the heading."
24
+ },
25
+ "showCopyAction": {
26
+ "type": "boolean",
27
+ "default": false,
28
+ "description": "Show Copy conversation in the actions menu. Rich messages should provide exportText."
29
+ },
30
+ "actions": {
31
+ "type": "slot",
32
+ "description": "Additional controls inside the optional actions menu."
33
+ },
34
+ "children": {
35
+ "type": "slot",
36
+ "description": "Window body: compose a directory, transcript, composer, or custom content."
37
+ },
38
+ "side": {
39
+ "type": "select",
40
+ "options": [
41
+ "top",
42
+ "right",
43
+ "bottom",
44
+ "left"
45
+ ],
46
+ "description": "Popover panel side relative to the host launcher.",
47
+ "default": "bottom"
48
+ },
49
+ "align": {
50
+ "type": "select",
51
+ "options": [
52
+ "start",
53
+ "center",
54
+ "end"
55
+ ],
56
+ "description": "Popover panel alignment relative to the host launcher.",
57
+ "default": "start"
58
+ },
59
+ "defaultOpen": {
60
+ "type": "boolean",
61
+ "default": false,
62
+ "description": "Show the panel on initial render."
63
+ },
64
+ "className": {
65
+ "type": "string",
66
+ "default": "",
67
+ "description": "Additional classes for the Popover root."
68
+ },
69
+ "view": {
70
+ "type": "select",
71
+ "description": "Current view for enhancement and header labels.",
72
+ "options": [
73
+ "inbox",
74
+ "contacts",
75
+ "conversation",
76
+ "thread"
77
+ ],
78
+ "default": "conversation"
79
+ },
80
+ "showBack": {
81
+ "type": "boolean",
82
+ "description": "Show the back navigation control.",
83
+ "default": false
84
+ },
85
+ "showNewMessage": {
86
+ "type": "boolean",
87
+ "description": "Show the new message control.",
88
+ "default": false
89
+ },
90
+ "conversationId": {
91
+ "type": "string",
92
+ "description": "Conversation identifier included in host action events."
93
+ },
94
+ "conversationActions": {
95
+ "type": "array",
96
+ "description": "Actions for the selected conversation, using the same list as its directory row. Dispatches usx:chat-directory-action with actionId and conversationId.",
97
+ "items": {
98
+ "type": "object",
99
+ "description": "One conversation action.",
100
+ "properties": {
101
+ "id": {
102
+ "type": "string",
103
+ "description": "Action identifier."
104
+ },
105
+ "label": {
106
+ "type": "string",
107
+ "description": "Visible action label."
108
+ },
109
+ "disabled": {
110
+ "type": "boolean",
111
+ "description": "Disable this action."
112
+ }
113
+ }
114
+ },
115
+ "default": []
116
+ },
117
+ "summaryProps": {
118
+ "type": "object",
119
+ "component": "summary",
120
+ "description": "Host-supplied launcher content, classes, accessible label, and title. Chat adds no launcher styling or positioning. The default label is Open chat."
121
+ }
122
+ }
123
+ }
@@ -324,7 +324,7 @@
324
324
  </div>
325
325
 
326
326
  <span class="usa-error-message usx-error-message" role="alert"
327
- >You've done something wrong, although we don't necessarily know what.</span
327
+ >You&#x27;ve done something wrong, although we don&#x27;t necessarily know what.</span
328
328
  >
329
329
  </div>
330
330
 
@@ -369,7 +369,7 @@
369
369
  </div>
370
370
 
371
371
  <span class="usa-error-message usx-error-message" role="alert"
372
- >You've done something wrong, although we don't necessarily know what.</span
372
+ >You&#x27;ve done something wrong, although we don&#x27;t necessarily know what.</span
373
373
  >
374
374
 
375
375
  <h3 class="site-preview-heading">Default Checked</h3>
@@ -22,9 +22,13 @@ function ClickableLink({
22
22
  'usx-clickable__link',
23
23
  colorChange && 'usx-clickable__color-on-hover',
24
24
  bgColorChange && 'usx-clickable__bg-color-on-hover',
25
- className,
25
+ className
26
+ );
27
+ return (
28
+ <Tag className={classes} {...rest}>
29
+ {children}
30
+ </Tag>
26
31
  );
27
- return <Tag className={classes} {...rest}>{children}</Tag>;
28
32
  }
29
33
 
30
34
  function ClickableColorChange({ children, className, as: Tag = 'span', ...rest }: SubProps) {
@@ -51,21 +55,31 @@ type ButtonProps = { href?: undefined } & ButtonHTMLAttributes<HTMLButtonElement
51
55
  export type ClickableProps = (AnchorProps | ButtonProps) & {
52
56
  className?: string;
53
57
  children?: ReactNode;
58
+ extraAttributes?: Record<string, unknown>;
54
59
  };
55
60
 
56
- function Clickable({ className, children, ...rest }: ClickableProps) {
61
+ function Clickable({ className, children, extraAttributes = {}, ...rest }: ClickableProps) {
57
62
  const classes = classNames('usx-clickable', className);
58
63
 
59
64
  if ('href' in rest && rest.href !== undefined) {
60
65
  return (
61
- <a className={classes} {...(rest as AnchorHTMLAttributes<HTMLAnchorElement>)}>
66
+ <a
67
+ className={classes}
68
+ {...(rest as AnchorHTMLAttributes<HTMLAnchorElement>)}
69
+ {...extraAttributes}
70
+ >
62
71
  {children}
63
72
  </a>
64
73
  );
65
74
  }
66
75
 
67
76
  return (
68
- <button type="button" className={classes} {...(rest as ButtonHTMLAttributes<HTMLButtonElement>)}>
77
+ <button
78
+ type="button"
79
+ className={classes}
80
+ {...(rest as ButtonHTMLAttributes<HTMLButtonElement>)}
81
+ {...extraAttributes}
82
+ >
69
83
  {children}
70
84
  </button>
71
85
  );
@@ -1,5 +1,9 @@
1
1
  <h3 class="site-preview-heading">Default</h3>
2
- <a class="usx-clickable display-flex flex-column padding-2 border" href="https://google.com">
2
+ <a
3
+ class="usx-clickable display-flex flex-column padding-2 border"
4
+ href="https://google.com"
5
+ data-example="link"
6
+ >
3
7
  Everything taking up space in this box is clickable, but only the text below appears as a link.
4
8
  <br />
5
9
  <span class="usx-clickable__link">I look clickable</span>
@@ -216,6 +220,11 @@
216
220
  </a>
217
221
 
218
222
  <h3 class="site-preview-heading">Button Surface</h3>
219
- <button type="button" class="usx-clickable usa-button usx-button usx-button--ghost">
223
+ <button
224
+ type="button"
225
+ class="usx-clickable usa-button usx-button usx-button--ghost"
226
+ data-example="button"
227
+ data-active="false"
228
+ >
220
229
  <span class="usx-clickable__link">Action-style clickable (button mode)</span>
221
230
  </button>
@@ -2,8 +2,10 @@
2
2
  class="usx-clickable{% if className %} {{ className }}{% endif %}"
3
3
  href="{{ href }}"
4
4
  {% if id %}id="{{ id }}"{% endif %}
5
+ {% for attr, value in extraAttributes.items %} {{ attr }}="{% if value is True %}true{% elif value is False %}false{% else %}{{ value }}{% endif %}"{% endfor %}
5
6
  >{{ children|safe }}</a>{% else %}<button
6
7
  type="button"
7
8
  class="usx-clickable{% if className %} {{ className }}{% endif %}"
8
9
  {% if id %}id="{{ id }}"{% endif %}
10
+ {% for attr, value in extraAttributes.items %} {{ attr }}="{% if value is True %}true{% elif value is False %}false{% else %}{{ value }}{% endif %}"{% endfor %}
9
11
  >{{ children|safe }}</button>{% endif %}
@@ -1,5 +1,8 @@
1
1
  <h3 class="site-preview-heading">Default</h3>
2
- <a class="usx-clickable display-flex flex-column padding-2 border" href="https://google.com"
2
+ <a
3
+ class="usx-clickable display-flex flex-column padding-2 border"
4
+ href="https://google.com"
5
+ data-example="link"
3
6
  >Everything taking up space in this box is clickable, but only the text below appears as a
4
7
  link.<br /><span class="usx-clickable__link">I look clickable</span></a
5
8
  >
@@ -189,6 +192,11 @@
189
192
  >
190
193
 
191
194
  <h3 class="site-preview-heading">Button Surface</h3>
192
- <button type="button" class="usx-clickable usa-button usx-button usx-button--ghost">
195
+ <button
196
+ type="button"
197
+ class="usx-clickable usa-button usx-button usx-button--ghost"
198
+ data-example="button"
199
+ data-active="false"
200
+ >
193
201
  <span class="usx-clickable__link">Action-style clickable (button mode)</span>
194
202
  </button>
@@ -23,6 +23,10 @@
23
23
  "children": {
24
24
  "type": "slot",
25
25
  "description": "Composed content. React provides Clickable.Link, Clickable.ColorChange, and Clickable.BgColorChange; Django provides clickable_link, clickable_color_change, and clickable_bg_color_change block tags."
26
+ },
27
+ "extraAttributes": {
28
+ "type": "object",
29
+ "description": "Additional attributes for the root button or link, including data and ARIA attributes."
26
30
  }
27
31
  }
28
32
  }
@@ -74,11 +74,11 @@
74
74
  <button
75
75
  type="button"
76
76
  class="usa-button usx-button usx-button--ghost usx-copy"
77
- onclick="
78
- navigator.clipboard.writeText(
79
- '\u003Csection aria\u002Dlabel\u003D\u0022Account \u0026 settings\u0022\u003E\u000A \u003Ch2\u003EContact information\u003C/h2\u003E\u000A \u003Cp\u003EUse \u0026lt\u003BPage\u0026gt\u003B to define the page.\u003C/p\u003E\u000A\u003C/section\u003E'
80
- )
81
- "
77
+ data-usx-copy='&lt;section aria-label="Account &amp; settings"&gt;
78
+ &lt;h2&gt;Contact information&lt;/h2&gt;
79
+ &lt;p&gt;Use &amp;lt;Page&amp;gt; to define the page.&lt;/p&gt;
80
+ &lt;/section&gt;'
81
+ aria-label="Copy to clipboard"
82
82
  >
83
83
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
84
84
  <use href="img/sprite.svg#content_copy"></use>
@@ -125,11 +125,14 @@
125
125
  <button
126
126
  type="button"
127
127
  class="usa-button usx-button usx-button--ghost usx-copy"
128
- onclick="
129
- navigator.clipboard.writeText(
130
- '\u003CLayout\u003E\u000A \u003CPage title\u003D\u0022Account\u0022\u003E\u000A \u003CSection title\u003D\u0022Contact information\u0022\u003E\u000A \u003CContactDetails user\u003D{currentUser} /\u003E\u000A \u003C/Section\u003E\u000A \u003C/Page\u003E\u000A\u003C/Layout\u003E'
131
- )
132
- "
128
+ data-usx-copy='&lt;Layout&gt;
129
+ &lt;Page title="Account"&gt;
130
+ &lt;Section title="Contact information"&gt;
131
+ &lt;ContactDetails user={currentUser} /&gt;
132
+ &lt;/Section&gt;
133
+ &lt;/Page&gt;
134
+ &lt;/Layout&gt;'
135
+ aria-label="Copy to clipboard"
133
136
  >
134
137
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
135
138
  <use href="img/sprite.svg#content_copy"></use>
@@ -174,11 +177,14 @@
174
177
  <button
175
178
  type="button"
176
179
  class="usa-button usx-button usx-button--ghost usx-copy"
177
- onclick="
178
- navigator.clipboard.writeText(
179
- '\u003CLayout\u003E\u000A \u003CPage title\u003D\u0022Account\u0022\u003E\u000A \u003CSection title\u003D\u0022Contact information\u0022\u003E\u000A \u003CContactDetails user\u003D{currentUser} /\u003E\u000A \u003C/Section\u003E\u000A \u003C/Page\u003E\u000A\u003C/Layout\u003E'
180
- )
181
- "
180
+ data-usx-copy='&lt;Layout&gt;
181
+ &lt;Page title="Account"&gt;
182
+ &lt;Section title="Contact information"&gt;
183
+ &lt;ContactDetails user={currentUser} /&gt;
184
+ &lt;/Section&gt;
185
+ &lt;/Page&gt;
186
+ &lt;/Layout&gt;'
187
+ aria-label="Copy to clipboard"
182
188
  >
183
189
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
184
190
  <use href="img/sprite.svg#content_copy"></use>
@@ -233,9 +239,10 @@
233
239
  <button
234
240
  type="button"
235
241
  class="usa-button usx-button usx-button--ghost usx-copy"
236
- onclick="
237
- navigator.clipboard.writeText('npm install @solexllc/usx\u000Ainstalling...\u000ADone!')
238
- "
242
+ data-usx-copy="npm install @solexllc/usx
243
+ installing...
244
+ Done!"
245
+ aria-label="Copy to clipboard"
239
246
  >
240
247
  <svg class="usa-icon usx-icon usx-copy__copy" aria-hidden="true" focusable="false" role="img">
241
248
  <use href="img/sprite.svg#content_copy"></use>