@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,156 +1,75 @@
|
|
|
1
1
|
<h3 class="site-preview-heading">Default</h3>
|
|
2
|
-
<button
|
|
3
|
-
type="button"
|
|
4
|
-
class="usa-button usx-button usx-button--ghost"
|
|
5
|
-
onclick="window.scrollTo({ top: 0, behavior: 'smooth' })"
|
|
6
|
-
>
|
|
7
|
-
Back to top
|
|
8
|
-
|
|
9
|
-
<svg
|
|
10
|
-
class="margin-left-05 usa-icon usx-icon usa-icon--size-2"
|
|
11
|
-
aria-hidden="true"
|
|
12
|
-
focusable="false"
|
|
13
|
-
role="img"
|
|
14
|
-
>
|
|
15
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
16
|
-
</svg>
|
|
17
|
-
</button>
|
|
18
|
-
|
|
19
|
-
<h3 class="site-preview-heading">Primary</h3>
|
|
20
|
-
<button
|
|
21
|
-
type="button"
|
|
22
|
-
class="usa-button usx-button usa-button--primary usx-button--ghost"
|
|
23
|
-
onclick="window.scrollTo({ top: 0, behavior: 'smooth' })"
|
|
24
|
-
>
|
|
2
|
+
<a href="#top" class="usa-button usx-button usa-button--primary usx-button--ghost">
|
|
25
3
|
Back to top
|
|
26
4
|
|
|
27
|
-
<svg
|
|
28
|
-
|
|
29
|
-
aria-hidden="true"
|
|
30
|
-
focusable="false"
|
|
31
|
-
role="img"
|
|
32
|
-
>
|
|
33
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
34
|
-
</svg>
|
|
35
|
-
</button>
|
|
36
|
-
|
|
37
|
-
<h3 class="site-preview-heading">Icon Only Small</h3>
|
|
38
|
-
<button
|
|
39
|
-
type="button"
|
|
40
|
-
aria-label="Back to top"
|
|
41
|
-
class="usa-button usx-button usa-button--primary usx-button--ghost width-6"
|
|
42
|
-
onclick="window.scrollTo({ top: 0, behavior: 'smooth' })"
|
|
43
|
-
>
|
|
44
|
-
<svg
|
|
45
|
-
class="margin-left-05 usa-icon usx-icon usa-icon--size-3"
|
|
46
|
-
aria-hidden="true"
|
|
47
|
-
focusable="false"
|
|
48
|
-
role="img"
|
|
49
|
-
>
|
|
50
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
5
|
+
<svg class="usa-icon usx-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img">
|
|
6
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
51
7
|
</svg>
|
|
52
|
-
</
|
|
8
|
+
</a>
|
|
53
9
|
|
|
54
|
-
<h3 class="site-preview-heading">Icon
|
|
55
|
-
<button
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
class="usa-button usx-button usa-button--primary usx-button--ghost width-7"
|
|
59
|
-
onclick="window.scrollTo({ top: 0, behavior: 'smooth' })"
|
|
60
|
-
>
|
|
61
|
-
<svg
|
|
62
|
-
class="margin-left-05 usa-icon usx-icon usa-icon--size-4"
|
|
63
|
-
aria-hidden="true"
|
|
64
|
-
focusable="false"
|
|
65
|
-
role="img"
|
|
66
|
-
>
|
|
67
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
10
|
+
<h3 class="site-preview-heading">Icon Left</h3>
|
|
11
|
+
<a href="#top" class="usa-button usx-button usa-button--primary usx-button--ghost">
|
|
12
|
+
<svg class="usa-icon usx-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img">
|
|
13
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
68
14
|
</svg>
|
|
69
|
-
</button>
|
|
70
15
|
|
|
71
|
-
<h3 class="site-preview-heading">Link Default</h3>
|
|
72
|
-
<a class="usx-link usx-no-visited flex-align-center" href="#back-to-top">
|
|
73
16
|
Back to top
|
|
74
|
-
|
|
75
|
-
<svg
|
|
76
|
-
class="margin-left-05 usa-icon usx-icon usa-icon--size-2"
|
|
77
|
-
aria-hidden="true"
|
|
78
|
-
focusable="false"
|
|
79
|
-
role="img"
|
|
80
|
-
>
|
|
81
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
82
|
-
</svg>
|
|
83
17
|
</a>
|
|
84
18
|
|
|
85
|
-
<h3 class="site-preview-heading">
|
|
86
|
-
<
|
|
87
|
-
|
|
88
|
-
class="usa-button usx-button usx-button--ghost"
|
|
89
|
-
|
|
19
|
+
<h3 class="site-preview-heading">Icon Only Small</h3>
|
|
20
|
+
<a
|
|
21
|
+
href="#top"
|
|
22
|
+
class="usa-button usx-button usa-button--primary usx-button--ghost"
|
|
23
|
+
aria-label="Back to top"
|
|
90
24
|
>
|
|
91
|
-
<svg
|
|
92
|
-
|
|
93
|
-
aria-hidden="true"
|
|
94
|
-
focusable="false"
|
|
95
|
-
role="img"
|
|
96
|
-
>
|
|
97
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
25
|
+
<svg class="usa-icon usx-icon usa-icon--size-3" aria-hidden="true" focusable="false" role="img">
|
|
26
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
98
27
|
</svg>
|
|
28
|
+
</a>
|
|
99
29
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
<h3 class="site-preview-heading">Primary Icon Left</h3>
|
|
104
|
-
<button
|
|
105
|
-
type="button"
|
|
30
|
+
<h3 class="site-preview-heading">Icon Only Large</h3>
|
|
31
|
+
<a
|
|
32
|
+
href="#top"
|
|
106
33
|
class="usa-button usx-button usa-button--primary usx-button--ghost"
|
|
107
|
-
|
|
34
|
+
aria-label="Back to top"
|
|
108
35
|
>
|
|
109
|
-
<svg
|
|
110
|
-
|
|
111
|
-
aria-hidden="true"
|
|
112
|
-
focusable="false"
|
|
113
|
-
role="img"
|
|
114
|
-
>
|
|
115
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
36
|
+
<svg class="usa-icon usx-icon usa-icon--size-4" aria-hidden="true" focusable="false" role="img">
|
|
37
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
116
38
|
</svg>
|
|
117
|
-
|
|
118
|
-
Back to top
|
|
119
|
-
</button>
|
|
120
|
-
|
|
121
|
-
<h3 class="site-preview-heading">Link Icon Left</h3>
|
|
122
|
-
<a class="usx-link usx-no-visited flex-align-center" href="#back-to-top">
|
|
123
|
-
<svg
|
|
124
|
-
class="margin-right-05 usa-icon usx-icon usa-icon--size-2"
|
|
125
|
-
aria-hidden="true"
|
|
126
|
-
focusable="false"
|
|
127
|
-
role="img"
|
|
128
|
-
>
|
|
129
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
130
|
-
</svg>
|
|
131
|
-
|
|
132
|
-
Back to top
|
|
133
39
|
</a>
|
|
134
40
|
|
|
135
41
|
<h3 class="site-preview-heading">Link On Dark</h3>
|
|
136
|
-
<div class="bg-
|
|
42
|
+
<div class="bg-surface-inverse padding-1">
|
|
137
43
|
<a
|
|
138
|
-
|
|
139
|
-
|
|
44
|
+
href="#top"
|
|
45
|
+
class="usa-button usx-button usa-button--primary usa-button--inverse usx-button--ghost"
|
|
140
46
|
>
|
|
141
47
|
Back to top
|
|
142
48
|
|
|
143
|
-
<svg
|
|
144
|
-
|
|
145
|
-
aria-hidden="true"
|
|
146
|
-
focusable="false"
|
|
147
|
-
role="img"
|
|
148
|
-
>
|
|
149
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
49
|
+
<svg class="usa-icon usx-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img">
|
|
50
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
150
51
|
</svg>
|
|
151
52
|
</a>
|
|
152
53
|
</div>
|
|
153
54
|
|
|
55
|
+
<h3 class="site-preview-heading">Custom Href</h3>
|
|
56
|
+
<a href="#storybook-root" class="usa-button usx-button usa-button--primary usx-button--ghost">
|
|
57
|
+
Back to preview
|
|
58
|
+
|
|
59
|
+
<svg class="usa-icon usx-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img">
|
|
60
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
61
|
+
</svg>
|
|
62
|
+
</a>
|
|
63
|
+
|
|
64
|
+
<h3 class="site-preview-heading">With On Click</h3>
|
|
65
|
+
<button type="button" class="usa-button usx-button usa-button--primary usx-button--ghost">
|
|
66
|
+
Back to top
|
|
67
|
+
|
|
68
|
+
<svg class="usa-icon usx-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img">
|
|
69
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
70
|
+
</svg>
|
|
71
|
+
</button>
|
|
72
|
+
|
|
154
73
|
<h3 class="site-preview-heading">All Variants</h3>
|
|
155
74
|
<div class="display-flex flex-wrap" style="gap: 2rem">
|
|
156
75
|
<div
|
|
@@ -158,178 +77,158 @@
|
|
|
158
77
|
style="gap: 0.5rem"
|
|
159
78
|
>
|
|
160
79
|
<h4>Button (icon right)</h4>
|
|
161
|
-
<button
|
|
162
|
-
type="button"
|
|
163
|
-
class="usa-button usx-button usx-button--ghost"
|
|
164
|
-
onclick="window.scrollTo({ top: 0, behavior: 'smooth' })"
|
|
165
|
-
>
|
|
80
|
+
<a href="#top" class="usa-button usx-button usa-button--primary usx-button--ghost">
|
|
166
81
|
Back to top
|
|
167
82
|
|
|
168
83
|
<svg
|
|
169
|
-
class="
|
|
84
|
+
class="usa-icon usx-icon usa-icon--size-2"
|
|
170
85
|
aria-hidden="true"
|
|
171
86
|
focusable="false"
|
|
172
87
|
role="img"
|
|
173
88
|
>
|
|
174
|
-
<use href="
|
|
175
|
-
</svg
|
|
176
|
-
><button
|
|
177
|
-
type="button"
|
|
178
|
-
class="usa-button usx-button usa-button--primary usx-button--ghost"
|
|
179
|
-
onclick="window.scrollTo({ top: 0, behavior: 'smooth' })"
|
|
180
|
-
>
|
|
89
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
90
|
+
</svg> </a
|
|
91
|
+
><a href="#top" class="usa-button usx-button usa-button--primary">
|
|
181
92
|
Back to top
|
|
182
93
|
|
|
183
94
|
<svg
|
|
184
|
-
class="
|
|
95
|
+
class="usa-icon usx-icon usa-icon--size-2"
|
|
185
96
|
aria-hidden="true"
|
|
186
97
|
focusable="false"
|
|
187
98
|
role="img"
|
|
188
99
|
>
|
|
189
|
-
<use href="
|
|
190
|
-
</svg
|
|
191
|
-
><
|
|
192
|
-
|
|
193
|
-
aria-label="Back to top"
|
|
100
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
101
|
+
</svg> </a
|
|
102
|
+
><a
|
|
103
|
+
href="#top"
|
|
194
104
|
class="usa-button usx-button usa-button--primary usx-button--ghost width-6"
|
|
195
|
-
|
|
105
|
+
aria-label="Back to top"
|
|
196
106
|
>
|
|
197
107
|
<svg
|
|
198
|
-
class="
|
|
108
|
+
class="usa-icon usx-icon usa-icon--size-3"
|
|
199
109
|
aria-hidden="true"
|
|
200
110
|
focusable="false"
|
|
201
111
|
role="img"
|
|
202
112
|
>
|
|
203
|
-
<use href="
|
|
204
|
-
</svg
|
|
205
|
-
><
|
|
206
|
-
|
|
207
|
-
aria-label="Back to top"
|
|
113
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
114
|
+
</svg> </a
|
|
115
|
+
><a
|
|
116
|
+
href="#top"
|
|
208
117
|
class="usa-button usx-button usa-button--primary usx-button--ghost width-7"
|
|
209
|
-
|
|
118
|
+
aria-label="Back to top"
|
|
210
119
|
>
|
|
211
120
|
<svg
|
|
212
|
-
class="
|
|
121
|
+
class="usa-icon usx-icon usa-icon--size-4"
|
|
213
122
|
aria-hidden="true"
|
|
214
123
|
focusable="false"
|
|
215
124
|
role="img"
|
|
216
125
|
>
|
|
217
|
-
<use href="
|
|
218
|
-
</svg
|
|
219
|
-
><a class="
|
|
126
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
127
|
+
</svg> </a
|
|
128
|
+
><a href="#storybook-root" class="usa-button usx-button usa-button--unstyled">
|
|
220
129
|
Back to top
|
|
221
130
|
|
|
222
131
|
<svg
|
|
223
|
-
class="
|
|
132
|
+
class="usa-icon usx-icon usa-icon--size-2"
|
|
224
133
|
aria-hidden="true"
|
|
225
134
|
focusable="false"
|
|
226
135
|
role="img"
|
|
227
136
|
>
|
|
228
|
-
<use href="
|
|
137
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
229
138
|
</svg>
|
|
230
139
|
</a>
|
|
231
|
-
<div class="bg-
|
|
140
|
+
<div class="bg-surface-inverse padding-1">
|
|
232
141
|
<a
|
|
233
|
-
|
|
234
|
-
|
|
142
|
+
href="#top"
|
|
143
|
+
class="usa-button usx-button usa-button--primary usa-button--inverse usx-button--ghost"
|
|
235
144
|
>
|
|
236
145
|
Back to top
|
|
237
146
|
|
|
238
147
|
<svg
|
|
239
|
-
class="
|
|
148
|
+
class="usa-icon usx-icon usa-icon--size-2"
|
|
240
149
|
aria-hidden="true"
|
|
241
150
|
focusable="false"
|
|
242
151
|
role="img"
|
|
243
152
|
>
|
|
244
|
-
<use href="
|
|
153
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
245
154
|
</svg>
|
|
246
155
|
</a>
|
|
247
156
|
</div>
|
|
248
157
|
</div>
|
|
249
158
|
<div class="display-flex flex-column flex-align-end margin-left-auto" style="gap: 0.5rem">
|
|
250
159
|
<h4>Button (icon left)</h4>
|
|
251
|
-
<button
|
|
252
|
-
type="button"
|
|
253
|
-
class="usa-button usx-button usx-button--ghost"
|
|
254
|
-
onclick="window.scrollTo({ top: 0, behavior: 'smooth' })"
|
|
255
|
-
>
|
|
160
|
+
<a href="#top" class="usa-button usx-button usa-button--primary usx-button--ghost">
|
|
256
161
|
<svg
|
|
257
|
-
class="
|
|
162
|
+
class="usa-icon usx-icon usa-icon--size-2"
|
|
258
163
|
aria-hidden="true"
|
|
259
164
|
focusable="false"
|
|
260
165
|
role="img"
|
|
261
166
|
>
|
|
262
|
-
<use href="
|
|
167
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
263
168
|
</svg>
|
|
264
169
|
|
|
265
|
-
Back to top</
|
|
266
|
-
><button
|
|
267
|
-
type="button"
|
|
268
|
-
class="usa-button usx-button usa-button--primary usx-button--ghost"
|
|
269
|
-
onclick="window.scrollTo({ top: 0, behavior: 'smooth' })"
|
|
270
|
-
>
|
|
170
|
+
Back to top </a
|
|
171
|
+
><a href="#top" class="usa-button usx-button usa-button--primary">
|
|
271
172
|
<svg
|
|
272
|
-
class="
|
|
173
|
+
class="usa-icon usx-icon usa-icon--size-2"
|
|
273
174
|
aria-hidden="true"
|
|
274
175
|
focusable="false"
|
|
275
176
|
role="img"
|
|
276
177
|
>
|
|
277
|
-
<use href="
|
|
178
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
278
179
|
</svg>
|
|
279
180
|
|
|
280
|
-
Back to top</
|
|
281
|
-
><
|
|
282
|
-
|
|
283
|
-
aria-label="Back to top"
|
|
181
|
+
Back to top </a
|
|
182
|
+
><a
|
|
183
|
+
href="#top"
|
|
284
184
|
class="usa-button usx-button usa-button--primary usx-button--ghost width-6"
|
|
285
|
-
|
|
185
|
+
aria-label="Back to top"
|
|
286
186
|
>
|
|
287
187
|
<svg
|
|
288
|
-
class="
|
|
188
|
+
class="usa-icon usx-icon usa-icon--size-3"
|
|
289
189
|
aria-hidden="true"
|
|
290
190
|
focusable="false"
|
|
291
191
|
role="img"
|
|
292
192
|
>
|
|
293
|
-
<use href="
|
|
294
|
-
</svg
|
|
295
|
-
><
|
|
296
|
-
|
|
297
|
-
aria-label="Back to top"
|
|
193
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
194
|
+
</svg> </a
|
|
195
|
+
><a
|
|
196
|
+
href="#top"
|
|
298
197
|
class="usa-button usx-button usa-button--primary usx-button--ghost width-7"
|
|
299
|
-
|
|
198
|
+
aria-label="Back to top"
|
|
300
199
|
>
|
|
301
200
|
<svg
|
|
302
|
-
class="
|
|
201
|
+
class="usa-icon usx-icon usa-icon--size-4"
|
|
303
202
|
aria-hidden="true"
|
|
304
203
|
focusable="false"
|
|
305
204
|
role="img"
|
|
306
205
|
>
|
|
307
|
-
<use href="
|
|
308
|
-
</svg
|
|
309
|
-
><a class="
|
|
206
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
207
|
+
</svg> </a
|
|
208
|
+
><a href="#storybook-root" class="usa-button usx-button usa-button--unstyled">
|
|
310
209
|
<svg
|
|
311
|
-
class="
|
|
210
|
+
class="usa-icon usx-icon usa-icon--size-2"
|
|
312
211
|
aria-hidden="true"
|
|
313
212
|
focusable="false"
|
|
314
213
|
role="img"
|
|
315
214
|
>
|
|
316
|
-
<use href="
|
|
215
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
317
216
|
</svg>
|
|
318
217
|
|
|
319
218
|
Back to top
|
|
320
219
|
</a>
|
|
321
|
-
<div class="bg-
|
|
220
|
+
<div class="bg-surface-inverse padding-1">
|
|
322
221
|
<a
|
|
323
|
-
|
|
324
|
-
|
|
222
|
+
href="#top"
|
|
223
|
+
class="usa-button usx-button usa-button--primary usa-button--inverse usx-button--ghost"
|
|
325
224
|
>
|
|
326
225
|
<svg
|
|
327
|
-
class="
|
|
226
|
+
class="usa-icon usx-icon usa-icon--size-2"
|
|
328
227
|
aria-hidden="true"
|
|
329
228
|
focusable="false"
|
|
330
229
|
role="img"
|
|
331
230
|
>
|
|
332
|
-
<use href="
|
|
231
|
+
<use href="img/sprite.svg#arrow_upward"></use>
|
|
333
232
|
</svg>
|
|
334
233
|
|
|
335
234
|
Back to top
|
|
@@ -1,40 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
{% if
|
|
3
|
-
|
|
4
|
-
class="usx-link usx-no-visited flex-align-center{% if className %} {{ className }}{% endif %}"
|
|
5
|
-
href="{{ href }}"
|
|
6
|
-
{% if not label %}aria-label="{{ ariaLabel|default:'Back to top' }}"{% endif %}
|
|
7
|
-
{% if tabindex %}tabindex="{{ tabindex }}"{% endif %}
|
|
8
|
-
>
|
|
9
|
-
{% if iconPosition == 'left' or not iconPosition %}
|
|
10
|
-
<svg class="margin-right-05 usa-icon usx-icon usa-icon--size-{{ iconSize|default:'2' }}" aria-hidden="true" focusable="false" role="img">
|
|
11
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
12
|
-
</svg>
|
|
13
|
-
{% endif %}
|
|
14
|
-
{% if label %}{{ label }}{% endif %}
|
|
15
|
-
{% if iconPosition == 'right' %}
|
|
16
|
-
<svg class="margin-left-05 usa-icon usx-icon usa-icon--size-{{ iconSize|default:'2' }}" aria-hidden="true" focusable="false" role="img">
|
|
17
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
18
|
-
</svg>
|
|
19
|
-
{% endif %}
|
|
20
|
-
</a>
|
|
1
|
+
{% load usx_components %}
|
|
2
|
+
{% if onClick %}
|
|
3
|
+
{% dict as navigation %}
|
|
21
4
|
{% else %}
|
|
22
|
-
|
|
23
|
-
type="button"
|
|
24
|
-
{% if not label %}aria-label="{{ ariaLabel|default:'Back to top' }}"{% endif %}
|
|
25
|
-
class="usa-button usx-button{% if variant == 'primary' %} usa-button--primary{% endif %} usx-button--ghost{% if className %} {{ className }}{% endif %}"
|
|
26
|
-
onclick="{{ onClick|default:'window.scrollTo({ top: 0, behavior: \'smooth\' });' }}"
|
|
27
|
-
>
|
|
28
|
-
{% if iconPosition == 'left' %}
|
|
29
|
-
<svg class="margin-right-05 usa-icon usx-icon usa-icon--size-{{ iconSize|default:'2' }}" aria-hidden="true" focusable="false" role="img">
|
|
30
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
31
|
-
</svg>
|
|
32
|
-
{% endif %}
|
|
33
|
-
{% if label %}{{ label }}{% endif %}
|
|
34
|
-
{% if iconPosition != 'left' %}
|
|
35
|
-
<svg class="margin-left-05 usa-icon usx-icon usa-icon--size-{{ iconSize|default:'2' }}" aria-hidden="true" focusable="false" role="img">
|
|
36
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
37
|
-
</svg>
|
|
38
|
-
{% endif %}
|
|
39
|
-
</button>
|
|
5
|
+
{% dict href=href|default:'#top' as navigation %}
|
|
40
6
|
{% endif %}
|
|
7
|
+
{% dict as attributes %}
|
|
8
|
+
{% if not label and ariaLabel != None %}
|
|
9
|
+
{% dict aria_label=ariaLabel as attributes %}
|
|
10
|
+
{% endif %}
|
|
11
|
+
{% dict name='arrow_upward' position=iconPosition size=iconSize as arrow %}
|
|
12
|
+
{% make_list arrow as icons %}
|
|
13
|
+
{% button props=navigation label=label variant=variant|default_if_none:'primary' ghost=ghost inverse=inverse iconProps=icons className=className extraAttributes=attributes %}{% endbutton %}
|
|
@@ -1,107 +1,23 @@
|
|
|
1
1
|
<h3 id="back-to-top" class="site-preview-heading">Back to top</h3>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
25
|
-
</svg>
|
|
26
|
-
</button>
|
|
27
|
-
<button class="usa-button usx-button usa-button--primary usx-button--ghost width-6"
|
|
28
|
-
onclick="window.scrollTo({ top: 0, behavior: 'smooth' });">
|
|
29
|
-
<svg class="usa-icon usa-icon--size-3" aria-hidden="true" focusable="false" role="img">
|
|
30
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
31
|
-
</svg>
|
|
32
|
-
</button>
|
|
33
|
-
<button class="usa-button usx-button usa-button--primary usx-button--ghost width-7"
|
|
34
|
-
onclick="window.scrollTo({ top: 0, behavior: 'smooth' });">
|
|
35
|
-
<svg class="usa-icon usa-icon--size-4" aria-hidden="true" focusable="false" role="img">
|
|
36
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
37
|
-
</svg>
|
|
38
|
-
</button>
|
|
39
|
-
<a class="usx-link usx-no-visited" tabindex="0"
|
|
40
|
-
href="#back-to-top"
|
|
41
|
-
onclick="document.getElementById('back-to-top').scrollIntoView({ behavior: 'smooth' });"
|
|
42
|
-
>
|
|
43
|
-
Back to top
|
|
44
|
-
<svg class="usa-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img">
|
|
45
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
46
|
-
</svg>
|
|
47
|
-
</a>
|
|
48
|
-
<div class="bg-primary-darkest padding-1 margin-top-2">
|
|
49
|
-
<a class="usx-link text-white hover:text-accent-cool usx-no-visited" tabindex="0"
|
|
50
|
-
href="#back-to-top"
|
|
51
|
-
onclick="document.getElementById('back-to-top').scrollIntoView({ behavior: 'smooth' });"
|
|
52
|
-
>
|
|
53
|
-
Back to top
|
|
54
|
-
<svg class="usa-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img">
|
|
55
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
56
|
-
</svg>
|
|
57
|
-
</a>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
<div class="display-flex flex-column flex-align-end margin-left-auto">
|
|
61
|
-
<button class="usa-button usx-button usx-button--ghost" onclick="window.scrollTo({ top: 0, behavior: 'smooth' });">
|
|
62
|
-
<svg class="usa-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img">
|
|
63
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
64
|
-
</svg>
|
|
65
|
-
Back to top
|
|
66
|
-
</button>
|
|
67
|
-
<button class="usa-button usx-button usa-button--primary usx-button--ghost"
|
|
68
|
-
onclick="window.scrollTo({ top: 0, behavior: 'smooth' });">
|
|
69
|
-
<svg class="usa-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img">
|
|
70
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
71
|
-
</svg>
|
|
72
|
-
Back to top
|
|
73
|
-
</button>
|
|
74
|
-
<button class="usa-button usx-button usa-button--primary usx-button--ghost width-6"
|
|
75
|
-
onclick="window.scrollTo({ top: 0, behavior: 'smooth' });">
|
|
76
|
-
<svg class="usa-icon usa-icon--size-3" aria-hidden="true" focusable="false" role="img">
|
|
77
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
78
|
-
</svg>
|
|
79
|
-
</button>
|
|
80
|
-
<button class="usa-button usx-button usa-button--primary usx-button--ghost width-7"
|
|
81
|
-
onclick="window.scrollTo({ top: 0, behavior: 'smooth' });">
|
|
82
|
-
<svg class="usa-icon usa-icon--size-4" aria-hidden="true" focusable="false" role="img">
|
|
83
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
84
|
-
</svg>
|
|
85
|
-
</button>
|
|
86
|
-
<a class="usx-link usx-no-visited" tabindex="0"
|
|
87
|
-
href="#back-to-top"
|
|
88
|
-
onclick="document.getElementById('back-to-top').scrollIntoView({ behavior: 'smooth' });"
|
|
89
|
-
>
|
|
90
|
-
<svg class="usa-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img">
|
|
91
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
92
|
-
</svg>
|
|
93
|
-
Back to top
|
|
94
|
-
</a>
|
|
95
|
-
<div class="bg-primary-darkest padding-1 margin-top-2">
|
|
96
|
-
<a class="usx-link text-white hover:text-accent-cool usx-no-visited" tabindex="0"
|
|
97
|
-
href="#back-to-top"
|
|
98
|
-
onclick="document.getElementById('back-to-top').scrollIntoView({ behavior: 'smooth' });"
|
|
99
|
-
>
|
|
100
|
-
<svg class="usa-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img">
|
|
101
|
-
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
102
|
-
</svg>
|
|
103
|
-
Back to top
|
|
104
|
-
</a>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
2
|
+
<a class="usa-button usx-button usa-button--primary usx-button--ghost" href="#top">
|
|
3
|
+
Back to top
|
|
4
|
+
<svg class="usa-icon usx-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img">
|
|
5
|
+
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
6
|
+
</svg>
|
|
7
|
+
</a>
|
|
8
|
+
|
|
9
|
+
<!-- Optional custom destination. -->
|
|
10
|
+
<a class="usa-button usx-button usa-button--unstyled" href="#back-to-top">
|
|
11
|
+
Back to this section
|
|
12
|
+
<svg class="usa-icon usx-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img">
|
|
13
|
+
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
14
|
+
</svg>
|
|
15
|
+
</a>
|
|
16
|
+
|
|
17
|
+
<!-- Optional button: the host supplies its click handler. -->
|
|
18
|
+
<button type="button" class="usa-button usx-button usa-button--primary usx-button--ghost">
|
|
19
|
+
Back to top
|
|
20
|
+
<svg class="usa-icon usx-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img">
|
|
21
|
+
<use href="./img/sprite.svg#arrow_upward"></use>
|
|
22
|
+
</svg>
|
|
23
|
+
</button>
|