@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.
- package/dist/index.cjs +231 -98
- package/dist/index.js +231 -98
- package/package.json +5 -5
- package/src/components/accordion/accordion.html +596 -291
- package/src/components/alert/alert.html +112 -148
- package/src/components/attribution/attribution.html +50 -21
- package/src/components/avatar/avatar.html +86 -51
- package/src/components/breadcrumb/breadcrumb.html +45 -66
- package/src/components/button/button.html +363 -226
- package/src/components/callout/Callout.tsx +1 -2
- package/src/components/callout/callout.django.html +2 -2
- package/src/components/callout/callout.html +0 -5
- package/src/components/callout/config.json +1 -5
- package/src/components/card/Card.tsx +6 -3
- package/src/components/card/card.django.html +2 -2
- package/src/components/card/card.html +1032 -35
- package/src/components/card/config.json +6 -2
- package/src/components/card-group/card-group.html +388 -95
- package/src/components/carousel/Carousel.tsx +42 -71
- package/src/components/carousel/carousel.django.html +22 -46
- package/src/components/carousel/carousel.html +715 -32
- package/src/components/carousel/config.json +25 -12
- package/src/components/character-count/character-count.html +231 -26
- package/src/components/checkbox/checkbox.html +313 -241
- package/src/components/checkbox-group/checkbox-group.html +346 -26
- package/src/components/clickable/clickable.html +168 -83
- package/src/components/code/Code.tsx +4 -3
- package/src/components/code/code.django.html +1 -1
- package/src/components/code/config.json +4 -0
- package/src/components/collection/collection.html +203 -379
- package/src/components/combobox/combobox.html +21 -9
- package/src/components/container/container.html +2616 -80
- package/src/components/copy-to-clipboard/copy-to-clipboard.html +48 -20
- package/src/components/details/Details.tsx +69 -0
- package/src/components/details/config.json +73 -0
- package/src/components/details/details.django.html +7 -0
- package/src/components/details/details.html +186 -0
- package/src/components/error-message/error-message.html +15 -2
- package/src/components/error-page/ErrorPage.tsx +169 -0
- package/src/components/error-page/config.json +152 -0
- package/src/components/error-page/error-page.django.html +80 -0
- package/src/components/error-page/error-page.html +437 -0
- package/src/components/eyebrow/eyebrow.html +8 -4
- package/src/components/fieldset/fieldset.html +33 -7
- package/src/components/file-input/file-input.html +310 -31
- package/src/components/file-list/file-list.html +191 -7
- package/src/components/footer/footer.html +611 -232
- package/src/components/header/header.html +2553 -611
- package/src/components/hero/hero.html +300 -38
- package/src/components/hint/hint.html +7 -2
- package/src/components/identifier/identifier.html +483 -255
- package/src/components/image/Image.tsx +2 -2
- package/src/components/image/image.django.html +4 -10
- package/src/components/image/image.html +144 -29
- package/src/components/indicator/indicator.html +25 -23
- package/src/components/label/label.html +15 -16
- package/src/components/language-selector/language-selector.html +74 -25
- package/src/components/layout/layout.html +991 -21
- package/src/components/legend/legend.html +10 -9
- package/src/components/list/list.html +45 -25
- package/src/components/page/Page.tsx +15 -2
- package/src/components/page/config.json +13 -1
- package/src/components/page/page.django.html +2 -2
- package/src/components/page/page.html +29 -8
- package/src/components/pagination/pagination.html +907 -305
- package/src/components/prose/prose.html +244 -85
- package/src/components/quote/Quote.tsx +1 -1
- package/src/components/quote/config.json +1 -2
- package/src/components/quote/quote.html +2 -7
- package/src/components/radio-buttons/radio-buttons.html +623 -127
- package/src/components/required/required.html +3 -4
- package/src/components/search/search.html +336 -54
- package/src/components/section/section.html +73 -11
- package/src/components/select/select.html +112 -58
- package/src/components/skipnav/skipnav.html +40 -1
- package/src/components/spinner/spinner.html +143 -23
- package/src/components/step-indicator/step-indicator.html +26 -68
- package/src/components/swap/swap.html +99 -154
- package/src/components/table/table.html +2168 -988
- package/src/components/tag/tag.html +73 -17
- package/src/components/task-list/task-list.html +252 -15
- package/src/components/theme-picker/theme-picker.html +26 -8
- package/src/components/toggle/toggle.html +64 -5
- package/src/index.js +2 -0
|
@@ -1,115 +1,200 @@
|
|
|
1
1
|
<h3 class="site-preview-heading">Single Clickable</h3>
|
|
2
|
-
<a class="usx-clickable display-flex flex-column padding-2 border" href="https://google.com"
|
|
3
|
-
Everything taking up space in this box is clickable, but only the text below
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
</a>
|
|
2
|
+
<a class="usx-clickable display-flex flex-column padding-2 border" href="https://google.com"
|
|
3
|
+
>Everything taking up space in this box is clickable, but only the text below appears as a
|
|
4
|
+
link.<br /><span class="usx-clickable__link">I look clickable</span></a
|
|
5
|
+
>
|
|
7
6
|
|
|
8
7
|
<h3 class="site-preview-heading margin-top-5">Multiple Clickables</h3>
|
|
9
|
-
<div class="grid-row grid-gap-6 bg-
|
|
8
|
+
<div class="grid-row grid-gap-6 bg-surface-2 padding-2">
|
|
10
9
|
<div class="grid-col-12 display-flex flex-justify-center tablet:grid-col-4">
|
|
11
|
-
<a
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</div>
|
|
15
|
-
<span class="usx-clickable__link">Choose this door</span
|
|
16
|
-
|
|
10
|
+
<a
|
|
11
|
+
class="usx-clickable display-flex padding-1 flex-column flex-align-center"
|
|
12
|
+
href="https://google.com"
|
|
13
|
+
><div class="font-heading-2xl text-secondary text-center">#1</div>
|
|
14
|
+
<span class="usx-clickable__link">Choose this door</span></a
|
|
15
|
+
>
|
|
17
16
|
</div>
|
|
18
17
|
<div class="grid-col-12 display-flex flex-justify-center tablet:grid-col-4">
|
|
19
|
-
<a
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</div>
|
|
23
|
-
<span class="usx-clickable__link">Choose this door</span
|
|
24
|
-
|
|
18
|
+
<a
|
|
19
|
+
class="usx-clickable display-flex padding-1 flex-column flex-align-center"
|
|
20
|
+
href="https://google.com"
|
|
21
|
+
><div class="font-heading-2xl text-secondary text-center">#2</div>
|
|
22
|
+
<span class="usx-clickable__link">Choose this door</span></a
|
|
23
|
+
>
|
|
25
24
|
</div>
|
|
26
25
|
<div class="grid-col-12 display-flex flex-justify-center tablet:grid-col-4">
|
|
27
|
-
<a
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</div>
|
|
31
|
-
<span class="usx-clickable__link">Choose this door</span
|
|
32
|
-
|
|
26
|
+
<a
|
|
27
|
+
class="usx-clickable display-flex padding-1 flex-column flex-align-center"
|
|
28
|
+
href="https://google.com"
|
|
29
|
+
><div class="font-heading-2xl text-secondary text-center">#3</div>
|
|
30
|
+
<span class="usx-clickable__link">Choose this door</span></a
|
|
31
|
+
>
|
|
33
32
|
</div>
|
|
34
33
|
</div>
|
|
35
34
|
|
|
36
35
|
<h3 class="site-preview-heading margin-top-5">With Color Change</h3>
|
|
37
|
-
<div class="grid-row grid-gap-6 bg-
|
|
36
|
+
<div class="grid-row grid-gap-6 bg-surface-2 padding-2">
|
|
38
37
|
<div class="grid-col-12 display-flex flex-justify-center tablet:grid-col-4">
|
|
39
|
-
<a class="usx-clickable display-flex flex-align-center" href="https://google.com"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
<a class="usx-clickable display-flex flex-align-center" href="https://google.com"
|
|
39
|
+
><span class="usx-clickable__color-on-hover"
|
|
40
|
+
><svg
|
|
41
|
+
class="usa-icon usa-icon--size-3"
|
|
42
|
+
aria-hidden="true"
|
|
43
|
+
aria-label="tornado icon"
|
|
44
|
+
focusable="false"
|
|
45
|
+
role="img"
|
|
46
|
+
>
|
|
47
|
+
<use href="/img/sprite.svg#tornado"></use></svg></span
|
|
48
|
+
><span class="usx-clickable__link margin-left-1">Auntie Em!</span></a
|
|
49
|
+
>
|
|
45
50
|
</div>
|
|
46
|
-
<div
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
<div
|
|
52
|
+
class="grid-col-12 display-flex flex-justify-center margin-top-2 tablet:margin-top-0 tablet:grid-col-4"
|
|
53
|
+
>
|
|
54
|
+
<a class="usx-clickable display-flex flex-align-center" href="https://google.com"
|
|
55
|
+
><span class="usx-clickable__color-on-hover"
|
|
56
|
+
><svg
|
|
57
|
+
class="usa-icon usa-icon--size-3"
|
|
58
|
+
aria-hidden="true"
|
|
59
|
+
aria-label="my_location icon"
|
|
60
|
+
focusable="false"
|
|
61
|
+
role="img"
|
|
62
|
+
>
|
|
63
|
+
<use href="/img/sprite.svg#my_location"></use></svg></span
|
|
64
|
+
><span class="usx-clickable__link margin-left-1">We're not in Kansas anymore</span></a
|
|
65
|
+
>
|
|
53
66
|
</div>
|
|
54
|
-
<div
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
67
|
+
<div
|
|
68
|
+
class="grid-col-12 display-flex flex-justify-center margin-top-2 tablet:margin-top-0 tablet:grid-col-4"
|
|
69
|
+
>
|
|
70
|
+
<a class="usx-clickable display-flex flex-align-center" href="https://google.com"
|
|
71
|
+
><span class="usx-clickable__color-on-hover"
|
|
72
|
+
><svg
|
|
73
|
+
class="usa-icon usa-icon--size-3"
|
|
74
|
+
aria-hidden="true"
|
|
75
|
+
aria-label="pets icon"
|
|
76
|
+
focusable="false"
|
|
77
|
+
role="img"
|
|
78
|
+
>
|
|
79
|
+
<use href="/img/sprite.svg#pets"></use></svg></span
|
|
80
|
+
><span class="usx-clickable__link margin-left-1">Oh, Toto!</span></a
|
|
81
|
+
>
|
|
61
82
|
</div>
|
|
62
83
|
</div>
|
|
63
84
|
|
|
64
|
-
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
85
|
+
<h3 class="site-preview-heading margin-top-5">Read John's Story CTA</h3>
|
|
86
|
+
<a
|
|
87
|
+
class="usx-clickable display-flex flex-row flex-align-center margin-1 usx-width-fit"
|
|
88
|
+
href="https://google.com"
|
|
89
|
+
><span
|
|
90
|
+
class="usx-clickable__bg-color-on-hover usx-circle bg-black text-white display-flex flex-align-center flex-justify-center width-4 height-4"
|
|
91
|
+
><svg
|
|
92
|
+
class="usa-icon usa-icon--size-3"
|
|
93
|
+
aria-hidden="true"
|
|
94
|
+
aria-label="arrow_forward icon"
|
|
95
|
+
focusable="false"
|
|
96
|
+
role="img"
|
|
97
|
+
>
|
|
98
|
+
<use href="/img/sprite.svg#arrow_forward"></use></svg></span
|
|
99
|
+
><span class="usx-clickable__link margin-left-1">Read John's Story</span></a
|
|
100
|
+
>
|
|
74
101
|
|
|
75
102
|
<h3 class="site-preview-heading margin-top-5">Clickable Quote</h3>
|
|
76
|
-
<a class="usx-clickable display-block maxw-tablet" href="https://google.com"
|
|
77
|
-
|
|
78
|
-
<div class="usx-callout usx-callout--vertical border-
|
|
103
|
+
<a class="usx-clickable display-block maxw-tablet" href="https://google.com"
|
|
104
|
+
><div class="usx-quote usx-quote--vertical">
|
|
105
|
+
<div class="usx-callout usx-callout--vertical border-info usx-callout--big">
|
|
79
106
|
<figure class="usx-quote__body">
|
|
80
|
-
<blockquote class="usx-quote__content font-serif-lg"
|
|
107
|
+
<blockquote class="usx-quote__content font-serif-lg">
|
|
108
|
+
❝We found this wand shop that had the best wands, and we were like, "We have to go here!"
|
|
109
|
+
So we went there.❞
|
|
110
|
+
</blockquote>
|
|
81
111
|
<figcaption class="usx-quote__attribution">
|
|
82
112
|
<div class="usx-attribution">
|
|
83
|
-
<span class="usx-attribution__content"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
113
|
+
<span class="usx-attribution__content"
|
|
114
|
+
><span class="usx-attribution__primary">John Doe</span
|
|
115
|
+
><span class="usx-attribution__secondary"
|
|
116
|
+
>Under Secretary for the Department of Magic and Mystical Affairs</span
|
|
117
|
+
></span
|
|
118
|
+
>
|
|
87
119
|
</div>
|
|
88
120
|
</figcaption>
|
|
89
121
|
</figure>
|
|
90
122
|
</div>
|
|
91
123
|
</div>
|
|
92
|
-
<
|
|
93
|
-
<span
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
124
|
+
<div class="display-flex flex-align-center margin-top-2">
|
|
125
|
+
<span
|
|
126
|
+
class="usx-clickable__bg-color-on-hover usx-circle bg-black text-white display-flex flex-align-center flex-justify-center width-4 height-4"
|
|
127
|
+
><svg
|
|
128
|
+
class="usa-icon usa-icon--size-3"
|
|
129
|
+
aria-hidden="true"
|
|
130
|
+
aria-label="arrow_forward icon"
|
|
131
|
+
focusable="false"
|
|
132
|
+
role="img"
|
|
133
|
+
>
|
|
134
|
+
<use href="/img/sprite.svg#arrow_forward"></use></svg></span
|
|
135
|
+
><span class="usx-clickable__link margin-left-1">Read John's Story</span>
|
|
136
|
+
</div></a
|
|
137
|
+
>
|
|
138
|
+
|
|
139
|
+
<h3 class="site-preview-heading margin-top-5">Clickable Quote v2 (Manual Markup)</h3>
|
|
140
|
+
<a class="usx-clickable display-block maxw-tablet" href="https://google.com"
|
|
141
|
+
><div class="usx-callout usx-callout--vertical border-info usx-callout--big usx-quote">
|
|
142
|
+
<figure class="usx-quote__body">
|
|
143
|
+
<blockquote class="usx-quote__content font-serif-lg">
|
|
144
|
+
❝We found this wand shop that had the best wands, and we were like, "We have to go here!" So
|
|
145
|
+
we went there.❞
|
|
146
|
+
</blockquote>
|
|
147
|
+
<figcaption class="usx-quote__attribution">
|
|
148
|
+
<div class="usx-attribution">
|
|
149
|
+
<span class="usx-attribution__content"
|
|
150
|
+
><span class="usx-attribution__primary">John Doe</span
|
|
151
|
+
><span class="usx-attribution__secondary"
|
|
152
|
+
>Under Secretary for the Department of Magic and Mystical Affairs</span
|
|
153
|
+
></span
|
|
154
|
+
>
|
|
155
|
+
</div>
|
|
156
|
+
</figcaption>
|
|
157
|
+
<div class="display-flex flex-align-center margin-top-2">
|
|
158
|
+
<span
|
|
159
|
+
class="usx-clickable__bg-color-on-hover usx-circle bg-black text-white display-flex flex-align-center flex-justify-center width-4 height-4"
|
|
160
|
+
><svg
|
|
161
|
+
class="usa-icon usa-icon--size-3"
|
|
162
|
+
aria-hidden="true"
|
|
163
|
+
aria-label="arrow_forward icon"
|
|
164
|
+
focusable="false"
|
|
165
|
+
role="img"
|
|
166
|
+
>
|
|
167
|
+
<use href="/img/sprite.svg#arrow_forward"></use></svg></span
|
|
168
|
+
><span class="usx-clickable__link margin-left-1">Read John's Story</span>
|
|
169
|
+
</div>
|
|
170
|
+
</figure>
|
|
171
|
+
</div></a
|
|
172
|
+
>
|
|
99
173
|
|
|
100
|
-
<
|
|
174
|
+
<h3 class="site-preview-heading margin-top-5">All Classes on One Element</h3>
|
|
175
|
+
<a class="usx-clickable text-primary-lightest" href="https://google.com"
|
|
176
|
+
><span class="usx-clickable__link usx-clickable__color-on-hover usx-clickable__bg-color-on-hover"
|
|
177
|
+
>Background and text changes color.</span
|
|
178
|
+
></a
|
|
179
|
+
>
|
|
101
180
|
|
|
102
|
-
<h3 class="site-preview-heading margin-top-5">
|
|
103
|
-
<a class="usx-clickable text-primary-lightest" href="https://google.com"
|
|
104
|
-
|
|
105
|
-
|
|
181
|
+
<h3 class="site-preview-heading margin-top-5">Color Classes Within Link</h3>
|
|
182
|
+
<a class="usx-clickable text-primary-lightest" href="https://google.com"
|
|
183
|
+
><span class="usx-clickable__link"
|
|
184
|
+
><span class="usx-clickable__bg-color-on-hover">Background changes color.</span
|
|
185
|
+
><span class="usx-clickable__color-on-hover"> Text changes color.</span> No change to background
|
|
186
|
+
or color.</span
|
|
187
|
+
></a
|
|
188
|
+
>
|
|
106
189
|
|
|
107
|
-
<h3 class="site-preview-heading margin-top-5">Color
|
|
108
|
-
<a class="usx-clickable text-primary-lightest" href="https://google.com"
|
|
109
|
-
|
|
110
|
-
</
|
|
190
|
+
<h3 class="site-preview-heading margin-top-5">Color Classes Outside Link</h3>
|
|
191
|
+
<a class="usx-clickable text-primary-lightest" href="https://google.com"
|
|
192
|
+
><span class="usx-clickable__bg-color-on-hover">Background changes color.</span
|
|
193
|
+
><span class="usx-clickable__color-on-hover"> Text changes color. </span
|
|
194
|
+
><span class="usx-clickable__link">No change to background or color.</span></a
|
|
195
|
+
>
|
|
111
196
|
|
|
112
|
-
<h3 class="site-preview-heading margin-top-5">
|
|
113
|
-
<
|
|
114
|
-
<span class="usx-
|
|
115
|
-
</
|
|
197
|
+
<h3 class="site-preview-heading margin-top-5">Button Surface</h3>
|
|
198
|
+
<button type="button" class="usx-clickable usa-button usx-button usx-button--ghost">
|
|
199
|
+
<span class="usx-clickable__link">Action-style clickable (button mode)</span>
|
|
200
|
+
</button>
|
|
@@ -14,16 +14,17 @@ export interface CodeProps {
|
|
|
14
14
|
copyText?: string | null;
|
|
15
15
|
staticBaseUrl?: string;
|
|
16
16
|
className?: string;
|
|
17
|
+
contentClassName?: string;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
export default function Code({ lines = [], allowHtml = false, copyText = null, staticBaseUrl, className = '' }: CodeProps) {
|
|
20
|
+
export default function Code({ lines = [], allowHtml = false, copyText = null, staticBaseUrl, className = '', contentClassName = '' }: CodeProps) {
|
|
20
21
|
return (
|
|
21
22
|
<div className={ClassNames('usx-mockup-code', className)}>
|
|
22
|
-
<div className=
|
|
23
|
+
<div className={ClassNames('usx-mockup-code__content', contentClassName)}>
|
|
23
24
|
{lines.map((line, i) => (
|
|
24
25
|
<pre
|
|
25
26
|
key={i}
|
|
26
|
-
{
|
|
27
|
+
data-prefix={line.prefix != null ? line.prefix : undefined}
|
|
27
28
|
className={line.className || undefined}
|
|
28
29
|
>
|
|
29
30
|
{allowHtml ? <code dangerouslySetInnerHTML={{ __html: line.code }} /> : <code>{line.code}</code>}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{# Django template for Code #}
|
|
2
2
|
{% load components %}
|
|
3
3
|
<div class="usx-mockup-code{% if className %} {{ className }}{% endif %}">
|
|
4
|
-
<div class="usx-mockup-code__content">
|
|
4
|
+
<div class="usx-mockup-code__content{% if contentClassName %} {{ contentClassName }}{% endif %}">
|
|
5
5
|
{% for line in lines %}
|
|
6
6
|
<pre
|
|
7
7
|
{% if line.prefix %} data-prefix="{{ line.prefix }}"{% endif %}{% if line.className %} class="{{ line.className }}"{% endif %}
|
|
@@ -44,6 +44,10 @@
|
|
|
44
44
|
"className": {
|
|
45
45
|
"type": "string",
|
|
46
46
|
"description": "Additional CSS classes to apply to the wrapper div."
|
|
47
|
+
},
|
|
48
|
+
"contentClassName": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Additional CSS classes to apply to the content wrapper div inside the component."
|
|
47
51
|
}
|
|
48
52
|
}
|
|
49
53
|
}
|