@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
|
@@ -96,6 +96,31 @@
|
|
|
96
96
|
<use href="/img/sprite.svg#person"></use></svg></span
|
|
97
97
|
></a>
|
|
98
98
|
|
|
99
|
+
<h3 class="site-preview-heading">Online Avatar</h3>
|
|
100
|
+
<span class="usx-tooltip"
|
|
101
|
+
><span
|
|
102
|
+
class="usx-avatar border-05 border-success usx-circle"
|
|
103
|
+
role="img"
|
|
104
|
+
aria-label="Statue of Liberty, Online"
|
|
105
|
+
><img
|
|
106
|
+
class="usx-avatar__img usx-circle"
|
|
107
|
+
src="./lady_liberty.png"
|
|
108
|
+
alt="Statue of Liberty"
|
|
109
|
+
role="img"
|
|
110
|
+
/></span>
|
|
111
|
+
<span class="usa-tooltip__body usa-tooltip__body--right" role="tooltip">Online</span></span
|
|
112
|
+
>
|
|
113
|
+
|
|
114
|
+
<h3 class="site-preview-heading">Pending Review Avatar</h3>
|
|
115
|
+
<span
|
|
116
|
+
class="usx-avatar border-05 border-warning usx-circle"
|
|
117
|
+
role="img"
|
|
118
|
+
aria-label="Alex Brown, Pending review"
|
|
119
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
120
|
+
>AB</span
|
|
121
|
+
></span
|
|
122
|
+
>
|
|
123
|
+
|
|
99
124
|
<h3 class="site-preview-heading">Icon Avatar Support Agent</h3>
|
|
100
125
|
<a href="#" class="usx-avatar" aria-label="Support Agent"
|
|
101
126
|
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<h3 class="site-preview-heading">Default</h3>
|
|
2
|
-
<a
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<a
|
|
3
|
+
href="https://google.com/search?q=Statue+of+Liberty"
|
|
4
|
+
class="usx-avatar"
|
|
5
|
+
aria-label="Statue of Liberty"
|
|
6
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker">SL</span></a
|
|
7
|
+
>
|
|
5
8
|
|
|
6
9
|
<h3 class="site-preview-heading">Circle Avatar</h3>
|
|
7
10
|
<a href="https://google.com/search?q=Statue+of+Liberty" class="usx-avatar"
|
|
@@ -57,6 +60,13 @@
|
|
|
57
60
|
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker">AB</span></a
|
|
58
61
|
>
|
|
59
62
|
|
|
63
|
+
<h3 class="site-preview-heading">Non Interactive</h3>
|
|
64
|
+
<span class="usx-avatar" aria-label="Morgan"
|
|
65
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
66
|
+
>MO</span
|
|
67
|
+
></span
|
|
68
|
+
>
|
|
69
|
+
|
|
60
70
|
<h3 class="site-preview-heading">Initials Avatar Small</h3>
|
|
61
71
|
<a href="#" class="usx-avatar usx-avatar--size-sm" aria-label="George Washington"
|
|
62
72
|
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker">GW</span></a
|
|
@@ -119,3 +129,100 @@
|
|
|
119
129
|
><svg class="usa-icon usx-icon" aria-hidden="true" focusable="false" role="img">
|
|
120
130
|
<use href="/img/sprite.svg#person"></use></svg></span
|
|
121
131
|
></a>
|
|
132
|
+
|
|
133
|
+
<h3 class="site-preview-heading">Status Success</h3>
|
|
134
|
+
<span class="usx-tooltip"
|
|
135
|
+
><a
|
|
136
|
+
href="https://google.com/search?q=Statue+of+Liberty"
|
|
137
|
+
class="usx-avatar border-05 border-success usx-circle"
|
|
138
|
+
aria-label="Statue of Liberty, Online"
|
|
139
|
+
><img
|
|
140
|
+
class="usx-avatar__img usx-circle"
|
|
141
|
+
src="./lady_liberty.png"
|
|
142
|
+
alt="Statue of Liberty"
|
|
143
|
+
role="img" /></a
|
|
144
|
+
><span class="usa-tooltip__body usa-tooltip__body--right" role="tooltip">Online</span></span
|
|
145
|
+
>
|
|
146
|
+
|
|
147
|
+
<h3 class="site-preview-heading">Status Caution</h3>
|
|
148
|
+
<span
|
|
149
|
+
class="usx-avatar border-05 border-warning usx-circle"
|
|
150
|
+
role="img"
|
|
151
|
+
aria-label="Alex Brown, Pending review"
|
|
152
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
153
|
+
>AB</span
|
|
154
|
+
></span
|
|
155
|
+
>
|
|
156
|
+
|
|
157
|
+
<h3 class="site-preview-heading">Status Danger</h3>
|
|
158
|
+
<span
|
|
159
|
+
class="usx-avatar border-05 border-error usx-circle"
|
|
160
|
+
role="img"
|
|
161
|
+
aria-label="Account owner, Do not disturb"
|
|
162
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-base-darkest"
|
|
163
|
+
><svg class="usa-icon usx-icon" aria-hidden="true" focusable="false" role="img">
|
|
164
|
+
<use href="/img/sprite.svg#person"></use></svg></span
|
|
165
|
+
></span>
|
|
166
|
+
|
|
167
|
+
<h3 class="site-preview-heading">Status Neutral</h3>
|
|
168
|
+
<a
|
|
169
|
+
href="https://google.com/search?q=Statue+of+Liberty"
|
|
170
|
+
class="usx-avatar border-05 border-base usx-rounded-md"
|
|
171
|
+
aria-label="Statue of Liberty, Offline"
|
|
172
|
+
><img
|
|
173
|
+
class="usx-avatar__img usx-rounded-md"
|
|
174
|
+
src="./lady_liberty.png"
|
|
175
|
+
alt="Statue of Liberty"
|
|
176
|
+
role="img"
|
|
177
|
+
/></a>
|
|
178
|
+
|
|
179
|
+
<h3 class="site-preview-heading">Status Info</h3>
|
|
180
|
+
<a
|
|
181
|
+
href="https://google.com/search?q=Statue+of+Liberty"
|
|
182
|
+
class="usx-avatar border-05 border-info usx-circle"
|
|
183
|
+
aria-label="Statue of Liberty, Verified"
|
|
184
|
+
><img
|
|
185
|
+
class="usx-avatar__img usx-circle"
|
|
186
|
+
src="./lady_liberty.png"
|
|
187
|
+
alt="Statue of Liberty"
|
|
188
|
+
role="img"
|
|
189
|
+
/></a>
|
|
190
|
+
|
|
191
|
+
<h3 class="site-preview-heading">Status Special</h3>
|
|
192
|
+
<span
|
|
193
|
+
class="usx-avatar border-05 border-accent-cool usx-circle"
|
|
194
|
+
role="img"
|
|
195
|
+
aria-label="Site administrator, Elevated privileges"
|
|
196
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-base-darkest"
|
|
197
|
+
><svg class="usa-icon usx-icon" aria-hidden="true" focusable="false" role="img">
|
|
198
|
+
<use href="/img/sprite.svg#person"></use></svg></span
|
|
199
|
+
></span>
|
|
200
|
+
|
|
201
|
+
<h3 class="site-preview-heading">Status Warning</h3>
|
|
202
|
+
<span
|
|
203
|
+
class="usx-avatar border-05 border-accent-warm usx-circle usx-avatar--size-sm"
|
|
204
|
+
role="img"
|
|
205
|
+
aria-label="Alex Brown, Requires action"
|
|
206
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
207
|
+
>AB</span
|
|
208
|
+
></span
|
|
209
|
+
>
|
|
210
|
+
|
|
211
|
+
<h3 class="site-preview-heading">Status Secondary Color</h3>
|
|
212
|
+
<a
|
|
213
|
+
href="https://google.com/search?q=Statue+of+Liberty"
|
|
214
|
+
class="usx-avatar border-05 border-secondary usx-circle"
|
|
215
|
+
aria-label="Statue of Liberty, Premium member"
|
|
216
|
+
><img
|
|
217
|
+
class="usx-avatar__img usx-circle"
|
|
218
|
+
src="./lady_liberty.png"
|
|
219
|
+
alt="Statue of Liberty"
|
|
220
|
+
role="img"
|
|
221
|
+
/></a>
|
|
222
|
+
|
|
223
|
+
<h3 class="site-preview-heading">Status Label Only</h3>
|
|
224
|
+
<span class="usx-avatar" role="img" aria-label="Alex Brown, Available by appointment"
|
|
225
|
+
><span class="usx-avatar__content usx-circle bg-primary-lighter text-primary-darker"
|
|
226
|
+
>AB</span
|
|
227
|
+
></span
|
|
228
|
+
>
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "avatar",
|
|
3
3
|
"template": "avatar/avatar.django.html",
|
|
4
|
-
"version":
|
|
4
|
+
"version": 2,
|
|
5
5
|
"default": {
|
|
6
6
|
"href": "https://google.com/search?q=Statue+of+Liberty",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
7
|
+
"variant": "initials",
|
|
8
|
+
"value": "SL",
|
|
9
|
+
"alt": "Statue of Liberty",
|
|
10
|
+
"contentClassName": "bg-primary-lighter text-primary-darker"
|
|
9
11
|
},
|
|
10
12
|
"props": {
|
|
11
13
|
"href": {
|
|
12
14
|
"type": "string",
|
|
13
|
-
"description": "
|
|
15
|
+
"description": "Optional link target. When absent, Avatar renders a noninteractive span."
|
|
14
16
|
},
|
|
15
17
|
"src": {
|
|
16
18
|
"type": "string",
|
|
@@ -22,11 +24,7 @@
|
|
|
22
24
|
},
|
|
23
25
|
"variant": {
|
|
24
26
|
"type": "select",
|
|
25
|
-
"options": [
|
|
26
|
-
"image",
|
|
27
|
-
"initials",
|
|
28
|
-
"icon"
|
|
29
|
-
],
|
|
27
|
+
"options": ["image", "initials", "icon"],
|
|
30
28
|
"description": "Avatar content mode."
|
|
31
29
|
},
|
|
32
30
|
"value": {
|
|
@@ -35,15 +33,17 @@
|
|
|
35
33
|
},
|
|
36
34
|
"shape": {
|
|
37
35
|
"type": "select",
|
|
38
|
-
"options": [
|
|
39
|
-
"circle",
|
|
40
|
-
"rounded-sm",
|
|
41
|
-
"rounded-md",
|
|
42
|
-
"rounded-lg",
|
|
43
|
-
"rounded-xl"
|
|
44
|
-
],
|
|
36
|
+
"options": ["circle", "rounded-sm", "rounded-md", "rounded-lg", "rounded-xl"],
|
|
45
37
|
"description": "Optional shape utility for avatar image or initials."
|
|
46
38
|
},
|
|
39
|
+
"statusRingColor": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Existing border utility color name for the 4px ring, such as success, warning, error, info, primary, or accent-cool. Omit to hide the ring."
|
|
42
|
+
},
|
|
43
|
+
"statusLabel": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "Host-supplied status text appended to the accessible name. Supply it whenever the ring conveys a meaningful state; pass the same text to tooltipProps to show it visually on hover."
|
|
46
|
+
},
|
|
47
47
|
"tooltipProps": {
|
|
48
48
|
"type": "object",
|
|
49
49
|
"component": "tooltip",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"className": {
|
|
54
54
|
"type": "string",
|
|
55
|
-
"description": "Additional classes for the avatar
|
|
55
|
+
"description": "Additional classes for the avatar wrapper."
|
|
56
56
|
},
|
|
57
57
|
"imageClassName": {
|
|
58
58
|
"type": "string",
|
|
@@ -2,40 +2,42 @@ import React from 'react';
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import Avatar, { AvatarProps } from '../avatar/Avatar';
|
|
4
4
|
|
|
5
|
-
export interface AvatarGroupAvatar extends
|
|
5
|
+
export interface AvatarGroupAvatar extends AvatarProps {
|
|
6
6
|
initials?: string;
|
|
7
7
|
initialsClassName?: string;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
export interface AvatarGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
11
11
|
avatarProps?: AvatarGroupAvatar[];
|
|
12
12
|
overlap?: boolean;
|
|
13
13
|
stacked?: boolean;
|
|
14
14
|
className?: string;
|
|
15
|
+
children?: never;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
export default function AvatarGroup({
|
|
18
|
+
export default function AvatarGroup({
|
|
19
|
+
avatarProps = [],
|
|
20
|
+
overlap = false,
|
|
21
|
+
stacked = false,
|
|
22
|
+
className = '',
|
|
23
|
+
...props
|
|
24
|
+
}: AvatarGroupProps) {
|
|
18
25
|
const classes = classNames(
|
|
19
26
|
'usx-avatar-group',
|
|
20
27
|
overlap && 'usx-avatar-group--overlap',
|
|
21
28
|
stacked && 'usx-avatar-group--stacked',
|
|
22
|
-
className
|
|
29
|
+
className
|
|
23
30
|
);
|
|
24
31
|
|
|
25
32
|
return (
|
|
26
33
|
<div className={classes} {...props}>
|
|
27
|
-
{avatarProps.map((avatar, index) => (
|
|
34
|
+
{avatarProps.map(({ initials, initialsClassName, ...avatar }, index) => (
|
|
28
35
|
<Avatar
|
|
29
|
-
key={`${avatar.src || avatar.initials || 'avatar'}-${index}`}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
shape={avatar.shape}
|
|
35
|
-
tooltipProps={avatar.tooltipProps}
|
|
36
|
-
className={avatar.className}
|
|
37
|
-
imageClassName={avatar.imageClassName}
|
|
38
|
-
contentClassName={avatar.initialsClassName}
|
|
36
|
+
key={`${avatar.src || avatar.value || initials || 'avatar'}-${index}`}
|
|
37
|
+
{...avatar}
|
|
38
|
+
variant={avatar.variant ?? (avatar.src ? 'image' : 'initials')}
|
|
39
|
+
value={avatar.value ?? initials}
|
|
40
|
+
contentClassName={avatar.contentClassName ?? initialsClassName}
|
|
39
41
|
/>
|
|
40
42
|
))}
|
|
41
43
|
</div>
|