@solexllc/usx-react 0.6.1 → 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
|
@@ -90,8 +90,8 @@ export default function Image({
|
|
|
90
90
|
if (caption) {
|
|
91
91
|
return (
|
|
92
92
|
<figure className={classes} style={style}>
|
|
93
|
-
{imgElement}
|
|
94
|
-
<figcaption className={captionClasses}
|
|
93
|
+
{href ? <a href={href}>{imgElement}</a> : imgElement}
|
|
94
|
+
<figcaption className={captionClasses}>{caption}</figcaption>
|
|
95
95
|
</figure>
|
|
96
96
|
);
|
|
97
97
|
}
|
|
@@ -4,17 +4,10 @@
|
|
|
4
4
|
{# Props: src, alt, href, rounded, circular, objectFit, maxWidth, maxHeight, caption, hideCaption, className #}
|
|
5
5
|
{# For responsive images, src may be an object: { fallback, sources: [{ srcSet, media?, type?, sizes? }] } #}
|
|
6
6
|
|
|
7
|
-
{% comment %} Build shared values {% endcomment %}
|
|
8
|
-
{% with classes="usx-image"|add:" usx-image--rounded"|yesno:","|slice:"0" %}
|
|
9
|
-
{% endwith %}
|
|
10
|
-
|
|
11
|
-
{% comment %} Inline image element (string src or picture) {% endcomment %}
|
|
12
|
-
{% with img_style=""|add:"" %}
|
|
13
|
-
{% endwith %}
|
|
14
|
-
|
|
15
7
|
{% if caption %}
|
|
16
8
|
<figure class="usx-image{% if rounded %} usx-image--rounded{% endif %}{% if circular %} usx-image--circular{% endif %}{% if objectFit %} usx-object-fit-{{ objectFit }}{% endif %}{% if className %} {{ className }}{% endif %}"
|
|
17
9
|
{% if maxWidth or maxHeight %} style="{% if maxWidth %}max-width: {{ maxWidth }};{% if not maxHeight %} height: auto;{% endif %}{% endif %}{% if maxHeight %} max-height: {{ maxHeight }};{% if not maxWidth %} width: auto;{% endif %}{% endif %}"{% endif %}>
|
|
10
|
+
{% if href %}<a href="{{ href }}">{% endif %}
|
|
18
11
|
{% if src.fallback %}
|
|
19
12
|
<picture>
|
|
20
13
|
{% for source in src.sources %}
|
|
@@ -33,7 +26,8 @@
|
|
|
33
26
|
{% else %}
|
|
34
27
|
Image
|
|
35
28
|
{% endif %}
|
|
36
|
-
|
|
29
|
+
{% if href %}</a>{% endif %}
|
|
30
|
+
<figcaption class="usx-image--caption{% if hideCaption %} usa-sr-only{% endif %}">{{ caption }}</figcaption>
|
|
37
31
|
</figure>
|
|
38
32
|
{% else %}
|
|
39
33
|
{% if href %}<a href="{{ href }}"
|
|
@@ -61,4 +55,4 @@
|
|
|
61
55
|
Image
|
|
62
56
|
{% endif %}
|
|
63
57
|
{% if href %}</a>{% else %}</div>{% endif %}
|
|
64
|
-
{% endif %}
|
|
58
|
+
{% endif %}
|
|
@@ -1,53 +1,168 @@
|
|
|
1
|
-
<h3 class="site-preview-heading
|
|
1
|
+
<h3 class="site-preview-heading">Default</h3>
|
|
2
2
|
<div class="usx-image">
|
|
3
3
|
<img src="https://picsum.photos/600/400?random=1" alt="Example image 1" />
|
|
4
4
|
</div>
|
|
5
5
|
|
|
6
|
-
<h3 class="site-preview-heading
|
|
6
|
+
<h3 class="site-preview-heading">Rounded</h3>
|
|
7
7
|
<div class="usx-image usx-image--rounded">
|
|
8
8
|
<img src="https://picsum.photos/600/400?random=2" alt="Example image 2" />
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
|
-
<h3 class="site-preview-heading
|
|
11
|
+
<h3 class="site-preview-heading">Circular</h3>
|
|
12
12
|
<div class="usx-image usx-image--circular">
|
|
13
13
|
<img src="https://picsum.photos/600/400?random=3" alt="Example image 3" />
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
|
-
<h3 class="site-preview-heading
|
|
16
|
+
<h3 class="site-preview-heading">With Caption</h3>
|
|
17
17
|
<figure class="usx-image">
|
|
18
18
|
<img src="https://picsum.photos/600/400?random=10" alt="Example image 10" />
|
|
19
|
-
<figcaption class="usx-image--caption">
|
|
19
|
+
<figcaption class="usx-image--caption">
|
|
20
|
+
This is a caption describing the image above.
|
|
21
|
+
</figcaption>
|
|
20
22
|
</figure>
|
|
21
23
|
|
|
22
|
-
<h3 class="site-preview-heading
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</
|
|
30
|
-
</
|
|
24
|
+
<h3 class="site-preview-heading">With Linked Caption</h3>
|
|
25
|
+
<figure class="usx-image">
|
|
26
|
+
<a href="#image-details">
|
|
27
|
+
<img src="https://picsum.photos/600/400?random=20" alt="Example image 20" />
|
|
28
|
+
</a>
|
|
29
|
+
<figcaption class="usx-image--caption">
|
|
30
|
+
This is a caption describing the image above.
|
|
31
|
+
</figcaption>
|
|
32
|
+
</figure>
|
|
33
|
+
|
|
34
|
+
<h3 class="site-preview-heading">With Hidden Caption</h3>
|
|
35
|
+
<figure class="usx-image">
|
|
36
|
+
<img src="https://picsum.photos/600/400?random=11" alt="Example image 11" />
|
|
37
|
+
<figcaption class="usx-image--caption usa-sr-only">
|
|
38
|
+
This caption is visually hidden but accessible to screen readers.
|
|
39
|
+
</figcaption>
|
|
40
|
+
</figure>
|
|
31
41
|
|
|
32
|
-
<h3 class="site-preview-heading
|
|
33
|
-
<
|
|
42
|
+
<h3 class="site-preview-heading">Object Fit Cover</h3>
|
|
43
|
+
<figure class="usx-image usx-object-fit-cover">
|
|
34
44
|
<img src="https://picsum.photos/400/300?random=12" alt="Example image 12" />
|
|
35
|
-
|
|
45
|
+
<figcaption class="usx-image--caption">
|
|
46
|
+
This is a caption describing the image above.
|
|
47
|
+
</figcaption>
|
|
48
|
+
</figure>
|
|
49
|
+
|
|
50
|
+
<h3 class="site-preview-heading">Object Fit Contain</h3>
|
|
51
|
+
<figure class="usx-image usx-object-fit-contain">
|
|
52
|
+
<img src="https://picsum.photos/200/500?random=13" alt="Example image 13" />
|
|
53
|
+
<figcaption class="usx-image--caption">
|
|
54
|
+
This is a caption describing the image above.
|
|
55
|
+
</figcaption>
|
|
56
|
+
</figure>
|
|
57
|
+
|
|
58
|
+
<h3 class="site-preview-heading">Object Fit Fill</h3>
|
|
59
|
+
<figure class="usx-image usx-object-fit-fill">
|
|
60
|
+
<img src="https://picsum.photos/50/30?random=14" alt="Example image 14" />
|
|
61
|
+
<figcaption class="usx-image--caption">
|
|
62
|
+
This is a caption describing the image above.
|
|
63
|
+
</figcaption>
|
|
64
|
+
</figure>
|
|
36
65
|
|
|
37
|
-
<h3 class="site-preview-heading
|
|
38
|
-
<figure class="usx-image usx-
|
|
39
|
-
<img src="https://picsum.photos/
|
|
40
|
-
<figcaption class="usx-image--caption">
|
|
66
|
+
<h3 class="site-preview-heading">Object Fit None</h3>
|
|
67
|
+
<figure class="usx-image usx-object-fit-none">
|
|
68
|
+
<img src="https://picsum.photos/400/300?random=15" alt="Example image 15" />
|
|
69
|
+
<figcaption class="usx-image--caption">
|
|
70
|
+
This is a caption describing the image above.
|
|
71
|
+
</figcaption>
|
|
41
72
|
</figure>
|
|
42
73
|
|
|
43
|
-
<h3 class="site-preview-heading
|
|
44
|
-
<figure class="usx-image usx-
|
|
45
|
-
<img src="https://picsum.photos/
|
|
46
|
-
<figcaption class="usx-image--caption">
|
|
74
|
+
<h3 class="site-preview-heading">Object Fit Scale Down</h3>
|
|
75
|
+
<figure class="usx-image usx-object-fit-scale-down">
|
|
76
|
+
<img src="https://picsum.photos/1300/500?random=16" alt="Example image 16" />
|
|
77
|
+
<figcaption class="usx-image--caption">
|
|
78
|
+
This is a caption describing the image above.
|
|
79
|
+
</figcaption>
|
|
47
80
|
</figure>
|
|
48
81
|
|
|
49
|
-
<h3 class="site-preview-heading
|
|
82
|
+
<h3 class="site-preview-heading">With Max Width</h3>
|
|
83
|
+
<figure class="usx-image usx-object-fit-fill" style="max-width: 200px; height: auto">
|
|
84
|
+
<img
|
|
85
|
+
src="https://picsum.photos/600/400?random=17"
|
|
86
|
+
alt="Example image 17"
|
|
87
|
+
style="max-width: 200px; height: auto"
|
|
88
|
+
/>
|
|
89
|
+
<figcaption class="usx-image--caption">
|
|
90
|
+
This is a caption describing the image above.
|
|
91
|
+
</figcaption>
|
|
92
|
+
</figure>
|
|
93
|
+
|
|
94
|
+
<h3 class="site-preview-heading">With Max Height</h3>
|
|
95
|
+
<figure class="usx-image usx-object-fit-fill" style="max-height: 150px; width: auto">
|
|
96
|
+
<img
|
|
97
|
+
src="https://picsum.photos/600/400?random=18"
|
|
98
|
+
alt="Example image 18"
|
|
99
|
+
style="max-height: 150px; width: auto"
|
|
100
|
+
/>
|
|
101
|
+
<figcaption class="usx-image--caption">
|
|
102
|
+
This is a caption describing the image above.
|
|
103
|
+
</figcaption>
|
|
104
|
+
</figure>
|
|
105
|
+
|
|
106
|
+
<h3 class="site-preview-heading">Long Caption</h3>
|
|
50
107
|
<figure class="usx-image">
|
|
51
|
-
<img src="https://picsum.photos/600/400?random=
|
|
52
|
-
<figcaption class="usx-image--caption">
|
|
53
|
-
|
|
108
|
+
<img src="https://picsum.photos/600/400?random=19" alt="Example image 19" />
|
|
109
|
+
<figcaption class="usx-image--caption">
|
|
110
|
+
This is a longer caption that provides more detailed information about the image above. It can
|
|
111
|
+
span multiple lines and gives context to the visual content.
|
|
112
|
+
</figcaption>
|
|
113
|
+
</figure>
|
|
114
|
+
|
|
115
|
+
<h3 class="site-preview-heading">Responsive</h3>
|
|
116
|
+
<div class="usx-image">
|
|
117
|
+
<picture
|
|
118
|
+
><source media="(min-width: 64em)" srcset="/linear-w-symbol_left.svg" />
|
|
119
|
+
<source media="(min-width: 40em)" srcset="/linear.svg" />
|
|
120
|
+
<source media="(min-width: 20em)" srcset="/solex-only.svg" />
|
|
121
|
+
<img src="/symbol-only.svg" alt="SOLEX"
|
|
122
|
+
/></picture>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<h3 class="site-preview-heading">Short And Wide Container With Object Fit Contain</h3>
|
|
126
|
+
<div style="width: 100%; height: 200px; border: 2px solid blue">
|
|
127
|
+
<figure class="usx-image usx-object-fit-contain">
|
|
128
|
+
<img
|
|
129
|
+
src="https://picsum.photos/200/500?random=14"
|
|
130
|
+
alt="Example of object-fit contain with a tall image"
|
|
131
|
+
/>
|
|
132
|
+
<figcaption class="usx-image--caption">
|
|
133
|
+
This container is wider than the image, and the image is taller than the container. With
|
|
134
|
+
'contain', the image will scale to fit within the container while maintaining its aspect
|
|
135
|
+
ratio, which may result in empty space on the sides or top/bottom of the image.
|
|
136
|
+
</figcaption>
|
|
137
|
+
</figure>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
<h3 class="site-preview-heading">Short And Wide Container With Object Fit Fill</h3>
|
|
141
|
+
<div style="width: 100%; height: 200px; border: 2px solid blue">
|
|
142
|
+
<figure class="usx-image usx-object-fit-fill">
|
|
143
|
+
<img
|
|
144
|
+
src="https://picsum.photos/200/500?random=14"
|
|
145
|
+
alt="Example of object-fit fill with a tall image"
|
|
146
|
+
/>
|
|
147
|
+
<figcaption class="usx-image--caption">
|
|
148
|
+
This container is wider than the image, and the image is taller than the container. With
|
|
149
|
+
'fill', the image will stretch to fill the entire container, which may distort the aspect
|
|
150
|
+
ratio of the image.
|
|
151
|
+
</figcaption>
|
|
152
|
+
</figure>
|
|
153
|
+
</div>
|
|
154
|
+
|
|
155
|
+
<h3 class="site-preview-heading">Short And Wide Container With Object Fit Cover</h3>
|
|
156
|
+
<div style="width: 100%; height: 200px; border: 2px solid blue">
|
|
157
|
+
<figure class="usx-image usx-object-fit-cover">
|
|
158
|
+
<img
|
|
159
|
+
src="https://picsum.photos/200/500?random=14"
|
|
160
|
+
alt="Example of object-fit cover with a tall image"
|
|
161
|
+
/>
|
|
162
|
+
<figcaption class="usx-image--caption">
|
|
163
|
+
This container is wider than the image, and the image is taller than the container. With
|
|
164
|
+
'cover', the image will scale to cover the entire container while maintaining its aspect
|
|
165
|
+
ratio, which may result in some cropping of the image.
|
|
166
|
+
</figcaption>
|
|
167
|
+
</figure>
|
|
168
|
+
</div>
|
|
@@ -4,39 +4,41 @@
|
|
|
4
4
|
<div class="bg-base width-10 height-10"></div>
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
|
-
<h3 class="site-preview-heading">Tag
|
|
7
|
+
<h3 class="site-preview-heading">Tag Indicator</h3>
|
|
8
8
|
<div class="usx-indicator">
|
|
9
|
-
<span class="usx-indicator-item usa-tag usx-tag bg-primary
|
|
9
|
+
<span class="usx-indicator-item usa-tag usx-tag bg-primary usx-height-min">New</span>
|
|
10
10
|
<div class="bg-base width-10 height-10"></div>
|
|
11
11
|
</div>
|
|
12
12
|
|
|
13
13
|
<h3 class="site-preview-heading">For Button</h3>
|
|
14
14
|
<div class="usx-indicator">
|
|
15
|
-
<span class="usx-indicator-item usa-tag usx-tag bg-secondary
|
|
16
|
-
|
|
15
|
+
<span class="usx-indicator-item usa-tag usx-tag bg-secondary usx-height-min">13</span
|
|
16
|
+
><button class="usa-button usx-button usa-button--outline margin-right-0">Inbox</button>
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
<h3 class="site-preview-heading">
|
|
19
|
+
<h3 class="site-preview-heading">Ping</h3>
|
|
20
20
|
<div class="usx-indicator">
|
|
21
21
|
<span class="usx-indicator-item usx-status usx-ping text-success"></span>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
<div class="usx-avatar">
|
|
23
|
+
<img
|
|
24
|
+
class="usx-avatar__img usx-rounded-sm"
|
|
25
|
+
src="./george_washington.png"
|
|
26
|
+
alt="George Washington"
|
|
27
|
+
role="img"
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
29
30
|
</div>
|
|
30
31
|
|
|
31
|
-
<h3 class="site-preview-heading">All
|
|
32
|
+
<h3 class="site-preview-heading">All Positions</h3>
|
|
32
33
|
<div class="usx-indicator">
|
|
33
|
-
<span class="usx-indicator-item usx-indicator-top usx-indicator-start">↖︎</span
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<div class="bg-base" style="height: 100px; width: 100px
|
|
34
|
+
<span class="usx-indicator-item usx-indicator-top usx-indicator-start">↖︎</span
|
|
35
|
+
><span class="usx-indicator-item usx-indicator-top usx-indicator-center">↑</span
|
|
36
|
+
><span class="usx-indicator-item usx-indicator-top usx-indicator-end">↗︎</span
|
|
37
|
+
><span class="usx-indicator-item usx-indicator-middle usx-indicator-start">←</span
|
|
38
|
+
><span class="usx-indicator-item usx-indicator-middle usx-indicator-center">●</span
|
|
39
|
+
><span class="usx-indicator-item usx-indicator-middle usx-indicator-end">→</span
|
|
40
|
+
><span class="usx-indicator-item usx-indicator-bottom usx-indicator-start">↙︎</span
|
|
41
|
+
><span class="usx-indicator-item usx-indicator-bottom usx-indicator-center">↓</span
|
|
42
|
+
><span class="usx-indicator-item usx-indicator-bottom usx-indicator-end">↘︎</span>
|
|
43
|
+
<div class="bg-base" style="height: 100px; width: 100px"></div>
|
|
44
|
+
</div>
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
<h3 class="site-preview-heading">Default</h3>
|
|
2
|
-
<label class="usa-label usx-label"
|
|
3
|
-
<input id="label-default-input" type="text" />
|
|
2
|
+
<label class="usa-label usx-label">Label Text</label>
|
|
4
3
|
|
|
5
|
-
<h3 class="site-preview-heading">Required</h3>
|
|
6
|
-
<label class="usa-label usx-label"
|
|
7
|
-
|
|
4
|
+
<h3 class="site-preview-heading">With Required</h3>
|
|
5
|
+
<label class="usa-label usx-label"
|
|
6
|
+
><abbr title="Required" class="usx-required">*</abbr> Label Text</label
|
|
7
|
+
>
|
|
8
8
|
|
|
9
|
-
<h3 class="site-preview-heading">Screen
|
|
10
|
-
<label class="usa-label usx-label usa-sr-only"
|
|
11
|
-
<input id="label-sr-input" type="text" aria-label="Hidden label example" />
|
|
9
|
+
<h3 class="site-preview-heading">Screen Reader Only</h3>
|
|
10
|
+
<label class="usa-label usx-label usa-sr-only">Label Text</label>
|
|
12
11
|
|
|
13
|
-
<h3 class="site-preview-heading">With
|
|
14
|
-
<label class="usa-label usx-label
|
|
15
|
-
<input id="label-custom-input" type="text" />
|
|
12
|
+
<h3 class="site-preview-heading">With Custom Class</h3>
|
|
13
|
+
<label class="usa-label usx-label text-primary">Label Text</label>
|
|
16
14
|
|
|
17
|
-
<h3 class="site-preview-heading">Class
|
|
18
|
-
<label class="
|
|
19
|
-
|
|
15
|
+
<h3 class="site-preview-heading">With Class Override (radio button)</h3>
|
|
16
|
+
<label class="usa-radio__label">Label Text</label>
|
|
17
|
+
|
|
18
|
+
<h3 class="site-preview-heading">With Class Override (checkbox)</h3>
|
|
19
|
+
<label class="usa-checkbox__label">Label Text</label>
|
|
20
20
|
|
|
21
21
|
<h3 class="site-preview-heading">Error</h3>
|
|
22
|
-
<label class="usa-label usx-label usa-label--error"
|
|
23
|
-
<input id="label-error-input" type="text" class="usa-input usa-input--error" />
|
|
22
|
+
<label class="usa-label usx-label usa-label--error">Label Text</label>
|
|
@@ -1,41 +1,39 @@
|
|
|
1
|
-
<h3 class="site-preview-heading">Two
|
|
2
|
-
<nav aria-label="Language selection">
|
|
3
|
-
<div class="usa-language-container
|
|
1
|
+
<h3 class="site-preview-heading">Two Languages</h3>
|
|
2
|
+
<nav class="usx-language-selector" aria-label="Language selection">
|
|
3
|
+
<div class="usa-language-container">
|
|
4
4
|
<button type="button" class="usa-button usx-button usa-button--primary">
|
|
5
5
|
<span lang="es" xml:lang="es"><strong>Español</strong></span>
|
|
6
6
|
</button>
|
|
7
7
|
</div>
|
|
8
8
|
</nav>
|
|
9
9
|
|
|
10
|
-
<h3 class="site-preview-heading">
|
|
11
|
-
<nav aria-label="Language selection">
|
|
12
|
-
<div class="usa-language-container
|
|
10
|
+
<h3 class="site-preview-heading">Many Languages</h3>
|
|
11
|
+
<nav class="usx-language-selector" aria-label="Language selection">
|
|
12
|
+
<div class="usa-language-container">
|
|
13
13
|
<ul class="usa-language__primary usa-accordion">
|
|
14
14
|
<li class="usa-language__primary-item">
|
|
15
15
|
<button
|
|
16
16
|
type="button"
|
|
17
17
|
class="usa-button usx-button usa-button--primary usa-language__link"
|
|
18
18
|
aria-expanded="false"
|
|
19
|
-
aria-controls="language-options"
|
|
19
|
+
aria-controls="html-language-options-many"
|
|
20
20
|
>
|
|
21
21
|
Languages
|
|
22
22
|
</button>
|
|
23
|
-
<ul id="language-options" class="usa-language__submenu" hidden>
|
|
23
|
+
<ul id="html-language-options-many" class="usa-language__submenu" hidden>
|
|
24
24
|
<li class="usa-language__submenu-item">
|
|
25
|
-
<a href="javascript:void(0);"
|
|
25
|
+
<a href="javascript:void(0);" aria-current="true"
|
|
26
|
+
><span lang="en" xml:lang="en"><strong>English</strong></span></a
|
|
27
|
+
>
|
|
26
28
|
</li>
|
|
27
29
|
<li class="usa-language__submenu-item">
|
|
28
30
|
<a href="javascript:void(0);"
|
|
29
|
-
><span lang="es" xml:lang="es"
|
|
30
|
-
><strong>Español</strong> (Spanish)</span
|
|
31
|
-
></a
|
|
31
|
+
><span lang="es" xml:lang="es"><strong>Español</strong> (Spanish)</span></a
|
|
32
32
|
>
|
|
33
33
|
</li>
|
|
34
34
|
<li class="usa-language__submenu-item">
|
|
35
35
|
<a href="javascript:void(0);"
|
|
36
|
-
><span lang="vi" xml:lang="vi"
|
|
37
|
-
><strong>Tiếng Việt</strong> (Vietnamese)</span
|
|
38
|
-
></a
|
|
36
|
+
><span lang="vi" xml:lang="vi"><strong>Tiếng Việt</strong> (Vietnamese)</span></a
|
|
39
37
|
>
|
|
40
38
|
</li>
|
|
41
39
|
<li class="usa-language__submenu-item">
|
|
@@ -45,9 +43,6 @@
|
|
|
45
43
|
></a
|
|
46
44
|
>
|
|
47
45
|
</li>
|
|
48
|
-
<li class="usa-language__submenu-item">
|
|
49
|
-
<a href="javascript:void(0);">Selected content in additional languages</a>
|
|
50
|
-
</li>
|
|
51
46
|
</ul>
|
|
52
47
|
</li>
|
|
53
48
|
</ul>
|
|
@@ -55,26 +50,80 @@
|
|
|
55
50
|
</nav>
|
|
56
51
|
|
|
57
52
|
<h3 class="site-preview-heading">Unstyled</h3>
|
|
58
|
-
<nav aria-label="Language selection">
|
|
59
|
-
<div class="usa-language-container
|
|
53
|
+
<nav class="usx-language-selector" aria-label="Language selection">
|
|
54
|
+
<div class="usa-language-container">
|
|
60
55
|
<ul class="usa-language__primary usa-accordion">
|
|
61
56
|
<li class="usa-language__primary-item">
|
|
62
57
|
<button
|
|
63
58
|
type="button"
|
|
64
59
|
class="usa-button usx-button usa-button--unstyled usa-language__link"
|
|
65
60
|
aria-expanded="false"
|
|
66
|
-
aria-controls="language-options-unstyled"
|
|
61
|
+
aria-controls="html-language-options-unstyled"
|
|
67
62
|
>
|
|
68
63
|
Languages
|
|
69
64
|
</button>
|
|
70
|
-
<ul id="language-options-unstyled" class="usa-language__submenu" hidden>
|
|
65
|
+
<ul id="html-language-options-unstyled" class="usa-language__submenu" hidden>
|
|
71
66
|
<li class="usa-language__submenu-item">
|
|
72
|
-
<a href="javascript:void(0);"
|
|
67
|
+
<a href="javascript:void(0);" aria-current="true"
|
|
68
|
+
><span lang="en" xml:lang="en"><strong>English</strong></span></a
|
|
69
|
+
>
|
|
73
70
|
</li>
|
|
74
71
|
<li class="usa-language__submenu-item">
|
|
75
72
|
<a href="javascript:void(0);"
|
|
76
|
-
><span lang="es" xml:lang="es"
|
|
77
|
-
|
|
73
|
+
><span lang="es" xml:lang="es"><strong>Español</strong> (Spanish)</span></a
|
|
74
|
+
>
|
|
75
|
+
</li>
|
|
76
|
+
<li class="usa-language__submenu-item">
|
|
77
|
+
<a href="javascript:void(0);"
|
|
78
|
+
><span lang="vi" xml:lang="vi"><strong>Tiếng Việt</strong> (Vietnamese)</span></a
|
|
79
|
+
>
|
|
80
|
+
</li>
|
|
81
|
+
<li class="usa-language__submenu-item">
|
|
82
|
+
<a href="javascript:void(0);"
|
|
83
|
+
><span lang="zh" xml:lang="zh"
|
|
84
|
+
><strong>简体字</strong> (Chinese – Simplified)</span
|
|
85
|
+
></a
|
|
86
|
+
>
|
|
87
|
+
</li>
|
|
88
|
+
</ul>
|
|
89
|
+
</li>
|
|
90
|
+
</ul>
|
|
91
|
+
</div>
|
|
92
|
+
</nav>
|
|
93
|
+
|
|
94
|
+
<h3 class="site-preview-heading">Small</h3>
|
|
95
|
+
<nav class="usx-language-selector" aria-label="Language selection">
|
|
96
|
+
<div class="usa-language-container usa-language--small">
|
|
97
|
+
<ul class="usa-language__primary usa-accordion">
|
|
98
|
+
<li class="usa-language__primary-item">
|
|
99
|
+
<button
|
|
100
|
+
type="button"
|
|
101
|
+
class="usa-button usx-button usa-button--primary usa-language__link"
|
|
102
|
+
aria-expanded="false"
|
|
103
|
+
aria-controls="html-language-options-small"
|
|
104
|
+
>
|
|
105
|
+
Languages
|
|
106
|
+
</button>
|
|
107
|
+
<ul id="html-language-options-small" class="usa-language__submenu" hidden>
|
|
108
|
+
<li class="usa-language__submenu-item">
|
|
109
|
+
<a href="javascript:void(0);" aria-current="true"
|
|
110
|
+
><span lang="en" xml:lang="en"><strong>English</strong></span></a
|
|
111
|
+
>
|
|
112
|
+
</li>
|
|
113
|
+
<li class="usa-language__submenu-item">
|
|
114
|
+
<a href="javascript:void(0);"
|
|
115
|
+
><span lang="es" xml:lang="es"><strong>Español</strong> (Spanish)</span></a
|
|
116
|
+
>
|
|
117
|
+
</li>
|
|
118
|
+
<li class="usa-language__submenu-item">
|
|
119
|
+
<a href="javascript:void(0);"
|
|
120
|
+
><span lang="vi" xml:lang="vi"><strong>Tiếng Việt</strong> (Vietnamese)</span></a
|
|
121
|
+
>
|
|
122
|
+
</li>
|
|
123
|
+
<li class="usa-language__submenu-item">
|
|
124
|
+
<a href="javascript:void(0);"
|
|
125
|
+
><span lang="zh" xml:lang="zh"
|
|
126
|
+
><strong>简体字</strong> (Chinese – Simplified)</span
|
|
78
127
|
></a
|
|
79
128
|
>
|
|
80
129
|
</li>
|