@solexllc/usx 0.1.0 → 0.1.2
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/LICENSE +21 -0
- package/package.json +5 -5
- package/src/components/_header.scss +23 -0
- package/src/components/_in-page-nav.scss +15 -0
- package/src/components/_layout.scss +7 -14
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alex
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solexllc/usx",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Compiled USWDS-based component styles for USX.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"src"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@solexllc/usx-theme": "
|
|
35
|
+
"@solexllc/usx-theme": "0.1.1"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"sass": "^1.98.0"
|
|
36
39
|
},
|
|
37
40
|
"scripts": {
|
|
38
41
|
"build": "node scripts/build-sprite.mjs",
|
|
39
42
|
"dev": "node scripts/build-sprite.mjs --watch",
|
|
40
43
|
"test": "node test/theme-check.mjs"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"sass": "^1.98.0"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
2
|
|
|
3
3
|
/* stylelint-disable selector-class-pattern, no-descending-specificity -- Public USX classes use BEM naming; intentional cascade order. */
|
|
4
|
+
|
|
5
|
+
// Keeps utilityContent and the search box on one row regardless of the
|
|
6
|
+
// parent's own flex-direction (USWDS's .usa-nav__secondary stacks its
|
|
7
|
+
// children in a column at desktop).
|
|
8
|
+
.usx-nav__utility {
|
|
9
|
+
align-items: center;
|
|
10
|
+
display: flex;
|
|
11
|
+
gap: 0.5rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
4
14
|
.usx-header {
|
|
5
15
|
@if $usx-header-bg {
|
|
6
16
|
background-color: $usx-header-bg;
|
|
@@ -91,6 +101,19 @@
|
|
|
91
101
|
padding-left: 2rem;
|
|
92
102
|
padding-right: 2rem;
|
|
93
103
|
position: relative;
|
|
104
|
+
|
|
105
|
+
// .usa-nav__close (mobile-only) is hidden at this width, and
|
|
106
|
+
// .usa-nav__secondary is taken out of flow via its own absolute
|
|
107
|
+
// positioning — so .usa-nav__primary and .usx-nav__end-slot are the
|
|
108
|
+
// only two participants in this row, letting margin-left: auto push
|
|
109
|
+
// the slot flush right, vertically centered with the nav links.
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.usx-nav__end-slot {
|
|
115
|
+
flex-shrink: 0;
|
|
116
|
+
margin-left: auto;
|
|
94
117
|
}
|
|
95
118
|
|
|
96
119
|
// USWDS's own .usa-header--extended .usa-nav__primary-item > .usa-nav__link:hover::after
|
|
@@ -10,12 +10,27 @@
|
|
|
10
10
|
// instead of leaving the compiled defaults frozen.
|
|
11
11
|
|
|
12
12
|
.usa-in-page-nav-container {
|
|
13
|
+
// Lets the sticky <aside> inside stick across its ancestor's full height
|
|
14
|
+
// (e.g. Layout's right sidebar, which stretches via CSS grid) instead of
|
|
15
|
+
// being bounded by this container's own (much shorter) content height.
|
|
16
|
+
height: 100%;
|
|
17
|
+
|
|
13
18
|
main,
|
|
14
19
|
.usx-in-page-nav__content {
|
|
15
20
|
max-width: 100%;
|
|
16
21
|
}
|
|
17
22
|
}
|
|
18
23
|
|
|
24
|
+
.usx-layout__sidebar--right {
|
|
25
|
+
|
|
26
|
+
.usa-in-page-nav-container {
|
|
27
|
+
|
|
28
|
+
.usa-in-page-nav.usx-in-page-nav {
|
|
29
|
+
margin: 0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
19
34
|
.usa-in-page-nav__nav {
|
|
20
35
|
@if $usx-in-page-nav-bg {
|
|
21
36
|
background-color: $usx-in-page-nav-bg;
|
|
@@ -13,17 +13,9 @@
|
|
|
13
13
|
// | gutter | content (max-width 960px) | gutter |
|
|
14
14
|
|
|
15
15
|
&__single-column {
|
|
16
|
-
max-width: $max-layout-width;
|
|
16
|
+
max-width: calc($max-layout-width + units(4));
|
|
17
17
|
margin: 0 auto;
|
|
18
|
-
padding: 0 units(2
|
|
19
|
-
|
|
20
|
-
@include at-media('tablet') {
|
|
21
|
-
padding: 0 units(4);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@include at-media('desktop') {
|
|
25
|
-
padding: 0;
|
|
26
|
-
}
|
|
18
|
+
padding: 0 units(2);
|
|
27
19
|
}
|
|
28
20
|
|
|
29
21
|
// ── Multi-column grid layout ──────────────────────────────────────────────
|
|
@@ -52,6 +44,7 @@
|
|
|
52
44
|
&__content {
|
|
53
45
|
grid-column: content-start / span content-end;
|
|
54
46
|
grid-row: 1;
|
|
47
|
+
max-width: calc($max-layout-width + units(4));
|
|
55
48
|
|
|
56
49
|
|
|
57
50
|
// Content that leaves space for a left sidebar
|
|
@@ -62,8 +55,7 @@
|
|
|
62
55
|
|
|
63
56
|
@include at-media('desktop') {
|
|
64
57
|
grid-column: content-start / span right-sidebar-end;
|
|
65
|
-
|
|
66
|
-
margin: 0 units(4) 0 0;
|
|
58
|
+
padding-right: units(4);
|
|
67
59
|
}
|
|
68
60
|
}
|
|
69
61
|
|
|
@@ -75,9 +67,8 @@
|
|
|
75
67
|
|
|
76
68
|
@include at-media('desktop') {
|
|
77
69
|
grid-column: left-sidebar-start / span content-end;
|
|
78
|
-
width: $dynamic-content-width;
|
|
79
|
-
margin: 0 0 0 units(4);
|
|
80
70
|
justify-self: flex-end;
|
|
71
|
+
padding-left: units(4);
|
|
81
72
|
}
|
|
82
73
|
}
|
|
83
74
|
}
|
|
@@ -87,11 +78,13 @@
|
|
|
87
78
|
&__sidebar--left {
|
|
88
79
|
grid-column: left-sidebar-start / span content-start;
|
|
89
80
|
grid-row: 1;
|
|
81
|
+
height: 100%;
|
|
90
82
|
}
|
|
91
83
|
|
|
92
84
|
&__sidebar--right {
|
|
93
85
|
grid-column: content-end / span right-sidebar-end;
|
|
94
86
|
grid-row: 1;
|
|
87
|
+
height: 100%;
|
|
95
88
|
}
|
|
96
89
|
|
|
97
90
|
// Hide sidebars on mobile/tablet, show on desktop
|