@solexllc/usx 0.1.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/README.md +45 -0
- package/package.json +45 -0
- package/src/_utilities.scss +146 -0
- package/src/components/_accordion.scss +110 -0
- package/src/components/_alert.scss +156 -0
- package/src/components/_attribution.scss +40 -0
- package/src/components/_avatar-group.scss +50 -0
- package/src/components/_avatar.scss +63 -0
- package/src/components/_banner.scss +30 -0
- package/src/components/_block.scss +105 -0
- package/src/components/_branding.scss +89 -0
- package/src/components/_breadcrumb.scss +35 -0
- package/src/components/_button-group.scss +50 -0
- package/src/components/_button.scss +250 -0
- package/src/components/_calendar-date.scss +50 -0
- package/src/components/_carousel.scss +142 -0
- package/src/components/_character-count.scss +12 -0
- package/src/components/_checkbox.scss +68 -0
- package/src/components/_clickable.scss +81 -0
- package/src/components/_code.scss +76 -0
- package/src/components/_collection.scss +27 -0
- package/src/components/_combobox.scss +59 -0
- package/src/components/_copy-to-clipboard.scss +46 -0
- package/src/components/_date-picker.scss +58 -0
- package/src/components/_eyebrow.scss +10 -0
- package/src/components/_file-input.scss +254 -0
- package/src/components/_focus.scss +24 -0
- package/src/components/_footer.scss +185 -0
- package/src/components/_form-group.scss +32 -0
- package/src/components/_header.scss +441 -0
- package/src/components/_hero.scss +149 -0
- package/src/components/_icon-list.scss +23 -0
- package/src/components/_icon.scss +18 -0
- package/src/components/_image.scss +80 -0
- package/src/components/_in-page-nav.scss +74 -0
- package/src/components/_indicator.scss +73 -0
- package/src/components/_input.scss +135 -0
- package/src/components/_language-selector.scss +26 -0
- package/src/components/_layout.scss +115 -0
- package/src/components/_link.scss +63 -0
- package/src/components/_list.scss +4 -0
- package/src/components/_misc-banner.scss +143 -0
- package/src/components/_modal.scss +47 -0
- package/src/components/_page.scss +28 -0
- package/src/components/_pagination.scss +202 -0
- package/src/components/_process-list.scss +35 -0
- package/src/components/_prose.scss +1 -0
- package/src/components/_radio-buttons.scss +66 -0
- package/src/components/_range-slider.scss +117 -0
- package/src/components/_required.scss +7 -0
- package/src/components/_search.scss +10 -0
- package/src/components/_section.scss +26 -0
- package/src/components/_select.scss +112 -0
- package/src/components/_sidenav.scss +74 -0
- package/src/components/_site-alert.scss +75 -0
- package/src/components/_spinner.scss +25 -0
- package/src/components/_status.scss +46 -0
- package/src/components/_step-indicator.scss +130 -0
- package/src/components/_summary-box.scss +42 -0
- package/src/components/_swap.scss +151 -0
- package/src/components/_switch.scss +108 -0
- package/src/components/_table.scss +330 -0
- package/src/components/_tag-group.scss +9 -0
- package/src/components/_tag.scss +47 -0
- package/src/components/_task-list.scss +75 -0
- package/src/components/_text-area.scss +87 -0
- package/src/components/_theme-picker.scss +60 -0
- package/src/components/_time-picker.scss +1 -0
- package/src/components/_toggle.scss +34 -0
- package/src/components/_tooltip.scss +73 -0
- package/src/components/_typography.scss +145 -0
- package/src/icons/spinner.svg +14 -0
- package/src/img/usx-icons.json +5 -0
- package/src/img/usx-sprite.svg +24 -0
- package/src/index.scss +67 -0
- package/src/themed.scss +11 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
2
|
+
.usa-search .usx-input {
|
|
3
|
+
border-top-right-radius: 0;
|
|
4
|
+
border-bottom-right-radius: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.usa-search .usa-button.usx-button {
|
|
8
|
+
border-bottom-left-radius: 0;
|
|
9
|
+
border-top-left-radius: 0;
|
|
10
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
|
+
.usx-section {
|
|
5
|
+
margin: 2rem 0;
|
|
6
|
+
|
|
7
|
+
@if $usx-section-bg {
|
|
8
|
+
background-color: $usx-section-bg;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@if $usx-section-text {
|
|
12
|
+
color: $usx-section-text;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.usx-section__title {
|
|
17
|
+
margin-top: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.usx-section__content > :first-child {
|
|
21
|
+
margin-top: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.usx-section__content > :last-child {
|
|
25
|
+
margin-bottom: 0;
|
|
26
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
|
+
/* stylelint-disable no-descending-specificity -- Focus enhancements intentionally follow state rules. */
|
|
5
|
+
|
|
6
|
+
/* ---------------------------------- */
|
|
7
|
+
|
|
8
|
+
/* Base Enhancements */
|
|
9
|
+
|
|
10
|
+
/* ---------------------------------- */
|
|
11
|
+
|
|
12
|
+
.usa-select.usx-select {
|
|
13
|
+
// USWDS sets a fixed height: 2.5rem (border-box). A thick
|
|
14
|
+
// $usx-border-width-inputs eats into that fixed box until the content
|
|
15
|
+
// area is shorter than the text's line-height, and unlike <input> (which
|
|
16
|
+
// overflows its box visibly), <select> clips the value at the box edge —
|
|
17
|
+
// so let the box grow past 2.5rem instead of clipping.
|
|
18
|
+
height: auto;
|
|
19
|
+
min-height: 2.5rem;
|
|
20
|
+
|
|
21
|
+
@if $usx-input-radius {
|
|
22
|
+
border-radius: $usx-input-radius;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@if $usx-input-padding {
|
|
26
|
+
padding: $usx-input-padding;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* ---------------------------------- */
|
|
31
|
+
|
|
32
|
+
/* State Enhancements */
|
|
33
|
+
|
|
34
|
+
/* ---------------------------------- */
|
|
35
|
+
|
|
36
|
+
.usa-select.usx-select:not(.usa-input--error):not(.usa-input--success) {
|
|
37
|
+
&:not(:disabled) {
|
|
38
|
+
@if $usx-input-bg {
|
|
39
|
+
background-color: $usx-input-bg;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@if $usx-input-text {
|
|
43
|
+
color: $usx-input-text;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@if $usx-input-border {
|
|
47
|
+
border-color: $usx-input-border;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.usa-select.usx-select.usa-input--error {
|
|
53
|
+
@if $usx-input-error-border-width {
|
|
54
|
+
border-width: $usx-input-error-border-width;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@if $usx-input-error-border {
|
|
58
|
+
border-color: $usx-input-error-border;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@if $usx-input-error-border-style {
|
|
62
|
+
border-style: $usx-input-error-border-style;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@if $usx-input-error-padding-top {
|
|
66
|
+
padding-top: $usx-input-error-padding-top;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@if $usx-input-error-padding-bottom {
|
|
70
|
+
padding-bottom: $usx-input-error-padding-bottom;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Error can be toggled dynamically (e.g. character-count) on top of a
|
|
75
|
+
// statically-applied success class, so error must win when both are present.
|
|
76
|
+
.usa-select.usx-select.usa-input--success:not(.usa-input--error) {
|
|
77
|
+
@if $usx-input-success-border-width {
|
|
78
|
+
border-width: $usx-input-success-border-width;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@if $usx-input-success-border {
|
|
82
|
+
border-color: $usx-input-success-border;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@if $usx-input-success-border-style {
|
|
86
|
+
border-style: $usx-input-success-border-style;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@if $usx-input-success-padding-top {
|
|
90
|
+
padding-top: $usx-input-success-padding-top;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@if $usx-input-success-padding-bottom {
|
|
94
|
+
padding-bottom: $usx-input-success-padding-bottom;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* ---------------------------------- */
|
|
99
|
+
|
|
100
|
+
/* Focus Enhancements */
|
|
101
|
+
|
|
102
|
+
/* ---------------------------------- */
|
|
103
|
+
|
|
104
|
+
.usa-select.usx-select:focus-visible {
|
|
105
|
+
@if $usx-input-focus-outline {
|
|
106
|
+
outline: $usx-input-focus-outline;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@if $usx-input-focus-outline-offset {
|
|
110
|
+
outline-offset: $usx-input-focus-outline-offset;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
|
+
.usx-layout {
|
|
5
|
+
.usx-sidenav {
|
|
6
|
+
margin-top: 2rem;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.usx-sidenav.usa-sidenav {
|
|
11
|
+
@if $usx-sidenav-border {
|
|
12
|
+
border-bottom-color: $usx-sidenav-border;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@if $usx-sidenav-border-width {
|
|
16
|
+
border-bottom-width: $usx-sidenav-border-width;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&.usx-sidenav--sticky {
|
|
20
|
+
position: sticky;
|
|
21
|
+
top: 2rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.usa-sidenav__item {
|
|
25
|
+
@if $usx-sidenav-border {
|
|
26
|
+
border-top-color: $usx-sidenav-border;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@if $usx-sidenav-border-width {
|
|
30
|
+
border-top-width: $usx-sidenav-border-width;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
a {
|
|
35
|
+
&.usa-current {
|
|
36
|
+
@if $usx-sidenav-current {
|
|
37
|
+
color: $usx-sidenav-current;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&::after {
|
|
41
|
+
@if $usx-sidenav-current {
|
|
42
|
+
background-color: $usx-sidenav-current;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:not(.usa-button):not(.usa-current) {
|
|
48
|
+
@if $usx-sidenav-link-text {
|
|
49
|
+
color: $usx-sidenav-link-text;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:hover {
|
|
53
|
+
@if $usx-sidenav-link-text-hover {
|
|
54
|
+
color: $usx-sidenav-link-text-hover;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@if $usx-sidenav-bg-hover {
|
|
58
|
+
background-color: $usx-sidenav-bg-hover;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&:hover {
|
|
64
|
+
@if $usx-sidenav-bg-hover {
|
|
65
|
+
background-color: $usx-sidenav-bg-hover;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Adjust sticky positioning when nav is present at the same level as layout
|
|
72
|
+
.usx-nav--sticky ~ .usx-layout .usx-sidenav--sticky {
|
|
73
|
+
top: 5rem;
|
|
74
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
@use 'alert' as *;
|
|
3
|
+
|
|
4
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
5
|
+
.usa-site-alert.usx-site-alert {
|
|
6
|
+
display: block;
|
|
7
|
+
position: relative;
|
|
8
|
+
|
|
9
|
+
&.usa-site-alert--info {
|
|
10
|
+
@if $usx-site-alert-default-bg {
|
|
11
|
+
background-color: $usx-site-alert-default-bg;
|
|
12
|
+
|
|
13
|
+
.usa-alert.usx-alert {
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@if $usx-site-alert-default-border {
|
|
19
|
+
.usa-alert.usx-alert {
|
|
20
|
+
border-color: $usx-site-alert-default-border;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.usa-site-alert--emergency {
|
|
26
|
+
@if $usx-site-alert-emergency-bg {
|
|
27
|
+
background-color: $usx-site-alert-emergency-bg;
|
|
28
|
+
|
|
29
|
+
.usa-alert {
|
|
30
|
+
border-color: $usx-site-alert-emergency-bg;
|
|
31
|
+
background-color: transparent;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.usx-site-alert--maintenance, &.usx-site-alert--maintenance-warning {
|
|
37
|
+
background-color: #f0f0f0;
|
|
38
|
+
|
|
39
|
+
@if $usx-site-alert-maintenance-bg {
|
|
40
|
+
background-color: $usx-site-alert-maintenance-bg;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.usa-alert {
|
|
44
|
+
border: none;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.usx-site-alert--maintenance {
|
|
49
|
+
border-top: 8px solid #b50909;
|
|
50
|
+
|
|
51
|
+
@if $usx-color-error {
|
|
52
|
+
border-color: $usx-color-error;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@if $usx-alert-border-width {
|
|
56
|
+
border-width: $usx-alert-border-width;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&.usx-site-alert--maintenance-warning {
|
|
61
|
+
border-top: 8px solid #ffbe2e;
|
|
62
|
+
|
|
63
|
+
@if $usx-color-warning {
|
|
64
|
+
border-color: $usx-color-warning;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@if $usx-alert-border-width {
|
|
68
|
+
border-width: $usx-alert-border-width;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.usa-alert.usx-alert .usa-alert__body {
|
|
73
|
+
background-color: transparent !important;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@keyframes usx-spin {
|
|
2
|
+
from {
|
|
3
|
+
transform: rotate(0deg);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
to {
|
|
7
|
+
transform: rotate(360deg);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
12
|
+
.usx-spinner {
|
|
13
|
+
animation: usx-spin 800ms infinite linear;
|
|
14
|
+
will-change: transform;
|
|
15
|
+
|
|
16
|
+
@media (forced-colors: active) {
|
|
17
|
+
forced-color-adjust: auto;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.usx-spinner--size-1 {
|
|
22
|
+
height: .75em;
|
|
23
|
+
width: .75em;
|
|
24
|
+
}
|
|
25
|
+
/* stylelint-enable selector-class-pattern */
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
|
+
.usx-status {
|
|
5
|
+
display: inline-block;
|
|
6
|
+
border-radius: 100%;
|
|
7
|
+
aspect-ratio: 1 / 1;
|
|
8
|
+
width: .5rem;
|
|
9
|
+
height: .5rem;
|
|
10
|
+
alignment-baseline: middle;
|
|
11
|
+
align-items: center;
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: 0;
|
|
14
|
+
border: 0 solid;
|
|
15
|
+
background-repeat: no-repeat;
|
|
16
|
+
background-position: 50%;
|
|
17
|
+
grid-area: 1 / 1;
|
|
18
|
+
background-color: currentcolor;
|
|
19
|
+
background-image: radial-gradient(circle at 35% 30%, oklch(100% 0 0deg / 50%), rgb(0 0 0 / 0%));
|
|
20
|
+
box-shadow: 0 2px 3px -1px color-mix(in oklab, currentColor 100%, #0000);
|
|
21
|
+
|
|
22
|
+
&.usx-status--xs {
|
|
23
|
+
width: .25rem;
|
|
24
|
+
height: .25rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.usx-status--sm {
|
|
28
|
+
width: .375rem;
|
|
29
|
+
height: .375rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.usx-status--md {
|
|
33
|
+
width: .5rem;
|
|
34
|
+
height: .5rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.usx-status--lg {
|
|
38
|
+
width: .75rem;
|
|
39
|
+
height: .75rem;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.usx-status--xl {
|
|
43
|
+
width: 1rem;
|
|
44
|
+
height: 1rem;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
|
+
.usx-step-indicator {
|
|
5
|
+
@if $usx-step-indicator-bg {
|
|
6
|
+
background-color: $usx-step-indicator-bg;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.usa-step-indicator__heading {
|
|
10
|
+
@if $usx-step-indicator-heading-text {
|
|
11
|
+
color: $usx-step-indicator-heading-text;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.usa-step-indicator__segment--complete {
|
|
16
|
+
&::before, &::after {
|
|
17
|
+
@if $usx-step-indicator-segment-complete {
|
|
18
|
+
background-color: $usx-step-indicator-segment-complete;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.usa-step-indicator__segment-label {
|
|
23
|
+
@if $usx-step-indicator-segment-complete {
|
|
24
|
+
color: $usx-step-indicator-segment-complete;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.usa-step-indicator__segment--current {
|
|
30
|
+
&::before, &::after {
|
|
31
|
+
@if $usx-step-indicator-segment-current {
|
|
32
|
+
background-color: $usx-step-indicator-segment-current;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.usa-step-indicator__segment-label {
|
|
37
|
+
@if $usx-step-indicator-segment-current {
|
|
38
|
+
color: $usx-step-indicator-segment-current;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.usa-step-indicator__current-step {
|
|
44
|
+
@if $usx-step-indicator-segment-current {
|
|
45
|
+
background-color: $usx-step-indicator-segment-current;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@if $usx-step-indicator-counter-text {
|
|
49
|
+
color: $usx-step-indicator-counter-text;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.usa-step-indicator__total-steps {
|
|
54
|
+
@if $usx-step-indicator-segment-current {
|
|
55
|
+
color: $usx-step-indicator-segment-current;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.usa-step-indicator__segment-label {
|
|
60
|
+
@if $usx-step-indicator-segment-label-text {
|
|
61
|
+
color: $usx-step-indicator-segment-label-text;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.usa-step-indicator__segment::after {
|
|
66
|
+
@if $usx-step-indicator-segment-bar-width {
|
|
67
|
+
height: $usx-step-indicator-segment-bar-width;
|
|
68
|
+
|
|
69
|
+
// Normal height is 0.5rem and top is normally 0
|
|
70
|
+
// Center by offsetting by half the difference between the normal height and the new height
|
|
71
|
+
// Note: the bare "0" must be a length (0rem), not a unitless number —
|
|
72
|
+
// once $usx-step-indicator-segment-bar-width is a var(), Sass can't
|
|
73
|
+
// fold this at build time, and calc(0 - <length>) is invalid CSS,
|
|
74
|
+
// which silently falls back to `top: auto` (bar drops to the bottom).
|
|
75
|
+
top: calc(0rem - ($usx-step-indicator-segment-bar-width - 0.5rem) / 2);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// ── Counters / counters-sm variants ───────────────────────────────────────
|
|
80
|
+
// The counter circles (`::before`) are separate pseudo-elements from the
|
|
81
|
+
// segment bar (`::after`) the overrides above already cover, so USWDS's
|
|
82
|
+
// baked-in white/gray-40/base-dark ring and fill colors need their own
|
|
83
|
+
// overrides here too. Ring/gap thickness (.25rem) matches USWDS's own
|
|
84
|
+
// compiled default exactly — only the colors are themed.
|
|
85
|
+
&.usa-step-indicator--counters, &.usa-step-indicator--counters-sm {
|
|
86
|
+
.usa-step-indicator__segment::before {
|
|
87
|
+
@if $usx-step-indicator-bg {
|
|
88
|
+
background-color: $usx-step-indicator-bg;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@if $usx-step-indicator-segment-pending-border and $usx-step-indicator-bg {
|
|
92
|
+
box-shadow:
|
|
93
|
+
inset 0 0 0 .25rem $usx-step-indicator-segment-pending-border,
|
|
94
|
+
0 0 0 .25rem $usx-step-indicator-bg;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@if $usx-step-indicator-segment-label-text {
|
|
98
|
+
color: $usx-step-indicator-segment-label-text;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.usa-step-indicator__segment--complete::before {
|
|
103
|
+
@if $usx-step-indicator-segment-complete {
|
|
104
|
+
background-color: $usx-step-indicator-segment-complete;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@if $usx-step-indicator-bg {
|
|
108
|
+
box-shadow: 0 0 0 .25rem $usx-step-indicator-bg;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@if $usx-step-indicator-counter-text {
|
|
112
|
+
color: $usx-step-indicator-counter-text;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.usa-step-indicator__segment--current::before {
|
|
117
|
+
@if $usx-step-indicator-segment-current {
|
|
118
|
+
background-color: $usx-step-indicator-segment-current;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@if $usx-step-indicator-bg {
|
|
122
|
+
box-shadow: 0 0 0 .25rem $usx-step-indicator-bg;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@if $usx-step-indicator-counter-text {
|
|
126
|
+
color: $usx-step-indicator-counter-text;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
|
+
.usa-summary-box.usx-summary-box {
|
|
5
|
+
@if $usx-summary-box-border {
|
|
6
|
+
border: $usx-summary-box-border;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@if $usx-summary-box-radius {
|
|
10
|
+
border-radius: $usx-summary-box-radius;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@if $usx-summary-box-padding {
|
|
14
|
+
padding: $usx-summary-box-padding;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@if $usx-summary-box-bg {
|
|
18
|
+
background-color: $usx-summary-box-bg;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@if $usx-summary-box-text {
|
|
22
|
+
color: $usx-summary-box-text;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@if $usx-summary-box-link-text {
|
|
26
|
+
.usa-summary-box__link:not(:visited):not(:hover) {
|
|
27
|
+
color: $usx-summary-box-link-text;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@if $usx-summary-box-link-text-hover {
|
|
32
|
+
.usa-summary-box__link:hover {
|
|
33
|
+
color: $usx-summary-box-link-text-hover;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@if $usx-summary-box-link-text-visited {
|
|
38
|
+
.usa-summary-box__link:visited {
|
|
39
|
+
color: $usx-summary-box-link-text-visited;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
// Define variable to set time for swap transition
|
|
2
|
+
$usx-swap-transition-time: 0.25s !default;
|
|
3
|
+
|
|
4
|
+
/* stylelint-disable selector-class-pattern, no-descending-specificity -- Public BEM classes and state overrides are ordered by interaction state. */
|
|
5
|
+
.usx-swap {
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
vertical-align: middle;
|
|
8
|
+
place-content: center;
|
|
9
|
+
user-select: none;
|
|
10
|
+
display: inline-grid;
|
|
11
|
+
position: relative;
|
|
12
|
+
|
|
13
|
+
> * {
|
|
14
|
+
grid-row-start: 1;
|
|
15
|
+
grid-column-start: 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// A transition animates using whichever rule newly matches (the
|
|
19
|
+
// destination state), so each side needs its OWN declaration per
|
|
20
|
+
// direction: the element becoming hidden holds its size until the end
|
|
21
|
+
// (step-end) while the element becoming shown snaps to size immediately
|
|
22
|
+
// (step-start) — swapped compared to the other direction.
|
|
23
|
+
&.usx-swap--ease,
|
|
24
|
+
&.usx-swap--rotate,
|
|
25
|
+
&.usx-swap--flip {
|
|
26
|
+
// Unchecked (off shown, on hidden): off is *becoming* shown here.
|
|
27
|
+
.usx-swap-off {
|
|
28
|
+
transition: opacity $usx-swap-transition-time cubic-bezier(0, 0, .25, 1),
|
|
29
|
+
transform $usx-swap-transition-time cubic-bezier(0, 0, .25, 1),
|
|
30
|
+
max-height $usx-swap-transition-time step-start,
|
|
31
|
+
max-width $usx-swap-transition-time step-start;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.usx-swap-on,
|
|
35
|
+
.usx-swap-indeterminate,
|
|
36
|
+
input:indeterminate ~ .usx-swap-on {
|
|
37
|
+
transition: opacity $usx-swap-transition-time cubic-bezier(0, 0, .25, 1),
|
|
38
|
+
transform $usx-swap-transition-time cubic-bezier(0, 0, .25, 1),
|
|
39
|
+
max-height $usx-swap-transition-time step-end,
|
|
40
|
+
max-width $usx-swap-transition-time step-start;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Checked (on shown, off hidden): higher specificity than the rules
|
|
44
|
+
// above, so these win once the checkbox is checked.
|
|
45
|
+
input:is(:checked, :indeterminate) ~ .usx-swap-off {
|
|
46
|
+
transition: opacity $usx-swap-transition-time cubic-bezier(0, 0, .25, 1),
|
|
47
|
+
transform $usx-swap-transition-time cubic-bezier(0, 0, .25, 1),
|
|
48
|
+
max-height $usx-swap-transition-time step-end,
|
|
49
|
+
max-width $usx-swap-transition-time step-start;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
input:checked ~ .usx-swap-on,
|
|
53
|
+
input:indeterminate ~ .usx-swap-indeterminate {
|
|
54
|
+
transition: opacity $usx-swap-transition-time cubic-bezier(0, 0, .25, 1),
|
|
55
|
+
transform $usx-swap-transition-time cubic-bezier(0, 0, .25, 1),
|
|
56
|
+
max-height $usx-swap-transition-time step-start,
|
|
57
|
+
max-width $usx-swap-transition-time step-start;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
input {
|
|
62
|
+
appearance: none;
|
|
63
|
+
border: none;
|
|
64
|
+
|
|
65
|
+
&:focus {
|
|
66
|
+
outline: none;
|
|
67
|
+
border: none;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.usx-swap-on,
|
|
72
|
+
.usx-swap-indeterminate,
|
|
73
|
+
input:indeterminate ~ .usx-swap-on {
|
|
74
|
+
opacity: 0;
|
|
75
|
+
max-height: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Explicit shown-state size (rather than the initial "none") so hiding
|
|
79
|
+
// transitions between two real values and step-end can hold it until the end.
|
|
80
|
+
.usx-swap-off {
|
|
81
|
+
max-height: 100%;
|
|
82
|
+
max-width: 100%;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
input:is(:checked, :indeterminate) ~ .usx-swap-off {
|
|
86
|
+
opacity: 0;
|
|
87
|
+
max-height: 0;
|
|
88
|
+
max-width: 0;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
input:checked ~ .usx-swap-on,
|
|
93
|
+
input:indeterminate ~ .usx-swap-indeterminate {
|
|
94
|
+
opacity: 1;
|
|
95
|
+
max-height: 100%;
|
|
96
|
+
backface-visibility: visible;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.usx-swap-active {
|
|
101
|
+
.usx-swap-off {
|
|
102
|
+
opacity: 0;
|
|
103
|
+
max-height: 0;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.usx-swap-on {
|
|
107
|
+
opacity: 1;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.usx-swap--rotate {
|
|
112
|
+
.usx-swap-on,
|
|
113
|
+
input:indeterminate ~ .usx-swap-on {
|
|
114
|
+
transform: rotate(-45deg);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
input:is(:checked, :indeterminate) ~ .usx-swap-on,
|
|
118
|
+
&.usx-swap-active .usx-swap-on {
|
|
119
|
+
transform: rotate(0deg);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
input:is(:checked, :indeterminate) ~ .usx-swap-off,
|
|
123
|
+
&.usx-swap-active .usx-swap-off {
|
|
124
|
+
transform: rotate(45deg);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.usx-swap--flip {
|
|
129
|
+
transform-style: preserve-3d;
|
|
130
|
+
perspective: 20rem;
|
|
131
|
+
|
|
132
|
+
.usx-swap-on,
|
|
133
|
+
.usx-swap-indeterminate,
|
|
134
|
+
input:indeterminate ~ .usx-swap-on {
|
|
135
|
+
transform: rotateY(180deg);
|
|
136
|
+
backface-visibility: hidden;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
input:is(:checked, :indeterminate) ~ .usx-swap-on,
|
|
140
|
+
&.usx-swap-active .usx-swap-on {
|
|
141
|
+
transform: rotateY(0deg);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
input:is(:checked, :indeterminate) ~ .usx-swap-off,
|
|
145
|
+
&.usx-swap-active .usx-swap-off {
|
|
146
|
+
transform: rotateY(-180deg);
|
|
147
|
+
backface-visibility: hidden;
|
|
148
|
+
opacity: 1;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/* stylelint-enable selector-class-pattern, no-descending-specificity */
|