@solexllc/usx-react 0.10.0 → 0.11.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 +123 -66
- package/dist/index.js +123 -66
- package/package.json +4 -4
- package/src/components/code/code.django-snapshot.html +4 -6
- package/src/components/code/code.html +2 -2
- package/src/components/code/code.react-snapshot.html +2 -4
- package/src/components/header/header.django-snapshot.html +5 -7
- package/src/components/header/header.html +1 -11
- package/src/components/header/header.react-snapshot.html +3 -6
- package/src/components/icon-list/IconList.tsx +10 -2
- package/src/components/icon-list/config.json +5 -1
- package/src/components/icon-list/icon-list.django-snapshot.html +39 -0
- package/src/components/icon-list/icon-list.django.html +2 -0
- package/src/components/icon-list/icon-list.react-snapshot.html +31 -0
- package/src/components/list/List.tsx +10 -2
- package/src/components/list/config.json +5 -1
- package/src/components/list/list.django-snapshot.html +26 -0
- package/src/components/list/list.django.html +2 -0
- package/src/components/list/list.html +20 -0
- package/src/components/list/list.react-snapshot.html +20 -0
- package/src/components/page/Page.tsx +16 -0
- package/src/components/page/config.json +18 -1
- package/src/components/page/page.django-snapshot.html +74 -0
- package/src/components/page/page.django.html +8 -0
- package/src/components/page/page.html +60 -0
- package/src/components/page/page.react-snapshot.html +60 -0
- package/src/components/theme-picker/ThemePicker.tsx +95 -52
- package/src/components/theme-picker/config.json +7 -4
- package/src/components/theme-picker/theme-picker-select.django.html +7 -0
- package/src/components/theme-picker/theme-picker.django-snapshot.html +101 -21
- package/src/components/theme-picker/theme-picker.django.html +22 -24
- package/src/components/theme-picker/theme-picker.html +86 -56
- package/src/components/theme-picker/theme-picker.react-snapshot.html +74 -18
|
@@ -1,85 +1,115 @@
|
|
|
1
|
-
<h3 class="site-preview-heading
|
|
2
|
-
<div class="usx-theme-picker"
|
|
1
|
+
<h3 class="site-preview-heading">Default</h3>
|
|
2
|
+
<div class="usx-theme-picker">
|
|
3
3
|
<button
|
|
4
4
|
type="button"
|
|
5
5
|
class="usa-button usx-button usx-button--ghost usx-theme-picker__trigger"
|
|
6
6
|
aria-label="Theme"
|
|
7
|
-
|
|
7
|
+
aria-expanded="false"
|
|
8
|
+
aria-controls="theme-picker-example-1-panel"
|
|
8
9
|
>
|
|
9
10
|
<svg
|
|
10
|
-
class="usa-icon usx-theme-picker__icon"
|
|
11
|
+
class="usa-icon usx-icon usx-theme-picker__icon"
|
|
11
12
|
aria-hidden="true"
|
|
12
13
|
focusable="false"
|
|
13
|
-
|
|
14
|
+
role="img"
|
|
14
15
|
>
|
|
15
|
-
<
|
|
16
|
-
fill="currentColor"
|
|
17
|
-
d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"
|
|
18
|
-
/>
|
|
16
|
+
<use href="./img/usx-sprite.svg#color_palette"></use>
|
|
19
17
|
</svg>
|
|
20
18
|
</button>
|
|
21
|
-
<div class="usx-theme-picker__panel">
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<option value="
|
|
19
|
+
<div id="theme-picker-example-1-panel" class="usx-theme-picker__panel">
|
|
20
|
+
<label class="usa-label usx-label usa-sr-only" for="theme-picker-example-1">Theme</label
|
|
21
|
+
><select id="theme-picker-example-1" class="usa-select usx-select">
|
|
22
|
+
<option value="Default" selected="">Default</option>
|
|
23
|
+
<option value="Forest">Forest</option>
|
|
24
|
+
<option value="Sunset">Sunset</option>
|
|
25
|
+
<option value="Ocean">Ocean</option>
|
|
26
|
+
<option value="Aurora">Aurora</option>
|
|
27
|
+
<option value="Borealis">Borealis</option>
|
|
28
28
|
<option value="Midnight">Midnight</option>
|
|
29
29
|
<option value="Carbon">Carbon</option>
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
<option value="VADS">VADS</option>
|
|
31
|
+
<option value="GOV.UK">GOV.UK</option>
|
|
32
|
+
<option value="NASA">NASA</option></select
|
|
33
|
+
><button
|
|
32
34
|
type="button"
|
|
33
35
|
class="usa-button usx-button usa-button--primary usx-theme-picker__toggle"
|
|
34
36
|
aria-label="Confirm theme"
|
|
35
|
-
onclick="this.closest('.usx-theme-picker').classList.remove('usx-theme-picker--open')"
|
|
36
37
|
>
|
|
37
|
-
<svg
|
|
38
|
-
|
|
38
|
+
<svg
|
|
39
|
+
class="usa-icon usx-icon usx-theme-picker__icon"
|
|
40
|
+
aria-hidden="true"
|
|
41
|
+
focusable="false"
|
|
42
|
+
role="img"
|
|
43
|
+
>
|
|
44
|
+
<use href="/img/sprite.svg#close"></use>
|
|
39
45
|
</svg>
|
|
40
46
|
</button>
|
|
41
47
|
</div>
|
|
42
48
|
</div>
|
|
43
49
|
|
|
44
|
-
<h3 class="site-preview-heading text-ink">Light/Dark Theme Picker</h3>
|
|
45
50
|
|
|
46
|
-
<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
onclick="this.closest('.usx-theme-picker').classList.add('usx-theme-picker--open')"
|
|
52
|
-
>
|
|
53
|
-
<svg
|
|
54
|
-
class="usa-icon usx-theme-picker__icon"
|
|
51
|
+
<h3 class="site-preview-heading">Ghost Select</h3>
|
|
52
|
+
<div class="usx-theme-picker usx-theme-picker--ghost-select">
|
|
53
|
+
<div class="usx-theme-picker__ghost">
|
|
54
|
+
<span
|
|
55
|
+
class="usa-button usx-button usx-button--ghost usx-theme-picker__ghost-face"
|
|
55
56
|
aria-hidden="true"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
class="usa-select usx-select"
|
|
68
|
-
id="theme-picker-light-dark-select"
|
|
69
|
-
onchange="window.usxThemePickerDemo.onChange(this.value)"
|
|
57
|
+
><svg
|
|
58
|
+
class="usa-icon usx-icon usx-theme-picker__icon"
|
|
59
|
+
aria-hidden="true"
|
|
60
|
+
focusable="false"
|
|
61
|
+
role="img"
|
|
62
|
+
>
|
|
63
|
+
<use href="./img/usx-sprite.svg#color_palette"></use></svg></span
|
|
64
|
+
><label class="usa-label usx-label usa-sr-only" for="theme-picker-example-ghost-select"
|
|
65
|
+
>Theme</label
|
|
66
|
+
><select
|
|
67
|
+
id="theme-picker-example-ghost-select"
|
|
68
|
+
class="usa-select usx-select usx-theme-picker__select--hidden"
|
|
70
69
|
>
|
|
71
|
-
<option value="
|
|
70
|
+
<option value="Default" selected="">Default</option>
|
|
71
|
+
<option value="Forest">Forest</option>
|
|
72
|
+
<option value="Sunset">Sunset</option>
|
|
73
|
+
<option value="Ocean">Ocean</option>
|
|
74
|
+
<option value="Aurora">Aurora</option>
|
|
75
|
+
<option value="Borealis">Borealis</option>
|
|
76
|
+
<option value="Midnight">Midnight</option>
|
|
77
|
+
<option value="Carbon">Carbon</option>
|
|
78
|
+
<option value="VADS">VADS</option>
|
|
79
|
+
<option value="GOV.UK">GOV.UK</option>
|
|
80
|
+
<option value="NASA">NASA</option>
|
|
81
|
+
</select>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
<h3 class="site-preview-heading">Swap</h3>
|
|
87
|
+
<div class="usx-theme-picker usx-theme-picker--swap">
|
|
88
|
+
<label
|
|
89
|
+
class="usx-swap usx-swap--rotate usx-theme-picker__swap usa-button usx-button usx-button--ghost"
|
|
90
|
+
><input type="checkbox" autocomplete="off" aria-label="Theme: Light. Switch to Dark" /><span
|
|
91
|
+
class="usx-swap-on"
|
|
92
|
+
><svg
|
|
93
|
+
class="usa-icon usx-icon usx-theme-picker__icon"
|
|
94
|
+
aria-hidden="true"
|
|
95
|
+
focusable="false"
|
|
96
|
+
role="img"
|
|
97
|
+
>
|
|
98
|
+
<use href="./img/usx-sprite.svg#moon"></use></svg></span
|
|
99
|
+
><span class="usx-swap-off"
|
|
100
|
+
><svg
|
|
101
|
+
class="usa-icon usx-icon usx-theme-picker__icon"
|
|
102
|
+
aria-hidden="true"
|
|
103
|
+
focusable="false"
|
|
104
|
+
role="img"
|
|
105
|
+
>
|
|
106
|
+
<use href="./img/usx-sprite.svg#sun"></use></svg></span
|
|
107
|
+
></label>
|
|
108
|
+
<div class="usx-theme-picker__fallback">
|
|
109
|
+
<label class="usa-label usx-label usa-sr-only" for="theme-picker-example-swap">Theme</label
|
|
110
|
+
><select id="theme-picker-example-swap" class="usa-select usx-select">
|
|
111
|
+
<option value="Aurora" selected="">Light</option>
|
|
72
112
|
<option value="Borealis">Dark</option>
|
|
73
113
|
</select>
|
|
74
|
-
<button
|
|
75
|
-
type="button"
|
|
76
|
-
class="usa-button usx-button usa-button--primary usx-theme-picker__toggle"
|
|
77
|
-
aria-label="Confirm theme"
|
|
78
|
-
onclick="this.closest('.usx-theme-picker').classList.remove('usx-theme-picker--open')"
|
|
79
|
-
>
|
|
80
|
-
<svg class="usa-icon usx-theme-picker__icon" aria-hidden="true" focusable="false" role="img">
|
|
81
|
-
<use href="img/sprite.svg#close"></use>
|
|
82
|
-
</svg>
|
|
83
|
-
</button>
|
|
84
114
|
</div>
|
|
85
115
|
</div>
|
|
@@ -8,15 +8,12 @@
|
|
|
8
8
|
aria-controls="react-theme-picker-1-panel"
|
|
9
9
|
>
|
|
10
10
|
<svg
|
|
11
|
-
class="usa-icon usx-theme-picker__icon"
|
|
11
|
+
class="usa-icon usx-icon usx-theme-picker__icon"
|
|
12
12
|
aria-hidden="true"
|
|
13
13
|
focusable="false"
|
|
14
|
-
|
|
14
|
+
role="img"
|
|
15
15
|
>
|
|
16
|
-
<
|
|
17
|
-
fill="currentColor"
|
|
18
|
-
d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"
|
|
19
|
-
></path>
|
|
16
|
+
<use href="/img/usx-sprite.svg#color_palette"></use>
|
|
20
17
|
</svg>
|
|
21
18
|
</button>
|
|
22
19
|
<div id="react-theme-picker-1-panel" class="usx-theme-picker__panel">
|
|
@@ -60,15 +57,12 @@
|
|
|
60
57
|
aria-controls="react-theme-picker-2-panel"
|
|
61
58
|
>
|
|
62
59
|
<svg
|
|
63
|
-
class="usa-icon usx-theme-picker__icon"
|
|
60
|
+
class="usa-icon usx-icon usx-theme-picker__icon"
|
|
64
61
|
aria-hidden="true"
|
|
65
62
|
focusable="false"
|
|
66
|
-
|
|
63
|
+
role="img"
|
|
67
64
|
>
|
|
68
|
-
<
|
|
69
|
-
fill="currentColor"
|
|
70
|
-
d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"
|
|
71
|
-
></path>
|
|
65
|
+
<use href="/img/usx-sprite.svg#color_palette"></use>
|
|
72
66
|
</svg>
|
|
73
67
|
</button>
|
|
74
68
|
<div id="react-theme-picker-2-panel" class="usx-theme-picker__panel">
|
|
@@ -93,6 +87,71 @@
|
|
|
93
87
|
</div>
|
|
94
88
|
</div>
|
|
95
89
|
|
|
90
|
+
<h3 class="site-preview-heading">Ghost Select</h3>
|
|
91
|
+
<div class="usx-theme-picker usx-theme-picker--ghost-select">
|
|
92
|
+
<div class="usx-theme-picker__ghost">
|
|
93
|
+
<span
|
|
94
|
+
class="usa-button usx-button usx-button--ghost usx-theme-picker__ghost-face"
|
|
95
|
+
aria-hidden="true"
|
|
96
|
+
><svg
|
|
97
|
+
class="usa-icon usx-icon usx-theme-picker__icon"
|
|
98
|
+
aria-hidden="true"
|
|
99
|
+
focusable="false"
|
|
100
|
+
role="img"
|
|
101
|
+
>
|
|
102
|
+
<use href="/img/usx-sprite.svg#color_palette"></use></svg></span
|
|
103
|
+
><label class="usa-label usx-label usa-sr-only" for="react-theme-picker-ghost-select"
|
|
104
|
+
>Theme</label
|
|
105
|
+
><select
|
|
106
|
+
id="react-theme-picker-ghost-select"
|
|
107
|
+
class="usa-select usx-select usx-theme-picker__select--hidden"
|
|
108
|
+
>
|
|
109
|
+
<option value="Default" selected="">Default</option>
|
|
110
|
+
<option value="Forest">Forest</option>
|
|
111
|
+
<option value="Sunset">Sunset</option>
|
|
112
|
+
<option value="Ocean">Ocean</option>
|
|
113
|
+
<option value="Aurora">Aurora</option>
|
|
114
|
+
<option value="Borealis">Borealis</option>
|
|
115
|
+
<option value="Midnight">Midnight</option>
|
|
116
|
+
<option value="Carbon">Carbon</option>
|
|
117
|
+
<option value="VADS">VADS</option>
|
|
118
|
+
<option value="GOV.UK">GOV.UK</option>
|
|
119
|
+
<option value="NASA">NASA</option>
|
|
120
|
+
</select>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
|
|
124
|
+
<h3 class="site-preview-heading">Swap</h3>
|
|
125
|
+
<div class="usx-theme-picker usx-theme-picker--swap">
|
|
126
|
+
<label
|
|
127
|
+
class="usx-swap usx-swap--rotate usx-theme-picker__swap usa-button usx-button usx-button--ghost"
|
|
128
|
+
><input type="checkbox" autocomplete="off" aria-label="Theme: Light. Switch to Dark" /><span
|
|
129
|
+
class="usx-swap-on"
|
|
130
|
+
><svg
|
|
131
|
+
class="usa-icon usx-icon usx-theme-picker__icon"
|
|
132
|
+
aria-hidden="true"
|
|
133
|
+
focusable="false"
|
|
134
|
+
role="img"
|
|
135
|
+
>
|
|
136
|
+
<use href="/img/usx-sprite.svg#moon"></use></svg></span
|
|
137
|
+
><span class="usx-swap-off"
|
|
138
|
+
><svg
|
|
139
|
+
class="usa-icon usx-icon usx-theme-picker__icon"
|
|
140
|
+
aria-hidden="true"
|
|
141
|
+
focusable="false"
|
|
142
|
+
role="img"
|
|
143
|
+
>
|
|
144
|
+
<use href="/img/usx-sprite.svg#sun"></use></svg></span
|
|
145
|
+
></label>
|
|
146
|
+
<div class="usx-theme-picker__fallback">
|
|
147
|
+
<label class="usa-label usx-label usa-sr-only" for="react-theme-picker-swap">Theme</label
|
|
148
|
+
><select id="react-theme-picker-swap" class="usa-select usx-select">
|
|
149
|
+
<option value="Aurora" selected="">Light</option>
|
|
150
|
+
<option value="Borealis">Dark</option>
|
|
151
|
+
</select>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
|
|
96
155
|
<h3 class="site-preview-heading">With Value</h3>
|
|
97
156
|
<div class="usx-theme-picker">
|
|
98
157
|
<button
|
|
@@ -103,15 +162,12 @@
|
|
|
103
162
|
aria-controls="react-theme-picker-value-panel"
|
|
104
163
|
>
|
|
105
164
|
<svg
|
|
106
|
-
class="usa-icon usx-theme-picker__icon"
|
|
165
|
+
class="usa-icon usx-icon usx-theme-picker__icon"
|
|
107
166
|
aria-hidden="true"
|
|
108
167
|
focusable="false"
|
|
109
|
-
|
|
168
|
+
role="img"
|
|
110
169
|
>
|
|
111
|
-
<
|
|
112
|
-
fill="currentColor"
|
|
113
|
-
d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"
|
|
114
|
-
></path>
|
|
170
|
+
<use href="/img/usx-sprite.svg#color_palette"></use>
|
|
115
171
|
</svg>
|
|
116
172
|
</button>
|
|
117
173
|
<div id="react-theme-picker-value-panel" class="usx-theme-picker__panel">
|