@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,16 +1,12 @@
|
|
|
1
1
|
<h3 class="site-preview-heading">Default</h3>
|
|
2
2
|
<div class="usa-step-indicator usx-step-indicator">
|
|
3
3
|
<ol class="usa-step-indicator__segments">
|
|
4
|
-
<li
|
|
5
|
-
class="usa-step-indicator__segment usa-step-indicator__segment--complete"
|
|
6
|
-
>
|
|
4
|
+
<li class="usa-step-indicator__segment usa-step-indicator__segment--complete">
|
|
7
5
|
<span class="usa-step-indicator__segment-label"
|
|
8
6
|
>Personal information <span class="usa-sr-only">completed</span></span
|
|
9
7
|
>
|
|
10
8
|
</li>
|
|
11
|
-
<li
|
|
12
|
-
class="usa-step-indicator__segment usa-step-indicator__segment--complete"
|
|
13
|
-
>
|
|
9
|
+
<li class="usa-step-indicator__segment usa-step-indicator__segment--complete">
|
|
14
10
|
<span class="usa-step-indicator__segment-label"
|
|
15
11
|
>Household status <span class="usa-sr-only">completed</span></span
|
|
16
12
|
>
|
|
@@ -19,9 +15,7 @@
|
|
|
19
15
|
class="usa-step-indicator__segment usa-step-indicator__segment--current"
|
|
20
16
|
aria-current="true"
|
|
21
17
|
>
|
|
22
|
-
<span class="usa-step-indicator__segment-label"
|
|
23
|
-
>Supporting documents</span
|
|
24
|
-
>
|
|
18
|
+
<span class="usa-step-indicator__segment-label">Supporting documents</span>
|
|
25
19
|
</li>
|
|
26
20
|
<li class="usa-step-indicator__segment">
|
|
27
21
|
<span class="usa-step-indicator__segment-label"
|
|
@@ -40,36 +34,26 @@
|
|
|
40
34
|
><span class="usa-sr-only">Step</span>
|
|
41
35
|
<span class="usa-step-indicator__current-step">3</span>
|
|
42
36
|
<span class="usa-step-indicator__total-steps">of 5</span> </span
|
|
43
|
-
><span class="usa-step-indicator__heading-text"
|
|
44
|
-
>Supporting documents</span
|
|
45
|
-
>
|
|
37
|
+
><span class="usa-step-indicator__heading-text">Supporting documents</span>
|
|
46
38
|
</h4>
|
|
47
39
|
</div>
|
|
48
40
|
</div>
|
|
49
41
|
|
|
50
42
|
<h3 class="site-preview-heading">No labels</h3>
|
|
51
|
-
<div class="usa-step-indicator usx-step-
|
|
43
|
+
<div class="usa-step-indicator usx-step-indicator usa-step-indicator--no-labels">
|
|
52
44
|
<ol class="usa-step-indicator__segments">
|
|
53
|
-
<li
|
|
54
|
-
class="usa-step-indicator__segment usa-step-indicator__segment--complete"
|
|
55
|
-
>
|
|
45
|
+
<li class="usa-step-indicator__segment usa-step-indicator__segment--complete">
|
|
56
46
|
<span class="usa-step-indicator__segment-label"
|
|
57
47
|
>Personal information <span class="usa-sr-only">completed</span></span
|
|
58
48
|
>
|
|
59
49
|
</li>
|
|
60
|
-
<li
|
|
61
|
-
class="usa-step-indicator__segment usa-step-indicator__segment--complete"
|
|
62
|
-
>
|
|
50
|
+
<li class="usa-step-indicator__segment usa-step-indicator__segment--complete">
|
|
63
51
|
<span class="usa-step-indicator__segment-label"
|
|
64
52
|
>Household status <span class="usa-sr-only">completed</span></span
|
|
65
53
|
>
|
|
66
54
|
</li>
|
|
67
|
-
<li
|
|
68
|
-
class="usa-step-indicator__segment
|
|
69
|
-
>
|
|
70
|
-
<span class="usa-step-indicator__segment-label"
|
|
71
|
-
>Supporting documents</span
|
|
72
|
-
>
|
|
55
|
+
<li class="usa-step-indicator__segment usa-step-indicator__segment--current">
|
|
56
|
+
<span class="usa-step-indicator__segment-label">Supporting documents</span>
|
|
73
57
|
</li>
|
|
74
58
|
<li class="usa-step-indicator__segment">
|
|
75
59
|
<span class="usa-step-indicator__segment-label"
|
|
@@ -88,26 +72,20 @@
|
|
|
88
72
|
><span class="usa-sr-only">Step</span>
|
|
89
73
|
<span class="usa-step-indicator__current-step">3</span>
|
|
90
74
|
<span class="usa-step-indicator__total-steps">of 5</span> </span
|
|
91
|
-
><span class="usa-step-indicator__heading-text"
|
|
92
|
-
>Supporting documents</span
|
|
93
|
-
>
|
|
75
|
+
><span class="usa-step-indicator__heading-text">Supporting documents</span>
|
|
94
76
|
</h4>
|
|
95
77
|
</div>
|
|
96
78
|
</div>
|
|
97
79
|
|
|
98
80
|
<h3 class="site-preview-heading">Centered</h3>
|
|
99
|
-
<div class="usa-step-indicator usx-step-
|
|
81
|
+
<div class="usa-step-indicator usx-step-indicator usa-step-indicator--center">
|
|
100
82
|
<ol class="usa-step-indicator__segments">
|
|
101
|
-
<li
|
|
102
|
-
class="usa-step-indicator__segment usa-step-indicator__segment--complete"
|
|
103
|
-
>
|
|
83
|
+
<li class="usa-step-indicator__segment usa-step-indicator__segment--complete">
|
|
104
84
|
<span class="usa-step-indicator__segment-label"
|
|
105
85
|
>Personal information <span class="usa-sr-only">completed</span></span
|
|
106
86
|
>
|
|
107
87
|
</li>
|
|
108
|
-
<li
|
|
109
|
-
class="usa-step-indicator__segment usa-step-indicator__segment--complete"
|
|
110
|
-
>
|
|
88
|
+
<li class="usa-step-indicator__segment usa-step-indicator__segment--complete">
|
|
111
89
|
<span class="usa-step-indicator__segment-label"
|
|
112
90
|
>Household status <span class="usa-sr-only">completed</span></span
|
|
113
91
|
>
|
|
@@ -116,9 +94,7 @@
|
|
|
116
94
|
class="usa-step-indicator__segment usa-step-indicator__segment--current"
|
|
117
95
|
aria-current="true"
|
|
118
96
|
>
|
|
119
|
-
<span class="usa-step-indicator__segment-label"
|
|
120
|
-
>Supporting documents</span
|
|
121
|
-
>
|
|
97
|
+
<span class="usa-step-indicator__segment-label">Supporting documents</span>
|
|
122
98
|
</li>
|
|
123
99
|
<li class="usa-step-indicator__segment">
|
|
124
100
|
<span class="usa-step-indicator__segment-label"
|
|
@@ -137,26 +113,20 @@
|
|
|
137
113
|
><span class="usa-sr-only">Step</span>
|
|
138
114
|
<span class="usa-step-indicator__current-step">3</span>
|
|
139
115
|
<span class="usa-step-indicator__total-steps">of 5</span> </span
|
|
140
|
-
><span class="usa-step-indicator__heading-text"
|
|
141
|
-
>Supporting documents</span
|
|
142
|
-
>
|
|
116
|
+
><span class="usa-step-indicator__heading-text">Supporting documents</span>
|
|
143
117
|
</h4>
|
|
144
118
|
</div>
|
|
145
119
|
</div>
|
|
146
120
|
|
|
147
121
|
<h3 class="site-preview-heading">Counters</h3>
|
|
148
|
-
<div class="usa-step-indicator usx-step-
|
|
122
|
+
<div class="usa-step-indicator usx-step-indicator usa-step-indicator--counters">
|
|
149
123
|
<ol class="usa-step-indicator__segments">
|
|
150
|
-
<li
|
|
151
|
-
class="usa-step-indicator__segment usa-step-indicator__segment--complete"
|
|
152
|
-
>
|
|
124
|
+
<li class="usa-step-indicator__segment usa-step-indicator__segment--complete">
|
|
153
125
|
<span class="usa-step-indicator__segment-label"
|
|
154
126
|
>Personal information <span class="usa-sr-only">completed</span></span
|
|
155
127
|
>
|
|
156
128
|
</li>
|
|
157
|
-
<li
|
|
158
|
-
class="usa-step-indicator__segment usa-step-indicator__segment--complete"
|
|
159
|
-
>
|
|
129
|
+
<li class="usa-step-indicator__segment usa-step-indicator__segment--complete">
|
|
160
130
|
<span class="usa-step-indicator__segment-label"
|
|
161
131
|
>Household status <span class="usa-sr-only">completed</span></span
|
|
162
132
|
>
|
|
@@ -165,9 +135,7 @@
|
|
|
165
135
|
class="usa-step-indicator__segment usa-step-indicator__segment--current"
|
|
166
136
|
aria-current="true"
|
|
167
137
|
>
|
|
168
|
-
<span class="usa-step-indicator__segment-label"
|
|
169
|
-
>Supporting documents</span
|
|
170
|
-
>
|
|
138
|
+
<span class="usa-step-indicator__segment-label">Supporting documents</span>
|
|
171
139
|
</li>
|
|
172
140
|
<li class="usa-step-indicator__segment">
|
|
173
141
|
<span class="usa-step-indicator__segment-label"
|
|
@@ -186,26 +154,20 @@
|
|
|
186
154
|
><span class="usa-sr-only">Step</span>
|
|
187
155
|
<span class="usa-step-indicator__current-step">3</span>
|
|
188
156
|
<span class="usa-step-indicator__total-steps">of 5</span> </span
|
|
189
|
-
><span class="usa-step-indicator__heading-text"
|
|
190
|
-
>Supporting documents</span
|
|
191
|
-
>
|
|
157
|
+
><span class="usa-step-indicator__heading-text">Supporting documents</span>
|
|
192
158
|
</h4>
|
|
193
159
|
</div>
|
|
194
160
|
</div>
|
|
195
161
|
|
|
196
162
|
<h3 class="site-preview-heading">Small counters</h3>
|
|
197
|
-
<div class="usa-step-indicator usx-step-
|
|
163
|
+
<div class="usa-step-indicator usx-step-indicator usa-step-indicator--counters-sm">
|
|
198
164
|
<ol class="usa-step-indicator__segments">
|
|
199
|
-
<li
|
|
200
|
-
class="usa-step-indicator__segment usa-step-indicator__segment--complete"
|
|
201
|
-
>
|
|
165
|
+
<li class="usa-step-indicator__segment usa-step-indicator__segment--complete">
|
|
202
166
|
<span class="usa-step-indicator__segment-label"
|
|
203
167
|
>Personal information <span class="usa-sr-only">completed</span></span
|
|
204
168
|
>
|
|
205
169
|
</li>
|
|
206
|
-
<li
|
|
207
|
-
class="usa-step-indicator__segment usa-step-indicator__segment--complete"
|
|
208
|
-
>
|
|
170
|
+
<li class="usa-step-indicator__segment usa-step-indicator__segment--complete">
|
|
209
171
|
<span class="usa-step-indicator__segment-label"
|
|
210
172
|
>Household status <span class="usa-sr-only">completed</span></span
|
|
211
173
|
>
|
|
@@ -214,9 +176,7 @@
|
|
|
214
176
|
class="usa-step-indicator__segment usa-step-indicator__segment--current"
|
|
215
177
|
aria-current="true"
|
|
216
178
|
>
|
|
217
|
-
<span class="usa-step-indicator__segment-label"
|
|
218
|
-
>Supporting documents</span
|
|
219
|
-
>
|
|
179
|
+
<span class="usa-step-indicator__segment-label">Supporting documents</span>
|
|
220
180
|
</li>
|
|
221
181
|
<li class="usa-step-indicator__segment">
|
|
222
182
|
<span class="usa-step-indicator__segment-label"
|
|
@@ -235,9 +195,7 @@
|
|
|
235
195
|
><span class="usa-sr-only">Step</span>
|
|
236
196
|
<span class="usa-step-indicator__current-step">3</span>
|
|
237
197
|
<span class="usa-step-indicator__total-steps">of 5</span> </span
|
|
238
|
-
><span class="usa-step-indicator__heading-text"
|
|
239
|
-
>Supporting documents</span
|
|
240
|
-
>
|
|
198
|
+
><span class="usa-step-indicator__heading-text">Supporting documents</span>
|
|
241
199
|
</h4>
|
|
242
200
|
</div>
|
|
243
|
-
</div>
|
|
201
|
+
</div>
|
|
@@ -1,163 +1,108 @@
|
|
|
1
|
-
<
|
|
1
|
+
<h3 class="site-preview-heading">Default</h3>
|
|
2
|
+
<label class="usx-swap"
|
|
3
|
+
><input type="checkbox" autocomplete="off" /><span class="usx-swap-on">ON</span
|
|
4
|
+
><span class="usx-swap-off">OFF</span></label
|
|
5
|
+
>
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
<h3 class="site-preview-heading margin-top-5">Default Icon</h3>
|
|
8
|
+
<label class="usx-swap"
|
|
9
|
+
><input type="checkbox" autocomplete="off" /><span class="usx-swap-on"
|
|
10
|
+
><svg
|
|
11
|
+
class="usa-icon usa-icon--size-4"
|
|
12
|
+
aria-hidden="true"
|
|
13
|
+
aria-label="visibility icon"
|
|
14
|
+
focusable="false"
|
|
15
|
+
role="img"
|
|
16
|
+
>
|
|
17
|
+
<use href="/img/sprite.svg#visibility"></use></svg></span
|
|
18
|
+
><span class="usx-swap-off"
|
|
19
|
+
><svg
|
|
20
|
+
class="usa-icon usa-icon--size-4"
|
|
21
|
+
aria-hidden="true"
|
|
22
|
+
aria-label="info icon"
|
|
23
|
+
focusable="false"
|
|
24
|
+
role="img"
|
|
25
|
+
>
|
|
26
|
+
<use href="/img/sprite.svg#info"></use></svg></span
|
|
27
|
+
></label>
|
|
10
28
|
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<svg class="usa-icon usa-icon--size-3 usx-swap-on" aria-hidden="true" focusable="false" role="img">
|
|
16
|
-
<use href="./img/sprite.svg#visibility"></use>
|
|
17
|
-
</svg>
|
|
18
|
-
<svg class="usa-icon usa-icon--size-3 usx-swap-off" aria-hidden="true" focusable="false" role="img">
|
|
19
|
-
<use href="./img/sprite.svg#info"></use>
|
|
20
|
-
</svg>
|
|
21
|
-
</label>
|
|
29
|
+
<h3 class="site-preview-heading margin-top-5">Active (fixed state)</h3>
|
|
30
|
+
<label class="usx-swap usx-swap--active usx-swap-active"
|
|
31
|
+
><span class="usx-swap-on">ACTIVE</span><span class="usx-swap-off">INACTIVE</span></label
|
|
32
|
+
>
|
|
22
33
|
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<span class="usx-swap-off">Slow is Smooth</span>
|
|
29
|
-
</label>
|
|
34
|
+
<h3 class="site-preview-heading margin-top-5">Rotate Text</h3>
|
|
35
|
+
<label class="usx-swap usx-swap--rotate"
|
|
36
|
+
><input type="checkbox" autocomplete="off" /><span class="usx-swap-on">Hello</span
|
|
37
|
+
><span class="usx-swap-off">Goodbye</span></label
|
|
38
|
+
>
|
|
30
39
|
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
<h3 class="site-preview-heading margin-top-5">Rotate Icon</h3>
|
|
41
|
+
<label class="usx-swap usx-swap--rotate"
|
|
42
|
+
><input type="checkbox" autocomplete="off" /><span class="usx-swap-on"
|
|
43
|
+
><svg
|
|
44
|
+
class="usa-icon usa-icon--size-4"
|
|
45
|
+
aria-hidden="true"
|
|
46
|
+
aria-label="security icon"
|
|
47
|
+
focusable="false"
|
|
48
|
+
role="img"
|
|
49
|
+
>
|
|
50
|
+
<use href="/img/sprite.svg#security"></use></svg></span
|
|
51
|
+
><span class="usx-swap-off"
|
|
52
|
+
><svg
|
|
53
|
+
class="usa-icon usa-icon--size-4"
|
|
54
|
+
aria-hidden="true"
|
|
55
|
+
aria-label="support_agent icon"
|
|
56
|
+
focusable="false"
|
|
57
|
+
role="img"
|
|
58
|
+
>
|
|
59
|
+
<use href="/img/sprite.svg#support_agent"></use></svg></span
|
|
60
|
+
></label>
|
|
42
61
|
|
|
43
|
-
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
<span class="usx-swap-off">Goodbye</span>
|
|
49
|
-
</label>
|
|
62
|
+
<h3 class="site-preview-heading margin-top-5">Flip Text</h3>
|
|
63
|
+
<label class="usx-swap usx-swap--flip"
|
|
64
|
+
><input type="checkbox" autocomplete="off" /><span class="usx-swap-on">👍</span
|
|
65
|
+
><span class="usx-swap-off">👎</span></label
|
|
66
|
+
>
|
|
50
67
|
|
|
51
|
-
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<use href="./img/sprite.svg#security"></use>
|
|
57
|
-
</svg>
|
|
58
|
-
<svg class="usa-icon usa-icon--size-3 usx-swap-off" aria-hidden="true" focusable="false" role="img">
|
|
59
|
-
<use href="./img/sprite.svg#support_agent"></use>
|
|
60
|
-
</svg>
|
|
61
|
-
</label>
|
|
68
|
+
<h3 class="site-preview-heading margin-top-5">Flip Emoji</h3>
|
|
69
|
+
<label class="usx-swap usx-swap--flip"
|
|
70
|
+
><input type="checkbox" autocomplete="off" /><span class="usx-swap-on">😊</span
|
|
71
|
+
><span class="usx-swap-off">😞</span></label
|
|
72
|
+
>
|
|
62
73
|
|
|
63
|
-
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
<h3 class="site-preview-heading margin-top-5">Color Change Icon</h3>
|
|
75
|
+
<label class="usx-swap"
|
|
76
|
+
><input type="checkbox" autocomplete="off" /><span class="usx-swap-on"
|
|
77
|
+
><svg
|
|
78
|
+
class="usa-icon usa-icon--size-4 text-success"
|
|
79
|
+
aria-hidden="true"
|
|
80
|
+
aria-label="check_circle icon"
|
|
81
|
+
focusable="false"
|
|
82
|
+
role="img"
|
|
83
|
+
>
|
|
84
|
+
<use href="/img/sprite.svg#check_circle"></use></svg></span
|
|
85
|
+
><span class="usx-swap-off"
|
|
86
|
+
><svg
|
|
87
|
+
class="usa-icon usa-icon--size-4 text-error"
|
|
88
|
+
aria-hidden="true"
|
|
89
|
+
aria-label="check_circle icon"
|
|
90
|
+
focusable="false"
|
|
91
|
+
role="img"
|
|
92
|
+
>
|
|
93
|
+
<use href="/img/sprite.svg#check_circle"></use></svg></span
|
|
94
|
+
></label>
|
|
70
95
|
|
|
71
|
-
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
<span class="usx-swap-off">😞</span>
|
|
77
|
-
</label>
|
|
96
|
+
<h3 class="site-preview-heading margin-top-5">Advanced Custom Children</h3>
|
|
97
|
+
<label class="usx-swap"
|
|
98
|
+
><input type="checkbox" autocomplete="off" /><span class="usx-swap-on">Custom ON</span
|
|
99
|
+
><span class="usx-swap-off">Custom OFF</span></label
|
|
100
|
+
>
|
|
78
101
|
|
|
79
|
-
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
<svg class="usa-icon usa-icon--size-3 usx-swap-off text-error" aria-hidden="true" focusable="false" role="img">
|
|
87
|
-
<use href="./img/sprite.svg#check_circle"></use>
|
|
88
|
-
</svg>
|
|
89
|
-
</label>
|
|
90
|
-
|
|
91
|
-
<!-- View More / View Less Example -->
|
|
92
|
-
<h3 class="site-preview-heading">View More / View Less</h3>
|
|
93
|
-
<label class="usx-swap maxw-mobile">
|
|
94
|
-
<input type="checkbox" autocomplete="off" />
|
|
95
|
-
<span class="usx-swap-off">
|
|
96
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore
|
|
97
|
-
magna aliqua. Ut enim ad...</p>
|
|
98
|
-
</span>
|
|
99
|
-
<span class="usx-swap-on">
|
|
100
|
-
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore
|
|
101
|
-
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
102
|
-
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
|
103
|
-
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
104
|
-
</span>
|
|
105
|
-
</label>
|
|
106
|
-
|
|
107
|
-
<h3 class="site-preview-heading">Trigger Alert On Swap</h3>
|
|
108
|
-
<label class="usx-swap">
|
|
109
|
-
<input type="checkbox" autocomplete="off" onchange="alert('Swap triggered!')" />
|
|
110
|
-
<span class="usx-swap-on">ON</span>
|
|
111
|
-
<span class="usx-swap-off">OFF</span>
|
|
112
|
-
</label>
|
|
113
|
-
|
|
114
|
-
<!-- Active Text Swap -->
|
|
115
|
-
<h3 class="site-preview-heading margin-bottom-0">Activated using "usx-swap-active" class</h3>
|
|
116
|
-
<p class="usa-hint margin-top-0">Remove "usx-swap-active" class to trigger swap</p>
|
|
117
|
-
<label class="usx-swap usx-swap-active">
|
|
118
|
-
<span class="usx-swap-on">ACTIVE</span>
|
|
119
|
-
<span class="usx-swap-off">INACTIVE</span>
|
|
120
|
-
</label>
|
|
121
|
-
|
|
122
|
-
<!-- Label outside of usx-swap -->
|
|
123
|
-
<h3 class="site-preview-heading">Label outside of swap</h3>
|
|
124
|
-
<span class="usx-swap width-mobile margin-bottom-3">
|
|
125
|
-
<input id="toggle-swap-2" type="checkbox" autocomplete="off" />
|
|
126
|
-
<span class="usx-swap-off">
|
|
127
|
-
<p class="margin-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore
|
|
128
|
-
magna aliqua. Ut enim ad...</p>
|
|
129
|
-
</span>
|
|
130
|
-
<span class="usx-swap-on">
|
|
131
|
-
<p class="margin-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore
|
|
132
|
-
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
133
|
-
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
|
134
|
-
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
135
|
-
</span>
|
|
136
|
-
</span><br/>
|
|
137
|
-
<button class="usa-button usx-button usa-button--primary">
|
|
138
|
-
<label for="toggle-swap-2">Toggle</label>
|
|
139
|
-
</button>
|
|
140
|
-
|
|
141
|
-
<!-- Label text controlled by usx-swap -->
|
|
142
|
-
<h3 class="site-preview-heading">Label text controlled by usx-swap</h3>
|
|
143
|
-
<span class="usx-swap width-mobile margin-bottom-3">
|
|
144
|
-
<input id="toggle-swap-3" type="checkbox" autocomplete="off" />
|
|
145
|
-
<span class="usx-swap-off">
|
|
146
|
-
<p class="margin-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore
|
|
147
|
-
magna aliqua. Ut enim ad...</p>
|
|
148
|
-
<label class="usa-button usx-button usa-button--unstyled" for="toggle-swap-3">
|
|
149
|
-
View More<svg class="usa-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img"><use href="./img/sprite.svg#expand_more"></use>
|
|
150
|
-
</svg>
|
|
151
|
-
</label>
|
|
152
|
-
</span>
|
|
153
|
-
<span class="usx-swap-on">
|
|
154
|
-
<p class="margin-0">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore
|
|
155
|
-
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
|
156
|
-
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
|
157
|
-
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
158
|
-
<label class="usa-button usx-button usa-button--unstyled" for="toggle-swap-3">
|
|
159
|
-
View Less<svg class="usa-icon usa-icon--size-2" aria-hidden="true" focusable="false" role="img"><use href="./img/sprite.svg#expand_less"></use>
|
|
160
|
-
</svg>
|
|
161
|
-
</label>
|
|
162
|
-
</span>
|
|
163
|
-
</span><br/>
|
|
102
|
+
<h3 class="site-preview-heading margin-top-5">Trigger Alert on Swap</h3>
|
|
103
|
+
<label class="usx-swap"
|
|
104
|
+
><input type="checkbox" autocomplete="off" onchange="alert('Swap triggered!')" /><span
|
|
105
|
+
class="usx-swap-on"
|
|
106
|
+
>ON</span
|
|
107
|
+
><span class="usx-swap-off">OFF</span></label
|
|
108
|
+
>
|