@solexllc/usx-react 0.6.0 → 0.7.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 (84) hide show
  1. package/dist/index.cjs +231 -98
  2. package/dist/index.js +231 -98
  3. package/package.json +5 -5
  4. package/src/components/accordion/accordion.html +596 -291
  5. package/src/components/alert/alert.html +112 -148
  6. package/src/components/attribution/attribution.html +50 -21
  7. package/src/components/avatar/avatar.html +86 -51
  8. package/src/components/breadcrumb/breadcrumb.html +45 -66
  9. package/src/components/button/button.html +363 -226
  10. package/src/components/callout/Callout.tsx +1 -2
  11. package/src/components/callout/callout.django.html +2 -2
  12. package/src/components/callout/callout.html +0 -5
  13. package/src/components/callout/config.json +1 -5
  14. package/src/components/card/Card.tsx +6 -3
  15. package/src/components/card/card.django.html +2 -2
  16. package/src/components/card/card.html +1032 -35
  17. package/src/components/card/config.json +6 -2
  18. package/src/components/card-group/card-group.html +388 -95
  19. package/src/components/carousel/Carousel.tsx +42 -71
  20. package/src/components/carousel/carousel.django.html +22 -46
  21. package/src/components/carousel/carousel.html +715 -32
  22. package/src/components/carousel/config.json +25 -12
  23. package/src/components/character-count/character-count.html +231 -26
  24. package/src/components/checkbox/checkbox.html +313 -241
  25. package/src/components/checkbox-group/checkbox-group.html +346 -26
  26. package/src/components/clickable/clickable.html +168 -83
  27. package/src/components/code/Code.tsx +4 -3
  28. package/src/components/code/code.django.html +1 -1
  29. package/src/components/code/config.json +4 -0
  30. package/src/components/collection/collection.html +203 -379
  31. package/src/components/combobox/combobox.html +21 -9
  32. package/src/components/container/container.html +2616 -80
  33. package/src/components/copy-to-clipboard/copy-to-clipboard.html +48 -20
  34. package/src/components/details/Details.tsx +69 -0
  35. package/src/components/details/config.json +73 -0
  36. package/src/components/details/details.django.html +7 -0
  37. package/src/components/details/details.html +186 -0
  38. package/src/components/error-message/error-message.html +15 -2
  39. package/src/components/error-page/ErrorPage.tsx +169 -0
  40. package/src/components/error-page/config.json +152 -0
  41. package/src/components/error-page/error-page.django.html +80 -0
  42. package/src/components/error-page/error-page.html +437 -0
  43. package/src/components/eyebrow/eyebrow.html +8 -4
  44. package/src/components/fieldset/fieldset.html +33 -7
  45. package/src/components/file-input/file-input.html +310 -31
  46. package/src/components/file-list/file-list.html +191 -7
  47. package/src/components/footer/footer.html +611 -232
  48. package/src/components/header/header.html +2553 -611
  49. package/src/components/hero/hero.html +300 -38
  50. package/src/components/hint/hint.html +7 -2
  51. package/src/components/identifier/identifier.html +483 -255
  52. package/src/components/image/Image.tsx +2 -2
  53. package/src/components/image/image.django.html +4 -10
  54. package/src/components/image/image.html +144 -29
  55. package/src/components/indicator/indicator.html +25 -23
  56. package/src/components/label/label.html +15 -16
  57. package/src/components/language-selector/language-selector.html +74 -25
  58. package/src/components/layout/layout.html +991 -21
  59. package/src/components/legend/legend.html +10 -9
  60. package/src/components/list/list.html +45 -25
  61. package/src/components/page/Page.tsx +15 -2
  62. package/src/components/page/config.json +13 -1
  63. package/src/components/page/page.django.html +2 -2
  64. package/src/components/page/page.html +29 -8
  65. package/src/components/pagination/pagination.html +907 -305
  66. package/src/components/prose/prose.html +244 -85
  67. package/src/components/quote/Quote.tsx +1 -1
  68. package/src/components/quote/config.json +1 -2
  69. package/src/components/quote/quote.html +2 -7
  70. package/src/components/radio-buttons/radio-buttons.html +623 -127
  71. package/src/components/required/required.html +3 -4
  72. package/src/components/search/search.html +336 -54
  73. package/src/components/section/section.html +73 -11
  74. package/src/components/select/select.html +112 -58
  75. package/src/components/skipnav/skipnav.html +40 -1
  76. package/src/components/spinner/spinner.html +143 -23
  77. package/src/components/step-indicator/step-indicator.html +26 -68
  78. package/src/components/swap/swap.html +99 -154
  79. package/src/components/table/table.html +2168 -988
  80. package/src/components/tag/tag.html +73 -17
  81. package/src/components/task-list/task-list.html +252 -15
  82. package/src/components/theme-picker/theme-picker.html +26 -8
  83. package/src/components/toggle/toggle.html +64 -5
  84. package/src/index.js +2 -0
@@ -1,45 +1,1015 @@
1
- <!-- Single Column Layout Example -->
1
+ <h3 class="site-preview-heading">Single Column</h3>
2
2
  <div class="usx-layout">
3
3
  <div class="usx-layout__single-column">
4
- <h1>Page Title</h1>
5
- <p>Main content goes here, centered with responsive gutters.</p>
4
+ <div class="bg-blue">
5
+ <h2>Single Column Layout</h2>
6
+ <p>This content is centered with responsive gutters.</p>
7
+ <p>
8
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut
9
+ labore et dolore magna aliqua.
10
+ </p>
11
+ </div>
6
12
  </div>
7
13
  </div>
8
14
 
9
- <!-- Grid Layout Example -->
15
+ <h3 class="site-preview-heading">Grid Full Content</h3>
16
+ <div class="usx-layout">
17
+ <div class="usx-layout__grid-container">
18
+ <aside class="usx-layout__sidebar--left">
19
+ <div class="bg-violet">
20
+ <h2>Left Sidebar</h2>
21
+ <p>Navigation or secondary content</p>
22
+ </div>
23
+ </aside>
24
+ <main class="usx-layout__content">
25
+ <div class="bg-blue">
26
+ <h2>Grid Layout - Full Content</h2>
27
+ <p>Content spans the full width, sidebars are hidden on mobile.</p>
28
+ <p>
29
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
30
+ commodo consequat.
31
+ </p>
32
+ </div>
33
+ </main>
34
+ <aside class="usx-layout__sidebar--right">
35
+ <div class="bg-cyan">
36
+ <h2>Right Sidebar</h2>
37
+ <p>Related links or ads</p>
38
+ </div>
39
+ </aside>
40
+ </div>
41
+ </div>
42
+
43
+ <h3 class="site-preview-heading">Grid Without Sidebars</h3>
44
+ <div class="usx-layout">
45
+ <div class="usx-layout__grid-container">
46
+ <main class="usx-layout__content">
47
+ <div class="bg-blue">
48
+ <h2>Single Column Layout</h2>
49
+ <p>This content is centered with responsive gutters.</p>
50
+ <p>
51
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt
52
+ ut labore et dolore magna aliqua.
53
+ </p>
54
+ </div>
55
+ </main>
56
+ </div>
57
+ </div>
58
+
59
+ <h3 class="site-preview-heading">Grid With Left Sidebar</h3>
10
60
  <div class="usx-layout">
11
61
  <div class="usx-layout__grid-container">
12
62
  <aside class="usx-layout__sidebar--left">
13
63
  <nav aria-label="Side navigation">
14
- <ul class="usa-sidenav">
64
+ <ul class="usa-sidenav usx-sidenav">
15
65
  <li class="usa-sidenav__item">
16
- <a href="#" class="usa-current">Current Page</a>
66
+ <a href="#" class="usa-current" aria-current="page">Home</a>
17
67
  </li>
68
+ <li class="usa-sidenav__item"><a href="#">About</a></li>
69
+ <li class="usa-sidenav__item"><a href="#">Services</a></li>
70
+ <li class="usa-sidenav__item"><a href="#">Contact</a></li>
71
+ </ul>
72
+ </nav>
73
+ </aside>
74
+ <main class="usx-layout__content usx-layout__content--right">
75
+ <div class="bg-blue">
76
+ <h2>Grid Layout - Content with Left Sidebar</h2>
77
+ <p>Content adjusts to leave space for the left sidebar on desktop.</p>
78
+ <p>
79
+ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
80
+ nulla pariatur.
81
+ </p>
82
+ </div>
83
+ </main>
84
+ </div>
85
+ </div>
86
+
87
+ <h3 class="site-preview-heading">Grid With Right Sidebar</h3>
88
+ <div class="usx-layout">
89
+ <div class="usx-layout__grid-container">
90
+ <main class="usx-layout__content usx-layout__content--left">
91
+ <div class="bg-blue">
92
+ <h2>Grid Layout - Content with Right Sidebar</h2>
93
+ <p>Content adjusts to leave space for the right sidebar on desktop.</p>
94
+ <p>
95
+ Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
96
+ anim id est laborum.
97
+ </p>
98
+ </div>
99
+ </main>
100
+ <aside class="usx-layout__sidebar--right">
101
+ <div class="bg-cyan">
102
+ <h2>Related Content</h2>
103
+ <ul>
104
+ <li>Related Link 1</li>
105
+ <li>Related Link 2</li>
106
+ <li>Related Link 3</li>
107
+ </ul>
108
+ </div>
109
+ </aside>
110
+ </div>
111
+ </div>
112
+
113
+ <h3 class="site-preview-heading">Expandable</h3>
114
+ <div class="usx-layout">
115
+ <div class="usx-layout__single-column">
116
+ <button
117
+ type="button"
118
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
119
+ aria-label="Expand"
120
+ aria-expanded="false"
121
+ onclick="
122
+ const layout = this.closest('.usx-layout');
123
+ const expanded = layout.classList.toggle('usx-expanded');
124
+ this.setAttribute('aria-expanded', expanded);
125
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
126
+ "
127
+ >
128
+ <svg
129
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
130
+ aria-hidden="true"
131
+ aria-label="expand icon"
132
+ focusable="false"
133
+ role="img"
134
+ >
135
+ <use href="/img/usx-sprite.svg#expand"></use></svg
136
+ ><svg
137
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
138
+ aria-hidden="true"
139
+ aria-label="contract icon"
140
+ focusable="false"
141
+ role="img"
142
+ >
143
+ <use href="/img/usx-sprite.svg#contract"></use>
144
+ </svg>
145
+ </button>
146
+ <div class="bg-blue">
147
+ <h2>Expandable Layout</h2>
148
+ <p>Use the expand button in the top-right corner to grow the layout to a wider max-width.</p>
149
+ </div>
150
+ </div>
151
+ </div>
152
+
153
+ <h3 class="site-preview-heading">Expandable Grid Full Content</h3>
154
+ <div class="usx-layout">
155
+ <div class="usx-layout__grid-container">
156
+ <aside class="usx-layout__sidebar--left">
157
+ <div class="bg-violet">
158
+ <h2>Left Sidebar</h2>
159
+ <p>Navigation or secondary content</p>
160
+ </div>
161
+ </aside>
162
+ <main class="usx-layout__content">
163
+ <button
164
+ type="button"
165
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
166
+ aria-label="Expand"
167
+ aria-expanded="false"
168
+ onclick="
169
+ const layout = this.closest('.usx-layout');
170
+ const expanded = layout.classList.toggle('usx-expanded');
171
+ this.setAttribute('aria-expanded', expanded);
172
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
173
+ "
174
+ >
175
+ <svg
176
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
177
+ aria-hidden="true"
178
+ aria-label="expand icon"
179
+ focusable="false"
180
+ role="img"
181
+ >
182
+ <use href="/img/usx-sprite.svg#expand"></use></svg
183
+ ><svg
184
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
185
+ aria-hidden="true"
186
+ aria-label="contract icon"
187
+ focusable="false"
188
+ role="img"
189
+ >
190
+ <use href="/img/usx-sprite.svg#contract"></use>
191
+ </svg>
192
+ </button>
193
+ <div class="bg-blue">
194
+ <h2>Grid Layout - Full Content</h2>
195
+ <p>Content spans the full width, sidebars are hidden on mobile.</p>
196
+ <p>
197
+ Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
198
+ commodo consequat.
199
+ </p>
200
+ </div>
201
+ </main>
202
+ <aside class="usx-layout__sidebar--right">
203
+ <div class="bg-cyan">
204
+ <h2>Right Sidebar</h2>
205
+ <p>Related links or ads</p>
206
+ </div>
207
+ </aside>
208
+ </div>
209
+ </div>
210
+
211
+ <h3 class="site-preview-heading">Expandable Grid With Left Sidebar</h3>
212
+ <div class="usx-layout">
213
+ <div class="usx-layout__grid-container">
214
+ <aside class="usx-layout__sidebar--left">
215
+ <nav aria-label="Side navigation">
216
+ <ul class="usa-sidenav usx-sidenav">
18
217
  <li class="usa-sidenav__item">
19
- <a href="#">Menu Item</a>
218
+ <a href="#" class="usa-current" aria-current="page">Home</a>
20
219
  </li>
220
+ <li class="usa-sidenav__item"><a href="#">About</a></li>
221
+ <li class="usa-sidenav__item"><a href="#">Services</a></li>
222
+ <li class="usa-sidenav__item"><a href="#">Contact</a></li>
21
223
  </ul>
22
224
  </nav>
23
225
  </aside>
24
226
  <main class="usx-layout__content usx-layout__content--right">
25
- <h1>Page Title</h1>
26
- <p>Main content with left sidebar. On desktop, content adjusts to account for sidebar width.</p>
227
+ <button
228
+ type="button"
229
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
230
+ aria-label="Expand"
231
+ aria-expanded="false"
232
+ onclick="
233
+ const layout = this.closest('.usx-layout');
234
+ const expanded = layout.classList.toggle('usx-expanded');
235
+ this.setAttribute('aria-expanded', expanded);
236
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
237
+ "
238
+ >
239
+ <svg
240
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
241
+ aria-hidden="true"
242
+ aria-label="expand icon"
243
+ focusable="false"
244
+ role="img"
245
+ >
246
+ <use href="/img/usx-sprite.svg#expand"></use></svg
247
+ ><svg
248
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
249
+ aria-hidden="true"
250
+ aria-label="contract icon"
251
+ focusable="false"
252
+ role="img"
253
+ >
254
+ <use href="/img/usx-sprite.svg#contract"></use>
255
+ </svg>
256
+ </button>
257
+ <div class="bg-blue">
258
+ <h2>Grid Layout - Content with Left Sidebar</h2>
259
+ <p>Content adjusts to leave space for the left sidebar on desktop.</p>
260
+ <p>
261
+ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
262
+ nulla pariatur.
263
+ </p>
264
+ </div>
27
265
  </main>
28
266
  </div>
29
267
  </div>
30
268
 
31
- <!-- Expandable Layout Example -->
269
+ <h3 class="site-preview-heading">Expandable Grid With Right Sidebar</h3>
32
270
  <div class="usx-layout">
33
- <div class="usx-layout__single-column">
34
- <button type="button" class="usx-layout__expand-button" aria-expanded="false" aria-label="Expand" onclick="const expanded = this.closest('.usx-layout').classList.toggle('usx-expanded'); this.setAttribute('aria-expanded', expanded); this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');">
35
- <svg class="usa-icon usx-layout__expand-icon usx-layout__expand-icon--expand" aria-hidden="true" focusable="false" role="img">
36
- <use href="./img/usx-sprite.svg#expand"></use>
37
- </svg>
38
- <svg class="usa-icon usx-layout__expand-icon usx-layout__expand-icon--contract" aria-hidden="true" focusable="false" role="img">
39
- <use href="./img/usx-sprite.svg#contract"></use>
40
- </svg>
41
- </button>
42
- <h1>Page Title</h1>
43
- <p>Use the expand button in the top-right corner to grow the layout to a wider max-width.</p>
271
+ <div class="usx-layout__grid-container">
272
+ <main class="usx-layout__content usx-layout__content--left">
273
+ <button
274
+ type="button"
275
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
276
+ aria-label="Expand"
277
+ aria-expanded="false"
278
+ onclick="
279
+ const layout = this.closest('.usx-layout');
280
+ const expanded = layout.classList.toggle('usx-expanded');
281
+ this.setAttribute('aria-expanded', expanded);
282
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
283
+ "
284
+ >
285
+ <svg
286
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
287
+ aria-hidden="true"
288
+ aria-label="expand icon"
289
+ focusable="false"
290
+ role="img"
291
+ >
292
+ <use href="/img/usx-sprite.svg#expand"></use></svg
293
+ ><svg
294
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
295
+ aria-hidden="true"
296
+ aria-label="contract icon"
297
+ focusable="false"
298
+ role="img"
299
+ >
300
+ <use href="/img/usx-sprite.svg#contract"></use>
301
+ </svg>
302
+ </button>
303
+ <div class="bg-blue">
304
+ <h2>Grid Layout - Content with Right Sidebar</h2>
305
+ <p>Content adjusts to leave space for the right sidebar on desktop.</p>
306
+ <p>
307
+ Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
308
+ anim id est laborum.
309
+ </p>
310
+ </div>
311
+ </main>
312
+ <aside class="usx-layout__sidebar--right">
313
+ <div class="bg-cyan">
314
+ <h2>Related Content</h2>
315
+ <ul>
316
+ <li>Related Link 1</li>
317
+ <li>Related Link 2</li>
318
+ <li>Related Link 3</li>
319
+ </ul>
320
+ </div>
321
+ </aside>
322
+ </div>
323
+ </div>
324
+
325
+ <h3 class="site-preview-heading">Vertical Spacing</h3>
326
+ <div
327
+ class="usa-alert usx-alert usa-alert--info"
328
+ role="region"
329
+ aria-label="Position of Expand/Collapse button"
330
+ >
331
+ <div class="usa-alert__body">
332
+ <h4 class="usa-alert__heading">Position of Expand/Collapse button</h4>
333
+ <div class="usa-alert__text">
334
+ <div class="maxw-tablet">
335
+ The Expand/Collapse button (not visible on small screens) is always 3.5 units from the top,
336
+ and 5 units from the right of the usx-layout component's boundary. It remains consistently
337
+ positioned regardless of the heading margin and/or layout type (single-column or grid).
338
+ </div>
339
+ </div>
340
+ </div>
341
+ </div>
342
+ <div>
343
+ <section data-spacing-case="heading">
344
+ <div class="usx-layout margin-y-2 bg-surface-2">
345
+ <div class="usx-layout__single-column">
346
+ <button
347
+ type="button"
348
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
349
+ aria-label="Expand"
350
+ aria-expanded="false"
351
+ onclick="
352
+ const layout = this.closest('.usx-layout');
353
+ const expanded = layout.classList.toggle('usx-expanded');
354
+ this.setAttribute('aria-expanded', expanded);
355
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
356
+ "
357
+ >
358
+ <svg
359
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
360
+ aria-hidden="true"
361
+ aria-label="expand icon"
362
+ focusable="false"
363
+ role="img"
364
+ >
365
+ <use href="/img/usx-sprite.svg#expand"></use></svg
366
+ ><svg
367
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
368
+ aria-hidden="true"
369
+ aria-label="contract icon"
370
+ focusable="false"
371
+ role="img"
372
+ >
373
+ <use href="/img/usx-sprite.svg#contract"></use>
374
+ </svg>
375
+ </button>
376
+ <h1 class="bg-surface-1">H1 Page heading</h1>
377
+ </div>
378
+ </div>
379
+ <div class="usx-layout margin-y-2 bg-surface-2">
380
+ <div class="usx-layout__grid-container">
381
+ <main class="usx-layout__content">
382
+ <button
383
+ type="button"
384
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
385
+ aria-label="Expand"
386
+ aria-expanded="false"
387
+ onclick="
388
+ const layout = this.closest('.usx-layout');
389
+ const expanded = layout.classList.toggle('usx-expanded');
390
+ this.setAttribute('aria-expanded', expanded);
391
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
392
+ "
393
+ >
394
+ <svg
395
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
396
+ aria-hidden="true"
397
+ aria-label="expand icon"
398
+ focusable="false"
399
+ role="img"
400
+ >
401
+ <use href="/img/usx-sprite.svg#expand"></use></svg
402
+ ><svg
403
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
404
+ aria-hidden="true"
405
+ aria-label="contract icon"
406
+ focusable="false"
407
+ role="img"
408
+ >
409
+ <use href="/img/usx-sprite.svg#contract"></use>
410
+ </svg>
411
+ </button>
412
+ <h1 class="bg-surface-1">H1 Page heading</h1>
413
+ </main>
414
+ </div>
415
+ </div>
416
+ </section>
417
+ <section data-spacing-case="wrapped-heading">
418
+ <div class="usx-layout margin-y-2 bg-surface-2">
419
+ <div class="usx-layout__single-column">
420
+ <button
421
+ type="button"
422
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
423
+ aria-label="Expand"
424
+ aria-expanded="false"
425
+ onclick="
426
+ const layout = this.closest('.usx-layout');
427
+ const expanded = layout.classList.toggle('usx-expanded');
428
+ this.setAttribute('aria-expanded', expanded);
429
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
430
+ "
431
+ >
432
+ <svg
433
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
434
+ aria-hidden="true"
435
+ aria-label="expand icon"
436
+ focusable="false"
437
+ role="img"
438
+ >
439
+ <use href="/img/usx-sprite.svg#expand"></use></svg
440
+ ><svg
441
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
442
+ aria-hidden="true"
443
+ aria-label="contract icon"
444
+ focusable="false"
445
+ role="img"
446
+ >
447
+ <use href="/img/usx-sprite.svg#contract"></use>
448
+ </svg>
449
+ </button>
450
+ <div class="bg-surface-1">
451
+ <h2>H2 Section heading</h2>
452
+ <p>Section content.</p>
453
+ </div>
454
+ </div>
455
+ </div>
456
+ <div class="usx-layout margin-y-2 bg-surface-2">
457
+ <div class="usx-layout__grid-container">
458
+ <main class="usx-layout__content">
459
+ <button
460
+ type="button"
461
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
462
+ aria-label="Expand"
463
+ aria-expanded="false"
464
+ onclick="
465
+ const layout = this.closest('.usx-layout');
466
+ const expanded = layout.classList.toggle('usx-expanded');
467
+ this.setAttribute('aria-expanded', expanded);
468
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
469
+ "
470
+ >
471
+ <svg
472
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
473
+ aria-hidden="true"
474
+ aria-label="expand icon"
475
+ focusable="false"
476
+ role="img"
477
+ >
478
+ <use href="/img/usx-sprite.svg#expand"></use></svg
479
+ ><svg
480
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
481
+ aria-hidden="true"
482
+ aria-label="contract icon"
483
+ focusable="false"
484
+ role="img"
485
+ >
486
+ <use href="/img/usx-sprite.svg#contract"></use>
487
+ </svg>
488
+ </button>
489
+ <div class="bg-surface-1">
490
+ <h2>H2 Section heading</h2>
491
+ <p>Section content.</p>
492
+ </div>
493
+ </main>
494
+ </div>
495
+ </div>
496
+ </section>
497
+ <section data-spacing-case="page">
498
+ <div class="usx-layout margin-y-2 bg-surface-2">
499
+ <div class="usx-layout__single-column">
500
+ <button
501
+ type="button"
502
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
503
+ aria-label="Expand"
504
+ aria-expanded="false"
505
+ onclick="
506
+ const layout = this.closest('.usx-layout');
507
+ const expanded = layout.classList.toggle('usx-expanded');
508
+ this.setAttribute('aria-expanded', expanded);
509
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
510
+ "
511
+ >
512
+ <svg
513
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
514
+ aria-hidden="true"
515
+ aria-label="expand icon"
516
+ focusable="false"
517
+ role="img"
518
+ >
519
+ <use href="/img/usx-sprite.svg#expand"></use></svg
520
+ ><svg
521
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
522
+ aria-hidden="true"
523
+ aria-label="contract icon"
524
+ focusable="false"
525
+ role="img"
526
+ >
527
+ <use href="/img/usx-sprite.svg#contract"></use>
528
+ </svg>
529
+ </button>
530
+ <section class="usx-page bg-surface-1">
531
+ <h1 class="usx-page__title">H1 Page heading</h1>
532
+ <div class="usx-page__content">
533
+ <div class="usa-prose">
534
+ <h2>H2 Section heading</h2>
535
+ <p>Page content.</p>
536
+ </div>
537
+ </div>
538
+ </section>
539
+ </div>
540
+ </div>
541
+ <div class="usx-layout margin-y-2 bg-surface-2">
542
+ <div class="usx-layout__grid-container">
543
+ <main class="usx-layout__content">
544
+ <button
545
+ type="button"
546
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
547
+ aria-label="Expand"
548
+ aria-expanded="false"
549
+ onclick="
550
+ const layout = this.closest('.usx-layout');
551
+ const expanded = layout.classList.toggle('usx-expanded');
552
+ this.setAttribute('aria-expanded', expanded);
553
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
554
+ "
555
+ >
556
+ <svg
557
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
558
+ aria-hidden="true"
559
+ aria-label="expand icon"
560
+ focusable="false"
561
+ role="img"
562
+ >
563
+ <use href="/img/usx-sprite.svg#expand"></use></svg
564
+ ><svg
565
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
566
+ aria-hidden="true"
567
+ aria-label="contract icon"
568
+ focusable="false"
569
+ role="img"
570
+ >
571
+ <use href="/img/usx-sprite.svg#contract"></use>
572
+ </svg>
573
+ </button>
574
+ <section class="usx-page bg-surface-1">
575
+ <h1 class="usx-page__title">H1 Page heading</h1>
576
+ <div class="usx-page__content">
577
+ <div class="usa-prose">
578
+ <h2>H2 Section heading</h2>
579
+ <p>Page content.</p>
580
+ </div>
581
+ </div>
582
+ </section>
583
+ </main>
584
+ </div>
585
+ </div>
586
+ </section>
587
+ </div>
588
+
589
+ <h3 class="site-preview-heading">Responsiveness And Availability</h3>
590
+ <div>
591
+ <div class="usx-layout undefined">
592
+ <div class="usx-layout__single-column">
593
+ <button
594
+ type="button"
595
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
596
+ aria-label="Expand"
597
+ aria-expanded="false"
598
+ onclick="
599
+ const layout = this.closest('.usx-layout');
600
+ const expanded = layout.classList.toggle('usx-expanded');
601
+ this.setAttribute('aria-expanded', expanded);
602
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
603
+ "
604
+ >
605
+ <svg
606
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
607
+ aria-hidden="true"
608
+ aria-label="expand icon"
609
+ focusable="false"
610
+ role="img"
611
+ >
612
+ <use href="/img/usx-sprite.svg#expand"></use></svg
613
+ ><svg
614
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
615
+ aria-hidden="true"
616
+ aria-label="contract icon"
617
+ focusable="false"
618
+ role="img"
619
+ >
620
+ <use href="/img/usx-sprite.svg#contract"></use>
621
+ </svg>
622
+ </button>
623
+ <div data-layout-content="true" class="bg-blue height-15">
624
+ <h2>Single column</h2>
625
+ <p>Content with shared responsive gutters.</p>
626
+ </div>
627
+ </div>
628
+ </div>
629
+ <div class="usx-layout margin-top-3 undefined">
630
+ <div class="usx-layout__grid-container">
631
+ <main class="usx-layout__content">
632
+ <button
633
+ type="button"
634
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
635
+ aria-label="Expand"
636
+ aria-expanded="false"
637
+ onclick="
638
+ const layout = this.closest('.usx-layout');
639
+ const expanded = layout.classList.toggle('usx-expanded');
640
+ this.setAttribute('aria-expanded', expanded);
641
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
642
+ "
643
+ >
644
+ <svg
645
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
646
+ aria-hidden="true"
647
+ aria-label="expand icon"
648
+ focusable="false"
649
+ role="img"
650
+ >
651
+ <use href="/img/usx-sprite.svg#expand"></use></svg
652
+ ><svg
653
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
654
+ aria-hidden="true"
655
+ aria-label="contract icon"
656
+ focusable="false"
657
+ role="img"
658
+ >
659
+ <use href="/img/usx-sprite.svg#contract"></use>
660
+ </svg>
661
+ </button>
662
+ <div data-layout-content="true" class="bg-blue height-full">
663
+ <h2>Grid: no sidebars</h2>
664
+ <p>Content with shared responsive gutters.</p>
665
+ </div>
666
+ </main>
667
+ </div>
668
+ </div>
669
+ <div class="usx-layout margin-top-3 undefined">
670
+ <div class="usx-layout__grid-container">
671
+ <aside class="usx-layout__sidebar--left">
672
+ <div class="bg-violet height-full"><h2>Left sidebar</h2></div>
673
+ </aside>
674
+ <main class="usx-layout__content usx-layout__content--right">
675
+ <button
676
+ type="button"
677
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
678
+ aria-label="Expand"
679
+ aria-expanded="false"
680
+ onclick="
681
+ const layout = this.closest('.usx-layout');
682
+ const expanded = layout.classList.toggle('usx-expanded');
683
+ this.setAttribute('aria-expanded', expanded);
684
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
685
+ "
686
+ >
687
+ <svg
688
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
689
+ aria-hidden="true"
690
+ aria-label="expand icon"
691
+ focusable="false"
692
+ role="img"
693
+ >
694
+ <use href="/img/usx-sprite.svg#expand"></use></svg
695
+ ><svg
696
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
697
+ aria-hidden="true"
698
+ aria-label="contract icon"
699
+ focusable="false"
700
+ role="img"
701
+ >
702
+ <use href="/img/usx-sprite.svg#contract"></use>
703
+ </svg>
704
+ </button>
705
+ <div data-layout-content="true" class="bg-blue height-full">
706
+ <h2>Grid: left</h2>
707
+ <p>Content with shared responsive gutters.</p>
708
+ </div>
709
+ </main>
710
+ </div>
711
+ </div>
712
+ <div class="usx-layout margin-top-3 undefined">
713
+ <div class="usx-layout__grid-container">
714
+ <main class="usx-layout__content usx-layout__content--left">
715
+ <button
716
+ type="button"
717
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
718
+ aria-label="Expand"
719
+ aria-expanded="false"
720
+ onclick="
721
+ const layout = this.closest('.usx-layout');
722
+ const expanded = layout.classList.toggle('usx-expanded');
723
+ this.setAttribute('aria-expanded', expanded);
724
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
725
+ "
726
+ >
727
+ <svg
728
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
729
+ aria-hidden="true"
730
+ aria-label="expand icon"
731
+ focusable="false"
732
+ role="img"
733
+ >
734
+ <use href="/img/usx-sprite.svg#expand"></use></svg
735
+ ><svg
736
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
737
+ aria-hidden="true"
738
+ aria-label="contract icon"
739
+ focusable="false"
740
+ role="img"
741
+ >
742
+ <use href="/img/usx-sprite.svg#contract"></use>
743
+ </svg>
744
+ </button>
745
+ <div data-layout-content="true" class="bg-blue height-full">
746
+ <h2>Grid: right</h2>
747
+ <p>Content with shared responsive gutters.</p>
748
+ </div>
749
+ </main>
750
+ <aside class="usx-layout__sidebar--right">
751
+ <div class="bg-cyan height-full"><h2>Right sidebar</h2></div>
752
+ </aside>
753
+ </div>
754
+ </div>
755
+ <div class="usx-layout margin-top-3 undefined">
756
+ <div class="usx-layout__grid-container">
757
+ <aside class="usx-layout__sidebar--left">
758
+ <div class="bg-violet height-full"><h2>Left sidebar</h2></div>
759
+ </aside>
760
+ <main class="usx-layout__content">
761
+ <button
762
+ type="button"
763
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
764
+ aria-label="Expand"
765
+ aria-expanded="false"
766
+ onclick="
767
+ const layout = this.closest('.usx-layout');
768
+ const expanded = layout.classList.toggle('usx-expanded');
769
+ this.setAttribute('aria-expanded', expanded);
770
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
771
+ "
772
+ >
773
+ <svg
774
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
775
+ aria-hidden="true"
776
+ aria-label="expand icon"
777
+ focusable="false"
778
+ role="img"
779
+ >
780
+ <use href="/img/usx-sprite.svg#expand"></use></svg
781
+ ><svg
782
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
783
+ aria-hidden="true"
784
+ aria-label="contract icon"
785
+ focusable="false"
786
+ role="img"
787
+ >
788
+ <use href="/img/usx-sprite.svg#contract"></use>
789
+ </svg>
790
+ </button>
791
+ <div data-layout-content="true" class="bg-blue height-full">
792
+ <h2>Grid: left and right</h2>
793
+ <p>Content with shared responsive gutters.</p>
794
+ </div>
795
+ </main>
796
+ <aside class="usx-layout__sidebar--right">
797
+ <div class="bg-cyan height-full"><h2>Right sidebar</h2></div>
798
+ </aside>
799
+ </div>
800
+ </div>
801
+ </div>
802
+
803
+ <h3 class="site-preview-heading">Themed Comparison</h3>
804
+ <div style="--usx-layout-gutter-mobile: 1rem; --usx-layout-gutter: 2.5rem">
805
+ <div class="usx-layout usx-layout--compact">
806
+ <div class="usx-layout__single-column">
807
+ <button
808
+ type="button"
809
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
810
+ aria-label="Expand"
811
+ aria-expanded="false"
812
+ onclick="
813
+ const layout = this.closest('.usx-layout');
814
+ const expanded = layout.classList.toggle('usx-expanded');
815
+ this.setAttribute('aria-expanded', expanded);
816
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
817
+ "
818
+ >
819
+ <svg
820
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
821
+ aria-hidden="true"
822
+ aria-label="expand icon"
823
+ focusable="false"
824
+ role="img"
825
+ >
826
+ <use href="/img/usx-sprite.svg#expand"></use></svg
827
+ ><svg
828
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
829
+ aria-hidden="true"
830
+ aria-label="contract icon"
831
+ focusable="false"
832
+ role="img"
833
+ >
834
+ <use href="/img/usx-sprite.svg#contract"></use>
835
+ </svg>
836
+ </button>
837
+ <div data-layout-content="true" class="bg-blue height-15">
838
+ <h2>Single column</h2>
839
+ <p>Content with shared responsive gutters.</p>
840
+ </div>
841
+ </div>
842
+ </div>
843
+ <div class="usx-layout margin-top-3 usx-layout--compact">
844
+ <div class="usx-layout__grid-container">
845
+ <main class="usx-layout__content">
846
+ <button
847
+ type="button"
848
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
849
+ aria-label="Expand"
850
+ aria-expanded="false"
851
+ onclick="
852
+ const layout = this.closest('.usx-layout');
853
+ const expanded = layout.classList.toggle('usx-expanded');
854
+ this.setAttribute('aria-expanded', expanded);
855
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
856
+ "
857
+ >
858
+ <svg
859
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
860
+ aria-hidden="true"
861
+ aria-label="expand icon"
862
+ focusable="false"
863
+ role="img"
864
+ >
865
+ <use href="/img/usx-sprite.svg#expand"></use></svg
866
+ ><svg
867
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
868
+ aria-hidden="true"
869
+ aria-label="contract icon"
870
+ focusable="false"
871
+ role="img"
872
+ >
873
+ <use href="/img/usx-sprite.svg#contract"></use>
874
+ </svg>
875
+ </button>
876
+ <div data-layout-content="true" class="bg-blue height-full">
877
+ <h2>Grid: no sidebars</h2>
878
+ <p>Content with shared responsive gutters.</p>
879
+ </div>
880
+ </main>
881
+ </div>
882
+ </div>
883
+ <div class="usx-layout margin-top-3 usx-layout--compact">
884
+ <div class="usx-layout__grid-container">
885
+ <aside class="usx-layout__sidebar--left">
886
+ <div class="bg-violet height-full"><h2>Left sidebar</h2></div>
887
+ </aside>
888
+ <main class="usx-layout__content usx-layout__content--right">
889
+ <button
890
+ type="button"
891
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
892
+ aria-label="Expand"
893
+ aria-expanded="false"
894
+ onclick="
895
+ const layout = this.closest('.usx-layout');
896
+ const expanded = layout.classList.toggle('usx-expanded');
897
+ this.setAttribute('aria-expanded', expanded);
898
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
899
+ "
900
+ >
901
+ <svg
902
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
903
+ aria-hidden="true"
904
+ aria-label="expand icon"
905
+ focusable="false"
906
+ role="img"
907
+ >
908
+ <use href="/img/usx-sprite.svg#expand"></use></svg
909
+ ><svg
910
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
911
+ aria-hidden="true"
912
+ aria-label="contract icon"
913
+ focusable="false"
914
+ role="img"
915
+ >
916
+ <use href="/img/usx-sprite.svg#contract"></use>
917
+ </svg>
918
+ </button>
919
+ <div data-layout-content="true" class="bg-blue height-full">
920
+ <h2>Grid: left</h2>
921
+ <p>Content with shared responsive gutters.</p>
922
+ </div>
923
+ </main>
924
+ </div>
925
+ </div>
926
+ <div class="usx-layout margin-top-3 usx-layout--compact">
927
+ <div class="usx-layout__grid-container">
928
+ <main class="usx-layout__content usx-layout__content--left">
929
+ <button
930
+ type="button"
931
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
932
+ aria-label="Expand"
933
+ aria-expanded="false"
934
+ onclick="
935
+ const layout = this.closest('.usx-layout');
936
+ const expanded = layout.classList.toggle('usx-expanded');
937
+ this.setAttribute('aria-expanded', expanded);
938
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
939
+ "
940
+ >
941
+ <svg
942
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
943
+ aria-hidden="true"
944
+ aria-label="expand icon"
945
+ focusable="false"
946
+ role="img"
947
+ >
948
+ <use href="/img/usx-sprite.svg#expand"></use></svg
949
+ ><svg
950
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
951
+ aria-hidden="true"
952
+ aria-label="contract icon"
953
+ focusable="false"
954
+ role="img"
955
+ >
956
+ <use href="/img/usx-sprite.svg#contract"></use>
957
+ </svg>
958
+ </button>
959
+ <div data-layout-content="true" class="bg-blue height-full">
960
+ <h2>Grid: right</h2>
961
+ <p>Content with shared responsive gutters.</p>
962
+ </div>
963
+ </main>
964
+ <aside class="usx-layout__sidebar--right">
965
+ <div class="bg-cyan height-full"><h2>Right sidebar</h2></div>
966
+ </aside>
967
+ </div>
968
+ </div>
969
+ <div class="usx-layout margin-top-3 usx-layout--compact">
970
+ <div class="usx-layout__grid-container">
971
+ <aside class="usx-layout__sidebar--left">
972
+ <div class="bg-violet height-full"><h2>Left sidebar</h2></div>
973
+ </aside>
974
+ <main class="usx-layout__content">
975
+ <button
976
+ type="button"
977
+ class="usa-button usx-button usa-button--primary usx-button--ghost usx-layout__expand-button"
978
+ aria-label="Expand"
979
+ aria-expanded="false"
980
+ onclick="
981
+ const layout = this.closest('.usx-layout');
982
+ const expanded = layout.classList.toggle('usx-expanded');
983
+ this.setAttribute('aria-expanded', expanded);
984
+ this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');
985
+ "
986
+ >
987
+ <svg
988
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--expand"
989
+ aria-hidden="true"
990
+ aria-label="expand icon"
991
+ focusable="false"
992
+ role="img"
993
+ >
994
+ <use href="/img/usx-sprite.svg#expand"></use></svg
995
+ ><svg
996
+ class="usa-icon usa-icon--size-3 usx-layout__expand-icon usx-layout__expand-icon--contract"
997
+ aria-hidden="true"
998
+ aria-label="contract icon"
999
+ focusable="false"
1000
+ role="img"
1001
+ >
1002
+ <use href="/img/usx-sprite.svg#contract"></use>
1003
+ </svg>
1004
+ </button>
1005
+ <div data-layout-content="true" class="bg-blue height-full">
1006
+ <h2>Grid: left and right</h2>
1007
+ <p>Content with shared responsive gutters.</p>
1008
+ </div>
1009
+ </main>
1010
+ <aside class="usx-layout__sidebar--right">
1011
+ <div class="bg-cyan height-full"><h2>Right sidebar</h2></div>
1012
+ </aside>
1013
+ </div>
44
1014
  </div>
45
1015
  </div>