@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,105 @@
|
|
|
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 -- Callout modifier intentionally follows base quote-icon rules. */
|
|
5
|
+
.usx-block {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
|
|
9
|
+
.usx-block__quote-attribution {
|
|
10
|
+
margin-top: 0.5rem;
|
|
11
|
+
margin-bottom: 0.5rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.usx-block__content {
|
|
15
|
+
margin: 0;
|
|
16
|
+
padding-left: 1rem;
|
|
17
|
+
padding-right: 1rem;
|
|
18
|
+
border-width: 0 0 0 4px;
|
|
19
|
+
border-style: solid;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
|
|
23
|
+
@if $usx-block-border-width {
|
|
24
|
+
border-width: 0 0 0 $usx-block-border-width;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&.usx-block--callout {
|
|
29
|
+
border-width: 4px 0 0;
|
|
30
|
+
border-style: solid;
|
|
31
|
+
background-color: #e2e8f0;
|
|
32
|
+
padding: 1rem 1.25rem;
|
|
33
|
+
|
|
34
|
+
@if $usx-block-callout-bg {
|
|
35
|
+
background-color: $usx-block-callout-bg;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@if $usx-block-border-width {
|
|
39
|
+
border-width: $usx-block-border-width 0 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.usx-block__content {
|
|
43
|
+
border-left: none;
|
|
44
|
+
padding: 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.usx-block__open-quote-icon {
|
|
48
|
+
margin-top: -0.3125rem;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.usx-block__close-quote-icon {
|
|
52
|
+
margin-top: -0.3125rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.usx-block__quote-attribution {
|
|
56
|
+
margin-top: 0.5rem;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.usx-block__open-quote-icon {
|
|
61
|
+
margin-left: -0.4375rem;
|
|
62
|
+
transform: rotate(180deg);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.usx-block--dedent {
|
|
66
|
+
margin-left: -1.25rem;
|
|
67
|
+
z-index: 1;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.usx-block--indent {
|
|
71
|
+
&-sm {
|
|
72
|
+
margin-left: 1.25rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&-md {
|
|
76
|
+
margin-left: 2.5rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&-lg {
|
|
80
|
+
margin-left: 3.75rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&-xl {
|
|
84
|
+
margin-left: 5rem;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&.usx-block--big {
|
|
89
|
+
.usx-block__content {
|
|
90
|
+
@if $usx-block-border-width {
|
|
91
|
+
border-left-width: calc(1.5 * $usx-block-border-width);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
padding-left: 1.375rem;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&.usx-block--spill-left.usx-block--big {
|
|
99
|
+
margin-left: -1.375rem;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.usx-block__attribution {
|
|
103
|
+
margin-top: 1rem;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable selector-class-pattern, no-descending-specificity -- Public USX classes use BEM naming; intentional cascade order. */
|
|
4
|
+
|
|
5
|
+
// Logo-image mode: .usx-image wrapper (<a> or <div>) produced by Image component.
|
|
6
|
+
.usx-logo {
|
|
7
|
+
margin-left: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@media (width <= 64em) {
|
|
11
|
+
.usa-navbar .usx-logo {
|
|
12
|
+
margin-left: 1rem;
|
|
13
|
+
margin-right: 1rem;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.usx-logo__image {
|
|
18
|
+
display: block;
|
|
19
|
+
|
|
20
|
+
img {
|
|
21
|
+
display: block;
|
|
22
|
+
height: auto;
|
|
23
|
+
max-height: 1.75rem;
|
|
24
|
+
width: auto;
|
|
25
|
+
|
|
26
|
+
@media (width >= 64em) {
|
|
27
|
+
max-height: 3rem;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Symbol + title mode: flex row when a symbol is present alongside the title.
|
|
33
|
+
.usa-logo__text:has(.usx-logo__symbol) {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
|
|
37
|
+
.usx-logo__symbol {
|
|
38
|
+
display: block;
|
|
39
|
+
flex-shrink: 0;
|
|
40
|
+
height: 1.5rem;
|
|
41
|
+
margin-right: 0.5rem;
|
|
42
|
+
width: auto;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.usa-header {
|
|
47
|
+
.usx-logo__title {
|
|
48
|
+
@if $usx-header-text {
|
|
49
|
+
color: $usx-header-text;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.usa-footer {
|
|
55
|
+
.usx-logo__title {
|
|
56
|
+
@if $usx-footer-text {
|
|
57
|
+
color: $usx-footer-text;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Theme-responsive artwork: both variants are in the DOM and the active theme
|
|
63
|
+
// picks one. Only applied when an inverse variant was actually supplied, so
|
|
64
|
+
// single-logo branding never disappears under a dark theme.
|
|
65
|
+
.usx-logo__image .usx-logo__variant {
|
|
66
|
+
display: block;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// :has() detects the inverse variant directly, so no marker class is needed
|
|
70
|
+
// to gate the swap only when branding actually supplied one.
|
|
71
|
+
.usx-logo__image:has(.usx-logo__variant--inverse) {
|
|
72
|
+
.usx-logo__variant {
|
|
73
|
+
display: $usx-logo-display;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.usx-logo__variant--inverse {
|
|
77
|
+
display: $usx-logo-inverse-display;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.usa-logo__text:has(.usx-logo__symbol.usx-logo__variant--inverse) {
|
|
82
|
+
.usx-logo__symbol {
|
|
83
|
+
display: $usx-logo-display;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.usx-logo__symbol.usx-logo__variant--inverse {
|
|
87
|
+
display: $usx-logo-inverse-display;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
2
|
+
|
|
3
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
4
|
+
|
|
5
|
+
// Real USWDS hardcodes breadcrumb background/text to fixed #fff/#1b1b1b —
|
|
6
|
+
// give it a themeable default instead (nav/wayfinding element).
|
|
7
|
+
.usx-breadcrumb {
|
|
8
|
+
@if $usx-breadcrumb-bg {
|
|
9
|
+
background-color: $usx-breadcrumb-bg;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@if $usx-breadcrumb-text {
|
|
13
|
+
color: $usx-breadcrumb-text;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.usa-breadcrumb__link {
|
|
17
|
+
@if $usx-breadcrumb-link-text {
|
|
18
|
+
color: $usx-breadcrumb-link-text;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:hover {
|
|
22
|
+
@if $usx-breadcrumb-link-text-hover {
|
|
23
|
+
color: $usx-breadcrumb-link-text-hover;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.usa-breadcrumb__list-item {
|
|
29
|
+
&.usa-current {
|
|
30
|
+
@if $usx-breadcrumb-current-text {
|
|
31
|
+
color: $usx-breadcrumb-current-text;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
|
+
|
|
5
|
+
@mixin -usx-button-variant($selector, $divider) {
|
|
6
|
+
.usa-button-group.usx-button-group {
|
|
7
|
+
&.usa-button-group--segmented {
|
|
8
|
+
.usa-button-group__item {
|
|
9
|
+
&:where(:not(:last-child)) #{$selector}::before {
|
|
10
|
+
@if $divider {
|
|
11
|
+
border-right: $divider;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&:where(:not(:first-child):not(:last-child)) {
|
|
16
|
+
.usa-button {
|
|
17
|
+
border-radius: 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/* ---------------------------------- */
|
|
27
|
+
|
|
28
|
+
/* Enhance USWDS Variants */
|
|
29
|
+
|
|
30
|
+
/* ---------------------------------- */
|
|
31
|
+
|
|
32
|
+
/* Primary */
|
|
33
|
+
@include -usx-button-variant(".usa-button--primary",
|
|
34
|
+
$usx-button-group-segmented-divider-primary);
|
|
35
|
+
|
|
36
|
+
/* Secondary */
|
|
37
|
+
@include -usx-button-variant(".usa-button--secondary",
|
|
38
|
+
$usx-button-group-segmented-divider-secondary);
|
|
39
|
+
|
|
40
|
+
/* Accent Cool */
|
|
41
|
+
@include -usx-button-variant(".usa-button--accent-cool",
|
|
42
|
+
$usx-button-group-segmented-divider-accent-cool);
|
|
43
|
+
|
|
44
|
+
/* Accent Warm */
|
|
45
|
+
@include -usx-button-variant(".usa-button--accent-warm",
|
|
46
|
+
$usx-button-group-segmented-divider-accent-warm);
|
|
47
|
+
|
|
48
|
+
/* Outline */
|
|
49
|
+
@include -usx-button-variant(".usa-button--outline",
|
|
50
|
+
$usx-button-group-segmented-divider-base);
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
|
+
|
|
5
|
+
/* ---------------------------------- */
|
|
6
|
+
|
|
7
|
+
/* Base Enhancements (SAFE ONLY) */
|
|
8
|
+
|
|
9
|
+
/* ---------------------------------- */
|
|
10
|
+
.usa-button.usx-button:not(.usa-button--unstyled) {
|
|
11
|
+
@if $usx-radius-button {
|
|
12
|
+
border-radius: $usx-radius-button;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&:not(.usa-button--outline) {
|
|
16
|
+
@if $usx-button-box-shadow {
|
|
17
|
+
box-shadow: $usx-button-box-shadow;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* ---------------------------------- */
|
|
23
|
+
|
|
24
|
+
/* Helper Mixin for Inverse Buttons */
|
|
25
|
+
|
|
26
|
+
/* ---------------------------------- */
|
|
27
|
+
@mixin usx-button-inverse($hover-mix: 20%, $active-mix: 40%) {
|
|
28
|
+
$inverse-color: white;
|
|
29
|
+
|
|
30
|
+
@if $usx-text-inverse {
|
|
31
|
+
$inverse-color: $usx-text-inverse;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
color: $inverse-color;
|
|
35
|
+
|
|
36
|
+
&.usa-button--hover,
|
|
37
|
+
&:hover {
|
|
38
|
+
color: color-mix(in srgb, $inverse-color, black $hover-mix);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.usa-button--active,
|
|
42
|
+
&:active {
|
|
43
|
+
color: color-mix(in srgb, $inverse-color, black $active-mix);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* ---------------------------------- */
|
|
48
|
+
|
|
49
|
+
/* Variant Enhancer Mixin */
|
|
50
|
+
|
|
51
|
+
/* ---------------------------------- */
|
|
52
|
+
@mixin usx-button-variant(
|
|
53
|
+
$selector,
|
|
54
|
+
$bg,
|
|
55
|
+
$bg-hover: null,
|
|
56
|
+
$bg-active: null,
|
|
57
|
+
$color: null,
|
|
58
|
+
$color-hover: null,
|
|
59
|
+
$color-active: null,
|
|
60
|
+
$box-shadow: null,
|
|
61
|
+
$is-outline: false
|
|
62
|
+
) {
|
|
63
|
+
/* Non-disabled buttons only */
|
|
64
|
+
.usa-button.usx-button#{$selector}:not(:disabled):not([aria-disabled="true"]):not(.usx-button--ghost) {
|
|
65
|
+
@if $bg {
|
|
66
|
+
background-color: $bg;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@if $color {
|
|
70
|
+
color: $color;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@if $box-shadow {
|
|
74
|
+
box-shadow: $box-shadow;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Hover state */
|
|
78
|
+
&.usa-button--hover,
|
|
79
|
+
&:hover {
|
|
80
|
+
@if $bg-hover {
|
|
81
|
+
background-color: $bg-hover;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@if $color-hover {
|
|
85
|
+
color: $color-hover;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Active state */
|
|
90
|
+
&.usa-button--active,
|
|
91
|
+
&:active {
|
|
92
|
+
@if $bg-active {
|
|
93
|
+
background-color: $bg-active;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@if $color-active {
|
|
97
|
+
color: $color-active;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Inverse modifier */
|
|
102
|
+
&.usa-button--inverse {
|
|
103
|
+
@include usx-button-inverse;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* ---------------------------------- */
|
|
109
|
+
|
|
110
|
+
/* Enhance USWDS Variants */
|
|
111
|
+
|
|
112
|
+
/* ---------------------------------- */
|
|
113
|
+
|
|
114
|
+
/* Primary */
|
|
115
|
+
@include usx-button-variant(
|
|
116
|
+
".usa-button--primary",
|
|
117
|
+
$usx-button-primary-bg,
|
|
118
|
+
$usx-button-primary-bg-hover,
|
|
119
|
+
$usx-button-primary-bg-active,
|
|
120
|
+
$usx-button-primary-text,
|
|
121
|
+
$usx-button-primary-text-hover,
|
|
122
|
+
$usx-button-primary-text-active,
|
|
123
|
+
$usx-button-primary-border
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
/* Secondary */
|
|
127
|
+
@include usx-button-variant(
|
|
128
|
+
".usa-button--secondary",
|
|
129
|
+
$usx-button-secondary-bg,
|
|
130
|
+
$usx-button-secondary-bg-hover,
|
|
131
|
+
$usx-button-secondary-bg-active,
|
|
132
|
+
$usx-button-secondary-text,
|
|
133
|
+
$usx-button-secondary-text-hover,
|
|
134
|
+
$usx-button-secondary-text-active,
|
|
135
|
+
$usx-button-secondary-border
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
/* Accent Cool */
|
|
139
|
+
@include usx-button-variant(
|
|
140
|
+
".usa-button--accent-cool",
|
|
141
|
+
$usx-button-accent-cool-bg,
|
|
142
|
+
$usx-button-accent-cool-bg-hover,
|
|
143
|
+
$usx-button-accent-cool-bg-active,
|
|
144
|
+
$usx-button-accent-cool-text,
|
|
145
|
+
$usx-button-accent-cool-text-hover,
|
|
146
|
+
$usx-button-accent-cool-text-active,
|
|
147
|
+
$usx-button-accent-cool-border
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
/* Accent Warm */
|
|
151
|
+
@include usx-button-variant(
|
|
152
|
+
".usa-button--accent-warm",
|
|
153
|
+
$usx-button-accent-warm-bg,
|
|
154
|
+
$usx-button-accent-warm-bg-hover,
|
|
155
|
+
$usx-button-accent-warm-bg-active,
|
|
156
|
+
$usx-button-accent-warm-text,
|
|
157
|
+
$usx-button-accent-warm-text-hover,
|
|
158
|
+
$usx-button-accent-warm-text-active,
|
|
159
|
+
$usx-button-accent-warm-border
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
/* Outline */
|
|
163
|
+
@include usx-button-variant(
|
|
164
|
+
".usa-button--outline",
|
|
165
|
+
$usx-button-outline-bg,
|
|
166
|
+
$usx-button-outline-bg-hover,
|
|
167
|
+
$usx-button-outline-bg-active,
|
|
168
|
+
$usx-button-outline-text,
|
|
169
|
+
$usx-button-outline-text-hover,
|
|
170
|
+
$usx-button-outline-text-active,
|
|
171
|
+
$usx-button-outline-box-shadow,
|
|
172
|
+
true
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
/* Unstyled */
|
|
176
|
+
@include usx-button-variant(
|
|
177
|
+
".usa-button--unstyled",
|
|
178
|
+
null,
|
|
179
|
+
null,
|
|
180
|
+
null,
|
|
181
|
+
$usx-color-primary,
|
|
182
|
+
$usx-color-primary-hover,
|
|
183
|
+
$usx-color-primary-active,
|
|
184
|
+
null
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
.usa-button.usx-button {
|
|
188
|
+
.usa-button--outline {
|
|
189
|
+
box-shadow: 0 0 0 2px currentcolor;
|
|
190
|
+
|
|
191
|
+
@if $usx-button-outline-border-width {
|
|
192
|
+
box-shadow: 0 0 0 $usx-button-outline-border-width currentcolor;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&.usx-button--ghost {
|
|
197
|
+
background-color: transparent;
|
|
198
|
+
color: currentcolor;
|
|
199
|
+
|
|
200
|
+
&:not([disabled]):not([aria-disabled="true"]) {
|
|
201
|
+
&.usa-button--primary {
|
|
202
|
+
@if $usx-color-primary {
|
|
203
|
+
color: $usx-color-primary;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&.usa-button--secondary {
|
|
208
|
+
@if $usx-color-secondary {
|
|
209
|
+
color: $usx-color-secondary;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&.usa-button--accent-cool {
|
|
214
|
+
@if $usx-color-accent-cool {
|
|
215
|
+
color: $usx-color-accent-cool;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&.usa-button--accent-warm {
|
|
220
|
+
@if $usx-color-accent-warm {
|
|
221
|
+
color: $usx-color-accent-warm;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
&.usa-button--base {
|
|
226
|
+
@if $usx-color-base {
|
|
227
|
+
color: $usx-color-base;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&.usa-button--hover,
|
|
232
|
+
&:hover {
|
|
233
|
+
background-color: color-mix(in srgb, currentcolor 20%, transparent);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&.usa-button--active,
|
|
237
|
+
&:active {
|
|
238
|
+
background-color: color-mix(in srgb, currentcolor 35%, transparent);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
&.usa-button--inverse {
|
|
242
|
+
color: white;
|
|
243
|
+
|
|
244
|
+
@if $usx-surface-1 {
|
|
245
|
+
color: $usx-surface-1;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
|
+
.usx-calendar-date {
|
|
5
|
+
// USWDS has margin-right: 1rem, but it's for the purposes of the collection component.
|
|
6
|
+
// USX sets this margin in usx-collection instead to allow the independent use of calendar-date without the margin.
|
|
7
|
+
margin: 0;
|
|
8
|
+
|
|
9
|
+
// Width only applies when used standalone (not inside a collection, which controls its own layout)
|
|
10
|
+
&:not(.usa-collection *) {
|
|
11
|
+
width: 4rem;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.usx-calendar-date-month {
|
|
15
|
+
border-top-left-radius: 2px;
|
|
16
|
+
border-top-right-radius: 2px;
|
|
17
|
+
background-color: $usx-color-primary;
|
|
18
|
+
color: $usx-text-inverse;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.usx-calendar-date-day {
|
|
22
|
+
border-bottom-left-radius: 2px;
|
|
23
|
+
border-bottom-right-radius: 2px;
|
|
24
|
+
color: $usx-color-primary;
|
|
25
|
+
|
|
26
|
+
@if $usx-color-primary {
|
|
27
|
+
border: 1px solid $usx-color-primary;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.usx-calendar-date-month, .usx-calendar-date-day {
|
|
32
|
+
font-size: $usx-calendar-date-font-size;
|
|
33
|
+
display: block;
|
|
34
|
+
font-weight: $usx-font-weight-bold;
|
|
35
|
+
padding: .25rem;
|
|
36
|
+
text-align: center;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (width >= 40em) {
|
|
41
|
+
.usx-calendar-date {
|
|
42
|
+
&:not(.usx-collection *) {
|
|
43
|
+
width: 5rem;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.usx-calendar-date-month, .usx-calendar-date-day {
|
|
47
|
+
padding: .5rem;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
|
+
|
|
5
|
+
/* ============================= */
|
|
6
|
+
|
|
7
|
+
/* Base Carousel */
|
|
8
|
+
|
|
9
|
+
/* ============================= */
|
|
10
|
+
|
|
11
|
+
.usx-carousel {
|
|
12
|
+
height: 100%;
|
|
13
|
+
display: block;
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Viewport (scroll container) */
|
|
18
|
+
.usx-carousel__viewport {
|
|
19
|
+
height: 100%;
|
|
20
|
+
overflow-x: auto;
|
|
21
|
+
scroll-snap-type: x mandatory;
|
|
22
|
+
scroll-behavior: smooth;
|
|
23
|
+
|
|
24
|
+
/* Improve UX */
|
|
25
|
+
-webkit-overflow-scrolling: touch;
|
|
26
|
+
scrollbar-width: thin;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Track */
|
|
30
|
+
.usx-carousel__track {
|
|
31
|
+
height: 100%;
|
|
32
|
+
display: flex;
|
|
33
|
+
gap: 1rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Slides */
|
|
37
|
+
.usx-carousel__slide {
|
|
38
|
+
flex: 0 0 100%;
|
|
39
|
+
scroll-snap-align: start;
|
|
40
|
+
overflow: clip;
|
|
41
|
+
outline: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.usx-carousel__slide:focus {
|
|
45
|
+
outline: .25rem solid #2491ff;
|
|
46
|
+
outline-offset: -.25rem;
|
|
47
|
+
|
|
48
|
+
@if $usx-carousel-focus {
|
|
49
|
+
outline-color: $usx-carousel-focus;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* ============================= */
|
|
54
|
+
|
|
55
|
+
/* Dots Navigation */
|
|
56
|
+
|
|
57
|
+
/* ============================= */
|
|
58
|
+
|
|
59
|
+
.usx-carousel__dots {
|
|
60
|
+
display: flex;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
gap: 0.5rem;
|
|
63
|
+
position: absolute;
|
|
64
|
+
bottom: 10px;
|
|
65
|
+
width: 100%;
|
|
66
|
+
|
|
67
|
+
@if $usx-carousel-dot-gap {
|
|
68
|
+
gap: $usx-carousel-dot-gap;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.usx-carousel__dots a {
|
|
73
|
+
width: 10px;
|
|
74
|
+
height: 10px;
|
|
75
|
+
border-radius: 50%;
|
|
76
|
+
background: #c0c0c0;
|
|
77
|
+
display: inline-block;
|
|
78
|
+
text-decoration: none;
|
|
79
|
+
|
|
80
|
+
@if $usx-carousel-dot-bg {
|
|
81
|
+
background: $usx-carousel-dot-bg;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:hover {
|
|
85
|
+
background: #a0a0a0;
|
|
86
|
+
|
|
87
|
+
@if $usx-carousel-dot-bg-hover {
|
|
88
|
+
background: $usx-carousel-dot-bg-hover;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&:active {
|
|
93
|
+
background: #808080;
|
|
94
|
+
|
|
95
|
+
@if $usx-carousel-dot-bg-active {
|
|
96
|
+
background: $usx-carousel-dot-bg-active;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
/* ============================= */
|
|
103
|
+
|
|
104
|
+
/* Card Specifics */
|
|
105
|
+
|
|
106
|
+
/* ============================= */
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
.usa-card__media {
|
|
110
|
+
.usx-card__carousel {
|
|
111
|
+
border-top-left-radius: calc(.5rem - 2px);
|
|
112
|
+
border-top-right-radius: calc(.5rem - 2px);
|
|
113
|
+
overflow: hidden;
|
|
114
|
+
background-color: #f8fafc;
|
|
115
|
+
|
|
116
|
+
@if $usx-carousel-card-media-bg {
|
|
117
|
+
background-color: $usx-carousel-card-media-bg;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&.usa-card__media--inset {
|
|
122
|
+
.usx-card__carousel {
|
|
123
|
+
border-radius: 0;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@media (width >= 40em) {
|
|
129
|
+
.usa-card--flag .usa-card__media:not(.usa-card__media--inset) {
|
|
130
|
+
.usx-card__carousel {
|
|
131
|
+
border-radius: 0;
|
|
132
|
+
border-top-left-radius: calc(.5rem - 2px);
|
|
133
|
+
border-bottom-left-radius: calc(.5rem - 2px);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.usa-card--media-right .usx-card__carousel {
|
|
137
|
+
border-radius: 0;
|
|
138
|
+
border-top-right-radius: calc(.5rem - 2px);
|
|
139
|
+
border-bottom-right-radius: calc(.5rem - 2px);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|