@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.
- package/README.md +31 -0
- package/dist/Popover-Bg4-2-cU.cjs +987 -0
- package/dist/Popover-CqHczzNE.js +988 -0
- package/dist/chat.cjs +1396 -0
- package/dist/chat.js +1396 -0
- package/dist/index.cjs +4412 -5247
- package/dist/index.js +140 -972
- package/package.json +9 -5
- package/src/chat.js +15 -0
- package/src/components/accordion/Accordion.tsx +9 -57
- package/src/components/accordion/accordion.django.html +10 -20
- package/src/components/accordion/config.json +8 -2
- package/src/components/accordion-item/AccordionItem.tsx +54 -0
- package/src/components/accordion-item/accordion-item.django.html +19 -0
- package/src/components/accordion-item/accordion-item.html +8 -0
- package/src/components/accordion-item/config.json +55 -0
- package/src/components/alert/alert.django-snapshot.html +4 -4
- package/src/components/avatar/Avatar.tsx +54 -16
- package/src/components/avatar/avatar.django-snapshot.html +118 -2
- 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 +110 -3
- package/src/components/avatar/config.json +17 -17
- package/src/components/avatar-group/AvatarGroup.tsx +17 -15
- package/src/components/avatar-group/avatar-group.django-snapshot.html +196 -174
- package/src/components/avatar-group/avatar-group.django.html +1 -1
- package/src/components/avatar-group/avatar-group.react-snapshot.html +216 -165
- package/src/components/avatar-group/config.json +14 -8
- 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/banner/banner.django-snapshot.html +2 -2
- package/src/components/button/Button.tsx +15 -3
- package/src/components/button/button.django-snapshot.html +82 -0
- package/src/components/button/button.django.html +5 -2
- package/src/components/button/button.react-snapshot.html +80 -0
- package/src/components/button/config.json +17 -3
- package/src/components/callout/callout.django.html +1 -1
- package/src/components/callout/config.json +7 -16
- package/src/components/card/card.django-snapshot.html +43 -0
- package/src/components/card/card.react-snapshot.html +36 -0
- 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 +23579 -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 +213 -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 +135 -0
- package/src/components/chat-window/chat-window.django-snapshot.html +450 -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/checkbox/checkbox.django-snapshot.html +2 -2
- 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/data-table/data-table.django-snapshot.html +4 -5
- package/src/components/data-table/data-table.react-snapshot.html +4 -4
- package/src/components/drawer/drawer.django-snapshot.html +53 -30
- package/src/components/error-page/error-page.django-snapshot.html +20 -7
- package/src/components/fieldset/fieldset.django-snapshot.html +1 -6
- 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/form-group/form-group.django-snapshot.html +0 -2
- package/src/components/header/header.django-snapshot.html +3 -163
- package/src/components/header/header.django.html +2 -2
- package/src/components/header/header.html +1 -1
- package/src/components/header/header.react-snapshot.html +3 -3
- package/src/components/hero/hero.django-snapshot.html +0 -20
- package/src/components/hero/hero.django.html +3 -3
- package/src/components/identifier/config.json +4 -2
- package/src/components/identifier/identifier.django-snapshot.html +13 -16
- package/src/components/identifier/identifier.react-snapshot.html +13 -15
- package/src/components/image/image.django-snapshot.html +6 -6
- 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/layout/layout.django-snapshot.html +2 -0
- 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/modal/Modal.tsx +4 -3
- package/src/components/modal/config.json +3 -2
- package/src/components/modal/modal.django-snapshot.html +70 -14
- package/src/components/modal/modal.django.html +7 -9
- package/src/components/modal/modal.html +4 -4
- package/src/components/modal/modal.react-snapshot.html +64 -4
- package/src/components/page/Page.tsx +10 -7
- package/src/components/page/page.django-snapshot.html +5 -8
- package/src/components/page/page.django.html +2 -2
- package/src/components/page/page.html +1 -2
- package/src/components/page/page.react-snapshot.html +5 -8
- package/src/components/pagination/navigation/PaginationNavigation.tsx +2 -0
- package/src/components/pagination/navigation/pagination-navigation.django.html +2 -0
- package/src/components/pagination/pagination.django-snapshot.html +62 -0
- package/src/components/pagination/pagination.django.html +3 -1
- package/src/components/pagination/pagination.html +46 -0
- package/src/components/pagination/pagination.react-snapshot.html +48 -0
- package/src/components/pagination/summary/PaginationSummary.tsx +1 -1
- package/src/components/pagination/summary/pagination-summary.django.html +1 -1
- package/src/components/popover/Popover.tsx +61 -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 +265 -7
- package/src/components/popover/popover.django.html +3 -2
- package/src/components/popover/popover.react-snapshot.html +154 -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/section/Section.tsx +3 -1
- package/src/components/select/select.django-snapshot.html +7 -7
- package/src/components/select/select.react-snapshot.html +7 -7
- package/src/components/site-alert/site-alert.django-snapshot.html +8 -8
- 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/swap/Swap.tsx +35 -3
- package/src/components/swap/config.json +28 -1
- package/src/components/swap/swap.django-snapshot.html +29 -7
- package/src/components/swap/swap.django.html +15 -1
- package/src/components/swap/swap.react-snapshot.html +34 -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
- package/src/components/theme-picker/ThemePicker.tsx +48 -42
- package/src/components/theme-picker/config.json +27 -29
- package/src/components/theme-picker/theme-picker-select.django.html +1 -1
- package/src/components/theme-picker/theme-picker.django-snapshot.html +283 -78
- package/src/components/theme-picker/theme-picker.django.html +24 -11
- package/src/components/theme-picker/theme-picker.html +155 -54
- package/src/components/theme-picker/theme-picker.react-snapshot.html +265 -67
- package/src/index.js +1 -0
|
@@ -1,189 +1,217 @@
|
|
|
1
1
|
<h3 class="site-preview-heading">Default</h3>
|
|
2
2
|
<div class="usx-avatar-group">
|
|
3
|
-
<a
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
3
|
+
<a
|
|
4
|
+
href="https://google.com/search?q=George+Washington"
|
|
5
|
+
class="usx-avatar"
|
|
6
|
+
aria-label="George Washington"
|
|
7
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
8
|
+
>GW</span
|
|
9
|
+
></a
|
|
10
|
+
><a
|
|
11
|
+
href="https://google.com/search?q=Thomas+Jefferson"
|
|
12
|
+
class="usx-avatar"
|
|
13
|
+
aria-label="Thomas Jefferson"
|
|
14
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
15
|
+
>TJ</span
|
|
16
|
+
></a
|
|
17
|
+
><a
|
|
18
|
+
href="https://google.com/search?q=Benjamin+Franklin"
|
|
19
|
+
class="usx-avatar"
|
|
20
|
+
aria-label="Benjamin Franklin"
|
|
21
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
22
|
+
>BF</span
|
|
23
|
+
></a
|
|
24
|
+
>
|
|
18
25
|
</div>
|
|
19
26
|
|
|
20
27
|
<h3 class="site-preview-heading">Rounded Avatar Group</h3>
|
|
21
28
|
<div class="usx-avatar-group">
|
|
22
|
-
<a
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
29
|
+
<a
|
|
30
|
+
href="https://google.com/search?q=George+Washington"
|
|
31
|
+
class="usx-avatar"
|
|
32
|
+
aria-label="George Washington"
|
|
33
|
+
><span class="usx-avatar__content usx-rounded-md bg-primary-lighter text-primary-darker"
|
|
34
|
+
>GW</span
|
|
35
|
+
></a
|
|
36
|
+
><a
|
|
37
|
+
href="https://google.com/search?q=Thomas+Jefferson"
|
|
38
|
+
class="usx-avatar"
|
|
39
|
+
aria-label="Thomas Jefferson"
|
|
40
|
+
><span class="usx-avatar__content usx-rounded-md bg-primary-lighter text-primary-darker"
|
|
41
|
+
>TJ</span
|
|
42
|
+
></a
|
|
43
|
+
><a
|
|
44
|
+
href="https://google.com/search?q=Benjamin+Franklin"
|
|
45
|
+
class="usx-avatar"
|
|
46
|
+
aria-label="Benjamin Franklin"
|
|
47
|
+
><span class="usx-avatar__content usx-rounded-md bg-primary-lighter text-primary-darker"
|
|
48
|
+
>BF</span
|
|
49
|
+
></a
|
|
50
|
+
>
|
|
41
51
|
</div>
|
|
42
52
|
|
|
43
53
|
<h3 class="site-preview-heading">Circle Avatar Group</h3>
|
|
44
54
|
<div class="usx-avatar-group">
|
|
45
|
-
<a
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
<a
|
|
56
|
+
href="https://google.com/search?q=George+Washington"
|
|
57
|
+
class="usx-avatar"
|
|
58
|
+
aria-label="George Washington"
|
|
59
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
60
|
+
>GW</span
|
|
61
|
+
></a
|
|
62
|
+
><a
|
|
63
|
+
href="https://google.com/search?q=Thomas+Jefferson"
|
|
64
|
+
class="usx-avatar"
|
|
65
|
+
aria-label="Thomas Jefferson"
|
|
66
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
67
|
+
>TJ</span
|
|
68
|
+
></a
|
|
69
|
+
><a
|
|
70
|
+
href="https://google.com/search?q=Benjamin+Franklin"
|
|
71
|
+
class="usx-avatar"
|
|
72
|
+
aria-label="Benjamin Franklin"
|
|
73
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
74
|
+
>BF</span
|
|
75
|
+
></a
|
|
76
|
+
>
|
|
64
77
|
</div>
|
|
65
78
|
|
|
66
79
|
<h3 class="site-preview-heading">Overlapping Avatars</h3>
|
|
67
80
|
<div class="usx-avatar-group usx-avatar-group--overlap">
|
|
68
|
-
<a
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
<a
|
|
82
|
+
href="https://google.com/search?q=George+Washington"
|
|
83
|
+
class="usx-avatar"
|
|
84
|
+
aria-label="George Washington"
|
|
85
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
86
|
+
>GW</span
|
|
87
|
+
></a
|
|
88
|
+
><a
|
|
89
|
+
href="https://google.com/search?q=Thomas+Jefferson"
|
|
90
|
+
class="usx-avatar"
|
|
91
|
+
aria-label="Thomas Jefferson"
|
|
92
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
93
|
+
>TJ</span
|
|
94
|
+
></a
|
|
95
|
+
><a
|
|
96
|
+
href="https://google.com/search?q=Benjamin+Franklin"
|
|
97
|
+
class="usx-avatar"
|
|
98
|
+
aria-label="Benjamin Franklin"
|
|
99
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
100
|
+
>BF</span
|
|
101
|
+
></a
|
|
102
|
+
>
|
|
87
103
|
</div>
|
|
88
104
|
|
|
89
105
|
<h3 class="site-preview-heading">Stacked Avatars</h3>
|
|
90
106
|
<div class="usx-avatar-group usx-avatar-group--stacked">
|
|
91
|
-
<a
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
<a
|
|
108
|
+
href="https://google.com/search?q=George+Washington"
|
|
109
|
+
class="usx-avatar"
|
|
110
|
+
aria-label="George Washington"
|
|
111
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
112
|
+
>GW</span
|
|
113
|
+
></a
|
|
114
|
+
><a
|
|
115
|
+
href="https://google.com/search?q=Thomas+Jefferson"
|
|
116
|
+
class="usx-avatar"
|
|
117
|
+
aria-label="Thomas Jefferson"
|
|
118
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
119
|
+
>TJ</span
|
|
120
|
+
></a
|
|
121
|
+
><a
|
|
122
|
+
href="https://google.com/search?q=Benjamin+Franklin"
|
|
123
|
+
class="usx-avatar"
|
|
124
|
+
aria-label="Benjamin Franklin"
|
|
125
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
126
|
+
>BF</span
|
|
127
|
+
></a
|
|
128
|
+
>
|
|
110
129
|
</div>
|
|
111
130
|
|
|
112
131
|
<h3 class="site-preview-heading">Overlapping Stacked Avatars</h3>
|
|
113
132
|
<div class="usx-avatar-group usx-avatar-group--overlap usx-avatar-group--stacked">
|
|
114
|
-
<a
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
+
<a
|
|
134
|
+
href="https://google.com/search?q=George+Washington"
|
|
135
|
+
class="usx-avatar"
|
|
136
|
+
aria-label="George Washington"
|
|
137
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
138
|
+
>GW</span
|
|
139
|
+
></a
|
|
140
|
+
><a
|
|
141
|
+
href="https://google.com/search?q=Thomas+Jefferson"
|
|
142
|
+
class="usx-avatar"
|
|
143
|
+
aria-label="Thomas Jefferson"
|
|
144
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
145
|
+
>TJ</span
|
|
146
|
+
></a
|
|
147
|
+
><a
|
|
148
|
+
href="https://google.com/search?q=Benjamin+Franklin"
|
|
149
|
+
class="usx-avatar"
|
|
150
|
+
aria-label="Benjamin Franklin"
|
|
151
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
152
|
+
>BF</span
|
|
153
|
+
></a
|
|
154
|
+
>
|
|
133
155
|
</div>
|
|
134
156
|
|
|
135
157
|
<h3 class="site-preview-heading">Overlapping Rounded Avatars</h3>
|
|
136
158
|
<div class="usx-avatar-group usx-avatar-group--overlap">
|
|
137
|
-
<a
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
159
|
+
<a
|
|
160
|
+
href="https://google.com/search?q=George+Washington"
|
|
161
|
+
class="usx-avatar"
|
|
162
|
+
aria-label="George Washington"
|
|
163
|
+
><span class="usx-avatar__content usx-rounded-md bg-primary-lighter text-primary-darker"
|
|
164
|
+
>GW</span
|
|
165
|
+
></a
|
|
166
|
+
><a
|
|
167
|
+
href="https://google.com/search?q=Thomas+Jefferson"
|
|
168
|
+
class="usx-avatar"
|
|
169
|
+
aria-label="Thomas Jefferson"
|
|
170
|
+
><span class="usx-avatar__content usx-rounded-md bg-primary-lighter text-primary-darker"
|
|
171
|
+
>TJ</span
|
|
172
|
+
></a
|
|
173
|
+
><a
|
|
174
|
+
href="https://google.com/search?q=Benjamin+Franklin"
|
|
175
|
+
class="usx-avatar"
|
|
176
|
+
aria-label="Benjamin Franklin"
|
|
177
|
+
><span class="usx-avatar__content usx-rounded-md bg-primary-lighter text-primary-darker"
|
|
178
|
+
>BF</span
|
|
179
|
+
></a
|
|
180
|
+
>
|
|
156
181
|
</div>
|
|
157
182
|
|
|
158
183
|
<h3 class="site-preview-heading">With Tooltips</h3>
|
|
159
184
|
<div class="usx-avatar-group usx-avatar-group--overlap">
|
|
160
185
|
<span class="usx-tooltip"
|
|
161
|
-
><a
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
186
|
+
><a
|
|
187
|
+
href="https://google.com/search?q=George+Washington"
|
|
188
|
+
class="usx-avatar"
|
|
189
|
+
aria-label="George Washington"
|
|
190
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
191
|
+
>GW</span
|
|
192
|
+
></a
|
|
167
193
|
><span class="usa-tooltip__body usa-tooltip__body--right" role="tooltip"
|
|
168
194
|
>George Washington</span
|
|
169
195
|
></span
|
|
170
196
|
><span class="usx-tooltip"
|
|
171
|
-
><a
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
197
|
+
><a
|
|
198
|
+
href="https://google.com/search?q=Thomas+Jefferson"
|
|
199
|
+
class="usx-avatar"
|
|
200
|
+
aria-label="Thomas Jefferson"
|
|
201
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
202
|
+
>TJ</span
|
|
203
|
+
></a
|
|
177
204
|
><span class="usa-tooltip__body usa-tooltip__body--right" role="tooltip"
|
|
178
205
|
>Thomas Jefferson</span
|
|
179
206
|
></span
|
|
180
207
|
><span class="usx-tooltip"
|
|
181
|
-
><a
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
208
|
+
><a
|
|
209
|
+
href="https://google.com/search?q=Benjamin+Franklin"
|
|
210
|
+
class="usx-avatar"
|
|
211
|
+
aria-label="Benjamin Franklin"
|
|
212
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
213
|
+
>BF</span
|
|
214
|
+
></a
|
|
187
215
|
><span class="usa-tooltip__body usa-tooltip__body--right" role="tooltip"
|
|
188
216
|
>Benjamin Franklin</span
|
|
189
217
|
></span
|
|
@@ -193,34 +221,57 @@
|
|
|
193
221
|
<h3 class="site-preview-heading">Stacked With Tooltips</h3>
|
|
194
222
|
<div class="usx-avatar-group usx-avatar-group--overlap usx-avatar-group--stacked">
|
|
195
223
|
<span class="usx-tooltip"
|
|
196
|
-
><a
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
224
|
+
><a
|
|
225
|
+
href="https://google.com/search?q=George+Washington"
|
|
226
|
+
class="usx-avatar"
|
|
227
|
+
aria-label="George Washington"
|
|
228
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
229
|
+
>GW</span
|
|
230
|
+
></a
|
|
202
231
|
><span class="usa-tooltip__body usa-tooltip__body--right" role="tooltip"
|
|
203
232
|
>George Washington</span
|
|
204
233
|
></span
|
|
205
234
|
><span class="usx-tooltip"
|
|
206
|
-
><a
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
235
|
+
><a
|
|
236
|
+
href="https://google.com/search?q=Thomas+Jefferson"
|
|
237
|
+
class="usx-avatar"
|
|
238
|
+
aria-label="Thomas Jefferson"
|
|
239
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
240
|
+
>TJ</span
|
|
241
|
+
></a
|
|
212
242
|
><span class="usa-tooltip__body usa-tooltip__body--right" role="tooltip"
|
|
213
243
|
>Thomas Jefferson</span
|
|
214
244
|
></span
|
|
215
245
|
><span class="usx-tooltip"
|
|
216
|
-
><a
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
246
|
+
><a
|
|
247
|
+
href="https://google.com/search?q=Benjamin+Franklin"
|
|
248
|
+
class="usx-avatar"
|
|
249
|
+
aria-label="Benjamin Franklin"
|
|
250
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
251
|
+
>BF</span
|
|
252
|
+
></a
|
|
222
253
|
><span class="usa-tooltip__body usa-tooltip__body--right" role="tooltip"
|
|
223
254
|
>Benjamin Franklin</span
|
|
224
255
|
></span
|
|
225
256
|
>
|
|
226
257
|
</div>
|
|
258
|
+
|
|
259
|
+
<h3 class="site-preview-heading">Mixed avatars</h3>
|
|
260
|
+
<div class="usx-avatar-group usx-avatar-group--overlap">
|
|
261
|
+
<span class="usx-avatar" aria-label="Morgan"
|
|
262
|
+
><span class="usx-avatar__content usx-circle bg-primary text-inverse">MO</span></span
|
|
263
|
+
><span class="usx-avatar"
|
|
264
|
+
><img
|
|
265
|
+
class="usx-avatar__img usx-circle"
|
|
266
|
+
src="/chat-avatar-avery.webp"
|
|
267
|
+
alt="Avery"
|
|
268
|
+
role="img" /></span
|
|
269
|
+
><span
|
|
270
|
+
class="usx-avatar border-05 border-info usx-circle"
|
|
271
|
+
role="img"
|
|
272
|
+
aria-label="Support bot, Automated assistant"
|
|
273
|
+
><span class="usx-avatar__content usx-circle bg-info-lighter"
|
|
274
|
+
><svg class="usa-icon usx-icon" aria-hidden="true" focusable="false" role="img">
|
|
275
|
+
<use href="/img/sprite.svg#support_agent"></use></svg></span
|
|
276
|
+
></span>
|
|
277
|
+
</div>
|
|
@@ -6,18 +6,24 @@
|
|
|
6
6
|
"avatarProps": [
|
|
7
7
|
{
|
|
8
8
|
"href": "https://google.com/search?q=George+Washington",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
9
|
+
"variant": "initials",
|
|
10
|
+
"value": "GW",
|
|
11
|
+
"alt": "George Washington",
|
|
12
|
+
"contentClassName": "bg-primary-lighter text-primary-darker"
|
|
11
13
|
},
|
|
12
14
|
{
|
|
13
15
|
"href": "https://google.com/search?q=Thomas+Jefferson",
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
+
"variant": "initials",
|
|
17
|
+
"value": "TJ",
|
|
18
|
+
"alt": "Thomas Jefferson",
|
|
19
|
+
"contentClassName": "bg-primary-lighter text-primary-darker"
|
|
16
20
|
},
|
|
17
21
|
{
|
|
18
22
|
"href": "https://google.com/search?q=Benjamin+Franklin",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
23
|
+
"variant": "initials",
|
|
24
|
+
"value": "BF",
|
|
25
|
+
"alt": "Benjamin Franklin",
|
|
26
|
+
"contentClassName": "bg-primary-lighter text-primary-darker"
|
|
21
27
|
}
|
|
22
28
|
]
|
|
23
29
|
},
|
|
@@ -27,9 +33,9 @@
|
|
|
27
33
|
"description": "Array of avatars rendered by the group.",
|
|
28
34
|
"items": {
|
|
29
35
|
"type": "object",
|
|
30
|
-
"description": "Avatar item.
|
|
36
|
+
"description": "Avatar item. Accepts Avatar props, including variant, value, and status. The initials and initialsClassName aliases remain available; variant defaults to image when src is present and initials otherwise.",
|
|
31
37
|
"component": "avatar",
|
|
32
|
-
"omit": [
|
|
38
|
+
"omit": [],
|
|
33
39
|
"properties": {
|
|
34
40
|
"initials": {
|
|
35
41
|
"type": "string",
|
|
@@ -1,74 +1,38 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
import Icon from '../icon/Icon';
|
|
2
|
+
import Button, { type ButtonProps } from '../button/Button';
|
|
4
3
|
|
|
5
|
-
export type BackToTopProps = {
|
|
6
|
-
label?:
|
|
4
|
+
export type BackToTopProps = Pick<ButtonProps, 'variant' | 'ghost' | 'inverse' | 'className'> & {
|
|
5
|
+
label?: ButtonProps['label'] | null;
|
|
7
6
|
ariaLabel?: string;
|
|
8
|
-
href?:
|
|
9
|
-
variant?: 'primary' | null;
|
|
7
|
+
href?: ButtonProps['href'] | null;
|
|
10
8
|
iconPosition?: 'left' | 'right';
|
|
11
9
|
iconSize?: number;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} & React.AnchorHTMLAttributes<HTMLAnchorElement> & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
10
|
+
onClick?: ButtonProps['onClick'] | boolean;
|
|
11
|
+
};
|
|
15
12
|
|
|
16
13
|
export default function BackToTop({
|
|
17
14
|
label = 'Back to top',
|
|
18
15
|
ariaLabel = 'Back to top',
|
|
19
|
-
href =
|
|
20
|
-
variant =
|
|
16
|
+
href = '#top',
|
|
17
|
+
variant = 'primary',
|
|
18
|
+
ghost = true,
|
|
19
|
+
inverse = false,
|
|
21
20
|
iconPosition = 'right',
|
|
22
21
|
iconSize = 2,
|
|
23
22
|
className = '',
|
|
24
23
|
onClick = undefined,
|
|
25
|
-
...props
|
|
26
24
|
}: BackToTopProps) {
|
|
27
|
-
// An icon-only control has no text, so it is named by ariaLabel instead.
|
|
28
|
-
const accessibleName = label ? undefined : ariaLabel;
|
|
29
|
-
const icon = (
|
|
30
|
-
<Icon name="arrow_upward" size={iconSize} className={
|
|
31
|
-
ClassNames(
|
|
32
|
-
iconPosition === 'left' ? 'margin-right-05' : 'margin-left-05'
|
|
33
|
-
)
|
|
34
|
-
} />
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
if (href) {
|
|
38
|
-
const linkClasses = ClassNames(
|
|
39
|
-
'usx-link',
|
|
40
|
-
'usx-no-visited',
|
|
41
|
-
'flex-align-center',
|
|
42
|
-
className
|
|
43
|
-
);
|
|
44
|
-
return (
|
|
45
|
-
<a className={linkClasses} href={href} aria-label={accessibleName} {...props}>
|
|
46
|
-
{iconPosition === 'left' && icon}
|
|
47
|
-
{label}
|
|
48
|
-
{iconPosition === 'right' && icon}
|
|
49
|
-
</a>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const buttonClasses = ClassNames(
|
|
54
|
-
'usa-button',
|
|
55
|
-
'usx-button',
|
|
56
|
-
variant === 'primary' && 'usa-button--primary',
|
|
57
|
-
'usx-button--ghost',
|
|
58
|
-
className
|
|
59
|
-
);
|
|
60
|
-
|
|
61
25
|
return (
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
{
|
|
68
|
-
|
|
69
|
-
{
|
|
70
|
-
{
|
|
71
|
-
{
|
|
72
|
-
|
|
26
|
+
<Button
|
|
27
|
+
href={onClick ? undefined : href || '#top'}
|
|
28
|
+
onClick={typeof onClick === 'function' ? onClick : undefined}
|
|
29
|
+
label={label ?? undefined}
|
|
30
|
+
aria-label={label ? undefined : ariaLabel}
|
|
31
|
+
variant={variant ?? 'primary'}
|
|
32
|
+
ghost={ghost}
|
|
33
|
+
inverse={inverse}
|
|
34
|
+
iconProps={[{ name: 'arrow_upward', position: iconPosition, size: iconSize }]}
|
|
35
|
+
className={className}
|
|
36
|
+
/>
|
|
73
37
|
);
|
|
74
38
|
}
|