@solexllc/usx 0.1.6 → 0.1.8
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/package.json +2 -2
- package/src/_utilities.scss +1 -1
- package/src/components/_avatar.scss +4 -4
- package/src/components/_header.scss +7 -10
- package/src/components/_hero.scss +4 -9
- package/src/components/_layout.scss +85 -8
- package/src/components/_misc-banner.scss +1 -1
- package/src/components/_modal.scss +1 -1
- package/src/components/_page.scss +3 -3
- package/src/components/_pagination.scss +3 -3
- package/src/components/_section.scss +1 -1
- package/src/components/_sidenav.scss +2 -2
- package/src/components/_table.scss +1 -1
- package/src/icons/contract.svg +3 -0
- package/src/icons/expand.svg +3 -0
- package/src/img/usx-icons.json +3 -1
- package/src/img/usx-sprite.svg +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solexllc/usx",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Compiled USWDS-based component styles for USX.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"src"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@solexllc/usx-theme": "0.2.
|
|
35
|
+
"@solexllc/usx-theme": "0.2.3"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"sass": "^1.98.0"
|
package/src/_utilities.scss
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
/* stylelint-disable no-descending-specificity -- Size modifiers intentionally precede the base content rule. */
|
|
5
5
|
.usx-avatar {
|
|
6
6
|
text-decoration: none;
|
|
7
|
-
display:
|
|
7
|
+
display: flex;
|
|
8
8
|
width: 3rem;
|
|
9
9
|
height: 3rem;
|
|
10
|
+
align-items: center;
|
|
10
11
|
|
|
11
12
|
&.usx-avatar--size-sm {
|
|
12
13
|
width: 2.5rem;
|
|
@@ -41,9 +42,8 @@
|
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
.usx-avatar__img {
|
|
44
|
-
height:
|
|
45
|
-
width:
|
|
46
|
-
object-fit: cover;
|
|
45
|
+
height: auto;
|
|
46
|
+
width: auto;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.usx-avatar__content {
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
.usa-nav__inner {
|
|
87
87
|
margin-left: auto;
|
|
88
88
|
margin-right: auto;
|
|
89
|
-
max-width:
|
|
90
|
-
padding-left:
|
|
91
|
-
padding-right:
|
|
89
|
+
max-width: usx-when($max-layout-width, $max-layout-width, 64rem);
|
|
90
|
+
padding-left: units(4);
|
|
91
|
+
padding-right: units(4);
|
|
92
92
|
position: relative;
|
|
93
93
|
|
|
94
94
|
// .usa-nav__close (mobile-only) is hidden at this width, and
|
|
@@ -140,9 +140,9 @@
|
|
|
140
140
|
|
|
141
141
|
.usa-nav__submenu.usa-megamenu {
|
|
142
142
|
left: 0;
|
|
143
|
-
padding-left:
|
|
144
|
-
padding-right:
|
|
145
|
-
max-width:
|
|
143
|
+
padding-left: units(4);
|
|
144
|
+
padding-right: units(4);
|
|
145
|
+
max-width: usx-when($max-layout-width, $max-layout-width, 64rem);
|
|
146
146
|
margin-left: auto;
|
|
147
147
|
margin-right: auto;
|
|
148
148
|
}
|
|
@@ -228,10 +228,7 @@
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
.usa-nav__inner {
|
|
231
|
-
|
|
232
|
-
max-width: calc($max-layout-width + 4rem);
|
|
233
|
-
}
|
|
234
|
-
|
|
231
|
+
max-width: usx-when($max-layout-width, $max-layout-width, 64rem);
|
|
235
232
|
margin-left: auto;
|
|
236
233
|
margin-right: auto;
|
|
237
234
|
padding-left: 1rem;
|
|
@@ -36,14 +36,9 @@
|
|
|
36
36
|
position: relative;
|
|
37
37
|
z-index: 1;
|
|
38
38
|
width: 100%;
|
|
39
|
-
max-width: $max-layout-width;
|
|
39
|
+
max-width: usx-when($max-layout-width, $max-layout-width, 64rem);
|
|
40
40
|
margin-inline: auto;
|
|
41
|
-
padding
|
|
42
|
-
padding-inline: 1.5rem;
|
|
43
|
-
|
|
44
|
-
padding-block: usx-when($usx-hero-padding-block);
|
|
45
|
-
|
|
46
|
-
padding-inline: usx-when($usx-hero-padding-inline);
|
|
41
|
+
padding: 0 units(4);
|
|
47
42
|
}
|
|
48
43
|
|
|
49
44
|
&--has-overlay.usx-hero--custom-overlay::before {
|
|
@@ -54,7 +49,7 @@
|
|
|
54
49
|
min-width: 0;
|
|
55
50
|
overflow-wrap: anywhere;
|
|
56
51
|
max-width: 40rem;
|
|
57
|
-
padding:
|
|
52
|
+
padding: units(4);
|
|
58
53
|
background-color: rgb(0 0 0 / 90%);
|
|
59
54
|
|
|
60
55
|
// Radius follows the app-wide radius-box group (null/square by default,
|
|
@@ -85,7 +80,7 @@
|
|
|
85
80
|
|
|
86
81
|
&__secondary {
|
|
87
82
|
min-width: 0;
|
|
88
|
-
margin-top:
|
|
83
|
+
margin-top: units(4);
|
|
89
84
|
overflow-wrap: anywhere;
|
|
90
85
|
}
|
|
91
86
|
|
|
@@ -2,18 +2,80 @@
|
|
|
2
2
|
|
|
3
3
|
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
4
|
.usx-layout {
|
|
5
|
+
position: relative;
|
|
5
6
|
min-height: 100vh;
|
|
6
7
|
|
|
7
8
|
background-color: usx-when($usx-surface-1);
|
|
8
9
|
|
|
10
|
+
&.usx-expanded {
|
|
11
|
+
.usx-layout__single-column,
|
|
12
|
+
.usx-layout__content {
|
|
13
|
+
max-width: 1600px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.usx-layout__grid-container {
|
|
17
|
+
grid-template-columns:
|
|
18
|
+
[page-start] units(2) [left-sidebar-start] 0 [content-start] minmax(0, 1600px) [content-end] 0 [right-sidebar-end] units(2) [page-end];
|
|
19
|
+
|
|
20
|
+
@include at-media('tablet') {
|
|
21
|
+
grid-template-columns:
|
|
22
|
+
[page-start] units(4) [left-sidebar-start] 0 [content-start] minmax(0, 1600px) [content-end] 0 [right-sidebar-end] units(4) [page-end];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@include at-media('desktop') {
|
|
26
|
+
grid-template-columns:
|
|
27
|
+
[page-start] 1fr [left-sidebar-start] $max-sidebar-width [content-start] minmax(0, 1600px) [content-end] $max-sidebar-width [right-sidebar-end] 1fr [page-end];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__expand-button {
|
|
33
|
+
display: none;
|
|
34
|
+
position: absolute;
|
|
35
|
+
right: calc(0px - units(4));
|
|
36
|
+
top: 0;
|
|
37
|
+
width: units(5);
|
|
38
|
+
height: units(5);
|
|
39
|
+
padding: 0;
|
|
40
|
+
border: none;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
z-index: 1;
|
|
45
|
+
color: usx-when($usx-color-primary, #005ea2);
|
|
46
|
+
|
|
47
|
+
// Below this width there's no room to grow into, so hide the toggle.
|
|
48
|
+
@include at-media('desktop') {
|
|
49
|
+
display: flex;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:hover,
|
|
53
|
+
&:focus {
|
|
54
|
+
opacity: 1;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&__expand-icon--contract {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.usx-expanded &__expand-icon--expand {
|
|
63
|
+
display: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.usx-expanded &__expand-icon--contract {
|
|
67
|
+
display: block;
|
|
68
|
+
}
|
|
69
|
+
|
|
9
70
|
// ── Single column layout ──────────────────────────────────────────────────
|
|
10
71
|
// Centers content with max-width and responsive gutters
|
|
11
72
|
// | gutter | content (max-width 960px) | gutter |
|
|
12
73
|
|
|
13
74
|
&__single-column {
|
|
14
|
-
max-width:
|
|
75
|
+
max-width: usx-when($max-layout-width, $max-layout-width, 64rem);
|
|
15
76
|
margin: 0 auto;
|
|
16
|
-
padding: 0 units(
|
|
77
|
+
padding: 0 units(4);
|
|
78
|
+
position: relative;
|
|
17
79
|
}
|
|
18
80
|
|
|
19
81
|
// ── Multi-column grid layout ──────────────────────────────────────────────
|
|
@@ -21,28 +83,35 @@
|
|
|
21
83
|
// | gutter | left sidebar | content | right sidebar | gutter |
|
|
22
84
|
|
|
23
85
|
&__grid-container {
|
|
86
|
+
position: relative;
|
|
24
87
|
display: grid;
|
|
25
88
|
grid-template-rows: auto;
|
|
26
89
|
grid-template-columns:
|
|
27
|
-
[page-start] units(2) [left-sidebar-start] 0 [content-start] minmax(0, $max-layout-width) [content-end] 0 [right-sidebar-end] units(2) [page-end];
|
|
90
|
+
[page-start] units(2) [left-sidebar-start] 0 [content-start] minmax(0, usx-when($max-layout-width, $max-layout-width, 64rem)) [content-end] 0 [right-sidebar-end] units(2) [page-end];
|
|
28
91
|
|
|
29
92
|
@include at-media('tablet') {
|
|
30
93
|
grid-template-columns:
|
|
31
|
-
[page-start] units(4) [left-sidebar-start] 0 [content-start] minmax(0, $max-layout-width) [content-end] 0 [right-sidebar-end] units(4) [page-end];
|
|
94
|
+
[page-start] units(4) [left-sidebar-start] 0 [content-start] minmax(0, usx-when($max-layout-width, $max-layout-width, 64rem)) [content-end] 0 [right-sidebar-end] units(4) [page-end];
|
|
32
95
|
}
|
|
33
96
|
|
|
34
97
|
@include at-media('desktop') {
|
|
35
98
|
grid-template-columns:
|
|
36
|
-
[page-start] 1fr [left-sidebar-start] $max-sidebar-width [content-start] minmax(0, $max-layout-width) [content-end] $max-sidebar-width [right-sidebar-end] 1fr [page-end];
|
|
99
|
+
[page-start] 1fr [left-sidebar-start] $max-sidebar-width [content-start] minmax(0, usx-when($max-layout-width, $max-layout-width, 64rem)) [content-end] $max-sidebar-width [right-sidebar-end] 1fr [page-end];
|
|
37
100
|
}
|
|
38
101
|
}
|
|
39
102
|
|
|
40
103
|
// ── Content areas ─────────────────────────────────────────────────────────
|
|
41
104
|
|
|
42
105
|
&__content {
|
|
106
|
+
position: relative;
|
|
43
107
|
grid-column: content-start / span content-end;
|
|
44
108
|
grid-row: 1;
|
|
45
|
-
max-width:
|
|
109
|
+
max-width: usx-when($max-layout-width, $max-layout-width, 64rem);
|
|
110
|
+
padding: 0 units(4);
|
|
111
|
+
|
|
112
|
+
.usx-layout__expand-button {
|
|
113
|
+
top: units(3);
|
|
114
|
+
}
|
|
46
115
|
|
|
47
116
|
|
|
48
117
|
// Content that leaves space for a left sidebar
|
|
@@ -65,10 +134,17 @@
|
|
|
65
134
|
|
|
66
135
|
@include at-media('desktop') {
|
|
67
136
|
grid-column: left-sidebar-start / span content-end;
|
|
68
|
-
|
|
137
|
+
width: 100%;
|
|
138
|
+
justify-self: end;
|
|
69
139
|
padding-left: units(4);
|
|
70
140
|
}
|
|
71
141
|
}
|
|
142
|
+
|
|
143
|
+
&:not(&--right) {
|
|
144
|
+
.usx-layout__expand-button {
|
|
145
|
+
right: units(4);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
72
148
|
}
|
|
73
149
|
|
|
74
150
|
// ── Sidebar areas ─────────────────────────────────────────────────────────
|
|
@@ -77,19 +153,20 @@
|
|
|
77
153
|
grid-column: left-sidebar-start / span content-start;
|
|
78
154
|
grid-row: 1;
|
|
79
155
|
height: 100%;
|
|
156
|
+
padding: 0 0 0 units(4);
|
|
80
157
|
}
|
|
81
158
|
|
|
82
159
|
&__sidebar--right {
|
|
83
160
|
grid-column: content-end / span right-sidebar-end;
|
|
84
161
|
grid-row: 1;
|
|
85
162
|
height: 100%;
|
|
163
|
+
padding: 0 units(4) 0 0;
|
|
86
164
|
}
|
|
87
165
|
|
|
88
166
|
// Hide sidebars on mobile/tablet, show on desktop
|
|
89
167
|
&__sidebar--right,
|
|
90
168
|
&__sidebar--left {
|
|
91
169
|
display: none;
|
|
92
|
-
padding: 0 units(4);
|
|
93
170
|
|
|
94
171
|
@include at-media('desktop') {
|
|
95
172
|
display: block;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
4
|
.usx-page {
|
|
5
|
-
margin-top:
|
|
6
|
-
margin-bottom:
|
|
5
|
+
margin-top: units(4);
|
|
6
|
+
margin-bottom: units(8);
|
|
7
7
|
|
|
8
8
|
background-color: usx-when($usx-page-bg);
|
|
9
9
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
display: block;
|
|
19
19
|
|
|
20
20
|
p {
|
|
21
|
-
max-width:
|
|
21
|
+
max-width: usx-when($max-layout-width, $max-layout-width, 64rem);
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
4
|
.usx-layout {
|
|
5
5
|
.usx-sidenav {
|
|
6
|
-
margin-top:
|
|
6
|
+
margin-top: units(4);
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
&.usx-sidenav--sticky {
|
|
16
16
|
position: sticky;
|
|
17
|
-
top:
|
|
17
|
+
top: units(4);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.usa-sidenav__item {
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
// ── Placeholder ───────────────────────────────────────────────────────────────
|
|
267
267
|
.usx-table__placeholder-cell {
|
|
268
268
|
text-align: center;
|
|
269
|
-
padding:
|
|
269
|
+
padding: units(4) units(2);
|
|
270
270
|
font-style: italic;
|
|
271
271
|
|
|
272
272
|
color: usx-when($usx-table-placeholder-text);
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="11.1664 10.5 24.0006 24.0039" width="24" height="24">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" d="M20.9401 16.9421V10.5H17.6068V16.9421H11.1664V20.2754H20.9401V20.2716V16.9421ZM20.9401 28.0618V34.5039H17.6068V28.0618H11.1664V24.7285H20.9401V24.7323V28.0618ZM25.3933 10.5V16.9421V20.2716V20.2754H35.167V16.9421H28.7266V10.5H25.3933ZM25.3933 28.0618V34.5039H28.7266V28.0618H35.167V24.7285H25.3933V24.7323V28.0618Z" />
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="10.5 10.5 24 24" width="24" height="24">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" d="M10.5 13.8333V20.2754H13.8333L13.8333 13.8333H20.2738V10.5H10.5V10.5038V13.8333ZM10.5 31.1706V24.7285H13.8333L13.8333 31.1706H20.2738V34.5039H10.5V34.5002V31.1706ZM34.5 20.2754V13.8333V10.5038V10.5H24.7262V13.8333H31.1667L31.1667 20.2754H34.5ZM34.5 31.1706V24.7285H31.1667L31.1667 31.1706H24.7262V34.5039H34.5V34.5002V31.1706Z" />
|
|
3
|
+
</svg>
|
package/src/img/usx-icons.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"items": [
|
|
3
|
-
{ "name": "spinner", "meta": "loading spin progress busy wait" }
|
|
3
|
+
{ "name": "spinner", "meta": "loading spin progress busy wait" },
|
|
4
|
+
{ "name": "expand", "meta": "expand enlarge widen maximize" },
|
|
5
|
+
{ "name": "contract", "meta": "contract shrink narrow minimize collapse" }
|
|
4
6
|
]
|
|
5
7
|
}
|
package/src/img/usx-sprite.svg
CHANGED
|
@@ -7,6 +7,12 @@
|
|
|
7
7
|
search.
|
|
8
8
|
Reference icons with: <use href="./img/usx-sprite.svg#icon-name" />
|
|
9
9
|
-->
|
|
10
|
+
<symbol id="contract" viewBox="11.1664 10.5 24.0006 24.0039">
|
|
11
|
+
<path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" d="M20.9401 16.9421V10.5H17.6068V16.9421H11.1664V20.2754H20.9401V20.2716V16.9421ZM20.9401 28.0618V34.5039H17.6068V28.0618H11.1664V24.7285H20.9401V24.7323V28.0618ZM25.3933 10.5V16.9421V20.2716V20.2754H35.167V16.9421H28.7266V10.5H25.3933ZM25.3933 28.0618V34.5039H28.7266V28.0618H35.167V24.7285H25.3933V24.7323V28.0618Z" />
|
|
12
|
+
</symbol>
|
|
13
|
+
<symbol id="expand" viewBox="10.5 10.5 24 24">
|
|
14
|
+
<path fill-rule="evenodd" clip-rule="evenodd" fill="currentColor" d="M10.5 13.8333V20.2754H13.8333L13.8333 13.8333H20.2738V10.5H10.5V10.5038V13.8333ZM10.5 31.1706V24.7285H13.8333L13.8333 31.1706H20.2738V34.5039H10.5V34.5002V31.1706ZM34.5 20.2754V13.8333V10.5038V10.5H24.7262V13.8333H31.1667L31.1667 20.2754H34.5ZM34.5 31.1706V24.7285H31.1667L31.1667 31.1706H24.7262V34.5039H34.5V34.5002V31.1706Z" />
|
|
15
|
+
</symbol>
|
|
10
16
|
<symbol id="spinner" viewBox="0 0 24 24">
|
|
11
17
|
<!-- Track: full circle at low opacity -->
|
|
12
18
|
<circle cx="12" cy="12" r="10" fill="none" stroke="currentColor" stroke-width="2.5" opacity="0.2" />
|