@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,6 +1,5 @@
1
-
2
1
  <h3 class="site-preview-heading">Default</h3>
3
- <abbr title="required" class="usx-required">*</abbr>This field is required.
2
+ <abbr title="Required" class="usx-required">*</abbr> This field is required
4
3
 
5
- <h3 class="site-preview-heading">With custom title</h3>
6
- <abbr title="This field is required" class="usx-required">*</abbr>Hover over the asterisk to see the custom title.
4
+ <h3 class="site-preview-heading margin-top-5">With Custom Title</h3>
5
+ <abbr title="Custom Title Example" class="usx-required">*</abbr> Hover over the asterisk
@@ -1,76 +1,358 @@
1
1
  <h3 class="site-preview-heading">Default</h3>
2
- <section aria-label="Search component">
3
- <form class="usa-search" role="search">
4
- <label class="usa-sr-only" for="search-field">Search</label>
5
- <input class="usa-input usx-input" id="search-field" type="search" name="search" />
6
- <button class="usa-button usx-button usa-button--primary" type="submit">
7
- <span class="usa-search__submit-text">Search </span
8
- ><img
9
- src="/img/usa-icons-bg/search--white.svg"
10
- class="usa-search__submit-icon"
11
- alt="Search"
12
- />
2
+ <section aria-label="Search">
3
+ <form id="html-search-default-search-default-form" class="usa-search" method="get" role="search">
4
+ <label class="usa-label usx-label usa-sr-only" for="html-search-default-search-default"
5
+ >Search</label
6
+ ><input
7
+ id="html-search-default-search-default"
8
+ class="usa-input usx-input"
9
+ placeholder="Type here"
10
+ type="search"
11
+ name="q"
12
+ value=""
13
+ /><button type="submit" class="usa-button usx-button usa-button--primary">
14
+ <span class="usa-search__submit-text">Search</span
15
+ ><svg
16
+ class="usa-icon usa-icon--size-2 usa-search__submit-icon"
17
+ aria-hidden="true"
18
+ aria-label="Search"
19
+ focusable="false"
20
+ role="img"
21
+ >
22
+ <use href="/img/sprite.svg#search"></use>
23
+ </svg>
24
+ </button>
25
+ </form>
26
+ </section>
27
+
28
+ <h3 class="site-preview-heading">Custom Placeholder</h3>
29
+ <section aria-label="Search">
30
+ <form
31
+ id="html-search-custom-placeholder-search-custom-placeholder-form"
32
+ class="usa-search"
33
+ method="get"
34
+ role="search"
35
+ >
36
+ <label
37
+ class="usa-label usx-label usa-sr-only"
38
+ for="html-search-custom-placeholder-search-custom-placeholder"
39
+ >Search</label
40
+ ><input
41
+ id="html-search-custom-placeholder-search-custom-placeholder"
42
+ class="usa-input usx-input"
43
+ placeholder="Custom placeholder..."
44
+ type="search"
45
+ name="q"
46
+ value=""
47
+ /><button type="submit" class="usa-button usx-button usa-button--primary">
48
+ <span class="usa-search__submit-text">Search</span
49
+ ><svg
50
+ class="usa-icon usa-icon--size-2 usa-search__submit-icon"
51
+ aria-hidden="true"
52
+ aria-label="Search"
53
+ focusable="false"
54
+ role="img"
55
+ >
56
+ <use href="/img/sprite.svg#search"></use>
57
+ </svg>
58
+ </button>
59
+ </form>
60
+ </section>
61
+
62
+ <h3 class="site-preview-heading">With Default Value</h3>
63
+ <section aria-label="Search">
64
+ <form
65
+ id="html-search-with-default-value-search-default-value-form"
66
+ class="usa-search"
67
+ method="get"
68
+ role="search"
69
+ >
70
+ <label
71
+ class="usa-label usx-label usa-sr-only"
72
+ for="html-search-with-default-value-search-default-value"
73
+ >Search</label
74
+ ><input
75
+ id="html-search-with-default-value-search-default-value"
76
+ class="usa-input usx-input"
77
+ placeholder="Type here"
78
+ type="search"
79
+ name="q"
80
+ value="Default search value"
81
+ /><button type="submit" class="usa-button usx-button usa-button--primary">
82
+ <span class="usa-search__submit-text">Search</span
83
+ ><svg
84
+ class="usa-icon usa-icon--size-2 usa-search__submit-icon"
85
+ aria-hidden="true"
86
+ aria-label="Search"
87
+ focusable="false"
88
+ role="img"
89
+ >
90
+ <use href="/img/sprite.svg#search"></use>
91
+ </svg>
92
+ </button>
93
+ </form>
94
+ </section>
95
+
96
+ <h3 class="site-preview-heading">Big</h3>
97
+ <section aria-label="Search">
98
+ <form
99
+ id="html-search-big-search-big-form"
100
+ class="usa-search usa-search--big"
101
+ method="get"
102
+ role="search"
103
+ >
104
+ <label class="usa-label usx-label usa-sr-only" for="html-search-big-search-big">Search</label
105
+ ><input
106
+ id="html-search-big-search-big"
107
+ class="usa-input usx-input"
108
+ placeholder="Type here"
109
+ type="search"
110
+ name="q"
111
+ value=""
112
+ /><button type="submit" class="usa-button usx-button usa-button--primary">
113
+ <span class="usa-search__submit-text">Search</span
114
+ ><svg
115
+ class="usa-icon usa-icon--size-2 usa-search__submit-icon"
116
+ aria-hidden="true"
117
+ aria-label="Search"
118
+ focusable="false"
119
+ role="img"
120
+ >
121
+ <use href="/img/sprite.svg#search"></use>
122
+ </svg>
123
+ </button>
124
+ </form>
125
+ </section>
126
+
127
+ <h3 class="site-preview-heading">Icon Only</h3>
128
+ <section aria-label="Search">
129
+ <form
130
+ id="html-search-icon-only-search-icon-only-form"
131
+ class="usa-search usa-search--small"
132
+ method="get"
133
+ role="search"
134
+ >
135
+ <label class="usa-label usx-label usa-sr-only" for="html-search-icon-only-search-icon-only"
136
+ >Search</label
137
+ ><input
138
+ id="html-search-icon-only-search-icon-only"
139
+ class="usa-input usx-input"
140
+ placeholder="Type here"
141
+ type="search"
142
+ name="q"
143
+ value=""
144
+ /><button type="submit" class="usa-button usx-button usa-button--primary">
145
+ <svg
146
+ class="usa-icon usa-icon--size-2 usa-search__submit-icon display-inline-block"
147
+ aria-hidden="true"
148
+ aria-label="Search"
149
+ focusable="false"
150
+ role="img"
151
+ >
152
+ <use href="/img/sprite.svg#search"></use>
153
+ </svg>
154
+ </button>
155
+ </form>
156
+ </section>
157
+
158
+ <h3 class="site-preview-heading">Big Icon Only</h3>
159
+ <section aria-label="Search">
160
+ <form
161
+ id="html-search-big-icon-only-search-big-icon-only-form"
162
+ class="usa-search usa-search--big"
163
+ method="get"
164
+ role="search"
165
+ >
166
+ <label
167
+ class="usa-label usx-label usa-sr-only"
168
+ for="html-search-big-icon-only-search-big-icon-only"
169
+ >Search</label
170
+ ><input
171
+ id="html-search-big-icon-only-search-big-icon-only"
172
+ class="usa-input usx-input"
173
+ placeholder="Type here"
174
+ type="search"
175
+ name="q"
176
+ value=""
177
+ /><button type="submit" class="usa-button usx-button usa-button--primary">
178
+ <svg
179
+ class="usa-icon usa-icon--size-2 usa-search__submit-icon display-inline-block"
180
+ aria-hidden="true"
181
+ aria-label="Search"
182
+ focusable="false"
183
+ role="img"
184
+ >
185
+ <use href="/img/sprite.svg#search"></use>
186
+ </svg>
187
+ </button>
188
+ </form>
189
+ </section>
190
+
191
+ <h3 class="site-preview-heading">Non Standard Icon</h3>
192
+ <section aria-label="Search">
193
+ <form
194
+ id="html-search-non-standard-icon-search-non-standard-icon-form"
195
+ class="usa-search usa-search--small"
196
+ method="get"
197
+ role="search"
198
+ >
199
+ <label
200
+ class="usa-label usx-label usa-sr-only"
201
+ for="html-search-non-standard-icon-search-non-standard-icon"
202
+ >Search</label
203
+ ><input
204
+ id="html-search-non-standard-icon-search-non-standard-icon"
205
+ class="usa-input usx-input"
206
+ placeholder="Type here"
207
+ type="search"
208
+ name="q"
209
+ value=""
210
+ /><button type="submit" class="usa-button usx-button usa-button--primary">
211
+ <svg
212
+ class="usa-icon usa-icon--size-2 usa-search__submit-icon display-inline-block"
213
+ aria-hidden="true"
214
+ aria-label="Search"
215
+ focusable="false"
216
+ role="img"
217
+ >
218
+ <use href="/img/sprite.svg#star"></use>
219
+ </svg>
220
+ </button>
221
+ </form>
222
+ </section>
223
+
224
+ <h3 class="site-preview-heading">With Custom Button Variant</h3>
225
+ <section aria-label="Search">
226
+ <form
227
+ id="html-search-with-custom-button-variant-search-custom-variant-form"
228
+ class="usa-search"
229
+ method="get"
230
+ role="search"
231
+ >
232
+ <label
233
+ class="usa-label usx-label usa-sr-only"
234
+ for="html-search-with-custom-button-variant-search-custom-variant"
235
+ >Search</label
236
+ ><input
237
+ id="html-search-with-custom-button-variant-search-custom-variant"
238
+ class="usa-input usx-input"
239
+ placeholder="Type here"
240
+ type="search"
241
+ name="q"
242
+ value=""
243
+ /><button type="submit" class="usa-button usx-button usa-button--accent-cool">
244
+ <span class="usa-search__submit-text">Search</span
245
+ ><svg
246
+ class="usa-icon usa-icon--size-2 usa-search__submit-icon"
247
+ aria-hidden="true"
248
+ aria-label="Search"
249
+ focusable="false"
250
+ role="img"
251
+ >
252
+ <use href="/img/sprite.svg#search"></use>
253
+ </svg>
13
254
  </button>
14
255
  </form>
15
256
  </section>
16
257
 
17
- <h3 class="site-preview-heading">Big variant</h3>
18
- <section aria-label="Big search component">
19
- <form class="usa-search usa-search--big" role="search">
20
- <label class="usa-sr-only" for="search-field-en-big">Search</label>
21
- <input
258
+ <h3 class="site-preview-heading">Google Action</h3>
259
+ <section aria-label="Search">
260
+ <form
261
+ id="html-search-google-action-search-google-action-form"
262
+ class="usa-search"
263
+ method="get"
264
+ role="search"
265
+ action="https://www.google.com/search"
266
+ >
267
+ <label
268
+ class="usa-label usx-label usa-sr-only"
269
+ for="html-search-google-action-search-google-action"
270
+ >Search</label
271
+ ><input
272
+ id="html-search-google-action-search-google-action"
22
273
  class="usa-input usx-input"
23
- id="search-field-en-big"
274
+ placeholder="Search Google..."
24
275
  type="search"
25
- name="search"
26
- />
27
- <button class="usa-button usx-button usa-button--primary" type="submit">
28
- <span class="usa-search__submit-text">Search </span
29
- ><img
30
- src="/img/usa-icons-bg/search--white.svg"
31
- class="usa-search__submit-icon"
32
- alt="Search"
33
- />
276
+ name="q"
277
+ value=""
278
+ /><button type="submit" class="usa-button usx-button usa-button--primary">
279
+ <span class="usa-search__submit-text">Search</span
280
+ ><svg
281
+ class="usa-icon usa-icon--size-2 usa-search__submit-icon"
282
+ aria-hidden="true"
283
+ aria-label="Search"
284
+ focusable="false"
285
+ role="img"
286
+ >
287
+ <use href="/img/sprite.svg#search"></use>
288
+ </svg>
34
289
  </button>
35
290
  </form>
36
291
  </section>
37
292
 
38
- <h3 class="site-preview-heading">Big Icon variant</h3>
39
- <section aria-label="Big icon search component">
40
- <form class="usa-search usa-search--big" role="search">
41
- <label class="usa-sr-only" for="search-field-en-big">Search</label>
42
- <input
293
+ <h3 class="site-preview-heading">Path Action</h3>
294
+ <section aria-label="Search">
295
+ <form
296
+ id="html-search-path-action-search-path-action-form"
297
+ class="usa-search"
298
+ method="get"
299
+ role="search"
300
+ action="/searching-with-an-action/"
301
+ >
302
+ <label class="usa-label usx-label usa-sr-only" for="html-search-path-action-search-path-action"
303
+ >Search</label
304
+ ><input
305
+ id="html-search-path-action-search-path-action"
43
306
  class="usa-input usx-input"
44
- id="search-field-en-big"
307
+ placeholder="Search the site..."
45
308
  type="search"
46
- name="search"
47
- />
48
- <button class="usa-button usx-button usa-button--primary" type="submit">
49
- <img
50
- src="/img/usa-icons-bg/search--white.svg"
51
- class="usa-search__submit-icon display-inline-block"
52
- alt="Search"
53
- />
309
+ name="q"
310
+ value=""
311
+ /><button type="submit" class="usa-button usx-button usa-button--primary">
312
+ <span class="usa-search__submit-text">Search</span
313
+ ><svg
314
+ class="usa-icon usa-icon--size-2 usa-search__submit-icon"
315
+ aria-hidden="true"
316
+ aria-label="Search"
317
+ focusable="false"
318
+ role="img"
319
+ >
320
+ <use href="/img/sprite.svg#search"></use>
321
+ </svg>
54
322
  </button>
55
323
  </form>
56
324
  </section>
57
325
 
58
- <h3 class="site-preview-heading">Small variant</h3>
59
- <section aria-label="Small search component">
60
- <form class="usa-search usa-search--small" role="search">
61
- <label class="usa-sr-only" for="search-field-en-small">Search</label>
62
- <input
326
+ <h3 class="site-preview-heading">With On Submit</h3>
327
+ <section aria-label="Search">
328
+ <form
329
+ id="html-search-with-on-submit-search-with-onsubmit-form"
330
+ class="usa-search"
331
+ method="get"
332
+ role="search"
333
+ >
334
+ <label
335
+ class="usa-label usx-label usa-sr-only"
336
+ for="html-search-with-on-submit-search-with-onsubmit"
337
+ >Search</label
338
+ ><input
339
+ id="html-search-with-on-submit-search-with-onsubmit"
63
340
  class="usa-input usx-input"
64
- id="search-field-en-small"
341
+ placeholder="Type something and submit..."
65
342
  type="search"
66
- name="search"
67
- />
68
- <button class="usa-button usx-button usa-button--primary" type="submit">
69
- <img
70
- src="/img/usa-icons-bg/search--white.svg"
71
- class="usa-search__submit-icon"
72
- alt="Search"
73
- />
343
+ name="q"
344
+ value=""
345
+ /><button type="submit" class="usa-button usx-button usa-button--primary">
346
+ <span class="usa-search__submit-text">Search</span
347
+ ><svg
348
+ class="usa-icon usa-icon--size-2 usa-search__submit-icon"
349
+ aria-hidden="true"
350
+ aria-label="Search"
351
+ focusable="false"
352
+ role="img"
353
+ >
354
+ <use href="/img/sprite.svg#search"></use>
355
+ </svg>
74
356
  </button>
75
357
  </form>
76
358
  </section>
@@ -1,16 +1,78 @@
1
- <h1 class="site-preview-heading margin-bottom-0">Default</h1>
2
- <hr>
1
+ <h3 class="site-preview-heading">Default</h3>
3
2
  <section class="usx-section">
4
- <div class="usx-section__content">
5
- <p>Use section to group related page content with consistent spacing.</p>
6
- </div>
3
+ <div class="usx-section__content">
4
+ <p>Use section to group related page content with consistent spacing.</p>
5
+ </div>
7
6
  </section>
8
7
 
9
- <h1 class="site-preview-heading margin-bottom-0">With Title</h1>
10
- <hr>
8
+ <h3 class="site-preview-heading">With Title</h3>
11
9
  <section class="usx-section">
12
- <h2 class="usx-section__title">Program details</h2>
13
- <div class="usx-section__content">
14
- <p>Optional section titles help organize long pages into meaningful chunks.</p>
15
- </div>
10
+ <h2 class="usx-section__title">Program details</h2>
11
+ <div class="usx-section__content">
12
+ <p>Optional section titles help organize long pages into meaningful chunks.</p>
13
+ </div>
14
+ </section>
15
+
16
+ <h3 class="site-preview-heading">With Additional Classes</h3>
17
+ <section class="usx-section bg-primary-darker text-inverse padding-3">
18
+ <h2 class="usx-section__title">Highlighted section</h2>
19
+ <div class="usx-section__content">
20
+ <p>This variant demonstrates adding utility classes directly on the section component.</p>
21
+ </div>
22
+ </section>
23
+
24
+ <h3 class="site-preview-heading">With Heading Level</h3>
25
+ <section class="usx-section">
26
+ <h3 class="usx-section__title">Nested program details</h3>
27
+ <div class="usx-section__content">
28
+ <p>Choose a heading level that fits the surrounding page structure.</p>
29
+ </div>
30
+ </section>
31
+
32
+ <h3 class="site-preview-heading">Heading H1</h3>
33
+ <section class="usx-section">
34
+ <h1 class="usx-section__title">Heading level 1</h1>
35
+ <div class="usx-section__content">
36
+ <p>This section uses an h1 heading. Choose the level that fits the page hierarchy.</p>
37
+ </div>
38
+ </section>
39
+
40
+ <h3 class="site-preview-heading">Heading H2</h3>
41
+ <section class="usx-section">
42
+ <h2 class="usx-section__title">Heading level 2</h2>
43
+ <div class="usx-section__content">
44
+ <p>This section uses an h2 heading. Choose the level that fits the page hierarchy.</p>
45
+ </div>
46
+ </section>
47
+
48
+ <h3 class="site-preview-heading">Heading H3</h3>
49
+ <section class="usx-section">
50
+ <h3 class="usx-section__title">Heading level 3</h3>
51
+ <div class="usx-section__content">
52
+ <p>This section uses an h3 heading. Choose the level that fits the page hierarchy.</p>
53
+ </div>
54
+ </section>
55
+
56
+ <h3 class="site-preview-heading">Heading H4</h3>
57
+ <section class="usx-section">
58
+ <h4 class="usx-section__title">Heading level 4</h4>
59
+ <div class="usx-section__content">
60
+ <p>This section uses an h4 heading. Choose the level that fits the page hierarchy.</p>
61
+ </div>
62
+ </section>
63
+
64
+ <h3 class="site-preview-heading">Heading H5</h3>
65
+ <section class="usx-section">
66
+ <h5 class="usx-section__title">Heading level 5</h5>
67
+ <div class="usx-section__content">
68
+ <p>This section uses an h5 heading. Choose the level that fits the page hierarchy.</p>
69
+ </div>
70
+ </section>
71
+
72
+ <h3 class="site-preview-heading">Heading H6</h3>
73
+ <section class="usx-section">
74
+ <h6 class="usx-section__title">Heading level 6</h6>
75
+ <div class="usx-section__content">
76
+ <p>This section uses an h6 heading. Choose the level that fits the page hierarchy.</p>
77
+ </div>
16
78
  </section>