@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,56 @@
|
|
|
1
|
+
{% load usx_components %}
|
|
2
|
+
<li class="usx-chat__message usx-chat__message--{{ state.position }}{% if own %} usx-chat__message--own{% endif %}{% if message.layout == 'panel' %} usx-chat__message--panel{% endif %}{% if message.deliveryState == 'failed' %} usx-chat__message--failed{% endif %}" data-message-id="{{ message.id }}" {% if message.clientMessageId != None %}data-usx-chat-client-message-id="{{ message.clientMessageId }}"{% endif %} {% if message.deliveryState != None %}data-usx-chat-delivery-state="{{ message.deliveryState }}"{% endif %} data-sender-name="{{ state.senderName }}" {% if state.exportText != None %} data-export-text="{{ state.exportText }}" {% endif %} >
|
|
3
|
+
{% if state.showIdentity %}
|
|
4
|
+
{% avatar props=state.avatarProps %}{% endavatar %}
|
|
5
|
+
{% else %}
|
|
6
|
+
<span class="usx-chat__avatar-space" aria-hidden="true"></span>
|
|
7
|
+
{% endif %}
|
|
8
|
+
<div class="usx-chat__message-body">
|
|
9
|
+
{% if state.showIdentity %}
|
|
10
|
+
<span class="usx-chat__sender" >{{ state.senderName }}</span
|
|
11
|
+
>
|
|
12
|
+
{% endif %}
|
|
13
|
+
{% if message.layout != 'panel' and not message.deliveryState %}
|
|
14
|
+
{% chat_bubble text=message.text content=message|get_optional:'content' attachments=message.attachments reactions=message.reactions %}{% endchat_bubble %}
|
|
15
|
+
{% else %}
|
|
16
|
+
{% chat_bubble text=message.text content=message|get_optional:'content' attachments=message.attachments %}{% endchat_bubble %}
|
|
17
|
+
{% endif %}
|
|
18
|
+
{% if message.deliveryState == 'failed' %}
|
|
19
|
+
{% alert variant='error' slim=True noIcon=True className='usx-chat__delivery-error' %}
|
|
20
|
+
<span>Message not sent.</span>
|
|
21
|
+
{% dict data_usx_chat_retry=message.id aria_label='Retry sending message' as retryAttributes %}
|
|
22
|
+
{% button variant='unstyled' className='usx-chat__retry' disabled=disabled extraAttributes=retryAttributes %}
|
|
23
|
+
Retry
|
|
24
|
+
{% endbutton %}
|
|
25
|
+
{% endalert %}
|
|
26
|
+
{% endif %}
|
|
27
|
+
{% if message.layout != 'panel' %}
|
|
28
|
+
{% if message.timeLabel and not state.showTime %}
|
|
29
|
+
<time class="usx-chat__time usa-sr-only" {% if message.sentAt != None %} datetime="{{ message.sentAt }}" {% endif %} >
|
|
30
|
+
{{ message.timeLabel }}
|
|
31
|
+
</time >
|
|
32
|
+
{% endif %}
|
|
33
|
+
{% if message.timeLabel and state.showTime or message.edited or state.deliveryStatus or state.canOpenThread and replyCount > 0 %}
|
|
34
|
+
<div class="usx-chat__message-footer">
|
|
35
|
+
{% if message.timeLabel and state.showTime %}
|
|
36
|
+
<time class="usx-chat__time" {% if message.sentAt != None %} datetime="{{ message.sentAt }}" {% endif %} >
|
|
37
|
+
{{ message.timeLabel }}
|
|
38
|
+
</time >
|
|
39
|
+
{% endif %}
|
|
40
|
+
{% if message.edited or state.deliveryStatus %}
|
|
41
|
+
<span class="usx-chat__message-meta" >{% if message.edited %}Edited{% endif %}{% if message.edited and state.deliveryStatus %} · {% endif %}{{ state.deliveryStatus }}</span
|
|
42
|
+
>
|
|
43
|
+
{% endif %}
|
|
44
|
+
{% if state.canOpenThread and replyCount > 0 %}
|
|
45
|
+
<button type="button" class="usa-button usx-button usa-button--unstyled usx-chat__thread-link" data-usx-chat-thread="{{ message.id }}" >
|
|
46
|
+
{{ replyCount }} {% if replyCount == 1 %}reply{% else %}replies{% endif %}
|
|
47
|
+
</button >
|
|
48
|
+
{% endif %}
|
|
49
|
+
</div>
|
|
50
|
+
{% endif %}
|
|
51
|
+
{% endif %}
|
|
52
|
+
{% if message.layout != 'panel' and not message.deliveryState %}
|
|
53
|
+
{% chat_message_actions id=id messageId=message.id senderName=state.senderName reactions=message.reactions reactionOptions=availableReactions actions=message.actions canCopy=canCopyMessage canReply=state.canOpenThread canForward=state.canForward %}{% endchat_message_actions %}
|
|
54
|
+
{% endif %}
|
|
55
|
+
</div>
|
|
56
|
+
</li>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<ol class="usx-chat__messages" style="max-width: 28rem">
|
|
2
|
+
<li class="usx-chat__message usx-chat__message--single" data-message-id="m1" data-sender-name="Avery" data-export-text="Your appointment is confirmed.">
|
|
3
|
+
<span class="usx-avatar usx-chat__avatar" aria-label="Avery"><span class="usx-avatar__content usx-circle bg-primary-light text-inverse">A</span></span>
|
|
4
|
+
<div class="usx-chat__message-body">
|
|
5
|
+
<span class="usx-chat__sender">Avery</span>
|
|
6
|
+
<div class="usx-chat__bubble"><p>Your appointment is confirmed.</p></div>
|
|
7
|
+
<div class="usx-chat__message-footer">
|
|
8
|
+
<time class="usx-chat__time" datetime="2026-08-21T10:30:00Z">10:30 AM</time>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
</li>
|
|
12
|
+
</ol>
|