@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,277 +1,67 @@
|
|
|
1
1
|
<h3 class="site-preview-heading">Default</h3>
|
|
2
2
|
<section aria-label="Search">
|
|
3
|
-
<form
|
|
4
|
-
|
|
5
|
-
class="
|
|
6
|
-
usa-search
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
method="get"
|
|
12
|
-
role="search"
|
|
13
|
-
|
|
14
|
-
>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<label
|
|
18
|
-
|
|
19
|
-
class="
|
|
20
|
-
|
|
21
|
-
usa-label usx-label
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
usa-sr-only
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
for="django-search-default"
|
|
31
|
-
|
|
32
|
-
>
|
|
33
|
-
Search
|
|
34
|
-
</label>
|
|
3
|
+
<form id="django-search-default-form" class="usa-search" method="get" role="search">
|
|
4
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-default"> Search </label>
|
|
35
5
|
|
|
36
6
|
<input
|
|
37
7
|
id="django-search-default"
|
|
38
8
|
class="usa-input usx-input"
|
|
39
9
|
placeholder=""
|
|
40
|
-
value=""
|
|
41
10
|
type="search"
|
|
42
11
|
name="q"
|
|
43
12
|
/>
|
|
44
13
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
<span class="usa-search__submit-text">Search</span>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
<svg
|
|
73
|
-
class="
|
|
74
|
-
usa-icon usx-icon
|
|
75
|
-
|
|
76
|
-
usa-search__submit-icon
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
aria-hidden="true"
|
|
81
|
-
focusable="false"
|
|
82
|
-
role="img"
|
|
83
|
-
>
|
|
84
|
-
|
|
85
|
-
<use href="img/sprite.svg#search"></use>
|
|
86
|
-
|
|
87
|
-
</svg>
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
14
|
+
<button type="submit" class="usa-button usx-button usa-button--primary">
|
|
15
|
+
<span class="usa-search__submit-text">Search</span>
|
|
16
|
+
|
|
17
|
+
<svg
|
|
18
|
+
class="usa-icon usx-icon usa-search__submit-icon"
|
|
19
|
+
aria-hidden="true"
|
|
20
|
+
focusable="false"
|
|
21
|
+
role="img"
|
|
22
|
+
>
|
|
23
|
+
<use href="img/sprite.svg#search"></use>
|
|
24
|
+
</svg>
|
|
94
25
|
</button>
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
26
|
</form>
|
|
99
|
-
<script data-id="search-default" data-on-submit="" data-search-key="q">
|
|
100
|
-
const data = document.currentScript.dataset;
|
|
101
|
-
const onSubmit = data.onSubmit;
|
|
102
|
-
|
|
103
|
-
if (!!onSubmit) {
|
|
104
|
-
const id = data.id;
|
|
105
|
-
const searchKey = data.searchKey;
|
|
106
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
107
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
108
|
-
e.preventDefault();
|
|
109
|
-
const formData = new FormData(e.target);
|
|
110
|
-
const query = formData.get(searchKey);
|
|
111
|
-
const func = eval(onSubmit);
|
|
112
|
-
func(query);
|
|
113
|
-
return false;
|
|
114
|
-
};
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
</script>
|
|
119
27
|
</section>
|
|
120
28
|
|
|
121
29
|
<h3 class="site-preview-heading">Custom Placeholder</h3>
|
|
122
30
|
<section aria-label="Search">
|
|
123
|
-
<form
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"
|
|
131
|
-
method="get"
|
|
132
|
-
role="search"
|
|
133
|
-
|
|
134
|
-
>
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
<label
|
|
138
|
-
|
|
139
|
-
class="
|
|
140
|
-
|
|
141
|
-
usa-label usx-label
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
usa-sr-only
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
"
|
|
149
|
-
|
|
150
|
-
for="django-search-custom-placeholder"
|
|
151
|
-
|
|
152
|
-
>
|
|
153
|
-
Search
|
|
154
|
-
</label>
|
|
31
|
+
<form id="django-search-custom-placeholder-form" class="usa-search" method="get" role="search">
|
|
32
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-custom-placeholder">
|
|
33
|
+
Search
|
|
34
|
+
</label>
|
|
155
35
|
|
|
156
36
|
<input
|
|
157
37
|
id="django-search-custom-placeholder"
|
|
158
38
|
class="usa-input usx-input"
|
|
159
39
|
placeholder="Custom placeholder..."
|
|
160
|
-
value=""
|
|
161
40
|
type="search"
|
|
162
41
|
name="q"
|
|
163
42
|
/>
|
|
164
43
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
"
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
>
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
<span class="usa-search__submit-text">Search</span>
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
<svg
|
|
193
|
-
class="
|
|
194
|
-
usa-icon usx-icon
|
|
195
|
-
|
|
196
|
-
usa-search__submit-icon
|
|
197
|
-
|
|
198
|
-
"
|
|
199
|
-
|
|
200
|
-
aria-hidden="true"
|
|
201
|
-
focusable="false"
|
|
202
|
-
role="img"
|
|
203
|
-
>
|
|
204
|
-
|
|
205
|
-
<use href="img/sprite.svg#search"></use>
|
|
206
|
-
|
|
207
|
-
</svg>
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
44
|
+
<button type="submit" class="usa-button usx-button usa-button--primary">
|
|
45
|
+
<span class="usa-search__submit-text">Search</span>
|
|
46
|
+
|
|
47
|
+
<svg
|
|
48
|
+
class="usa-icon usx-icon usa-search__submit-icon"
|
|
49
|
+
aria-hidden="true"
|
|
50
|
+
focusable="false"
|
|
51
|
+
role="img"
|
|
52
|
+
>
|
|
53
|
+
<use href="img/sprite.svg#search"></use>
|
|
54
|
+
</svg>
|
|
214
55
|
</button>
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
56
|
</form>
|
|
219
|
-
<script data-id="search-custom-placeholder" data-on-submit="" data-search-key="q">
|
|
220
|
-
const data = document.currentScript.dataset;
|
|
221
|
-
const onSubmit = data.onSubmit;
|
|
222
|
-
|
|
223
|
-
if (!!onSubmit) {
|
|
224
|
-
const id = data.id;
|
|
225
|
-
const searchKey = data.searchKey;
|
|
226
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
227
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
228
|
-
e.preventDefault();
|
|
229
|
-
const formData = new FormData(e.target);
|
|
230
|
-
const query = formData.get(searchKey);
|
|
231
|
-
const func = eval(onSubmit);
|
|
232
|
-
func(query);
|
|
233
|
-
return false;
|
|
234
|
-
};
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
</script>
|
|
239
57
|
</section>
|
|
240
58
|
|
|
241
59
|
<h3 class="site-preview-heading">With Default Value</h3>
|
|
242
60
|
<section aria-label="Search">
|
|
243
|
-
<form
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
"
|
|
251
|
-
method="get"
|
|
252
|
-
role="search"
|
|
253
|
-
|
|
254
|
-
>
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
<label
|
|
258
|
-
|
|
259
|
-
class="
|
|
260
|
-
|
|
261
|
-
usa-label usx-label
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
usa-sr-only
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
"
|
|
269
|
-
|
|
270
|
-
for="django-search-default-value"
|
|
271
|
-
|
|
272
|
-
>
|
|
273
|
-
Search
|
|
274
|
-
</label>
|
|
61
|
+
<form id="django-search-default-value-form" class="usa-search" method="get" role="search">
|
|
62
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-default-value">
|
|
63
|
+
Search
|
|
64
|
+
</label>
|
|
275
65
|
|
|
276
66
|
<input
|
|
277
67
|
id="django-search-default-value"
|
|
@@ -282,1552 +72,401 @@
|
|
|
282
72
|
name="q"
|
|
283
73
|
/>
|
|
284
74
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
"
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
>
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
<span class="usa-search__submit-text">Search</span>
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
<svg
|
|
313
|
-
class="
|
|
314
|
-
usa-icon usx-icon
|
|
315
|
-
|
|
316
|
-
usa-search__submit-icon
|
|
317
|
-
|
|
318
|
-
"
|
|
319
|
-
|
|
320
|
-
aria-hidden="true"
|
|
321
|
-
focusable="false"
|
|
322
|
-
role="img"
|
|
323
|
-
>
|
|
324
|
-
|
|
325
|
-
<use href="img/sprite.svg#search"></use>
|
|
326
|
-
|
|
327
|
-
</svg>
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
75
|
+
<button type="submit" class="usa-button usx-button usa-button--primary">
|
|
76
|
+
<span class="usa-search__submit-text">Search</span>
|
|
77
|
+
|
|
78
|
+
<svg
|
|
79
|
+
class="usa-icon usx-icon usa-search__submit-icon"
|
|
80
|
+
aria-hidden="true"
|
|
81
|
+
focusable="false"
|
|
82
|
+
role="img"
|
|
83
|
+
>
|
|
84
|
+
<use href="img/sprite.svg#search"></use>
|
|
85
|
+
</svg>
|
|
334
86
|
</button>
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
87
|
</form>
|
|
339
|
-
<script data-id="search-default-value" data-on-submit="" data-search-key="q">
|
|
340
|
-
const data = document.currentScript.dataset;
|
|
341
|
-
const onSubmit = data.onSubmit;
|
|
342
|
-
|
|
343
|
-
if (!!onSubmit) {
|
|
344
|
-
const id = data.id;
|
|
345
|
-
const searchKey = data.searchKey;
|
|
346
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
347
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
348
|
-
e.preventDefault();
|
|
349
|
-
const formData = new FormData(e.target);
|
|
350
|
-
const query = formData.get(searchKey);
|
|
351
|
-
const func = eval(onSubmit);
|
|
352
|
-
func(query);
|
|
353
|
-
return false;
|
|
354
|
-
};
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
</script>
|
|
359
88
|
</section>
|
|
360
89
|
|
|
361
90
|
<h3 class="site-preview-heading">Big</h3>
|
|
362
91
|
<section aria-label="Search">
|
|
363
|
-
<form
|
|
364
|
-
|
|
365
|
-
class="
|
|
366
|
-
usa-search
|
|
367
|
-
|
|
368
|
-
usa-search--big
|
|
369
|
-
|
|
370
|
-
"
|
|
371
|
-
method="get"
|
|
372
|
-
role="search"
|
|
373
|
-
|
|
374
|
-
>
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
<label
|
|
378
|
-
|
|
379
|
-
class="
|
|
380
|
-
|
|
381
|
-
usa-label usx-label
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
usa-sr-only
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
"
|
|
389
|
-
|
|
390
|
-
for="django-search-big"
|
|
391
|
-
|
|
392
|
-
>
|
|
393
|
-
Search
|
|
394
|
-
</label>
|
|
92
|
+
<form id="django-search-big-form" class="usa-search usa-search--big" method="get" role="search">
|
|
93
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-big"> Search </label>
|
|
395
94
|
|
|
396
95
|
<input
|
|
397
96
|
id="django-search-big"
|
|
398
97
|
class="usa-input usx-input"
|
|
399
98
|
placeholder=""
|
|
400
|
-
value=""
|
|
401
99
|
type="search"
|
|
402
100
|
name="q"
|
|
403
101
|
/>
|
|
404
102
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
"
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
>
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
<span class="usa-search__submit-text">Search</span>
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
<svg
|
|
433
|
-
class="
|
|
434
|
-
usa-icon usx-icon
|
|
435
|
-
|
|
436
|
-
usa-search__submit-icon
|
|
437
|
-
|
|
438
|
-
"
|
|
439
|
-
|
|
440
|
-
aria-hidden="true"
|
|
441
|
-
focusable="false"
|
|
442
|
-
role="img"
|
|
443
|
-
>
|
|
444
|
-
|
|
445
|
-
<use href="img/sprite.svg#search"></use>
|
|
446
|
-
|
|
447
|
-
</svg>
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
103
|
+
<button type="submit" class="usa-button usx-button usa-button--primary">
|
|
104
|
+
<span class="usa-search__submit-text">Search</span>
|
|
105
|
+
|
|
106
|
+
<svg
|
|
107
|
+
class="usa-icon usx-icon usa-search__submit-icon"
|
|
108
|
+
aria-hidden="true"
|
|
109
|
+
focusable="false"
|
|
110
|
+
role="img"
|
|
111
|
+
>
|
|
112
|
+
<use href="img/sprite.svg#search"></use>
|
|
113
|
+
</svg>
|
|
454
114
|
</button>
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
115
|
</form>
|
|
459
|
-
<script data-id="search-big" data-on-submit="" data-search-key="q">
|
|
460
|
-
const data = document.currentScript.dataset;
|
|
461
|
-
const onSubmit = data.onSubmit;
|
|
462
|
-
|
|
463
|
-
if (!!onSubmit) {
|
|
464
|
-
const id = data.id;
|
|
465
|
-
const searchKey = data.searchKey;
|
|
466
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
467
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
468
|
-
e.preventDefault();
|
|
469
|
-
const formData = new FormData(e.target);
|
|
470
|
-
const query = formData.get(searchKey);
|
|
471
|
-
const func = eval(onSubmit);
|
|
472
|
-
func(query);
|
|
473
|
-
return false;
|
|
474
|
-
};
|
|
475
|
-
});
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
</script>
|
|
479
116
|
</section>
|
|
480
117
|
|
|
481
118
|
<h3 class="site-preview-heading">Icon Only</h3>
|
|
482
119
|
<section aria-label="Search">
|
|
483
120
|
<form
|
|
484
121
|
id="django-search-icon-only-form"
|
|
485
|
-
class="
|
|
486
|
-
usa-search
|
|
487
|
-
usa-search--small
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
"
|
|
122
|
+
class="usa-search usa-search--small"
|
|
491
123
|
method="get"
|
|
492
124
|
role="search"
|
|
493
|
-
|
|
494
125
|
>
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
<label
|
|
498
|
-
|
|
499
|
-
class="
|
|
500
|
-
|
|
501
|
-
usa-label usx-label
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
usa-sr-only
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
"
|
|
509
|
-
|
|
510
|
-
for="django-search-icon-only"
|
|
511
|
-
|
|
512
|
-
>
|
|
513
|
-
Search
|
|
514
|
-
</label>
|
|
126
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-icon-only"> Search </label>
|
|
515
127
|
|
|
516
128
|
<input
|
|
517
129
|
id="django-search-icon-only"
|
|
518
130
|
class="usa-input usx-input"
|
|
519
131
|
placeholder=""
|
|
520
|
-
value=""
|
|
521
132
|
type="search"
|
|
522
133
|
name="q"
|
|
523
134
|
/>
|
|
524
135
|
|
|
136
|
+
<button type="submit" class="usa-button usx-button usa-button--primary">
|
|
137
|
+
<svg
|
|
138
|
+
class="usa-icon usx-icon usa-search__submit-icon display-inline-block"
|
|
139
|
+
aria-label="Search"
|
|
140
|
+
focusable="false"
|
|
141
|
+
role="img"
|
|
142
|
+
>
|
|
143
|
+
<use href="img/sprite.svg#search"></use>
|
|
144
|
+
</svg>
|
|
145
|
+
</button>
|
|
146
|
+
</form>
|
|
147
|
+
</section>
|
|
525
148
|
|
|
149
|
+
<h3 class="site-preview-heading">Big Icon Only</h3>
|
|
150
|
+
<section aria-label="Search">
|
|
151
|
+
<form
|
|
152
|
+
id="django-search-big-icon-only-form"
|
|
153
|
+
class="usa-search usa-search--big"
|
|
154
|
+
method="get"
|
|
155
|
+
role="search"
|
|
156
|
+
>
|
|
157
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-big-icon-only">
|
|
158
|
+
Search
|
|
159
|
+
</label>
|
|
526
160
|
|
|
161
|
+
<input
|
|
162
|
+
id="django-search-big-icon-only"
|
|
163
|
+
class="usa-input usx-input"
|
|
164
|
+
placeholder=""
|
|
165
|
+
type="search"
|
|
166
|
+
name="q"
|
|
167
|
+
/>
|
|
527
168
|
|
|
169
|
+
<button type="submit" class="usa-button usx-button usa-button--primary">
|
|
170
|
+
<svg
|
|
171
|
+
class="usa-icon usx-icon usa-search__submit-icon display-inline-block"
|
|
172
|
+
aria-label="Search"
|
|
173
|
+
focusable="false"
|
|
174
|
+
role="img"
|
|
175
|
+
>
|
|
176
|
+
<use href="img/sprite.svg#search"></use>
|
|
177
|
+
</svg>
|
|
178
|
+
</button>
|
|
179
|
+
</form>
|
|
180
|
+
</section>
|
|
528
181
|
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
>
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
<svg
|
|
552
|
-
class="
|
|
553
|
-
usa-icon usx-icon
|
|
554
|
-
|
|
555
|
-
usa-search__submit-icon display-inline-block
|
|
556
|
-
|
|
557
|
-
"
|
|
558
|
-
|
|
559
|
-
aria-label="Search"
|
|
560
|
-
focusable="false"
|
|
561
|
-
role="img"
|
|
562
|
-
>
|
|
563
|
-
|
|
564
|
-
<use href="img/sprite.svg#search"></use>
|
|
565
|
-
|
|
566
|
-
</svg>
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
</button>
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
</form>
|
|
578
|
-
<script data-id="search-icon-only" data-on-submit="" data-search-key="q">
|
|
579
|
-
const data = document.currentScript.dataset;
|
|
580
|
-
const onSubmit = data.onSubmit;
|
|
581
|
-
|
|
582
|
-
if (!!onSubmit) {
|
|
583
|
-
const id = data.id;
|
|
584
|
-
const searchKey = data.searchKey;
|
|
585
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
586
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
587
|
-
e.preventDefault();
|
|
588
|
-
const formData = new FormData(e.target);
|
|
589
|
-
const query = formData.get(searchKey);
|
|
590
|
-
const func = eval(onSubmit);
|
|
591
|
-
func(query);
|
|
592
|
-
return false;
|
|
593
|
-
};
|
|
594
|
-
});
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
</script>
|
|
598
|
-
</section>
|
|
599
|
-
|
|
600
|
-
<h3 class="site-preview-heading">Big Icon Only</h3>
|
|
601
|
-
<section aria-label="Search">
|
|
602
|
-
<form
|
|
603
|
-
id="django-search-big-icon-only-form"
|
|
604
|
-
class="
|
|
605
|
-
usa-search
|
|
606
|
-
|
|
607
|
-
usa-search--big
|
|
608
|
-
|
|
609
|
-
"
|
|
610
|
-
method="get"
|
|
611
|
-
role="search"
|
|
612
|
-
|
|
613
|
-
>
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
<label
|
|
617
|
-
|
|
618
|
-
class="
|
|
619
|
-
|
|
620
|
-
usa-label usx-label
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
usa-sr-only
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
"
|
|
628
|
-
|
|
629
|
-
for="django-search-big-icon-only"
|
|
630
|
-
|
|
631
|
-
>
|
|
632
|
-
Search
|
|
633
|
-
</label>
|
|
634
|
-
|
|
635
|
-
<input
|
|
636
|
-
id="django-search-big-icon-only"
|
|
637
|
-
class="usa-input usx-input"
|
|
638
|
-
placeholder=""
|
|
639
|
-
value=""
|
|
640
|
-
type="search"
|
|
641
|
-
name="q"
|
|
642
|
-
/>
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
<button
|
|
650
|
-
type="submit"
|
|
651
|
-
class="
|
|
652
|
-
usa-button usx-button
|
|
653
|
-
usa-button--primary
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
"
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
>
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
<svg
|
|
671
|
-
class="
|
|
672
|
-
usa-icon usx-icon
|
|
673
|
-
|
|
674
|
-
usa-search__submit-icon display-inline-block
|
|
675
|
-
|
|
676
|
-
"
|
|
677
|
-
|
|
678
|
-
aria-label="Search"
|
|
679
|
-
focusable="false"
|
|
680
|
-
role="img"
|
|
681
|
-
>
|
|
682
|
-
|
|
683
|
-
<use href="img/sprite.svg#search"></use>
|
|
684
|
-
|
|
685
|
-
</svg>
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
</button>
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
</form>
|
|
697
|
-
<script data-id="search-big-icon-only" data-on-submit="" data-search-key="q">
|
|
698
|
-
const data = document.currentScript.dataset;
|
|
699
|
-
const onSubmit = data.onSubmit;
|
|
700
|
-
|
|
701
|
-
if (!!onSubmit) {
|
|
702
|
-
const id = data.id;
|
|
703
|
-
const searchKey = data.searchKey;
|
|
704
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
705
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
706
|
-
e.preventDefault();
|
|
707
|
-
const formData = new FormData(e.target);
|
|
708
|
-
const query = formData.get(searchKey);
|
|
709
|
-
const func = eval(onSubmit);
|
|
710
|
-
func(query);
|
|
711
|
-
return false;
|
|
712
|
-
};
|
|
713
|
-
});
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
</script>
|
|
717
|
-
</section>
|
|
718
|
-
|
|
719
|
-
<h3 class="site-preview-heading">Non Standard Icon</h3>
|
|
720
|
-
<section aria-label="Search">
|
|
721
|
-
<form
|
|
722
|
-
id="django-search-non-standard-icon-form"
|
|
723
|
-
class="
|
|
724
|
-
usa-search
|
|
725
|
-
usa-search--small
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
"
|
|
729
|
-
method="get"
|
|
730
|
-
role="search"
|
|
731
|
-
|
|
732
|
-
>
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
<label
|
|
736
|
-
|
|
737
|
-
class="
|
|
738
|
-
|
|
739
|
-
usa-label usx-label
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
usa-sr-only
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
"
|
|
747
|
-
|
|
748
|
-
for="django-search-non-standard-icon"
|
|
749
|
-
|
|
750
|
-
>
|
|
751
|
-
Search
|
|
752
|
-
</label>
|
|
182
|
+
<h3 class="site-preview-heading">Non Standard Icon</h3>
|
|
183
|
+
<section aria-label="Search">
|
|
184
|
+
<form
|
|
185
|
+
id="django-search-non-standard-icon-form"
|
|
186
|
+
class="usa-search usa-search--small"
|
|
187
|
+
method="get"
|
|
188
|
+
role="search"
|
|
189
|
+
>
|
|
190
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-non-standard-icon">
|
|
191
|
+
Search
|
|
192
|
+
</label>
|
|
753
193
|
|
|
754
194
|
<input
|
|
755
195
|
id="django-search-non-standard-icon"
|
|
756
196
|
class="usa-input usx-input"
|
|
757
197
|
placeholder=""
|
|
758
|
-
value=""
|
|
759
198
|
type="search"
|
|
760
199
|
name="q"
|
|
761
200
|
/>
|
|
762
201
|
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
usa-button--primary
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
"
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
>
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
<svg
|
|
790
|
-
class="
|
|
791
|
-
usa-icon usx-icon
|
|
792
|
-
|
|
793
|
-
usa-search__submit-icon display-inline-block
|
|
794
|
-
|
|
795
|
-
"
|
|
796
|
-
|
|
797
|
-
aria-label="Search"
|
|
798
|
-
focusable="false"
|
|
799
|
-
role="img"
|
|
800
|
-
>
|
|
801
|
-
|
|
802
|
-
<use href="img/sprite.svg#star"></use>
|
|
803
|
-
|
|
804
|
-
</svg>
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
202
|
+
<button type="submit" class="usa-button usx-button usa-button--primary">
|
|
203
|
+
<svg
|
|
204
|
+
class="usa-icon usx-icon usa-search__submit-icon display-inline-block"
|
|
205
|
+
aria-label="Search"
|
|
206
|
+
focusable="false"
|
|
207
|
+
role="img"
|
|
208
|
+
>
|
|
209
|
+
<use href="img/sprite.svg#star"></use>
|
|
210
|
+
</svg>
|
|
811
211
|
</button>
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
212
|
</form>
|
|
816
|
-
<script data-id="search-non-standard-icon" data-on-submit="" data-search-key="q">
|
|
817
|
-
const data = document.currentScript.dataset;
|
|
818
|
-
const onSubmit = data.onSubmit;
|
|
819
|
-
|
|
820
|
-
if (!!onSubmit) {
|
|
821
|
-
const id = data.id;
|
|
822
|
-
const searchKey = data.searchKey;
|
|
823
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
824
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
825
|
-
e.preventDefault();
|
|
826
|
-
const formData = new FormData(e.target);
|
|
827
|
-
const query = formData.get(searchKey);
|
|
828
|
-
const func = eval(onSubmit);
|
|
829
|
-
func(query);
|
|
830
|
-
return false;
|
|
831
|
-
};
|
|
832
|
-
});
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
</script>
|
|
836
213
|
</section>
|
|
837
214
|
|
|
838
215
|
<h3 class="site-preview-heading">With Custom Button Variant</h3>
|
|
839
216
|
<section aria-label="Search">
|
|
840
|
-
<form
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
"
|
|
848
|
-
method="get"
|
|
849
|
-
role="search"
|
|
850
|
-
|
|
851
|
-
>
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
<label
|
|
855
|
-
|
|
856
|
-
class="
|
|
857
|
-
|
|
858
|
-
usa-label usx-label
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
usa-sr-only
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
"
|
|
866
|
-
|
|
867
|
-
for="django-search-custom-variant"
|
|
868
|
-
|
|
869
|
-
>
|
|
870
|
-
Search
|
|
871
|
-
</label>
|
|
217
|
+
<form id="django-search-custom-variant-form" class="usa-search" method="get" role="search">
|
|
218
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-custom-variant">
|
|
219
|
+
Search
|
|
220
|
+
</label>
|
|
872
221
|
|
|
873
222
|
<input
|
|
874
223
|
id="django-search-custom-variant"
|
|
875
224
|
class="usa-input usx-input"
|
|
876
225
|
placeholder=""
|
|
877
|
-
value=""
|
|
878
226
|
type="search"
|
|
879
227
|
name="q"
|
|
880
228
|
/>
|
|
881
229
|
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
"
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
>
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
<span class="usa-search__submit-text">Search</span>
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
<svg
|
|
910
|
-
class="
|
|
911
|
-
usa-icon usx-icon
|
|
912
|
-
|
|
913
|
-
usa-search__submit-icon
|
|
914
|
-
|
|
915
|
-
"
|
|
916
|
-
|
|
917
|
-
aria-hidden="true"
|
|
918
|
-
focusable="false"
|
|
919
|
-
role="img"
|
|
920
|
-
>
|
|
921
|
-
|
|
922
|
-
<use href="img/sprite.svg#search"></use>
|
|
923
|
-
|
|
924
|
-
</svg>
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
230
|
+
<button type="submit" class="usa-button usx-button usa-button--accent-cool">
|
|
231
|
+
<span class="usa-search__submit-text">Search</span>
|
|
232
|
+
|
|
233
|
+
<svg
|
|
234
|
+
class="usa-icon usx-icon usa-search__submit-icon"
|
|
235
|
+
aria-hidden="true"
|
|
236
|
+
focusable="false"
|
|
237
|
+
role="img"
|
|
238
|
+
>
|
|
239
|
+
<use href="img/sprite.svg#search"></use>
|
|
240
|
+
</svg>
|
|
931
241
|
</button>
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
242
|
</form>
|
|
936
|
-
<script data-id="search-custom-variant" data-on-submit="" data-search-key="q">
|
|
937
|
-
const data = document.currentScript.dataset;
|
|
938
|
-
const onSubmit = data.onSubmit;
|
|
939
|
-
|
|
940
|
-
if (!!onSubmit) {
|
|
941
|
-
const id = data.id;
|
|
942
|
-
const searchKey = data.searchKey;
|
|
943
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
944
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
945
|
-
e.preventDefault();
|
|
946
|
-
const formData = new FormData(e.target);
|
|
947
|
-
const query = formData.get(searchKey);
|
|
948
|
-
const func = eval(onSubmit);
|
|
949
|
-
func(query);
|
|
950
|
-
return false;
|
|
951
|
-
};
|
|
952
|
-
});
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
</script>
|
|
956
243
|
</section>
|
|
957
244
|
|
|
958
245
|
<h3 class="site-preview-heading">Custom Label</h3>
|
|
959
246
|
<section aria-label="Find a program">
|
|
960
|
-
<form
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
"
|
|
968
|
-
method="get"
|
|
969
|
-
role="search"
|
|
970
|
-
|
|
971
|
-
>
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
<label
|
|
975
|
-
|
|
976
|
-
class="
|
|
977
|
-
|
|
978
|
-
usa-label usx-label
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
usa-sr-only
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
"
|
|
986
|
-
|
|
987
|
-
for="django-search-custom-label"
|
|
988
|
-
|
|
989
|
-
>
|
|
990
|
-
Find a program
|
|
991
|
-
</label>
|
|
247
|
+
<form id="django-search-custom-label-form" class="usa-search" method="get" role="search">
|
|
248
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-custom-label">
|
|
249
|
+
Find a program
|
|
250
|
+
</label>
|
|
992
251
|
|
|
993
252
|
<input
|
|
994
253
|
id="django-search-custom-label"
|
|
995
254
|
class="usa-input usx-input"
|
|
996
255
|
placeholder=""
|
|
997
|
-
value=""
|
|
998
256
|
type="search"
|
|
999
257
|
name="q"
|
|
1000
258
|
/>
|
|
1001
259
|
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
"
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
>
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
<span class="usa-search__submit-text">Find a program</span>
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
<svg
|
|
1030
|
-
class="
|
|
1031
|
-
usa-icon usx-icon
|
|
1032
|
-
|
|
1033
|
-
usa-search__submit-icon
|
|
1034
|
-
|
|
1035
|
-
"
|
|
1036
|
-
|
|
1037
|
-
aria-hidden="true"
|
|
1038
|
-
focusable="false"
|
|
1039
|
-
role="img"
|
|
1040
|
-
>
|
|
1041
|
-
|
|
1042
|
-
<use href="img/sprite.svg#search"></use>
|
|
1043
|
-
|
|
1044
|
-
</svg>
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
260
|
+
<button type="submit" class="usa-button usx-button usa-button--primary">
|
|
261
|
+
<span class="usa-search__submit-text">Find a program</span>
|
|
262
|
+
|
|
263
|
+
<svg
|
|
264
|
+
class="usa-icon usx-icon usa-search__submit-icon"
|
|
265
|
+
aria-hidden="true"
|
|
266
|
+
focusable="false"
|
|
267
|
+
role="img"
|
|
268
|
+
>
|
|
269
|
+
<use href="img/sprite.svg#search"></use>
|
|
270
|
+
</svg>
|
|
1051
271
|
</button>
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
272
|
</form>
|
|
1056
|
-
<script data-id="search-custom-label" data-on-submit="" data-search-key="q">
|
|
1057
|
-
const data = document.currentScript.dataset;
|
|
1058
|
-
const onSubmit = data.onSubmit;
|
|
1059
|
-
|
|
1060
|
-
if (!!onSubmit) {
|
|
1061
|
-
const id = data.id;
|
|
1062
|
-
const searchKey = data.searchKey;
|
|
1063
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
1064
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
1065
|
-
e.preventDefault();
|
|
1066
|
-
const formData = new FormData(e.target);
|
|
1067
|
-
const query = formData.get(searchKey);
|
|
1068
|
-
const func = eval(onSubmit);
|
|
1069
|
-
func(query);
|
|
1070
|
-
return false;
|
|
1071
|
-
};
|
|
1072
|
-
});
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
</script>
|
|
1076
273
|
</section>
|
|
1077
274
|
|
|
1078
275
|
<h3 class="site-preview-heading">Icon Only Custom Label</h3>
|
|
1079
276
|
<section aria-label="Find a program">
|
|
1080
277
|
<form
|
|
1081
278
|
id="django-search-icon-only-custom-label-form"
|
|
1082
|
-
class="
|
|
1083
|
-
usa-search
|
|
1084
|
-
usa-search--small
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
"
|
|
279
|
+
class="usa-search usa-search--small"
|
|
1088
280
|
method="get"
|
|
1089
281
|
role="search"
|
|
1090
|
-
|
|
1091
282
|
>
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
class="
|
|
1097
|
-
|
|
1098
|
-
usa-label usx-label
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
usa-sr-only
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
"
|
|
1106
|
-
|
|
1107
|
-
for="django-search-icon-only-custom-label"
|
|
1108
|
-
|
|
1109
|
-
>
|
|
1110
|
-
Find a program
|
|
1111
|
-
</label>
|
|
283
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-icon-only-custom-label">
|
|
284
|
+
Find a program
|
|
285
|
+
</label>
|
|
1112
286
|
|
|
1113
287
|
<input
|
|
1114
288
|
id="django-search-icon-only-custom-label"
|
|
1115
289
|
class="usa-input usx-input"
|
|
1116
290
|
placeholder=""
|
|
1117
|
-
value=""
|
|
1118
|
-
type="search"
|
|
1119
|
-
name="q"
|
|
1120
|
-
/>
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
<button
|
|
1128
|
-
type="submit"
|
|
1129
|
-
class="
|
|
1130
|
-
usa-button usx-button
|
|
1131
|
-
usa-button--primary
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
"
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
>
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
<svg
|
|
1149
|
-
class="
|
|
1150
|
-
usa-icon usx-icon
|
|
1151
|
-
|
|
1152
|
-
usa-search__submit-icon display-inline-block
|
|
1153
|
-
|
|
1154
|
-
"
|
|
1155
|
-
|
|
1156
|
-
aria-label="Find a program"
|
|
1157
|
-
focusable="false"
|
|
1158
|
-
role="img"
|
|
1159
|
-
>
|
|
1160
|
-
|
|
1161
|
-
<use href="img/sprite.svg#search"></use>
|
|
1162
|
-
|
|
1163
|
-
</svg>
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
</button>
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
</form>
|
|
1175
|
-
<script data-id="search-icon-only-custom-label" data-on-submit="" data-search-key="q">
|
|
1176
|
-
const data = document.currentScript.dataset;
|
|
1177
|
-
const onSubmit = data.onSubmit;
|
|
1178
|
-
|
|
1179
|
-
if (!!onSubmit) {
|
|
1180
|
-
const id = data.id;
|
|
1181
|
-
const searchKey = data.searchKey;
|
|
1182
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
1183
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
1184
|
-
e.preventDefault();
|
|
1185
|
-
const formData = new FormData(e.target);
|
|
1186
|
-
const query = formData.get(searchKey);
|
|
1187
|
-
const func = eval(onSubmit);
|
|
1188
|
-
func(query);
|
|
1189
|
-
return false;
|
|
1190
|
-
};
|
|
1191
|
-
});
|
|
1192
|
-
}
|
|
1193
|
-
|
|
1194
|
-
</script>
|
|
1195
|
-
</section>
|
|
1196
|
-
|
|
1197
|
-
<h3 class="site-preview-heading">Custom Aria Label</h3>
|
|
1198
|
-
<section aria-label="Site search">
|
|
1199
|
-
<form
|
|
1200
|
-
id="django-search-custom-aria-label-form"
|
|
1201
|
-
class="
|
|
1202
|
-
usa-search
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
"
|
|
1207
|
-
method="get"
|
|
1208
|
-
role="search"
|
|
1209
|
-
|
|
1210
|
-
>
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
<label
|
|
1214
|
-
|
|
1215
|
-
class="
|
|
1216
|
-
|
|
1217
|
-
usa-label usx-label
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
usa-sr-only
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
"
|
|
1225
|
-
|
|
1226
|
-
for="django-search-custom-aria-label"
|
|
1227
|
-
|
|
1228
|
-
>
|
|
1229
|
-
Search
|
|
1230
|
-
</label>
|
|
1231
|
-
|
|
1232
|
-
<input
|
|
1233
|
-
id="django-search-custom-aria-label"
|
|
1234
|
-
class="usa-input usx-input"
|
|
1235
|
-
placeholder=""
|
|
1236
|
-
value=""
|
|
1237
291
|
type="search"
|
|
1238
292
|
name="q"
|
|
1239
293
|
/>
|
|
1240
294
|
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
usa-button--primary
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
"
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
>
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
<span class="usa-search__submit-text">Search</span>
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
<svg
|
|
1269
|
-
class="
|
|
1270
|
-
usa-icon usx-icon
|
|
1271
|
-
|
|
1272
|
-
usa-search__submit-icon
|
|
1273
|
-
|
|
1274
|
-
"
|
|
1275
|
-
|
|
1276
|
-
aria-hidden="true"
|
|
1277
|
-
focusable="false"
|
|
1278
|
-
role="img"
|
|
1279
|
-
>
|
|
1280
|
-
|
|
1281
|
-
<use href="img/sprite.svg#search"></use>
|
|
1282
|
-
|
|
1283
|
-
</svg>
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
295
|
+
<button type="submit" class="usa-button usx-button usa-button--primary">
|
|
296
|
+
<svg
|
|
297
|
+
class="usa-icon usx-icon usa-search__submit-icon display-inline-block"
|
|
298
|
+
aria-label="Find a program"
|
|
299
|
+
focusable="false"
|
|
300
|
+
role="img"
|
|
301
|
+
>
|
|
302
|
+
<use href="img/sprite.svg#search"></use>
|
|
303
|
+
</svg>
|
|
1290
304
|
</button>
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
305
|
</form>
|
|
1295
|
-
|
|
1296
|
-
const data = document.currentScript.dataset;
|
|
1297
|
-
const onSubmit = data.onSubmit;
|
|
1298
|
-
|
|
1299
|
-
if (!!onSubmit) {
|
|
1300
|
-
const id = data.id;
|
|
1301
|
-
const searchKey = data.searchKey;
|
|
1302
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
1303
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
1304
|
-
e.preventDefault();
|
|
1305
|
-
const formData = new FormData(e.target);
|
|
1306
|
-
const query = formData.get(searchKey);
|
|
1307
|
-
const func = eval(onSubmit);
|
|
1308
|
-
func(query);
|
|
1309
|
-
return false;
|
|
1310
|
-
};
|
|
1311
|
-
});
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
</script>
|
|
1315
|
-
</section>
|
|
1316
|
-
|
|
1317
|
-
<h3 class="site-preview-heading">Custom Search Key</h3>
|
|
1318
|
-
<section aria-label="Search">
|
|
1319
|
-
<form
|
|
1320
|
-
id="django-search-custom-key-form"
|
|
1321
|
-
class="
|
|
1322
|
-
usa-search
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
"
|
|
1327
|
-
method="get"
|
|
1328
|
-
role="search"
|
|
1329
|
-
|
|
1330
|
-
>
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
<label
|
|
1334
|
-
|
|
1335
|
-
class="
|
|
1336
|
-
|
|
1337
|
-
usa-label usx-label
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
usa-sr-only
|
|
1341
|
-
|
|
306
|
+
</section>
|
|
1342
307
|
|
|
308
|
+
<h3 class="site-preview-heading">Custom Aria Label</h3>
|
|
309
|
+
<section aria-label="Site search">
|
|
310
|
+
<form id="django-search-custom-aria-label-form" class="usa-search" method="get" role="search">
|
|
311
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-custom-aria-label">
|
|
312
|
+
Search
|
|
313
|
+
</label>
|
|
1343
314
|
|
|
1344
|
-
|
|
315
|
+
<input
|
|
316
|
+
id="django-search-custom-aria-label"
|
|
317
|
+
class="usa-input usx-input"
|
|
318
|
+
placeholder=""
|
|
319
|
+
type="search"
|
|
320
|
+
name="q"
|
|
321
|
+
/>
|
|
1345
322
|
|
|
1346
|
-
|
|
323
|
+
<button type="submit" class="usa-button usx-button usa-button--primary">
|
|
324
|
+
<span class="usa-search__submit-text">Search</span>
|
|
325
|
+
|
|
326
|
+
<svg
|
|
327
|
+
class="usa-icon usx-icon usa-search__submit-icon"
|
|
328
|
+
aria-hidden="true"
|
|
329
|
+
focusable="false"
|
|
330
|
+
role="img"
|
|
331
|
+
>
|
|
332
|
+
<use href="img/sprite.svg#search"></use>
|
|
333
|
+
</svg>
|
|
334
|
+
</button>
|
|
335
|
+
</form>
|
|
336
|
+
</section>
|
|
1347
337
|
|
|
1348
|
-
>
|
|
1349
|
-
|
|
1350
|
-
|
|
338
|
+
<h3 class="site-preview-heading">Custom Search Key</h3>
|
|
339
|
+
<section aria-label="Search">
|
|
340
|
+
<form id="django-search-custom-key-form" class="usa-search" method="get" role="search">
|
|
341
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-custom-key"> Search </label>
|
|
1351
342
|
|
|
1352
343
|
<input
|
|
1353
344
|
id="django-search-custom-key"
|
|
1354
345
|
class="usa-input usx-input"
|
|
1355
346
|
placeholder=""
|
|
1356
|
-
value=""
|
|
1357
347
|
type="search"
|
|
1358
348
|
name="query"
|
|
1359
349
|
/>
|
|
1360
350
|
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
"
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
>
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
<span class="usa-search__submit-text">Search</span>
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
<svg
|
|
1389
|
-
class="
|
|
1390
|
-
usa-icon usx-icon
|
|
1391
|
-
|
|
1392
|
-
usa-search__submit-icon
|
|
1393
|
-
|
|
1394
|
-
"
|
|
1395
|
-
|
|
1396
|
-
aria-hidden="true"
|
|
1397
|
-
focusable="false"
|
|
1398
|
-
role="img"
|
|
1399
|
-
>
|
|
1400
|
-
|
|
1401
|
-
<use href="img/sprite.svg#search"></use>
|
|
1402
|
-
|
|
1403
|
-
</svg>
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
351
|
+
<button type="submit" class="usa-button usx-button usa-button--primary">
|
|
352
|
+
<span class="usa-search__submit-text">Search</span>
|
|
353
|
+
|
|
354
|
+
<svg
|
|
355
|
+
class="usa-icon usx-icon usa-search__submit-icon"
|
|
356
|
+
aria-hidden="true"
|
|
357
|
+
focusable="false"
|
|
358
|
+
role="img"
|
|
359
|
+
>
|
|
360
|
+
<use href="img/sprite.svg#search"></use>
|
|
361
|
+
</svg>
|
|
1410
362
|
</button>
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
363
|
</form>
|
|
1415
|
-
<script data-id="search-custom-key" data-on-submit="" data-search-key="query">
|
|
1416
|
-
const data = document.currentScript.dataset;
|
|
1417
|
-
const onSubmit = data.onSubmit;
|
|
1418
|
-
|
|
1419
|
-
if (!!onSubmit) {
|
|
1420
|
-
const id = data.id;
|
|
1421
|
-
const searchKey = data.searchKey;
|
|
1422
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
1423
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
1424
|
-
e.preventDefault();
|
|
1425
|
-
const formData = new FormData(e.target);
|
|
1426
|
-
const query = formData.get(searchKey);
|
|
1427
|
-
const func = eval(onSubmit);
|
|
1428
|
-
func(query);
|
|
1429
|
-
return false;
|
|
1430
|
-
};
|
|
1431
|
-
});
|
|
1432
|
-
}
|
|
1433
|
-
|
|
1434
|
-
</script>
|
|
1435
364
|
</section>
|
|
1436
365
|
|
|
1437
366
|
<h3 class="site-preview-heading">Google Action</h3>
|
|
1438
367
|
<section aria-label="Search">
|
|
1439
368
|
<form
|
|
1440
369
|
id="django-search-google-action-form"
|
|
1441
|
-
class="
|
|
1442
|
-
usa-search
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
"
|
|
370
|
+
class="usa-search"
|
|
1447
371
|
method="get"
|
|
1448
372
|
role="search"
|
|
1449
373
|
action="https://www.google.com/search"
|
|
1450
374
|
>
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
class="
|
|
1456
|
-
|
|
1457
|
-
usa-label usx-label
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
usa-sr-only
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
"
|
|
1465
|
-
|
|
1466
|
-
for="django-search-google-action"
|
|
1467
|
-
|
|
1468
|
-
>
|
|
1469
|
-
Search
|
|
1470
|
-
</label>
|
|
375
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-google-action">
|
|
376
|
+
Search
|
|
377
|
+
</label>
|
|
1471
378
|
|
|
1472
379
|
<input
|
|
1473
380
|
id="django-search-google-action"
|
|
1474
381
|
class="usa-input usx-input"
|
|
1475
382
|
placeholder="Search Google..."
|
|
1476
|
-
value=""
|
|
1477
383
|
type="search"
|
|
1478
384
|
name="q"
|
|
1479
385
|
/>
|
|
1480
386
|
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
"
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
>
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
<span class="usa-search__submit-text">Search</span>
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
<svg
|
|
1509
|
-
class="
|
|
1510
|
-
usa-icon usx-icon
|
|
1511
|
-
|
|
1512
|
-
usa-search__submit-icon
|
|
1513
|
-
|
|
1514
|
-
"
|
|
1515
|
-
|
|
1516
|
-
aria-hidden="true"
|
|
1517
|
-
focusable="false"
|
|
1518
|
-
role="img"
|
|
1519
|
-
>
|
|
1520
|
-
|
|
1521
|
-
<use href="img/sprite.svg#search"></use>
|
|
1522
|
-
|
|
1523
|
-
</svg>
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
387
|
+
<button type="submit" class="usa-button usx-button usa-button--primary">
|
|
388
|
+
<span class="usa-search__submit-text">Search</span>
|
|
389
|
+
|
|
390
|
+
<svg
|
|
391
|
+
class="usa-icon usx-icon usa-search__submit-icon"
|
|
392
|
+
aria-hidden="true"
|
|
393
|
+
focusable="false"
|
|
394
|
+
role="img"
|
|
395
|
+
>
|
|
396
|
+
<use href="img/sprite.svg#search"></use>
|
|
397
|
+
</svg>
|
|
1530
398
|
</button>
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
399
|
</form>
|
|
1535
|
-
<script data-id="search-google-action" data-on-submit="" data-search-key="q">
|
|
1536
|
-
const data = document.currentScript.dataset;
|
|
1537
|
-
const onSubmit = data.onSubmit;
|
|
1538
|
-
|
|
1539
|
-
if (!!onSubmit) {
|
|
1540
|
-
const id = data.id;
|
|
1541
|
-
const searchKey = data.searchKey;
|
|
1542
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
1543
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
1544
|
-
e.preventDefault();
|
|
1545
|
-
const formData = new FormData(e.target);
|
|
1546
|
-
const query = formData.get(searchKey);
|
|
1547
|
-
const func = eval(onSubmit);
|
|
1548
|
-
func(query);
|
|
1549
|
-
return false;
|
|
1550
|
-
};
|
|
1551
|
-
});
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
</script>
|
|
1555
400
|
</section>
|
|
1556
401
|
|
|
1557
402
|
<h3 class="site-preview-heading">Path Action</h3>
|
|
1558
403
|
<section aria-label="Search">
|
|
1559
404
|
<form
|
|
1560
405
|
id="django-search-path-action-form"
|
|
1561
|
-
class="
|
|
1562
|
-
usa-search
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
"
|
|
406
|
+
class="usa-search"
|
|
1567
407
|
method="get"
|
|
1568
408
|
role="search"
|
|
1569
409
|
action="/searching-with-an-action/"
|
|
1570
410
|
>
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
<label
|
|
1574
|
-
|
|
1575
|
-
class="
|
|
1576
|
-
|
|
1577
|
-
usa-label usx-label
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
usa-sr-only
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
"
|
|
1585
|
-
|
|
1586
|
-
for="django-search-path-action"
|
|
1587
|
-
|
|
1588
|
-
>
|
|
1589
|
-
Search
|
|
1590
|
-
</label>
|
|
411
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-path-action"> Search </label>
|
|
1591
412
|
|
|
1592
413
|
<input
|
|
1593
414
|
id="django-search-path-action"
|
|
1594
415
|
class="usa-input usx-input"
|
|
1595
416
|
placeholder="Search the site..."
|
|
1596
|
-
value=""
|
|
1597
417
|
type="search"
|
|
1598
418
|
name="q"
|
|
1599
419
|
/>
|
|
1600
420
|
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
"
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
>
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
<span class="usa-search__submit-text">Search</span>
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
<svg
|
|
1629
|
-
class="
|
|
1630
|
-
usa-icon usx-icon
|
|
1631
|
-
|
|
1632
|
-
usa-search__submit-icon
|
|
1633
|
-
|
|
1634
|
-
"
|
|
1635
|
-
|
|
1636
|
-
aria-hidden="true"
|
|
1637
|
-
focusable="false"
|
|
1638
|
-
role="img"
|
|
1639
|
-
>
|
|
1640
|
-
|
|
1641
|
-
<use href="img/sprite.svg#search"></use>
|
|
1642
|
-
|
|
1643
|
-
</svg>
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
421
|
+
<button type="submit" class="usa-button usx-button usa-button--primary">
|
|
422
|
+
<span class="usa-search__submit-text">Search</span>
|
|
423
|
+
|
|
424
|
+
<svg
|
|
425
|
+
class="usa-icon usx-icon usa-search__submit-icon"
|
|
426
|
+
aria-hidden="true"
|
|
427
|
+
focusable="false"
|
|
428
|
+
role="img"
|
|
429
|
+
>
|
|
430
|
+
<use href="img/sprite.svg#search"></use>
|
|
431
|
+
</svg>
|
|
1650
432
|
</button>
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
433
|
</form>
|
|
1655
|
-
<script data-id="search-path-action" data-on-submit="" data-search-key="q">
|
|
1656
|
-
const data = document.currentScript.dataset;
|
|
1657
|
-
const onSubmit = data.onSubmit;
|
|
1658
|
-
|
|
1659
|
-
if (!!onSubmit) {
|
|
1660
|
-
const id = data.id;
|
|
1661
|
-
const searchKey = data.searchKey;
|
|
1662
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
1663
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
1664
|
-
e.preventDefault();
|
|
1665
|
-
const formData = new FormData(e.target);
|
|
1666
|
-
const query = formData.get(searchKey);
|
|
1667
|
-
const func = eval(onSubmit);
|
|
1668
|
-
func(query);
|
|
1669
|
-
return false;
|
|
1670
|
-
};
|
|
1671
|
-
});
|
|
1672
|
-
}
|
|
1673
|
-
|
|
1674
|
-
</script>
|
|
1675
434
|
</section>
|
|
1676
435
|
|
|
1677
436
|
<h3 class="site-preview-heading">With On Submit</h3>
|
|
1678
437
|
<section aria-label="Search">
|
|
1679
|
-
<form
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
"
|
|
1687
|
-
method="get"
|
|
1688
|
-
role="search"
|
|
1689
|
-
|
|
1690
|
-
>
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
<label
|
|
1694
|
-
|
|
1695
|
-
class="
|
|
1696
|
-
|
|
1697
|
-
usa-label usx-label
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
usa-sr-only
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
"
|
|
1705
|
-
|
|
1706
|
-
for="django-search-with-onsubmit"
|
|
1707
|
-
|
|
1708
|
-
>
|
|
1709
|
-
Search
|
|
1710
|
-
</label>
|
|
438
|
+
<form id="django-search-with-onsubmit-form" class="usa-search" method="get" role="search">
|
|
439
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-with-onsubmit">
|
|
440
|
+
Search
|
|
441
|
+
</label>
|
|
1711
442
|
|
|
1712
443
|
<input
|
|
1713
444
|
id="django-search-with-onsubmit"
|
|
1714
445
|
class="usa-input usx-input"
|
|
1715
446
|
placeholder="Type something and submit..."
|
|
1716
|
-
value=""
|
|
1717
447
|
type="search"
|
|
1718
448
|
name="q"
|
|
1719
449
|
/>
|
|
1720
450
|
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
"
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
>
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
<span class="usa-search__submit-text">Search</span>
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
<svg
|
|
1749
|
-
class="
|
|
1750
|
-
usa-icon usx-icon
|
|
1751
|
-
|
|
1752
|
-
usa-search__submit-icon
|
|
1753
|
-
|
|
1754
|
-
"
|
|
1755
|
-
|
|
1756
|
-
aria-hidden="true"
|
|
1757
|
-
focusable="false"
|
|
1758
|
-
role="img"
|
|
1759
|
-
>
|
|
1760
|
-
|
|
1761
|
-
<use href="img/sprite.svg#search"></use>
|
|
1762
|
-
|
|
1763
|
-
</svg>
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
451
|
+
<button type="submit" class="usa-button usx-button usa-button--primary">
|
|
452
|
+
<span class="usa-search__submit-text">Search</span>
|
|
453
|
+
|
|
454
|
+
<svg
|
|
455
|
+
class="usa-icon usx-icon usa-search__submit-icon"
|
|
456
|
+
aria-hidden="true"
|
|
457
|
+
focusable="false"
|
|
458
|
+
role="img"
|
|
459
|
+
>
|
|
460
|
+
<use href="img/sprite.svg#search"></use>
|
|
461
|
+
</svg>
|
|
1770
462
|
</button>
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
463
|
</form>
|
|
1775
|
-
<script data-id="search-with-onsubmit" data-on-submit="(query) => alert("Search submitted: " + query)" data-search-key="q">
|
|
1776
|
-
const data = document.currentScript.dataset;
|
|
1777
|
-
const onSubmit = data.onSubmit;
|
|
1778
|
-
|
|
1779
|
-
if (!!onSubmit) {
|
|
1780
|
-
const id = data.id;
|
|
1781
|
-
const searchKey = data.searchKey;
|
|
1782
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
1783
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
1784
|
-
e.preventDefault();
|
|
1785
|
-
const formData = new FormData(e.target);
|
|
1786
|
-
const query = formData.get(searchKey);
|
|
1787
|
-
const func = eval(onSubmit);
|
|
1788
|
-
func(query);
|
|
1789
|
-
return false;
|
|
1790
|
-
};
|
|
1791
|
-
});
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
|
-
</script>
|
|
1795
464
|
</section>
|
|
1796
465
|
|
|
1797
466
|
<h3 class="site-preview-heading">With Value</h3>
|
|
1798
467
|
<section aria-label="Search">
|
|
1799
|
-
<form
|
|
1800
|
-
|
|
1801
|
-
class="
|
|
1802
|
-
usa-search
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
"
|
|
1807
|
-
method="get"
|
|
1808
|
-
role="search"
|
|
1809
|
-
|
|
1810
|
-
>
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
<label
|
|
1814
|
-
|
|
1815
|
-
class="
|
|
1816
|
-
|
|
1817
|
-
usa-label usx-label
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
usa-sr-only
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
"
|
|
1825
|
-
|
|
1826
|
-
for="django-search-value"
|
|
1827
|
-
|
|
1828
|
-
>
|
|
1829
|
-
Search
|
|
1830
|
-
</label>
|
|
468
|
+
<form id="django-search-value-form" class="usa-search" method="get" role="search">
|
|
469
|
+
<label class="usa-label usx-label usa-sr-only" for="django-search-value"> Search </label>
|
|
1831
470
|
|
|
1832
471
|
<input
|
|
1833
472
|
id="django-search-value"
|
|
@@ -1838,78 +477,17 @@
|
|
|
1838
477
|
name="q"
|
|
1839
478
|
/>
|
|
1840
479
|
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
"
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
>
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
<span class="usa-search__submit-text">Search</span>
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
<svg
|
|
1869
|
-
class="
|
|
1870
|
-
usa-icon usx-icon
|
|
1871
|
-
|
|
1872
|
-
usa-search__submit-icon
|
|
1873
|
-
|
|
1874
|
-
"
|
|
1875
|
-
|
|
1876
|
-
aria-hidden="true"
|
|
1877
|
-
focusable="false"
|
|
1878
|
-
role="img"
|
|
1879
|
-
>
|
|
1880
|
-
|
|
1881
|
-
<use href="img/sprite.svg#search"></use>
|
|
1882
|
-
|
|
1883
|
-
</svg>
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
480
|
+
<button type="submit" class="usa-button usx-button usa-button--primary">
|
|
481
|
+
<span class="usa-search__submit-text">Search</span>
|
|
482
|
+
|
|
483
|
+
<svg
|
|
484
|
+
class="usa-icon usx-icon usa-search__submit-icon"
|
|
485
|
+
aria-hidden="true"
|
|
486
|
+
focusable="false"
|
|
487
|
+
role="img"
|
|
488
|
+
>
|
|
489
|
+
<use href="img/sprite.svg#search"></use>
|
|
490
|
+
</svg>
|
|
1890
491
|
</button>
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
492
|
</form>
|
|
1895
|
-
<script data-id="search-value" data-on-submit="" data-search-key="q">
|
|
1896
|
-
const data = document.currentScript.dataset;
|
|
1897
|
-
const onSubmit = data.onSubmit;
|
|
1898
|
-
|
|
1899
|
-
if (!!onSubmit) {
|
|
1900
|
-
const id = data.id;
|
|
1901
|
-
const searchKey = data.searchKey;
|
|
1902
|
-
document.addEventListener("DOMContentLoaded", function() {
|
|
1903
|
-
document.getElementById(`${id}-form`).onsubmit = function(e) {
|
|
1904
|
-
e.preventDefault();
|
|
1905
|
-
const formData = new FormData(e.target);
|
|
1906
|
-
const query = formData.get(searchKey);
|
|
1907
|
-
const func = eval(onSubmit);
|
|
1908
|
-
func(query);
|
|
1909
|
-
return false;
|
|
1910
|
-
};
|
|
1911
|
-
});
|
|
1912
|
-
}
|
|
1913
|
-
|
|
1914
|
-
</script>
|
|
1915
493
|
</section>
|