@solexllc/usx-react 0.9.0 → 0.10.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.
Files changed (123) hide show
  1. package/README.md +6 -5
  2. package/dist/index.cjs +123 -97
  3. package/dist/index.js +124 -98
  4. package/package.json +4 -4
  5. package/src/components/accordion/Accordion.tsx +4 -1
  6. package/src/components/accordion/accordion.django.html +1 -1
  7. package/src/components/accordion/config.json +1 -0
  8. package/src/components/banner/Banner.tsx +3 -1
  9. package/src/components/banner/banner.django.html +1 -1
  10. package/src/components/banner/config.json +1 -0
  11. package/src/components/carousel/carousel.django-snapshot.html +0 -40
  12. package/src/components/carousel/carousel.react-snapshot.html +0 -38
  13. package/src/components/character-count/CharacterCount.tsx +3 -0
  14. package/src/components/character-count/character-count.django-snapshot.html +43 -0
  15. package/src/components/character-count/character-count.django.html +2 -2
  16. package/src/components/character-count/character-count.react-snapshot.html +37 -0
  17. package/src/components/character-count/config.json +9 -0
  18. package/src/components/checkbox/Checkbox.tsx +16 -17
  19. package/src/components/checkbox/checkbox.django-snapshot.html +18 -0
  20. package/src/components/checkbox/checkbox.django.html +6 -4
  21. package/src/components/checkbox/checkbox.react-snapshot.html +14 -0
  22. package/src/components/checkbox/config.json +4 -4
  23. package/src/components/checkbox-group/checkbox-group.django-snapshot.html +54 -0
  24. package/src/components/checkbox-group/checkbox-group.react-snapshot.html +45 -0
  25. package/src/components/combobox/Combobox.tsx +6 -1
  26. package/src/components/combobox/combobox.django-snapshot.html +141 -0
  27. package/src/components/combobox/combobox.django.html +2 -2
  28. package/src/components/combobox/combobox.react-snapshot.html +76 -0
  29. package/src/components/combobox/config.json +9 -0
  30. package/src/components/data-table/DataTable.tsx +4 -1
  31. package/src/components/data-table/config.json +4 -0
  32. package/src/components/data-table/data-table.django.html +1 -1
  33. package/src/components/date-picker/DatePicker.tsx +6 -1
  34. package/src/components/date-picker/config.json +9 -0
  35. package/src/components/date-picker/date-picker.django-snapshot.html +23 -0
  36. package/src/components/date-picker/date-picker.django.html +4 -4
  37. package/src/components/date-picker/date-picker.react-snapshot.html +19 -0
  38. package/src/components/date-range-picker/DateRangePicker.tsx +11 -2
  39. package/src/components/date-range-picker/config.json +14 -0
  40. package/src/components/date-range-picker/date-range-picker.django-snapshot.html +47 -0
  41. package/src/components/date-range-picker/date-range-picker.django.html +5 -5
  42. package/src/components/date-range-picker/date-range-picker.react-snapshot.html +38 -0
  43. package/src/components/drawer/Drawer.tsx +3 -1
  44. package/src/components/drawer/config.json +4 -0
  45. package/src/components/drawer/drawer.django.html +1 -1
  46. package/src/components/file-input/FileInput.tsx +7 -2
  47. package/src/components/file-input/_contents.django.html +2 -1
  48. package/src/components/file-input/config.json +4 -0
  49. package/src/components/header/Header.tsx +15 -9
  50. package/src/components/header/config.json +1 -0
  51. package/src/components/header/header.django-snapshot.html +24 -0
  52. package/src/components/header/header.django.html +8 -4
  53. package/src/components/header/header.html +20 -0
  54. package/src/components/header/header.react-snapshot.html +20 -0
  55. package/src/components/in-page-nav/InPageNav.tsx +3 -0
  56. package/src/components/in-page-nav/config.json +1 -0
  57. package/src/components/in-page-nav/in-page-nav.django.html +1 -1
  58. package/src/components/input/Input.tsx +3 -0
  59. package/src/components/input/config.json +10 -0
  60. package/src/components/input/input.django-snapshot.html +24 -0
  61. package/src/components/input/input.django.html +4 -4
  62. package/src/components/input/input.react-snapshot.html +22 -0
  63. package/src/components/language-selector/LanguageSelector.tsx +10 -5
  64. package/src/components/language-selector/config.json +1 -0
  65. package/src/components/language-selector/language-selector.django.html +2 -2
  66. package/src/components/layout/Layout.tsx +3 -1
  67. package/src/components/layout/config.json +4 -0
  68. package/src/components/layout/layout.django.html +1 -1
  69. package/src/components/memorable-date/MemorableDate.tsx +18 -3
  70. package/src/components/memorable-date/config.json +15 -0
  71. package/src/components/memorable-date/memorable-date.django-snapshot.html +82 -0
  72. package/src/components/memorable-date/memorable-date.django.html +14 -14
  73. package/src/components/memorable-date/memorable-date.react-snapshot.html +70 -0
  74. package/src/components/modal/Modal.tsx +3 -0
  75. package/src/components/modal/config.json +1 -0
  76. package/src/components/modal/modal.django.html +1 -1
  77. package/src/components/popover/Popover.tsx +3 -0
  78. package/src/components/popover/config.json +4 -0
  79. package/src/components/popover/popover.django-snapshot.html +30 -0
  80. package/src/components/popover/popover.django.html +1 -0
  81. package/src/components/radio-buttons/RadioButtons.tsx +5 -1
  82. package/src/components/radio-buttons/radio-buttons.django-snapshot.html +65 -0
  83. package/src/components/radio-buttons/radio-buttons.django.html +1 -1
  84. package/src/components/radio-buttons/radio-buttons.react-snapshot.html +53 -0
  85. package/src/components/range-slider/RangeSlider.tsx +4 -2
  86. package/src/components/range-slider/config.json +1 -0
  87. package/src/components/range-slider/range-slider.django-snapshot.html +17 -0
  88. package/src/components/range-slider/range-slider.django.html +4 -4
  89. package/src/components/range-slider/range-slider.react-snapshot.html +16 -0
  90. package/src/components/search/Search.tsx +6 -1
  91. package/src/components/search/config.json +5 -0
  92. package/src/components/search/search.django-snapshot.html +683 -563
  93. package/src/components/search/search.django.html +1 -1
  94. package/src/components/search/search.react-snapshot.html +25 -0
  95. package/src/components/select/Select.tsx +3 -1
  96. package/src/components/select/config.json +5 -0
  97. package/src/components/select/select.django-snapshot.html +15 -0
  98. package/src/components/select/select.django.html +2 -2
  99. package/src/components/select/select.react-snapshot.html +11 -0
  100. package/src/components/switch/Switch.tsx +13 -70
  101. package/src/components/switch/config.json +60 -23
  102. package/src/components/switch/switch.django-snapshot.html +507 -56
  103. package/src/components/switch/switch.django.html +23 -26
  104. package/src/components/switch/switch.html +425 -33
  105. package/src/components/switch/switch.react-snapshot.html +447 -58
  106. package/src/components/table/Table.tsx +3 -1
  107. package/src/components/table/config.json +1 -0
  108. package/src/components/table/table.django.html +1 -1
  109. package/src/components/text-area/TextArea.tsx +3 -1
  110. package/src/components/text-area/config.json +5 -0
  111. package/src/components/text-area/text-area.django-snapshot.html +18 -0
  112. package/src/components/text-area/text-area.django.html +4 -4
  113. package/src/components/text-area/text-area.react-snapshot.html +16 -0
  114. package/src/components/theme-picker/ThemePicker.tsx +3 -1
  115. package/src/components/theme-picker/config.json +14 -1
  116. package/src/components/theme-picker/theme-picker.django-snapshot.html +64 -0
  117. package/src/components/theme-picker/theme-picker.django.html +2 -2
  118. package/src/components/theme-picker/theme-picker.react-snapshot.html +52 -0
  119. package/src/components/time-picker/TimePicker.tsx +6 -1
  120. package/src/components/time-picker/config.json +9 -0
  121. package/src/components/time-picker/time-picker.django-snapshot.html +26 -0
  122. package/src/components/time-picker/time-picker.django.html +4 -4
  123. package/src/components/time-picker/time-picker.react-snapshot.html +22 -0
@@ -4,31 +4,31 @@
4
4
  id="django-search-default-form"
5
5
  class="
6
6
  usa-search
7
-
8
-
9
-
7
+
8
+
9
+
10
10
  "
11
11
  method="get"
12
12
  role="search"
13
-
13
+
14
14
  >
15
-
15
+
16
16
 
17
17
  <label
18
-
18
+
19
19
  class="
20
-
20
+
21
21
  usa-label usx-label
22
-
23
-
22
+
23
+
24
24
  usa-sr-only
25
-
26
-
27
-
25
+
26
+
27
+
28
28
  "
29
-
29
+
30
30
  for="django-search-default"
31
-
31
+
32
32
  >
33
33
  Search
34
34
  </label>
@@ -41,9 +41,9 @@
41
41
  type="search"
42
42
  name="q"
43
43
  />
44
-
45
-
46
-
44
+
45
+
46
+
47
47
 
48
48
 
49
49
 
@@ -52,49 +52,49 @@
52
52
  class="
53
53
  usa-button usx-button
54
54
  usa-button--primary
55
-
56
-
57
-
58
-
55
+
56
+
57
+
58
+
59
59
  "
60
-
61
-
60
+
61
+
62
62
  >
63
63
 
64
-
65
-
66
64
 
67
-
68
-
65
+
66
+
67
+
68
+
69
69
  <span class="usa-search__submit-text">Search</span>
70
-
70
+
71
71
 
72
72
  <svg
73
73
  class="
74
74
  usa-icon usx-icon
75
-
75
+
76
76
  usa-search__submit-icon
77
-
77
+
78
78
  "
79
-
79
+
80
80
  aria-hidden="true"
81
81
  focusable="false"
82
82
  role="img"
83
83
  >
84
-
84
+
85
85
  <use href="img/sprite.svg#search"></use>
86
-
86
+
87
87
  </svg>
88
-
89
-
90
88
 
91
-
89
+
90
+
91
+
92
92
 
93
93
 
94
94
  </button>
95
95
 
96
-
97
-
96
+
97
+
98
98
  </form>
99
99
  <script data-id="search-default" data-on-submit="" data-search-key="q">
100
100
  const data = document.currentScript.dataset;
@@ -124,31 +124,31 @@
124
124
  id="django-search-custom-placeholder-form"
125
125
  class="
126
126
  usa-search
127
-
128
-
129
-
127
+
128
+
129
+
130
130
  "
131
131
  method="get"
132
132
  role="search"
133
-
133
+
134
134
  >
135
-
135
+
136
136
 
137
137
  <label
138
-
138
+
139
139
  class="
140
-
140
+
141
141
  usa-label usx-label
142
-
143
-
142
+
143
+
144
144
  usa-sr-only
145
-
146
-
147
-
145
+
146
+
147
+
148
148
  "
149
-
149
+
150
150
  for="django-search-custom-placeholder"
151
-
151
+
152
152
  >
153
153
  Search
154
154
  </label>
@@ -161,9 +161,9 @@
161
161
  type="search"
162
162
  name="q"
163
163
  />
164
-
165
-
166
-
164
+
165
+
166
+
167
167
 
168
168
 
169
169
 
@@ -172,49 +172,49 @@
172
172
  class="
173
173
  usa-button usx-button
174
174
  usa-button--primary
175
-
176
-
177
-
178
-
175
+
176
+
177
+
178
+
179
179
  "
180
-
181
-
180
+
181
+
182
182
  >
183
183
 
184
-
185
-
186
184
 
187
-
188
-
185
+
186
+
187
+
188
+
189
189
  <span class="usa-search__submit-text">Search</span>
190
-
190
+
191
191
 
192
192
  <svg
193
193
  class="
194
194
  usa-icon usx-icon
195
-
195
+
196
196
  usa-search__submit-icon
197
-
197
+
198
198
  "
199
-
199
+
200
200
  aria-hidden="true"
201
201
  focusable="false"
202
202
  role="img"
203
203
  >
204
-
204
+
205
205
  <use href="img/sprite.svg#search"></use>
206
-
206
+
207
207
  </svg>
208
-
209
-
210
208
 
211
-
209
+
210
+
211
+
212
212
 
213
213
 
214
214
  </button>
215
215
 
216
-
217
-
216
+
217
+
218
218
  </form>
219
219
  <script data-id="search-custom-placeholder" data-on-submit="" data-search-key="q">
220
220
  const data = document.currentScript.dataset;
@@ -244,31 +244,31 @@
244
244
  id="django-search-default-value-form"
245
245
  class="
246
246
  usa-search
247
-
248
-
249
-
247
+
248
+
249
+
250
250
  "
251
251
  method="get"
252
252
  role="search"
253
-
253
+
254
254
  >
255
-
255
+
256
256
 
257
257
  <label
258
-
258
+
259
259
  class="
260
-
260
+
261
261
  usa-label usx-label
262
-
263
-
262
+
263
+
264
264
  usa-sr-only
265
-
266
-
267
-
265
+
266
+
267
+
268
268
  "
269
-
269
+
270
270
  for="django-search-default-value"
271
-
271
+
272
272
  >
273
273
  Search
274
274
  </label>
@@ -281,9 +281,9 @@
281
281
  type="search"
282
282
  name="q"
283
283
  />
284
-
285
-
286
-
284
+
285
+
286
+
287
287
 
288
288
 
289
289
 
@@ -292,49 +292,49 @@
292
292
  class="
293
293
  usa-button usx-button
294
294
  usa-button--primary
295
-
296
-
297
-
298
-
295
+
296
+
297
+
298
+
299
299
  "
300
-
301
-
300
+
301
+
302
302
  >
303
303
 
304
-
305
-
306
304
 
307
-
308
-
305
+
306
+
307
+
308
+
309
309
  <span class="usa-search__submit-text">Search</span>
310
-
310
+
311
311
 
312
312
  <svg
313
313
  class="
314
314
  usa-icon usx-icon
315
-
315
+
316
316
  usa-search__submit-icon
317
-
317
+
318
318
  "
319
-
319
+
320
320
  aria-hidden="true"
321
321
  focusable="false"
322
322
  role="img"
323
323
  >
324
-
324
+
325
325
  <use href="img/sprite.svg#search"></use>
326
-
326
+
327
327
  </svg>
328
-
329
-
330
328
 
331
-
329
+
330
+
331
+
332
332
 
333
333
 
334
334
  </button>
335
335
 
336
-
337
-
336
+
337
+
338
338
  </form>
339
339
  <script data-id="search-default-value" data-on-submit="" data-search-key="q">
340
340
  const data = document.currentScript.dataset;
@@ -364,31 +364,31 @@
364
364
  id="django-search-big-form"
365
365
  class="
366
366
  usa-search
367
-
367
+
368
368
  usa-search--big
369
-
369
+
370
370
  "
371
371
  method="get"
372
372
  role="search"
373
-
373
+
374
374
  >
375
-
375
+
376
376
 
377
377
  <label
378
-
378
+
379
379
  class="
380
-
380
+
381
381
  usa-label usx-label
382
-
383
-
382
+
383
+
384
384
  usa-sr-only
385
-
386
-
387
-
385
+
386
+
387
+
388
388
  "
389
-
389
+
390
390
  for="django-search-big"
391
-
391
+
392
392
  >
393
393
  Search
394
394
  </label>
@@ -401,9 +401,9 @@
401
401
  type="search"
402
402
  name="q"
403
403
  />
404
-
405
-
406
-
404
+
405
+
406
+
407
407
 
408
408
 
409
409
 
@@ -412,49 +412,49 @@
412
412
  class="
413
413
  usa-button usx-button
414
414
  usa-button--primary
415
-
416
-
417
-
418
-
415
+
416
+
417
+
418
+
419
419
  "
420
-
421
-
420
+
421
+
422
422
  >
423
423
 
424
-
425
-
426
424
 
427
-
428
-
425
+
426
+
427
+
428
+
429
429
  <span class="usa-search__submit-text">Search</span>
430
-
430
+
431
431
 
432
432
  <svg
433
433
  class="
434
434
  usa-icon usx-icon
435
-
435
+
436
436
  usa-search__submit-icon
437
-
437
+
438
438
  "
439
-
439
+
440
440
  aria-hidden="true"
441
441
  focusable="false"
442
442
  role="img"
443
443
  >
444
-
444
+
445
445
  <use href="img/sprite.svg#search"></use>
446
-
446
+
447
447
  </svg>
448
-
449
-
450
448
 
451
-
449
+
450
+
451
+
452
452
 
453
453
 
454
454
  </button>
455
455
 
456
-
457
-
456
+
457
+
458
458
  </form>
459
459
  <script data-id="search-big" data-on-submit="" data-search-key="q">
460
460
  const data = document.currentScript.dataset;
@@ -485,30 +485,30 @@
485
485
  class="
486
486
  usa-search
487
487
  usa-search--small
488
-
489
-
488
+
489
+
490
490
  "
491
491
  method="get"
492
492
  role="search"
493
-
493
+
494
494
  >
495
-
495
+
496
496
 
497
497
  <label
498
-
498
+
499
499
  class="
500
-
500
+
501
501
  usa-label usx-label
502
-
503
-
502
+
503
+
504
504
  usa-sr-only
505
-
506
-
507
-
505
+
506
+
507
+
508
508
  "
509
-
509
+
510
510
  for="django-search-icon-only"
511
-
511
+
512
512
  >
513
513
  Search
514
514
  </label>
@@ -521,9 +521,9 @@
521
521
  type="search"
522
522
  name="q"
523
523
  />
524
-
525
-
526
-
524
+
525
+
526
+
527
527
 
528
528
 
529
529
 
@@ -532,48 +532,48 @@
532
532
  class="
533
533
  usa-button usx-button
534
534
  usa-button--primary
535
-
536
-
537
-
538
-
535
+
536
+
537
+
538
+
539
539
  "
540
-
541
-
540
+
541
+
542
542
  >
543
543
 
544
-
545
-
546
544
 
547
-
548
-
549
-
545
+
546
+
547
+
548
+
549
+
550
550
 
551
551
  <svg
552
552
  class="
553
553
  usa-icon usx-icon
554
-
554
+
555
555
  usa-search__submit-icon display-inline-block
556
-
556
+
557
557
  "
558
-
558
+
559
559
  aria-label="Search"
560
560
  focusable="false"
561
561
  role="img"
562
562
  >
563
-
563
+
564
564
  <use href="img/sprite.svg#search"></use>
565
-
565
+
566
566
  </svg>
567
-
568
-
569
567
 
570
-
568
+
569
+
570
+
571
571
 
572
572
 
573
573
  </button>
574
574
 
575
-
576
-
575
+
576
+
577
577
  </form>
578
578
  <script data-id="search-icon-only" data-on-submit="" data-search-key="q">
579
579
  const data = document.currentScript.dataset;
@@ -603,31 +603,31 @@
603
603
  id="django-search-big-icon-only-form"
604
604
  class="
605
605
  usa-search
606
-
606
+
607
607
  usa-search--big
608
-
608
+
609
609
  "
610
610
  method="get"
611
611
  role="search"
612
-
612
+
613
613
  >
614
-
614
+
615
615
 
616
616
  <label
617
-
617
+
618
618
  class="
619
-
619
+
620
620
  usa-label usx-label
621
-
622
-
621
+
622
+
623
623
  usa-sr-only
624
-
625
-
626
-
624
+
625
+
626
+
627
627
  "
628
-
628
+
629
629
  for="django-search-big-icon-only"
630
-
630
+
631
631
  >
632
632
  Search
633
633
  </label>
@@ -640,9 +640,9 @@
640
640
  type="search"
641
641
  name="q"
642
642
  />
643
-
644
-
645
-
643
+
644
+
645
+
646
646
 
647
647
 
648
648
 
@@ -651,48 +651,48 @@
651
651
  class="
652
652
  usa-button usx-button
653
653
  usa-button--primary
654
-
655
-
656
-
657
-
654
+
655
+
656
+
657
+
658
658
  "
659
-
660
-
659
+
660
+
661
661
  >
662
662
 
663
-
664
-
665
663
 
666
-
667
-
668
-
664
+
665
+
666
+
667
+
668
+
669
669
 
670
670
  <svg
671
671
  class="
672
672
  usa-icon usx-icon
673
-
673
+
674
674
  usa-search__submit-icon display-inline-block
675
-
675
+
676
676
  "
677
-
677
+
678
678
  aria-label="Search"
679
679
  focusable="false"
680
680
  role="img"
681
681
  >
682
-
682
+
683
683
  <use href="img/sprite.svg#search"></use>
684
-
684
+
685
685
  </svg>
686
-
687
-
688
686
 
689
-
687
+
688
+
689
+
690
690
 
691
691
 
692
692
  </button>
693
693
 
694
-
695
-
694
+
695
+
696
696
  </form>
697
697
  <script data-id="search-big-icon-only" data-on-submit="" data-search-key="q">
698
698
  const data = document.currentScript.dataset;
@@ -723,30 +723,30 @@
723
723
  class="
724
724
  usa-search
725
725
  usa-search--small
726
-
727
-
726
+
727
+
728
728
  "
729
729
  method="get"
730
730
  role="search"
731
-
731
+
732
732
  >
733
-
733
+
734
734
 
735
735
  <label
736
-
736
+
737
737
  class="
738
-
738
+
739
739
  usa-label usx-label
740
-
741
-
740
+
741
+
742
742
  usa-sr-only
743
-
744
-
745
-
743
+
744
+
745
+
746
746
  "
747
-
747
+
748
748
  for="django-search-non-standard-icon"
749
-
749
+
750
750
  >
751
751
  Search
752
752
  </label>
@@ -759,9 +759,9 @@
759
759
  type="search"
760
760
  name="q"
761
761
  />
762
-
763
-
764
-
762
+
763
+
764
+
765
765
 
766
766
 
767
767
 
@@ -770,48 +770,48 @@
770
770
  class="
771
771
  usa-button usx-button
772
772
  usa-button--primary
773
-
774
-
775
-
776
-
773
+
774
+
775
+
776
+
777
777
  "
778
-
779
-
778
+
779
+
780
780
  >
781
781
 
782
-
783
-
784
782
 
785
-
786
-
787
-
783
+
784
+
785
+
786
+
787
+
788
788
 
789
789
  <svg
790
790
  class="
791
791
  usa-icon usx-icon
792
-
792
+
793
793
  usa-search__submit-icon display-inline-block
794
-
794
+
795
795
  "
796
-
796
+
797
797
  aria-label="Search"
798
798
  focusable="false"
799
799
  role="img"
800
800
  >
801
-
801
+
802
802
  <use href="img/sprite.svg#star"></use>
803
-
803
+
804
804
  </svg>
805
-
806
-
807
805
 
808
-
806
+
807
+
808
+
809
809
 
810
810
 
811
811
  </button>
812
812
 
813
-
814
-
813
+
814
+
815
815
  </form>
816
816
  <script data-id="search-non-standard-icon" data-on-submit="" data-search-key="q">
817
817
  const data = document.currentScript.dataset;
@@ -841,31 +841,31 @@
841
841
  id="django-search-custom-variant-form"
842
842
  class="
843
843
  usa-search
844
-
845
-
846
-
844
+
845
+
846
+
847
847
  "
848
848
  method="get"
849
849
  role="search"
850
-
850
+
851
851
  >
852
-
852
+
853
853
 
854
854
  <label
855
-
855
+
856
856
  class="
857
-
857
+
858
858
  usa-label usx-label
859
-
860
-
859
+
860
+
861
861
  usa-sr-only
862
-
863
-
864
-
862
+
863
+
864
+
865
865
  "
866
-
866
+
867
867
  for="django-search-custom-variant"
868
-
868
+
869
869
  >
870
870
  Search
871
871
  </label>
@@ -878,9 +878,9 @@
878
878
  type="search"
879
879
  name="q"
880
880
  />
881
-
882
-
883
-
881
+
882
+
883
+
884
884
 
885
885
 
886
886
 
@@ -889,49 +889,49 @@
889
889
  class="
890
890
  usa-button usx-button
891
891
  usa-button--accent-cool
892
-
893
-
894
-
895
-
892
+
893
+
894
+
895
+
896
896
  "
897
-
898
-
897
+
898
+
899
899
  >
900
900
 
901
-
902
-
903
901
 
904
-
905
-
902
+
903
+
904
+
905
+
906
906
  <span class="usa-search__submit-text">Search</span>
907
-
907
+
908
908
 
909
909
  <svg
910
910
  class="
911
911
  usa-icon usx-icon
912
-
912
+
913
913
  usa-search__submit-icon
914
-
914
+
915
915
  "
916
-
916
+
917
917
  aria-hidden="true"
918
918
  focusable="false"
919
919
  role="img"
920
920
  >
921
-
921
+
922
922
  <use href="img/sprite.svg#search"></use>
923
-
923
+
924
924
  </svg>
925
-
926
-
927
925
 
928
-
926
+
927
+
928
+
929
929
 
930
930
 
931
931
  </button>
932
932
 
933
-
934
-
933
+
934
+
935
935
  </form>
936
936
  <script data-id="search-custom-variant" data-on-submit="" data-search-key="q">
937
937
  const data = document.currentScript.dataset;
@@ -961,31 +961,31 @@
961
961
  id="django-search-custom-label-form"
962
962
  class="
963
963
  usa-search
964
-
965
-
966
-
964
+
965
+
966
+
967
967
  "
968
968
  method="get"
969
969
  role="search"
970
-
970
+
971
971
  >
972
-
972
+
973
973
 
974
974
  <label
975
-
975
+
976
976
  class="
977
-
977
+
978
978
  usa-label usx-label
979
-
980
-
979
+
980
+
981
981
  usa-sr-only
982
-
983
-
984
-
982
+
983
+
984
+
985
985
  "
986
-
986
+
987
987
  for="django-search-custom-label"
988
-
988
+
989
989
  >
990
990
  Find a program
991
991
  </label>
@@ -998,9 +998,9 @@
998
998
  type="search"
999
999
  name="q"
1000
1000
  />
1001
-
1002
-
1003
-
1001
+
1002
+
1003
+
1004
1004
 
1005
1005
 
1006
1006
 
@@ -1009,49 +1009,49 @@
1009
1009
  class="
1010
1010
  usa-button usx-button
1011
1011
  usa-button--primary
1012
-
1013
-
1014
-
1015
-
1012
+
1013
+
1014
+
1015
+
1016
1016
  "
1017
-
1018
-
1017
+
1018
+
1019
1019
  >
1020
1020
 
1021
-
1022
-
1023
1021
 
1024
-
1025
-
1022
+
1023
+
1024
+
1025
+
1026
1026
  <span class="usa-search__submit-text">Find a program</span>
1027
-
1027
+
1028
1028
 
1029
1029
  <svg
1030
1030
  class="
1031
1031
  usa-icon usx-icon
1032
-
1032
+
1033
1033
  usa-search__submit-icon
1034
-
1034
+
1035
1035
  "
1036
-
1036
+
1037
1037
  aria-hidden="true"
1038
1038
  focusable="false"
1039
1039
  role="img"
1040
1040
  >
1041
-
1041
+
1042
1042
  <use href="img/sprite.svg#search"></use>
1043
-
1043
+
1044
1044
  </svg>
1045
-
1046
-
1047
1045
 
1048
-
1046
+
1047
+
1048
+
1049
1049
 
1050
1050
 
1051
1051
  </button>
1052
1052
 
1053
-
1054
-
1053
+
1054
+
1055
1055
  </form>
1056
1056
  <script data-id="search-custom-label" data-on-submit="" data-search-key="q">
1057
1057
  const data = document.currentScript.dataset;
@@ -1082,30 +1082,30 @@
1082
1082
  class="
1083
1083
  usa-search
1084
1084
  usa-search--small
1085
-
1086
-
1085
+
1086
+
1087
1087
  "
1088
1088
  method="get"
1089
1089
  role="search"
1090
-
1090
+
1091
1091
  >
1092
-
1092
+
1093
1093
 
1094
1094
  <label
1095
-
1095
+
1096
1096
  class="
1097
-
1097
+
1098
1098
  usa-label usx-label
1099
-
1100
-
1099
+
1100
+
1101
1101
  usa-sr-only
1102
-
1103
-
1104
-
1102
+
1103
+
1104
+
1105
1105
  "
1106
-
1106
+
1107
1107
  for="django-search-icon-only-custom-label"
1108
-
1108
+
1109
1109
  >
1110
1110
  Find a program
1111
1111
  </label>
@@ -1118,9 +1118,9 @@
1118
1118
  type="search"
1119
1119
  name="q"
1120
1120
  />
1121
-
1122
-
1123
-
1121
+
1122
+
1123
+
1124
1124
 
1125
1125
 
1126
1126
 
@@ -1129,48 +1129,48 @@
1129
1129
  class="
1130
1130
  usa-button usx-button
1131
1131
  usa-button--primary
1132
-
1133
-
1134
-
1135
-
1132
+
1133
+
1134
+
1135
+
1136
1136
  "
1137
-
1138
-
1137
+
1138
+
1139
1139
  >
1140
1140
 
1141
-
1142
-
1143
1141
 
1144
-
1145
-
1146
-
1142
+
1143
+
1144
+
1145
+
1146
+
1147
1147
 
1148
1148
  <svg
1149
1149
  class="
1150
1150
  usa-icon usx-icon
1151
-
1151
+
1152
1152
  usa-search__submit-icon display-inline-block
1153
-
1153
+
1154
1154
  "
1155
-
1155
+
1156
1156
  aria-label="Find a program"
1157
1157
  focusable="false"
1158
1158
  role="img"
1159
1159
  >
1160
-
1160
+
1161
1161
  <use href="img/sprite.svg#search"></use>
1162
-
1162
+
1163
1163
  </svg>
1164
-
1165
-
1166
1164
 
1167
-
1165
+
1166
+
1167
+
1168
1168
 
1169
1169
 
1170
1170
  </button>
1171
1171
 
1172
-
1173
-
1172
+
1173
+
1174
1174
  </form>
1175
1175
  <script data-id="search-icon-only-custom-label" data-on-submit="" data-search-key="q">
1176
1176
  const data = document.currentScript.dataset;
@@ -1200,31 +1200,31 @@
1200
1200
  id="django-search-custom-aria-label-form"
1201
1201
  class="
1202
1202
  usa-search
1203
-
1204
-
1205
-
1203
+
1204
+
1205
+
1206
1206
  "
1207
1207
  method="get"
1208
1208
  role="search"
1209
-
1209
+
1210
1210
  >
1211
-
1211
+
1212
1212
 
1213
1213
  <label
1214
-
1214
+
1215
1215
  class="
1216
-
1216
+
1217
1217
  usa-label usx-label
1218
-
1219
-
1218
+
1219
+
1220
1220
  usa-sr-only
1221
-
1222
-
1223
-
1221
+
1222
+
1223
+
1224
1224
  "
1225
-
1225
+
1226
1226
  for="django-search-custom-aria-label"
1227
-
1227
+
1228
1228
  >
1229
1229
  Search
1230
1230
  </label>
@@ -1237,9 +1237,9 @@
1237
1237
  type="search"
1238
1238
  name="q"
1239
1239
  />
1240
-
1241
-
1242
-
1240
+
1241
+
1242
+
1243
1243
 
1244
1244
 
1245
1245
 
@@ -1248,49 +1248,49 @@
1248
1248
  class="
1249
1249
  usa-button usx-button
1250
1250
  usa-button--primary
1251
-
1252
-
1253
-
1254
-
1251
+
1252
+
1253
+
1254
+
1255
1255
  "
1256
-
1257
-
1256
+
1257
+
1258
1258
  >
1259
1259
 
1260
-
1261
-
1262
1260
 
1263
-
1264
-
1261
+
1262
+
1263
+
1264
+
1265
1265
  <span class="usa-search__submit-text">Search</span>
1266
-
1266
+
1267
1267
 
1268
1268
  <svg
1269
1269
  class="
1270
1270
  usa-icon usx-icon
1271
-
1271
+
1272
1272
  usa-search__submit-icon
1273
-
1273
+
1274
1274
  "
1275
-
1275
+
1276
1276
  aria-hidden="true"
1277
1277
  focusable="false"
1278
1278
  role="img"
1279
1279
  >
1280
-
1280
+
1281
1281
  <use href="img/sprite.svg#search"></use>
1282
-
1282
+
1283
1283
  </svg>
1284
-
1285
-
1286
1284
 
1287
-
1285
+
1286
+
1287
+
1288
1288
 
1289
1289
 
1290
1290
  </button>
1291
1291
 
1292
-
1293
-
1292
+
1293
+
1294
1294
  </form>
1295
1295
  <script data-id="search-custom-aria-label" data-on-submit="" data-search-key="q">
1296
1296
  const data = document.currentScript.dataset;
@@ -1320,31 +1320,31 @@
1320
1320
  id="django-search-custom-key-form"
1321
1321
  class="
1322
1322
  usa-search
1323
-
1324
-
1325
-
1323
+
1324
+
1325
+
1326
1326
  "
1327
1327
  method="get"
1328
1328
  role="search"
1329
-
1329
+
1330
1330
  >
1331
-
1331
+
1332
1332
 
1333
1333
  <label
1334
-
1334
+
1335
1335
  class="
1336
-
1336
+
1337
1337
  usa-label usx-label
1338
-
1339
-
1338
+
1339
+
1340
1340
  usa-sr-only
1341
-
1342
-
1343
-
1341
+
1342
+
1343
+
1344
1344
  "
1345
-
1345
+
1346
1346
  for="django-search-custom-key"
1347
-
1347
+
1348
1348
  >
1349
1349
  Search
1350
1350
  </label>
@@ -1357,9 +1357,9 @@
1357
1357
  type="search"
1358
1358
  name="query"
1359
1359
  />
1360
-
1361
-
1362
-
1360
+
1361
+
1362
+
1363
1363
 
1364
1364
 
1365
1365
 
@@ -1368,49 +1368,49 @@
1368
1368
  class="
1369
1369
  usa-button usx-button
1370
1370
  usa-button--primary
1371
-
1372
-
1373
-
1374
-
1371
+
1372
+
1373
+
1374
+
1375
1375
  "
1376
-
1377
-
1376
+
1377
+
1378
1378
  >
1379
1379
 
1380
-
1381
-
1382
1380
 
1383
-
1384
-
1381
+
1382
+
1383
+
1384
+
1385
1385
  <span class="usa-search__submit-text">Search</span>
1386
-
1386
+
1387
1387
 
1388
1388
  <svg
1389
1389
  class="
1390
1390
  usa-icon usx-icon
1391
-
1391
+
1392
1392
  usa-search__submit-icon
1393
-
1393
+
1394
1394
  "
1395
-
1395
+
1396
1396
  aria-hidden="true"
1397
1397
  focusable="false"
1398
1398
  role="img"
1399
1399
  >
1400
-
1400
+
1401
1401
  <use href="img/sprite.svg#search"></use>
1402
-
1402
+
1403
1403
  </svg>
1404
-
1405
-
1406
1404
 
1407
-
1405
+
1406
+
1407
+
1408
1408
 
1409
1409
 
1410
1410
  </button>
1411
1411
 
1412
-
1413
-
1412
+
1413
+
1414
1414
  </form>
1415
1415
  <script data-id="search-custom-key" data-on-submit="" data-search-key="query">
1416
1416
  const data = document.currentScript.dataset;
@@ -1440,31 +1440,31 @@
1440
1440
  id="django-search-google-action-form"
1441
1441
  class="
1442
1442
  usa-search
1443
-
1444
-
1445
-
1443
+
1444
+
1445
+
1446
1446
  "
1447
1447
  method="get"
1448
1448
  role="search"
1449
1449
  action="https://www.google.com/search"
1450
1450
  >
1451
-
1451
+
1452
1452
 
1453
1453
  <label
1454
-
1454
+
1455
1455
  class="
1456
-
1456
+
1457
1457
  usa-label usx-label
1458
-
1459
-
1458
+
1459
+
1460
1460
  usa-sr-only
1461
-
1462
-
1463
-
1461
+
1462
+
1463
+
1464
1464
  "
1465
-
1465
+
1466
1466
  for="django-search-google-action"
1467
-
1467
+
1468
1468
  >
1469
1469
  Search
1470
1470
  </label>
@@ -1477,9 +1477,9 @@
1477
1477
  type="search"
1478
1478
  name="q"
1479
1479
  />
1480
-
1481
-
1482
-
1480
+
1481
+
1482
+
1483
1483
 
1484
1484
 
1485
1485
 
@@ -1488,49 +1488,49 @@
1488
1488
  class="
1489
1489
  usa-button usx-button
1490
1490
  usa-button--primary
1491
-
1492
-
1493
-
1494
-
1491
+
1492
+
1493
+
1494
+
1495
1495
  "
1496
-
1497
-
1496
+
1497
+
1498
1498
  >
1499
1499
 
1500
-
1501
-
1502
1500
 
1503
-
1504
-
1501
+
1502
+
1503
+
1504
+
1505
1505
  <span class="usa-search__submit-text">Search</span>
1506
-
1506
+
1507
1507
 
1508
1508
  <svg
1509
1509
  class="
1510
1510
  usa-icon usx-icon
1511
-
1511
+
1512
1512
  usa-search__submit-icon
1513
-
1513
+
1514
1514
  "
1515
-
1515
+
1516
1516
  aria-hidden="true"
1517
1517
  focusable="false"
1518
1518
  role="img"
1519
1519
  >
1520
-
1520
+
1521
1521
  <use href="img/sprite.svg#search"></use>
1522
-
1522
+
1523
1523
  </svg>
1524
-
1525
-
1526
1524
 
1527
-
1525
+
1526
+
1527
+
1528
1528
 
1529
1529
 
1530
1530
  </button>
1531
1531
 
1532
-
1533
-
1532
+
1533
+
1534
1534
  </form>
1535
1535
  <script data-id="search-google-action" data-on-submit="" data-search-key="q">
1536
1536
  const data = document.currentScript.dataset;
@@ -1560,31 +1560,31 @@
1560
1560
  id="django-search-path-action-form"
1561
1561
  class="
1562
1562
  usa-search
1563
-
1564
-
1565
-
1563
+
1564
+
1565
+
1566
1566
  "
1567
1567
  method="get"
1568
1568
  role="search"
1569
1569
  action="/searching-with-an-action/"
1570
1570
  >
1571
-
1571
+
1572
1572
 
1573
1573
  <label
1574
-
1574
+
1575
1575
  class="
1576
-
1576
+
1577
1577
  usa-label usx-label
1578
-
1579
-
1578
+
1579
+
1580
1580
  usa-sr-only
1581
-
1582
-
1583
-
1581
+
1582
+
1583
+
1584
1584
  "
1585
-
1585
+
1586
1586
  for="django-search-path-action"
1587
-
1587
+
1588
1588
  >
1589
1589
  Search
1590
1590
  </label>
@@ -1597,9 +1597,9 @@
1597
1597
  type="search"
1598
1598
  name="q"
1599
1599
  />
1600
-
1601
-
1602
-
1600
+
1601
+
1602
+
1603
1603
 
1604
1604
 
1605
1605
 
@@ -1608,49 +1608,49 @@
1608
1608
  class="
1609
1609
  usa-button usx-button
1610
1610
  usa-button--primary
1611
-
1612
-
1613
-
1614
-
1611
+
1612
+
1613
+
1614
+
1615
1615
  "
1616
-
1617
-
1616
+
1617
+
1618
1618
  >
1619
1619
 
1620
-
1621
-
1622
1620
 
1623
-
1624
-
1621
+
1622
+
1623
+
1624
+
1625
1625
  <span class="usa-search__submit-text">Search</span>
1626
-
1626
+
1627
1627
 
1628
1628
  <svg
1629
1629
  class="
1630
1630
  usa-icon usx-icon
1631
-
1631
+
1632
1632
  usa-search__submit-icon
1633
-
1633
+
1634
1634
  "
1635
-
1635
+
1636
1636
  aria-hidden="true"
1637
1637
  focusable="false"
1638
1638
  role="img"
1639
1639
  >
1640
-
1640
+
1641
1641
  <use href="img/sprite.svg#search"></use>
1642
-
1642
+
1643
1643
  </svg>
1644
-
1645
-
1646
1644
 
1647
-
1645
+
1646
+
1647
+
1648
1648
 
1649
1649
 
1650
1650
  </button>
1651
1651
 
1652
-
1653
-
1652
+
1653
+
1654
1654
  </form>
1655
1655
  <script data-id="search-path-action" data-on-submit="" data-search-key="q">
1656
1656
  const data = document.currentScript.dataset;
@@ -1680,31 +1680,31 @@
1680
1680
  id="django-search-with-onsubmit-form"
1681
1681
  class="
1682
1682
  usa-search
1683
-
1684
-
1685
-
1683
+
1684
+
1685
+
1686
1686
  "
1687
1687
  method="get"
1688
1688
  role="search"
1689
-
1689
+
1690
1690
  >
1691
-
1691
+
1692
1692
 
1693
1693
  <label
1694
-
1694
+
1695
1695
  class="
1696
-
1696
+
1697
1697
  usa-label usx-label
1698
-
1699
-
1698
+
1699
+
1700
1700
  usa-sr-only
1701
-
1702
-
1703
-
1701
+
1702
+
1703
+
1704
1704
  "
1705
-
1705
+
1706
1706
  for="django-search-with-onsubmit"
1707
-
1707
+
1708
1708
  >
1709
1709
  Search
1710
1710
  </label>
@@ -1717,9 +1717,9 @@
1717
1717
  type="search"
1718
1718
  name="q"
1719
1719
  />
1720
-
1721
-
1722
-
1720
+
1721
+
1722
+
1723
1723
 
1724
1724
 
1725
1725
 
@@ -1728,49 +1728,49 @@
1728
1728
  class="
1729
1729
  usa-button usx-button
1730
1730
  usa-button--primary
1731
-
1732
-
1733
-
1734
-
1731
+
1732
+
1733
+
1734
+
1735
1735
  "
1736
-
1737
-
1736
+
1737
+
1738
1738
  >
1739
1739
 
1740
-
1741
-
1742
1740
 
1743
-
1744
-
1741
+
1742
+
1743
+
1744
+
1745
1745
  <span class="usa-search__submit-text">Search</span>
1746
-
1746
+
1747
1747
 
1748
1748
  <svg
1749
1749
  class="
1750
1750
  usa-icon usx-icon
1751
-
1751
+
1752
1752
  usa-search__submit-icon
1753
-
1753
+
1754
1754
  "
1755
-
1755
+
1756
1756
  aria-hidden="true"
1757
1757
  focusable="false"
1758
1758
  role="img"
1759
1759
  >
1760
-
1760
+
1761
1761
  <use href="img/sprite.svg#search"></use>
1762
-
1762
+
1763
1763
  </svg>
1764
-
1765
-
1766
1764
 
1767
-
1765
+
1766
+
1767
+
1768
1768
 
1769
1769
 
1770
1770
  </button>
1771
1771
 
1772
-
1773
-
1772
+
1773
+
1774
1774
  </form>
1775
1775
  <script data-id="search-with-onsubmit" data-on-submit="(query) => alert("Search submitted: " + query)" data-search-key="q">
1776
1776
  const data = document.currentScript.dataset;
@@ -1793,3 +1793,123 @@
1793
1793
 
1794
1794
  </script>
1795
1795
  </section>
1796
+
1797
+ <h3 class="site-preview-heading">With Value</h3>
1798
+ <section aria-label="Search">
1799
+ <form
1800
+ id="django-search-value-form"
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>
1831
+
1832
+ <input
1833
+ id="django-search-value"
1834
+ class="usa-input usx-input"
1835
+ placeholder=""
1836
+ value="Current search"
1837
+ type="search"
1838
+ name="q"
1839
+ />
1840
+
1841
+
1842
+
1843
+
1844
+
1845
+
1846
+ <button
1847
+ type="submit"
1848
+ class="
1849
+ usa-button usx-button
1850
+ usa-button--primary
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
+
1890
+ </button>
1891
+
1892
+
1893
+
1894
+ </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
+ </section>