@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,91 +1,250 @@
1
+ <h3 class="site-preview-heading">Default</h3>
1
2
  <div class="usa-prose usx-prose">
2
- <h1>Page Heading</h1>
3
- <p>
4
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit auctor dui, sed efficitur
5
- ligula. Donec a semper dui.
6
- </p>
7
- <h2>Section Heading</h2>
8
- <h3>Section of the page</h3>
9
- <p>
10
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit auctor dui, sed efficitur
11
- ligula. Donec a semper dui. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit auctor dui, sed efficitur
12
- ligula. Donec a semper dui.
13
- </p>
14
- <h4>Subsection of the page</h4>
15
- <p>
16
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit auctor dui, sed efficitur
17
- ligula. Donec a semper dui. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
18
- </p>
19
- <h5>Subsection of the page</h5>
20
- <p>
21
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit auctor dui, sed efficitur ligula.
22
- </p>
23
- <ul>
3
+ <h1>Page Heading</h1>
4
+ <p>
5
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit auctor dui, sed
6
+ efficitur ligula. Donec a semper <a href="#">dui</a> lorem
7
+ <a class="usx-no-visited" href="#somethingelse">another link</a>, and
8
+ <a class="usa-link usx-link usa-link--external" href="https://google.com">a third link</a>.
9
+ </p>
10
+ <h2>Section Heading</h2>
11
+ <h3>Section of the page</h3>
12
+ <p>
13
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit auctor dui, sed
14
+ efficitur ligula. Donec a semper dui. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
15
+ Donec suscipit auctor dui, sed efficitur ligula. Donec a semper dui.
16
+ </p>
17
+ <h4>Subsection of the page</h4>
18
+ <p>
19
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit auctor dui, sed
20
+ efficitur ligula. Donec a semper dui. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
21
+ </p>
22
+ <h5>Subsection of the page</h5>
23
+ <p>
24
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit auctor dui, sed
25
+ efficitur ligula.
26
+ </p>
27
+ <ul>
28
+ <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
29
+ <li>Donec suscipit auctor dui, sed efficitur ligula.</li>
30
+ <li>
31
+ Donec a semper dui:
32
+ <ol>
24
33
  <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
25
- <li>Donec suscipit auctor dui, sed efficitur ligula.</li>
26
- <li>Donec a semper dui:
27
- <ol>
28
- <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
29
- <li>Donec suscipit auctor dui, sed efficitur ligula:
30
- <ul>
31
- <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
32
- <li>Donec suscipit auctor dui, sed efficitur ligula.</li>
33
- <li>Donec a semper dui.</li>
34
- </ul>
35
- </li>
36
- <li>Donec a semper dui.</li>
37
- </ol>
34
+ <li>
35
+ Donec suscipit auctor dui, sed efficitur ligula:
36
+ <ul>
37
+ <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
38
+ <li>Donec suscipit auctor dui, sed efficitur ligula.</li>
39
+ <li>Donec a semper dui.</li>
40
+ </ul>
38
41
  </li>
39
- </ul>
40
- <p>
41
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit auctor dui, sed efficitur
42
- ligula. Donec a semper dui.
43
- </p>
44
- <ol>
42
+ <li>Donec a semper dui.</li>
43
+ </ol>
44
+ </li>
45
+ </ul>
46
+ <p>
47
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit auctor dui, sed
48
+ efficitur ligula. Donec a semper dui.
49
+ </p>
50
+ <ol>
51
+ <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
52
+ <li>Donec suscipit auctor dui, sed efficitur ligula.</li>
53
+ <li>
54
+ Donec a semper dui:
55
+ <ul>
45
56
  <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
46
- <li>Donec suscipit auctor dui, sed efficitur ligula.</li>
47
- <li>Donec a semper dui:
48
- <ul>
49
- <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
50
- <li>Donec suscipit auctor dui, sed efficitur ligula:
51
- <ol>
52
- <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
53
- <li>Donec suscipit auctor dui, sed efficitur ligula.</li>
54
- <li>Donec a semper dui.</li>
55
- </ol>
56
- </li>
57
- <li>Donec a semper dui.</li>
58
- </ul>
57
+ <li>
58
+ Donec suscipit auctor dui, sed efficitur ligula:
59
+ <ol>
60
+ <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
61
+ <li>Donec suscipit auctor dui, sed efficitur ligula.</li>
62
+ <li>Donec a semper dui.</li>
63
+ </ol>
59
64
  </li>
60
- </ol>
61
- <table>
62
- <caption>
63
- Table caption
64
- </caption>
65
- <thead>
66
- <tr>
67
- <th>Column 1</th>
68
- <th>Column 2</th>
69
- <th>Column 3</th>
70
- </tr>
71
- </thead>
72
- <tbody>
73
- <tr>
74
- <td>Row 1, Cell 1</td>
75
- <td>Row 1, Cell 2</td>
76
- <td>Row 1, Cell 3</td>
77
- </tr>
78
- <tr>
79
- <td>Row 2, Cell 1</td>
80
- <td>Row 2, Cell 2</td>
81
- <td>Row 2, Cell 3</td>
82
- </tr>
83
- <tr>
84
- <td>Row 3, Cell 1</td>
85
- <td>Row 3, Cell 2</td>
86
- <td>Row 3, Cell 3</td>
87
- </tr>
88
- </tbody>
89
- </table>
65
+ <li>Donec a semper dui.</li>
66
+ </ul>
67
+ </li>
68
+ </ol>
69
+ <table>
70
+ <caption>
71
+ Table caption
72
+ </caption>
73
+ <thead>
74
+ <tr>
75
+ <th>Column 1</th>
76
+ <th>Column 2</th>
77
+ <th>Column 3</th>
78
+ </tr>
79
+ </thead>
80
+ <tbody>
81
+ <tr>
82
+ <td>Row 1, Cell 1</td>
83
+ <td>Row 1, Cell 2</td>
84
+ <td>Row 1, Cell 3</td>
85
+ </tr>
86
+ <tr>
87
+ <td>Row 2, Cell 1</td>
88
+ <td>Row 2, Cell 2</td>
89
+ <td>Row 2, Cell 3</td>
90
+ </tr>
91
+ <tr>
92
+ <td>Row 3, Cell 1</td>
93
+ <td>Row 3, Cell 2</td>
94
+ <td>Row 3, Cell 3</td>
95
+ </tr>
96
+ </tbody>
97
+ </table>
98
+ </div>
90
99
 
91
- </div>
100
+ <h3 class="site-preview-heading">Prose With Div</h3>
101
+ <div class="usa-prose usx-prose">
102
+ <h1>Page Heading</h1>
103
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
104
+ <ul>
105
+ <li>
106
+ Donec a semper dui:
107
+ <ol>
108
+ <li>
109
+ Donec suscipit auctor dui, sed efficitur ligula:
110
+ <ul>
111
+ <li>Donec a semper dui.</li>
112
+ </ul>
113
+ </li>
114
+ </ol>
115
+ </li>
116
+ </ul>
117
+
118
+ <table>
119
+ <thead>
120
+ <tr>
121
+ <th>Column 1</th>
122
+ <th>Column 2</th>
123
+ </tr>
124
+ </thead>
125
+ <tbody>
126
+ <tr>
127
+ <td>Row 1, Cell 1</td>
128
+ <td>Row 1, Cell 2</td>
129
+ </tr>
130
+ <tr>
131
+ <td>Row 2, Cell 1</td>
132
+ <td>Row 2, Cell 2</td>
133
+ </tr>
134
+ </tbody>
135
+ </table>
136
+ </div>
137
+
138
+ <h3 class="site-preview-heading">Prose With Article</h3>
139
+ <article class="usa-prose usx-prose">
140
+ <h1>Page Heading</h1>
141
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
142
+ <ul>
143
+ <li>
144
+ Donec a semper dui:
145
+ <ol>
146
+ <li>
147
+ Donec suscipit auctor dui, sed efficitur ligula:
148
+ <ul>
149
+ <li>Donec a semper dui.</li>
150
+ </ul>
151
+ </li>
152
+ </ol>
153
+ </li>
154
+ </ul>
155
+
156
+ <table>
157
+ <thead>
158
+ <tr>
159
+ <th>Column 1</th>
160
+ <th>Column 2</th>
161
+ </tr>
162
+ </thead>
163
+ <tbody>
164
+ <tr>
165
+ <td>Row 1, Cell 1</td>
166
+ <td>Row 1, Cell 2</td>
167
+ </tr>
168
+ <tr>
169
+ <td>Row 2, Cell 1</td>
170
+ <td>Row 2, Cell 2</td>
171
+ </tr>
172
+ </tbody>
173
+ </table>
174
+ </article>
175
+
176
+ <h3 class="site-preview-heading">Prose With Section</h3>
177
+ <section class="usa-prose usx-prose">
178
+ <h1>Page Heading</h1>
179
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
180
+ <ul>
181
+ <li>
182
+ Donec a semper dui:
183
+ <ol>
184
+ <li>
185
+ Donec suscipit auctor dui, sed efficitur ligula:
186
+ <ul>
187
+ <li>Donec a semper dui.</li>
188
+ </ul>
189
+ </li>
190
+ </ol>
191
+ </li>
192
+ </ul>
193
+
194
+ <table>
195
+ <thead>
196
+ <tr>
197
+ <th>Column 1</th>
198
+ <th>Column 2</th>
199
+ </tr>
200
+ </thead>
201
+ <tbody>
202
+ <tr>
203
+ <td>Row 1, Cell 1</td>
204
+ <td>Row 1, Cell 2</td>
205
+ </tr>
206
+ <tr>
207
+ <td>Row 2, Cell 1</td>
208
+ <td>Row 2, Cell 2</td>
209
+ </tr>
210
+ </tbody>
211
+ </table>
212
+ </section>
213
+
214
+ <h3 class="site-preview-heading">Prose With Main</h3>
215
+ <main class="usa-prose usx-prose">
216
+ <h1>Page Heading</h1>
217
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
218
+ <ul>
219
+ <li>
220
+ Donec a semper dui:
221
+ <ol>
222
+ <li>
223
+ Donec suscipit auctor dui, sed efficitur ligula:
224
+ <ul>
225
+ <li>Donec a semper dui.</li>
226
+ </ul>
227
+ </li>
228
+ </ol>
229
+ </li>
230
+ </ul>
231
+
232
+ <table>
233
+ <thead>
234
+ <tr>
235
+ <th>Column 1</th>
236
+ <th>Column 2</th>
237
+ </tr>
238
+ </thead>
239
+ <tbody>
240
+ <tr>
241
+ <td>Row 1, Cell 1</td>
242
+ <td>Row 1, Cell 2</td>
243
+ </tr>
244
+ <tr>
245
+ <td>Row 2, Cell 1</td>
246
+ <td>Row 2, Cell 2</td>
247
+ </tr>
248
+ </tbody>
249
+ </table>
250
+ </main>
@@ -7,7 +7,7 @@ import Link, { type LinkProps } from '../link/Link';
7
7
 
8
8
  export interface QuoteProps extends Omit<React.HTMLAttributes<HTMLElement>, 'content'> {
9
9
  className?: string;
10
- calloutProps?: Omit<CalloutProps, 'element' | 'children' | 'content' | 'cite'>;
10
+ calloutProps?: Omit<CalloutProps, 'element' | 'children' | 'content'>;
11
11
  attributionProps?: AttributionProps;
12
12
  children?: React.ReactNode;
13
13
  content?: React.ReactNode;
@@ -14,8 +14,7 @@
14
14
  "omit": [
15
15
  "element",
16
16
  "children",
17
- "content",
18
- "cite"
17
+ "content"
19
18
  ]
20
19
  },
21
20
  "attributionProps": {
@@ -6,12 +6,12 @@
6
6
 
7
7
  <section class="margin-bottom-4">
8
8
  <h2>With Attribution</h2>
9
- <div class="usx-quote"><svg class="usa-icon usa-icon--size-4 usx-quote__icon" aria-hidden="true" aria-label="format_quote icon" focusable="false" role="img"><use href="/img/sprite.svg#format_quote"></use></svg><div class="usx-callout usx-callout--big"><figure class="usx-quote__body"><blockquote class="usx-quote__content">Good services start with understanding the people who use them.</blockquote><figcaption class="usx-quote__attribution"><div class="usx-attribution"><span class="usx-attribution__content"><span class="usx-attribution__primary">Jane Doe</span><span class="usx-attribution__secondary">Research director</span></span></div></figcaption></figure></div></div>
9
+ <div class="usx-quote"><svg class="usa-icon usa-icon--size-4 usx-quote__icon" aria-hidden="true" aria-label="format_quote icon" focusable="false" role="img"><use href="/img/sprite.svg#format_quote"></use></svg><div class="usx-callout border-info usx-callout--big"><figure class="usx-quote__body"><blockquote class="usx-quote__content font-serif-lg text-italic">Good services start with understanding the people who use them.</blockquote><figcaption class="usx-quote__attribution"><div class="usx-attribution"><span class="usx-attribution__content"><span class="usx-attribution__primary">Jane Doe</span><span class="usx-attribution__secondary">Research director</span></span></div></figcaption></figure></div></div>
10
10
  </section>
11
11
 
12
12
  <section class="margin-bottom-4">
13
13
  <h2>With Avatar</h2>
14
- <div class="usx-quote"><svg class="usa-icon usa-icon--size-4 usx-quote__icon" aria-hidden="true" aria-label="format_quote icon" focusable="false" role="img"><use href="/img/sprite.svg#format_quote"></use></svg><div class="usx-callout border-info usx-callout--big"><figure class="usx-quote__body"><blockquote class="usx-quote__content">Good services start with understanding the people who use them.</blockquote><figcaption class="usx-quote__attribution"><div class="usx-attribution"><span class="usx-attribution__media"><a href="#" class="usx-avatar"><img class="usx-avatar__img usx-circle" src="./george_washington.png" alt="George Washington" role="img"/></a></span><span class="usx-attribution__content"><span class="usx-attribution__primary">Jane Doe</span><span class="usx-attribution__secondary">Research director</span></span></div></figcaption></figure></div></div>
14
+ <div class="usx-quote"><svg class="usa-icon usa-icon--size-4 usx-quote__icon" aria-hidden="true" aria-label="format_quote icon" focusable="false" role="img"><use href="/img/sprite.svg#format_quote"></use></svg><div class="usx-callout border-info usx-callout--big"><figure class="usx-quote__body"><blockquote class="usx-quote__content font-serif-lg text-italic">Good services start with understanding the people who use them.</blockquote><figcaption class="usx-quote__attribution"><div class="usx-attribution"><span class="usx-attribution__media"><a href="#" class="usx-avatar"><img class="usx-avatar__img usx-circle" src="./george_washington.png" alt="George Washington" role="img"/></a></span><span class="usx-attribution__content"><span class="usx-attribution__primary">Jane Doe</span><span class="usx-attribution__secondary">Research director</span></span></div></figcaption></figure></div></div>
15
15
  </section>
16
16
 
17
17
  <section class="margin-bottom-4">
@@ -24,11 +24,6 @@
24
24
  <div class="usx-quote"><svg class="usa-icon usa-icon--size-4 usx-quote__icon" aria-hidden="true" aria-label="format_quote icon" focusable="false" role="img"><use href="/img/sprite.svg#format_quote"></use></svg><div class="usx-callout border-primary usx-callout--indent-sm bg-base-lightest text-primary padding-y-2 padding-right-2"><figure class="usx-quote__body"><blockquote class="usx-quote__content">Good services start with understanding the people who use them.</blockquote><figcaption class="usx-quote__attribution"><div class="usx-attribution"><span class="usx-attribution__content"><span class="usx-attribution__primary">Jane Doe</span><span class="usx-attribution__secondary">Research director</span></span></div></figcaption></figure></div></div>
25
25
  </section>
26
26
 
27
- <section class="margin-bottom-4">
28
- <h2>Typography</h2>
29
- <div class="usx-quote maxw-tablet margin-y-2"><svg class="usa-icon usa-icon--size-4 usx-quote__icon" aria-hidden="true" aria-label="format_quote icon" focusable="false" role="img"><use href="/img/sprite.svg#format_quote"></use></svg><div class="usx-callout usx-callout--big"><figure class="usx-quote__body"><blockquote class="usx-quote__content font-serif-lg text-italic">Good services start with understanding the people who use them.</blockquote><figcaption class="usx-quote__attribution"><div class="usx-attribution font-sans-sm"><span class="usx-attribution__content"><span class="usx-attribution__primary">Jane Doe</span><span class="usx-attribution__secondary">Research director</span></span></div></figcaption></figure></div></div>
30
- </section>
31
-
32
27
  <section class="margin-bottom-4">
33
28
  <h2>With Source</h2>
34
29
  <div class="usx-quote"><svg class="usa-icon usa-icon--size-4 usx-quote__icon" aria-hidden="true" aria-label="format_quote icon" focusable="false" role="img"><use href="/img/sprite.svg#format_quote"></use></svg><div class="usx-callout usx-callout--big"><figure class="usx-quote__body"><blockquote class="usx-quote__content" cite="https://example.com/report">Good services start with understanding the people who use them.</blockquote><figcaption class="usx-quote__attribution"><cite><a href="https://example.com/report" class="usa-link usx-link usa-link--external font-sans-sm" target="_blank" rel="noreferrer noopener">Service research report</a></cite></figcaption></figure></div></div>