@solexllc/usx-react 0.11.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.
- package/README.md +16 -0
- package/dist/Popover-BzDCTuQM.cjs +984 -0
- package/dist/Popover-LToVWsWc.js +985 -0
- package/dist/chat.cjs +1391 -0
- package/dist/chat.js +1391 -0
- package/dist/index.cjs +4428 -5290
- package/dist/index.js +58 -917
- package/package.json +7 -3
- package/src/chat.js +15 -0
- package/src/components/avatar/Avatar.tsx +54 -16
- package/src/components/avatar/avatar.django-snapshot.html +112 -0
- package/src/components/avatar/avatar.django.html +2 -2
- package/src/components/avatar/avatar.html +25 -0
- package/src/components/avatar/avatar.react-snapshot.html +104 -0
- package/src/components/avatar/config.json +13 -15
- package/src/components/avatar-group/AvatarGroup.tsx +17 -15
- package/src/components/avatar-group/avatar-group.django-snapshot.html +22 -0
- package/src/components/avatar-group/avatar-group.django.html +1 -1
- package/src/components/avatar-group/avatar-group.react-snapshot.html +20 -0
- package/src/components/avatar-group/config.json +2 -2
- package/src/components/back-to-top/BackToTop.tsx +21 -57
- package/src/components/back-to-top/back-to-top.django-snapshot.html +101 -202
- package/src/components/back-to-top/back-to-top.django.html +11 -38
- package/src/components/back-to-top/back-to-top.html +22 -106
- package/src/components/back-to-top/back-to-top.react-snapshot.html +94 -148
- package/src/components/back-to-top/config.json +41 -10
- package/src/components/button/Button.tsx +12 -3
- package/src/components/button/button.django-snapshot.html +18 -0
- package/src/components/button/button.django.html +3 -2
- package/src/components/button/button.react-snapshot.html +16 -0
- package/src/components/button/config.json +11 -2
- package/src/components/callout/callout.django.html +1 -1
- package/src/components/callout/config.json +7 -16
- package/src/components/character-count/CharacterCount.tsx +2 -0
- package/src/components/character-count/character-count.react-snapshot.html +7 -0
- package/src/components/chat/Chat.tsx +575 -0
- package/src/components/chat/README.md +174 -0
- package/src/components/chat/avatarProps.ts +32 -0
- package/src/components/chat/chat.django-snapshot.html +23515 -0
- package/src/components/chat/chat.django.html +75 -0
- package/src/components/chat/chat.html +116 -0
- package/src/components/chat/chat.react-snapshot.html +16895 -0
- package/src/components/chat/config.json +1241 -0
- package/src/components/chat-attachment/ChatAttachment.tsx +39 -0
- package/src/components/chat-attachment/chat-attachment.django.html +24 -0
- package/src/components/chat-attachment/chat-attachment.html +10 -0
- package/src/components/chat-attachment/config.json +27 -0
- package/src/components/chat-attachments/ChatAttachments.tsx +17 -0
- package/src/components/chat-attachments/chat-attachments.django-snapshot.html +58 -0
- package/src/components/chat-attachments/chat-attachments.django.html +10 -0
- package/src/components/chat-attachments/chat-attachments.html +14 -0
- package/src/components/chat-attachments/chat-attachments.react-snapshot.html +46 -0
- package/src/components/chat-attachments/config.json +25 -0
- package/src/components/chat-bubble/ChatBubble.tsx +39 -0
- package/src/components/chat-bubble/ChatFormattedText.tsx +138 -0
- package/src/components/chat-bubble/chat-bubble.django-snapshot.html +128 -0
- package/src/components/chat-bubble/chat-bubble.django.html +19 -0
- package/src/components/chat-bubble/chat-bubble.html +1 -0
- package/src/components/chat-bubble/chat-bubble.react-snapshot.html +118 -0
- package/src/components/chat-bubble/config.json +70 -0
- package/src/components/chat-composer/ChatComposer.tsx +210 -0
- package/src/components/chat-composer/README.md +15 -0
- package/src/components/chat-composer/chat-composer.django-snapshot.html +575 -0
- package/src/components/chat-composer/chat-composer.django.html +77 -0
- package/src/components/chat-composer/chat-composer.html +44 -0
- package/src/components/chat-composer/chat-composer.react-snapshot.html +519 -0
- package/src/components/chat-composer/chat-formatting.django.html +59 -0
- package/src/components/chat-composer/config.json +137 -0
- package/src/components/chat-context/ChatContext.tsx +46 -0
- package/src/components/chat-context/chat-context.django-snapshot.html +35 -0
- package/src/components/chat-context/chat-context.django.html +20 -0
- package/src/components/chat-context/chat-context.html +9 -0
- package/src/components/chat-context/chat-context.react-snapshot.html +30 -0
- package/src/components/chat-context/config.json +36 -0
- package/src/components/chat-controls/ChatControls.tsx +67 -0
- package/src/components/chat-controls/chat-controls.django-snapshot.html +114 -0
- package/src/components/chat-controls/chat-controls.django.html +36 -0
- package/src/components/chat-controls/chat-controls.html +11 -0
- package/src/components/chat-controls/chat-controls.react-snapshot.html +107 -0
- package/src/components/chat-controls/config.json +67 -0
- package/src/components/chat-directory/ChatDirectory.tsx +168 -0
- package/src/components/chat-directory/chat-directory.django-snapshot.html +546 -0
- package/src/components/chat-directory/chat-directory.django.html +14 -0
- package/src/components/chat-directory/chat-directory.html +4 -0
- package/src/components/chat-directory/chat-directory.react-snapshot.html +471 -0
- package/src/components/chat-directory/config.json +242 -0
- package/src/components/chat-directory-item/ChatDirectoryItem.tsx +150 -0
- package/src/components/chat-directory-item/chat-directory-item.django-snapshot.html +281 -0
- package/src/components/chat-directory-item/chat-directory-item.django.html +38 -0
- package/src/components/chat-directory-item/chat-directory-item.html +9 -0
- package/src/components/chat-directory-item/chat-directory-item.react-snapshot.html +249 -0
- package/src/components/chat-directory-item/config.json +103 -0
- package/src/components/chat-history/ChatHistory.tsx +30 -0
- package/src/components/chat-history/chat-history.django-snapshot.html +113 -0
- package/src/components/chat-history/chat-history.django.html +20 -0
- package/src/components/chat-history/chat-history.html +9 -0
- package/src/components/chat-history/chat-history.react-snapshot.html +111 -0
- package/src/components/chat-history/config.json +24 -0
- package/src/components/chat-message/ChatMessage.tsx +148 -0
- package/src/components/chat-message/chat-message.django-snapshot.html +758 -0
- package/src/components/chat-message/chat-message.django.html +56 -0
- package/src/components/chat-message/chat-message.html +12 -0
- package/src/components/chat-message/chat-message.react-snapshot.html +627 -0
- package/src/components/chat-message/config.json +278 -0
- package/src/components/chat-message-actions/ChatMessageActions.tsx +133 -0
- package/src/components/chat-message-actions/chat-message-actions.django-snapshot.html +345 -0
- package/src/components/chat-message-actions/chat-message-actions.django.html +29 -0
- package/src/components/chat-message-actions/chat-message-actions.html +53 -0
- package/src/components/chat-message-actions/chat-message-actions.react-snapshot.html +295 -0
- package/src/components/chat-message-actions/config.json +121 -0
- package/src/components/chat-window/ChatWindow.tsx +133 -0
- package/src/components/chat-window/chat-window.django-snapshot.html +448 -0
- package/src/components/chat-window/chat-window.django.html +39 -0
- package/src/components/chat-window/chat-window.html +26 -0
- package/src/components/chat-window/chat-window.react-snapshot.html +286 -0
- package/src/components/chat-window/config.json +123 -0
- package/src/components/clickable/Clickable.tsx +19 -5
- package/src/components/clickable/clickable.django-snapshot.html +11 -2
- package/src/components/clickable/clickable.django.html +2 -0
- package/src/components/clickable/clickable.react-snapshot.html +10 -2
- package/src/components/clickable/config.json +4 -0
- package/src/components/code/code.django-snapshot.html +25 -18
- package/src/components/code/code.react-snapshot.html +41 -4
- package/src/components/copy-to-clipboard/CopyToClipboard.tsx +2 -7
- package/src/components/copy-to-clipboard/copy-to-clipboard.django-snapshot.html +6 -4
- package/src/components/copy-to-clipboard/copy-to-clipboard.django.html +3 -2
- package/src/components/copy-to-clipboard/copy-to-clipboard.react-snapshot.html +14 -2
- package/src/components/file-list/FileList.tsx +3 -2
- package/src/components/file-list/config.json +5 -0
- package/src/components/file-list/file-list.django-snapshot.html +63 -0
- package/src/components/file-list/file-list.django.html +1 -1
- package/src/components/file-list/file-list.react-snapshot.html +53 -0
- package/src/components/footer/footer.django-snapshot.html +0 -3
- package/src/components/header/header.django-snapshot.html +0 -160
- package/src/components/header/header.django.html +2 -2
- package/src/components/hero/hero.django-snapshot.html +0 -20
- package/src/components/hero/hero.django.html +3 -3
- package/src/components/image/image.django.html +4 -4
- package/src/components/input/Input.tsx +1 -1
- package/src/components/input/config.json +2 -3
- package/src/components/input/input.django-snapshot.html +4 -21
- package/src/components/input/input.django.html +2 -2
- package/src/components/link/Link.tsx +7 -4
- package/src/components/link/config.json +2 -3
- package/src/components/link/link.django-snapshot.html +8 -0
- package/src/components/link/link.django.html +2 -2
- package/src/components/link/link.html +4 -1
- package/src/components/link/link.react-snapshot.html +8 -0
- package/src/components/memorable-date/memorable-date.django-snapshot.html +0 -8
- package/src/components/memorable-date/memorable-date.django.html +2 -2
- package/src/components/misc-banner/misc-banner.django-snapshot.html +12 -12
- package/src/components/misc-banner/misc-banner.django.html +4 -2
- package/src/components/popover/Popover.tsx +60 -9
- package/src/components/popover/PopoverMenu.tsx +33 -15
- package/src/components/popover/config.json +88 -14
- package/src/components/popover/popover-menu.django.html +13 -2
- package/src/components/popover/popover.django-snapshot.html +229 -7
- package/src/components/popover/popover.django.html +3 -2
- package/src/components/popover/popover.react-snapshot.html +127 -4
- package/src/components/process-list/config.json +41 -3
- package/src/components/quote/Quote.tsx +9 -2
- package/src/components/search/Search.tsx +1 -1
- package/src/components/search/config.json +3 -4
- package/src/components/search/search.django-snapshot.html +262 -1684
- package/src/components/search/search.django.html +1 -20
- package/src/components/select/select.django-snapshot.html +7 -7
- package/src/components/select/select.react-snapshot.html +7 -7
- package/src/components/summary/Summary.tsx +4 -2
- package/src/components/summary/config.json +4 -0
- package/src/components/summary/summary.django.html +4 -4
- package/src/components/table/Table.tsx +58 -25
- package/src/components/table/config.json +61 -13
- package/src/components/tag/Tag.tsx +40 -7
- package/src/components/tag/config.json +18 -2
- package/src/components/tag/tag.django-snapshot.html +16 -1
- package/src/components/tag/tag.django.html +12 -6
- package/src/components/tag/tag.html +4 -0
- package/src/components/tag/tag.react-snapshot.html +16 -1
- package/src/components/tag-group/TagGroup.tsx +6 -9
- package/src/components/tag-group/config.json +4 -0
- package/src/components/tag-group/tag-group.django.html +1 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{% load usx_components %}
|
|
2
|
+
{% chat_window id=id title=chatTitle view=currentView status=windowState.status showBack=windowState.showBack showNewMessage=windowState.showNewMessage showCopyAction=windowState.showCopyAction conversationId=selectedConversation.id conversationActions=windowState.conversationActions actions=actions summaryProps=summaryProps side=side align=align defaultOpen=defaultOpen className=className %}
|
|
3
|
+
{% if currentView == 'conversation' or currentView == 'thread' %}
|
|
4
|
+
{% if subject != None %}
|
|
5
|
+
{% chat_context label=subject.label title=subject.title description=subject.description imageUrl=subject.imageUrl imageAlt=subject.imageAlt href=subject.href %}{% endchat_context %}
|
|
6
|
+
{% endif %}
|
|
7
|
+
{% endif %}
|
|
8
|
+
{% if currentView == 'thread' and visibleMessages.0 %}
|
|
9
|
+
{% dict aria_label='Thread context' as threadContextAttrs %}
|
|
10
|
+
{% callout as='aside' big=False strokeColor='primary' backgroundColor='surface-2' textColor='ink' className='usx-chat__context' extraAttributes=threadContextAttrs %}
|
|
11
|
+
<div class="usx-chat__context-copy">
|
|
12
|
+
<strong>Replying to {{ threadSender }}</strong>
|
|
13
|
+
{% if threadPreview %}<span>{{ threadPreview }}</span>{% endif %}
|
|
14
|
+
</div>
|
|
15
|
+
{% endcallout %}
|
|
16
|
+
{% endif %}
|
|
17
|
+
{% chat_directory id=id|add:'-directory' view=currentView conversations=conversations contacts=contacts participants=participants currentUserId=currentUserId selectable=isContacts recipientIds=recipientIds formId=id|add:'-composer' disabled=disabled %}{% endchat_directory %}
|
|
18
|
+
{% if currentView == 'contacts' %}
|
|
19
|
+
{% chat_composer id=id formAction=formAction requireRecipients=True disabled=disabled allowAttachments=allowAttachments allowFormatting=allowFormatting accept=accept emojiPack=emojiPack %}{% endchat_composer %}
|
|
20
|
+
{% endif %}
|
|
21
|
+
{% if currentView == 'conversation' or currentView == 'thread' %}
|
|
22
|
+
<ol class="usx-chat__messages" role="log" aria-label="{% if currentView == 'thread' %}Thread messages{% else %}Conversation{% endif %}" aria-live="polite" aria-relevant="additions text" aria-busy="{{ activeOlder.loading|yesno:'true,false' }}" tabindex="0" {% if activeOlder.cursor != None %} data-usx-chat-older-cursor="{{ activeOlder.cursor }}" {% endif %}{% if selectedId != None %} data-usx-chat-conversation-id="{{ selectedId }}" {% endif %}{% if currentView == 'thread' and threadId != None %} data-usx-chat-thread-id="{{ threadId }}" {% endif %} >
|
|
23
|
+
{% if activeOlder and currentView != 'thread' %}
|
|
24
|
+
{% chat_history hasMore=activeOlder.hasMore loading=activeOlder.loading error=activeOlder.error %}{% endchat_history %}
|
|
25
|
+
{% endif %}
|
|
26
|
+
{% if not visibleMessages %}
|
|
27
|
+
<li class="usx-chat__empty">
|
|
28
|
+
{% if currentView == 'thread' %}
|
|
29
|
+
Thread unavailable.
|
|
30
|
+
{% else %}
|
|
31
|
+
{{ emptyText }}
|
|
32
|
+
{% endif %}
|
|
33
|
+
</li>
|
|
34
|
+
{% endif %}
|
|
35
|
+
{% if currentView == 'thread' and visibleMessages.0 %}
|
|
36
|
+
<li class="usx-chat__thread-label" role="separator">
|
|
37
|
+
Original message
|
|
38
|
+
</li>
|
|
39
|
+
{% endif %}
|
|
40
|
+
{% for row in messageRows %}
|
|
41
|
+
{% with message=row.message %}
|
|
42
|
+
{% if currentView == 'conversation' and message.id == unreadBoundary %}
|
|
43
|
+
<li class="usx-chat__unread-divider" role="separator">
|
|
44
|
+
<span>Unread messages</span>
|
|
45
|
+
</li>
|
|
46
|
+
{% endif %}
|
|
47
|
+
{% chat_message id=id message=message participant=row.participant own=row.own isThread=isThread allowThreads=canThread allowForward=contacts|length showCopyMessageAction=showCopyMessageAction reactionOptions=row.reactionOptions disabled=disabled %}{% endchat_message %}
|
|
48
|
+
{% if currentView == 'thread' and forloop.first %}
|
|
49
|
+
{% if activeOlder %}
|
|
50
|
+
{% chat_history hasMore=activeOlder.hasMore loading=activeOlder.loading error=activeOlder.error %}{% endchat_history %}
|
|
51
|
+
{% endif %}
|
|
52
|
+
<li class="usx-chat__thread-divider" role="separator">
|
|
53
|
+
<span>{% if message.olderReplies.hasMore and message.replyCount == None %}Replies{% else %}{{ replyCount }} {% if replyCount == 1 %}reply{% else %}replies{% endif %}{% endif %}</span>
|
|
54
|
+
</li>
|
|
55
|
+
{% endif %}
|
|
56
|
+
{% endwith %}
|
|
57
|
+
{% endfor %}
|
|
58
|
+
{% if typingIds %}
|
|
59
|
+
<li class="usx-chat__typing" role="status" aria-live="polite">
|
|
60
|
+
{% avatar_group avatarProps=typingAvatarProps overlap=True %}{% endavatar_group %}
|
|
61
|
+
<span>{{ typingNames|join:', ' }} {% if typingIds|length == 1 %}is{% else %}are{% endif %} typing</span>
|
|
62
|
+
<span class="usx-chat__typing-dots" aria-hidden="true">
|
|
63
|
+
<i></i>
|
|
64
|
+
<i></i>
|
|
65
|
+
<i></i>
|
|
66
|
+
</span>
|
|
67
|
+
</li>
|
|
68
|
+
{% endif %}
|
|
69
|
+
{% chat_controls suggestedQuestions=suggestedQuestions choices=choices choicePrompt=choicePrompt disabled=disabled children=children %}{% endchat_controls %}
|
|
70
|
+
</ol>
|
|
71
|
+
{% if currentView != 'thread' or visibleMessages.0 %}
|
|
72
|
+
{% chat_composer id=id formAction=formAction allowAttachments=canAttach allowFormatting=allowFormatting conversationId=selectedId recipientId=recipientId isThread=isThread threadRootId=threadId disabled=disabled emojiPack=emojiPack accept=accept %}{% endchat_composer %}
|
|
73
|
+
{% endif %}
|
|
74
|
+
{% endif %}
|
|
75
|
+
{% endchat_window %}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<!-- Initialize @solexllc/usx/js/popover and @solexllc/usx/js/chat for dismiss and composer events. -->
|
|
2
|
+
<details
|
|
3
|
+
class="usx-popover usx-chat"
|
|
4
|
+
data-side="bottom"
|
|
5
|
+
data-align="start"
|
|
6
|
+
data-usx-popover-dismiss-on-outside="false"
|
|
7
|
+
>
|
|
8
|
+
<summary class="usa-button usx-button">Chat with us</summary>
|
|
9
|
+
<div id="chat-example" class="usx-popover__panel usx-popover__panel--square usx-chat__panel">
|
|
10
|
+
<div class="usx-popover__panel-content usx-chat__popover-content">
|
|
11
|
+
<section class="usx-chat__window" aria-labelledby="chat-example-title">
|
|
12
|
+
<header class="usx-chat__header">
|
|
13
|
+
<div>
|
|
14
|
+
<h2 id="chat-example-title" class="usx-chat__title">Support chat</h2>
|
|
15
|
+
<p class="usx-chat__status">Here to help</p>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="usx-chat__header-actions">
|
|
18
|
+
<details class="usx-chat__actions">
|
|
19
|
+
<summary aria-label="Conversation actions">
|
|
20
|
+
<svg class="usa-icon usx-icon" aria-hidden="true">
|
|
21
|
+
<use href="img/sprite.svg#more_vert"></use>
|
|
22
|
+
</svg>
|
|
23
|
+
</summary>
|
|
24
|
+
<div class="usx-chat__actions-menu">
|
|
25
|
+
<button type="button" data-usx-chat-copy>Copy conversation</button>
|
|
26
|
+
<span class="usa-sr-only" role="status" aria-live="polite"></span>
|
|
27
|
+
</div>
|
|
28
|
+
</details>
|
|
29
|
+
<button
|
|
30
|
+
type="button"
|
|
31
|
+
class="usx-chat__close"
|
|
32
|
+
data-usx-popover-close="chat-example"
|
|
33
|
+
aria-label="Close chat"
|
|
34
|
+
>
|
|
35
|
+
<svg class="usa-icon usx-icon" aria-hidden="true">
|
|
36
|
+
<use href="img/sprite.svg#close"></use>
|
|
37
|
+
</svg>
|
|
38
|
+
</button>
|
|
39
|
+
</div>
|
|
40
|
+
</header>
|
|
41
|
+
<ol
|
|
42
|
+
class="usx-chat__messages"
|
|
43
|
+
role="log"
|
|
44
|
+
aria-label="Conversation"
|
|
45
|
+
aria-live="polite"
|
|
46
|
+
aria-relevant="additions text"
|
|
47
|
+
tabindex="0"
|
|
48
|
+
>
|
|
49
|
+
<li
|
|
50
|
+
class="usx-chat__message usx-chat__message--single"
|
|
51
|
+
data-sender-name="Morgan"
|
|
52
|
+
data-export-text="Hi! How can I help today?"
|
|
53
|
+
>
|
|
54
|
+
<span class="usx-avatar usx-chat__avatar" aria-label="Morgan"
|
|
55
|
+
><span class="usx-avatar__content usx-circle">MO</span></span
|
|
56
|
+
>
|
|
57
|
+
<div class="usx-chat__message-body">
|
|
58
|
+
<span class="usx-chat__sender">Morgan</span>
|
|
59
|
+
<div class="usx-chat__bubble"><p>Hi! How can I help today?</p></div>
|
|
60
|
+
<time class="usx-chat__time" datetime="2026-01-01T12:00:00Z">12:00 PM</time>
|
|
61
|
+
</div>
|
|
62
|
+
</li>
|
|
63
|
+
</ol>
|
|
64
|
+
<div class="usx-chat__controls">
|
|
65
|
+
<div class="usx-chat__quick-replies" aria-label="Suggested questions">
|
|
66
|
+
<p>Suggested questions</p>
|
|
67
|
+
<button type="button" data-usx-chat-suggestion="apply">How do I apply?</button>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
<form class="usx-chat-composer usx-chat__composer" method="post" enctype="multipart/form-data">
|
|
71
|
+
<div id="chat-example-formatting" class="usx-chat__formatting" aria-label="Message formatting" hidden>
|
|
72
|
+
<ul class="usa-button-group usx-button-group usa-button-group--segmented usx-chat__format-buttons">
|
|
73
|
+
<li class="usa-button-group__item"><button type="button" class="usa-button usx-button usa-button--outline usx-chat__format-button" data-usx-chat-format="bold" aria-label="Bold" title="Bold (Ctrl/⌘+B)"><strong>B</strong></button></li>
|
|
74
|
+
<li class="usa-button-group__item"><button type="button" class="usa-button usx-button usa-button--outline usx-chat__format-button" data-usx-chat-format="italic" aria-label="Italic" title="Italic (Ctrl/⌘+I)"><em>I</em></button></li>
|
|
75
|
+
<li class="usa-button-group__item"><button type="button" class="usa-button usx-button usa-button--outline usx-chat__format-button" data-usx-chat-format="underline" aria-label="Underline" title="Underline (Ctrl/⌘+U)"><u>U</u></button></li>
|
|
76
|
+
<li class="usa-button-group__item"><button type="button" class="usa-button usx-button usa-button--outline usx-chat__format-button" data-usx-chat-format="strike" aria-label="Strikethrough" title="Strikethrough (Ctrl/⌘+Shift+X)"><s>S</s></button></li>
|
|
77
|
+
<li class="usa-button-group__item"><button type="button" class="usa-button usx-button usa-button--outline usx-chat__format-button" data-usx-chat-format="ordered" aria-label="Numbered list" title="Numbered list (Ctrl/⌘+Shift+7)">1.</button></li>
|
|
78
|
+
<li class="usa-button-group__item"><button type="button" class="usa-button usx-button usa-button--outline usx-chat__format-button" data-usx-chat-format="unordered" aria-label="Bulleted list" title="Bulleted list (Ctrl/⌘+Shift+8)"><svg class="usa-icon usx-icon" aria-hidden="true"><use href="img/sprite.svg#list"></use></svg></button></li>
|
|
79
|
+
<li class="usa-button-group__item"><button type="button" class="usa-button usx-button usa-button--outline usx-chat__format-button" data-usx-chat-format="quote" aria-label="Block quote" title="Block quote (Ctrl/⌘+Shift+9)"><svg class="usa-icon usx-icon" aria-hidden="true"><use href="img/sprite.svg#format_quote"></use></svg></button></li>
|
|
80
|
+
<li class="usa-button-group__item"><button type="button" class="usa-button usx-button usa-button--outline usx-chat__format-button" data-usx-chat-format="code" aria-label="Code block" title="Code block (Ctrl/⌘+Alt+Shift+C)"><svg class="usa-icon usx-icon" aria-hidden="true"><use href="img/sprite.svg#code"></use></svg></button></li>
|
|
81
|
+
</ul>
|
|
82
|
+
</div>
|
|
83
|
+
<label class="usa-sr-only" for="chat-example-message">Message</label>
|
|
84
|
+
<textarea
|
|
85
|
+
class="usa-textarea usx-textarea"
|
|
86
|
+
id="chat-example-message"
|
|
87
|
+
name="message"
|
|
88
|
+
placeholder="Write a message"
|
|
89
|
+
rows="2"
|
|
90
|
+
></textarea>
|
|
91
|
+
<div class="usx-chat__composer-actions">
|
|
92
|
+
<div class="usx-chat__attach usx-chat__attach--with-emoji">
|
|
93
|
+
<ul class="usa-button-group usx-button-group usa-button-group--segmented usx-chat__composer-tools">
|
|
94
|
+
<li class="usa-button-group__item"><button type="button" class="usa-button usx-button usa-button--outline" data-usx-chat-attach aria-label="Attach files" title="Attach files"><svg class="usa-icon usx-icon" aria-hidden="true"><use href="img/sprite.svg#attach_file"></use></svg></button></li>
|
|
95
|
+
<li class="usa-button-group__item"><button type="button" class="usa-button usx-button usa-button--outline" data-usx-chat-toggle-formatting aria-label="Show formatting" aria-controls="chat-example-formatting" aria-expanded="false" title="Show formatting"><svg class="usa-icon usx-icon" aria-hidden="true"><use href="img/sprite.svg#text_fields"></use></svg></button></li>
|
|
96
|
+
</ul>
|
|
97
|
+
<details class="usx-popover usx-chat__emoji-picker" data-side="top" data-align="start">
|
|
98
|
+
<summary class="usa-button usx-button usa-button--outline" aria-label="Choose emoji" title="Choose emoji"><svg class="usa-icon usx-icon" aria-hidden="true"><use href="img/sprite.svg#sentiment_satisfied"></use></svg></summary>
|
|
99
|
+
<div id="chat-example-emoji-picker" class="usx-popover__panel usx-popover__panel--square">
|
|
100
|
+
<ul class="usx-popover__menu"><li><button type="button" class="usx-popover__menu-item" data-usx-chat-emoji="🙂" data-usx-chat-emoji-name="slight_smile" aria-label="Slight smile" title=":slight_smile:">🙂</button></li></ul>
|
|
101
|
+
</div>
|
|
102
|
+
</details>
|
|
103
|
+
<input type="file" name="attachments" multiple aria-label="Attach files" hidden />
|
|
104
|
+
</div>
|
|
105
|
+
<button type="submit" class="usa-button usx-button usa-button--primary usx-chat__send" disabled>
|
|
106
|
+
<svg class="usa-icon usx-icon" aria-hidden="true">
|
|
107
|
+
<use href="img/sprite.svg#send"></use>
|
|
108
|
+
</svg>
|
|
109
|
+
Send
|
|
110
|
+
</button>
|
|
111
|
+
</div>
|
|
112
|
+
</form>
|
|
113
|
+
</section>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</details>
|