@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
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# @solexllc/usx
|
|
2
|
+
|
|
3
|
+
Branded USX component styles (`.usx-*`) layered on top of USWDS, compiled with
|
|
4
|
+
Dart Sass. This package ships Sass source only (`exports` → `src/*.scss`);
|
|
5
|
+
consumers compile it with the `pkg:` importer, so there is no Sass build step.
|
|
6
|
+
The only build step is regenerating the icon sprite (see **Icons** below).
|
|
7
|
+
|
|
8
|
+
## Theming
|
|
9
|
+
|
|
10
|
+
All design tokens come from `@solexllc/usx-theme` and are runtime-themeable via
|
|
11
|
+
`--usx-*` CSS custom properties. Compile `src/index.scss` for a fully static
|
|
12
|
+
build (no `var()` references), or `src/themed.scss` to enable every hook.
|
|
13
|
+
See `packages/usx-theme/README.md` for the full theming guide, and the Storybook
|
|
14
|
+
**Documentation → Theme → Playground** to generate a theme visually.
|
|
15
|
+
|
|
16
|
+
## Icons
|
|
17
|
+
|
|
18
|
+
`src/img/usx-sprite.svg` is a small sprite of custom icons USWDS doesn't ship
|
|
19
|
+
(currently just `spinner`, used by `@solexllc/usx-react`'s `Spinner`). It's
|
|
20
|
+
also exported as `@solexllc/usx/img/usx-sprite.svg` for direct resolution.
|
|
21
|
+
Like USWDS's own `dist/img/sprite.svg`, consuming apps must copy this file
|
|
22
|
+
into wherever they serve static assets from (e.g. Storybook mounts it at
|
|
23
|
+
`/img/usx-sprite.svg` via `staticDirs` in `.storybook/main.js`; a Django app
|
|
24
|
+
would add it to `STATICFILES_DIRS`).
|
|
25
|
+
|
|
26
|
+
The sprite is generated, not hand-written. Each icon lives as its own
|
|
27
|
+
standalone `<svg>` file in `src/icons/<name>.svg` (viewable directly in an
|
|
28
|
+
editor or browser), and `pnpm build` (or `pnpm --filter @solexllc/usx build`)
|
|
29
|
+
runs `scripts/build-sprite.mjs`, which reads every file in `src/icons/` and
|
|
30
|
+
writes the combined `<symbol>` sprite to `src/img/usx-sprite.svg`. To add an
|
|
31
|
+
icon: create `src/icons/<name>.svg`, add a matching `{ name, meta }` entry to
|
|
32
|
+
`src/img/usx-icons.json` (used by the Documentation/Icons page's search),
|
|
33
|
+
then rebuild. `pnpm --filter @solexllc/usx dev` rebuilds on every save.
|
|
34
|
+
|
|
35
|
+
## Tests
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
pnpm test # node test/theme-check.mjs
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`test/theme-check.mjs` compiles both entry points and asserts: the default
|
|
42
|
+
build has zero `var(--usx-*)` references; the themed build uses only bare
|
|
43
|
+
`var(--usx-*)` references (no fallbacks) that all exist in the theme manifest;
|
|
44
|
+
every manifest entry is consumed (or explicitly listed as unconsumed); no
|
|
45
|
+
literal `null` leaks into CSS; every `derivedFrom` names a real token.
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@solexllc/usx",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Compiled USWDS-based component styles for USX.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/solexconsulting/usx.git",
|
|
9
|
+
"directory": "packages/usx"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"sass": "src/index.scss",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"sass": "./src/index.scss"
|
|
18
|
+
},
|
|
19
|
+
"./themed": {
|
|
20
|
+
"sass": "./src/themed.scss"
|
|
21
|
+
},
|
|
22
|
+
"./utilities": {
|
|
23
|
+
"sass": "./src/_utilities.scss"
|
|
24
|
+
},
|
|
25
|
+
"./typography": {
|
|
26
|
+
"sass": "./src/components/_typography.scss"
|
|
27
|
+
},
|
|
28
|
+
"./img/usx-sprite.svg": "./src/img/usx-sprite.svg",
|
|
29
|
+
"./img/usx-icons.json": "./src/img/usx-icons.json"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"src"
|
|
33
|
+
],
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@solexllc/usx-theme": "workspace:*"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "node scripts/build-sprite.mjs",
|
|
39
|
+
"dev": "node scripts/build-sprite.mjs --watch",
|
|
40
|
+
"test": "node test/theme-check.mjs"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"sass": "^1.98.0"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
@each $color-name, $color-value in $colors {
|
|
4
|
+
@if $color-value {
|
|
5
|
+
.bg-#{$color-name} {
|
|
6
|
+
background-color: $color-value !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.text-#{$color-name} {
|
|
10
|
+
color: $color-value !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.usx-border-#{$color-name} {
|
|
14
|
+
border-color: $color-value !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.before-bg-#{$color-name}::before {
|
|
18
|
+
background-color: $color-value !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.after-bg-#{$color-name}::after {
|
|
22
|
+
background-color: $color-value !important;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@each $color-name, $color-value in $text-colors {
|
|
28
|
+
@if $color-value {
|
|
29
|
+
.text-#{$color-name} {
|
|
30
|
+
color: $color-value !important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.before-bg-#{$color-name}::before {
|
|
34
|
+
background-color: $color-value !important;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.after-bg-#{$color-name}::after {
|
|
38
|
+
background-color: $color-value !important;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@each $color-name, $color-value in $surface-colors {
|
|
44
|
+
@if $color-value {
|
|
45
|
+
.bg-#{$color-name} {
|
|
46
|
+
background-color: $color-value !important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.before-bg-#{$color-name}::before {
|
|
50
|
+
background-color: $color-value !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.after-bg-#{$color-name}::after {
|
|
54
|
+
background-color: $color-value !important;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.usx-rounded-sm {
|
|
60
|
+
border-radius: $usx-radius-sm;
|
|
61
|
+
overflow: clip;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.usx-rounded-md {
|
|
65
|
+
border-radius: $usx-radius-md;
|
|
66
|
+
overflow: clip;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.usx-rounded-lg {
|
|
70
|
+
border-radius: $usx-radius-lg;
|
|
71
|
+
overflow: clip;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.usx-rounded-xl {
|
|
75
|
+
border-radius: $usx-radius-xl;
|
|
76
|
+
overflow: clip;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.usx-circle {
|
|
80
|
+
border-radius: $usx-radius-full;
|
|
81
|
+
overflow: clip;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.usx-ping {
|
|
85
|
+
position: relative;
|
|
86
|
+
|
|
87
|
+
&::after {
|
|
88
|
+
content: '';
|
|
89
|
+
position: absolute;
|
|
90
|
+
inset: 0;
|
|
91
|
+
border-radius: inherit;
|
|
92
|
+
background-color: currentcolor;
|
|
93
|
+
animation: ping 2s cubic-bezier(0, 0, .2, 1) infinite;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.usx-pulse {
|
|
98
|
+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.usx-bounce {
|
|
102
|
+
animation: bounce 1s infinite;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@keyframes ping {
|
|
106
|
+
75%,
|
|
107
|
+
100% {
|
|
108
|
+
transform: scale(2);
|
|
109
|
+
opacity: 0;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@keyframes pulse {
|
|
114
|
+
50% {
|
|
115
|
+
opacity: 0.5;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@keyframes bounce {
|
|
120
|
+
0%,
|
|
121
|
+
100% {
|
|
122
|
+
transform: translateY(-25%);
|
|
123
|
+
animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
50% {
|
|
127
|
+
transform: none;
|
|
128
|
+
animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
$usx-sizes: (
|
|
133
|
+
min: min-content,
|
|
134
|
+
max: max-content,
|
|
135
|
+
fit: fit-content
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
@each $key, $value in $usx-sizes {
|
|
139
|
+
.usx-width-#{$key} {
|
|
140
|
+
width: $value;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.usx-height-#{$key} {
|
|
144
|
+
height: $value;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
// Minus/plus icons as inline data URIs (copied from USWDS's own
|
|
4
|
+
// usa-icons/remove.svg and usa-icons/add.svg). USWDS bakes these in as
|
|
5
|
+
// fixed-color `background-image`s at build time, so they can't track a
|
|
6
|
+
// runtime text-color override. Embedding them here lets us repaint them via
|
|
7
|
+
// `mask-image` + `background-color` instead \u2014 no bundler asset path
|
|
8
|
+
// resolution needed, and it reuses the exact same icon artwork.
|
|
9
|
+
$usx-accordion-icon-remove: 'data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'24\' height=\'24\' viewBox=\'0 0 24 24\'%3E%3Cpath d=\'M19 13H5v-2h14v2z\'/%3E%3C/svg%3E';
|
|
10
|
+
$usx-accordion-icon-add: 'data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'24\' height=\'24\' viewBox=\'0 0 24 24\'%3E%3Cpath d=\'M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z\'/%3E%3C/svg%3E';
|
|
11
|
+
|
|
12
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
13
|
+
.usx-accordion {
|
|
14
|
+
.usa-accordion__button {
|
|
15
|
+
border-radius: $usx-accordion-radius;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.usa-accordion__button[aria-expanded="true"] {
|
|
19
|
+
border-end-start-radius: 0;
|
|
20
|
+
border-end-end-radius: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.usa-accordion--bordered {
|
|
24
|
+
.usa-accordion__content {
|
|
25
|
+
@if $usx-accordion-border-width {
|
|
26
|
+
border-width: $usx-accordion-border-width;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.usa-accordion__content {
|
|
32
|
+
border-end-start-radius: $usx-accordion-radius;
|
|
33
|
+
border-end-end-radius: $usx-accordion-radius;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@if $usx-accordion-bg {
|
|
37
|
+
.usa-accordion__button {
|
|
38
|
+
background-color: $usx-accordion-bg;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@if $usx-accordion-bg-hover {
|
|
42
|
+
.usa-accordion__button:hover {
|
|
43
|
+
background-color: $usx-accordion-bg-hover !important;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.usa-accordion--bordered {
|
|
48
|
+
.usa-accordion__content {
|
|
49
|
+
border-color: $usx-accordion-bg;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@if $usx-accordion-content-bg {
|
|
55
|
+
.usa-accordion__content {
|
|
56
|
+
background-color: $usx-accordion-content-bg;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@if $usx-accordion-text {
|
|
61
|
+
// Replace the frozen background-image icon with a mask painted in the
|
|
62
|
+
// same theme-aware color as the text (mirrors the technique USWDS
|
|
63
|
+
// itself uses for forced-colors mode, just applied unconditionally).
|
|
64
|
+
.usa-accordion__button {
|
|
65
|
+
color: $usx-accordion-text;
|
|
66
|
+
position: relative;
|
|
67
|
+
background-image: none !important;
|
|
68
|
+
padding-inline: $usx-accordion-icon-padding-start $usx-accordion-icon-padding-end;
|
|
69
|
+
|
|
70
|
+
&::before {
|
|
71
|
+
content: '';
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: 0;
|
|
74
|
+
inset-inline: $usx-accordion-icon-position;
|
|
75
|
+
height: 100%;
|
|
76
|
+
width: 1.5rem;
|
|
77
|
+
background-color: $usx-accordion-text;
|
|
78
|
+
mask: url("#{$usx-accordion-icon-remove}") center / 1.5rem no-repeat;
|
|
79
|
+
-webkit-mask: url("#{$usx-accordion-icon-remove}") center / 1.5rem no-repeat;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&[aria-expanded="false"]::before {
|
|
83
|
+
mask-image: url("#{$usx-accordion-icon-add}");
|
|
84
|
+
-webkit-mask-image: url("#{$usx-accordion-icon-add}");
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&:hover {
|
|
88
|
+
background-image: none !important;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:hover::before {
|
|
92
|
+
background-color: $usx-accordion-text !important;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.usa-accordion--icon-start .usa-accordion__button::before {
|
|
97
|
+
inset-inline: 1.25rem auto;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&.usa-accordion--icon-end .usa-accordion__button::before {
|
|
101
|
+
inset-inline: auto 1.25rem;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@if $usx-accordion-content-text {
|
|
106
|
+
.usa-accordion__content {
|
|
107
|
+
color: $usx-accordion-content-text;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
@use "sass:string";
|
|
2
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
3
|
+
|
|
4
|
+
/* stylelint-disable selector-class-pattern, no-descending-specificity -- Public USX classes use BEM naming; intentional cascade order. */
|
|
5
|
+
|
|
6
|
+
// For alerts that aren't under usx-site-alert
|
|
7
|
+
.usa-alert:not(.usx-site-alert *) {
|
|
8
|
+
&.usx-alert, .usa-alert__body {
|
|
9
|
+
position: relative;
|
|
10
|
+
|
|
11
|
+
@if $usx-alert-radius {
|
|
12
|
+
border-radius: $usx-alert-radius;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@if $usx-alert-box-shadow {
|
|
16
|
+
box-shadow: $usx-alert-box-shadow;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.usx-alert__dismiss {
|
|
22
|
+
padding: 6px;
|
|
23
|
+
width: 2.5rem;
|
|
24
|
+
height: 2.5rem;
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
appearance: none;
|
|
29
|
+
border: none;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
background: transparent;
|
|
32
|
+
position: absolute;
|
|
33
|
+
color: currentcolor;
|
|
34
|
+
top: 0;
|
|
35
|
+
right: 0;
|
|
36
|
+
margin: 0;
|
|
37
|
+
z-index: 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@mixin usx-alert-variant($name, $bg, $color, $link-color, $border) {
|
|
41
|
+
$uswds-class-name: string.unquote("usa-alert--#{$name}");
|
|
42
|
+
$usa-class-name: string.unquote("usa-alert--#{$name}");
|
|
43
|
+
|
|
44
|
+
.#{$uswds-class-name}.#{$usa-class-name}:not(.usx-site-alert--maintenance *):not(.usx-site-alert--maintenance-warning *),
|
|
45
|
+
.#{$uswds-class-name}.#{$usa-class-name}:not(.usx-site-alert--maintenance *):not(.usx-site-alert--maintenance-warning *) .usa-alert__body {
|
|
46
|
+
@if $bg {
|
|
47
|
+
background-color: $bg;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@if $color {
|
|
51
|
+
color: $color;
|
|
52
|
+
|
|
53
|
+
::before {
|
|
54
|
+
background-color: $color;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@if $link-color {
|
|
59
|
+
.usa-link {
|
|
60
|
+
color: $link-color;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@if $border {
|
|
65
|
+
border-color: $border;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@if $usx-alert-border-width {
|
|
69
|
+
border-width: $usx-alert-border-width;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Info variant */
|
|
75
|
+
@include usx-alert-variant("info",
|
|
76
|
+
$usx-alert-info-bg,
|
|
77
|
+
$usx-alert-info-text,
|
|
78
|
+
$usx-alert-info-link-text,
|
|
79
|
+
$usx-alert-info-border);
|
|
80
|
+
|
|
81
|
+
/* Warning variant */
|
|
82
|
+
@include usx-alert-variant("warning",
|
|
83
|
+
$usx-alert-warning-bg,
|
|
84
|
+
$usx-alert-warning-text,
|
|
85
|
+
$usx-alert-warning-link-text,
|
|
86
|
+
$usx-alert-warning-border);
|
|
87
|
+
|
|
88
|
+
/* Success variant */
|
|
89
|
+
@include usx-alert-variant("success",
|
|
90
|
+
$usx-alert-success-bg,
|
|
91
|
+
$usx-alert-success-text,
|
|
92
|
+
$usx-alert-success-link-text,
|
|
93
|
+
$usx-alert-success-border);
|
|
94
|
+
|
|
95
|
+
/* Error variant */
|
|
96
|
+
@include usx-alert-variant("error",
|
|
97
|
+
$usx-alert-error-bg,
|
|
98
|
+
$usx-alert-error-text,
|
|
99
|
+
$usx-alert-error-link-text,
|
|
100
|
+
$usx-alert-error-border);
|
|
101
|
+
|
|
102
|
+
/* Emergency variant */
|
|
103
|
+
@include usx-alert-variant("emergency",
|
|
104
|
+
$usx-alert-emergency-bg,
|
|
105
|
+
$usx-alert-emergency-text,
|
|
106
|
+
$usx-alert-emergency-link-text,
|
|
107
|
+
$usx-alert-emergency-border);
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
.usx-alert {
|
|
111
|
+
.usa-alert--slim {
|
|
112
|
+
@if $usx-alert-slim-padding-block {
|
|
113
|
+
padding-block: $usx-alert-slim-padding-block;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@if $usx-alert-slim-padding-inline {
|
|
117
|
+
padding-inline: $usx-alert-slim-padding-inline;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.usa-alert--no-icon {
|
|
122
|
+
@if $usx-alert-no-icon-padding-inline-start {
|
|
123
|
+
padding-inline-start: $usx-alert-no-icon-padding-inline-start;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.usa-alert__body {
|
|
128
|
+
@if $usx-alert-body-gap {
|
|
129
|
+
gap: $usx-alert-body-gap;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.usa-alert__heading {
|
|
134
|
+
@if $usx-alert-heading-font-size {
|
|
135
|
+
font-size: $usx-alert-heading-font-size;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@if $usx-alert-heading-font-weight {
|
|
139
|
+
font-weight: $usx-alert-heading-font-weight;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@if $usx-alert-heading-margin-block-end {
|
|
143
|
+
margin-block-end: $usx-alert-heading-margin-block-end;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.usa-alert__text {
|
|
148
|
+
@if $usx-alert-text-font-size {
|
|
149
|
+
font-size: $usx-alert-text-font-size;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
@if $usx-alert-text-line-height {
|
|
153
|
+
line-height: $usx-alert-text-line-height;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
|
+
.usx-attribution {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
column-gap: 1rem;
|
|
8
|
+
|
|
9
|
+
.usx-attribution__media {
|
|
10
|
+
flex: 0 0 auto;
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.usx-attribution__content {
|
|
16
|
+
min-width: 0;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
row-gap: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.usx-attribution__primary,
|
|
23
|
+
.usx-attribution__secondary {
|
|
24
|
+
margin: 0;
|
|
25
|
+
line-height: $usx-line-height-heading;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.usx-attribution__primary {
|
|
29
|
+
font-weight: $usx-attribution-primary-font-weight;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.usx-attribution__secondary {
|
|
33
|
+
font-size: $usx-attribution-secondary-font-size;
|
|
34
|
+
color: #71767a;
|
|
35
|
+
|
|
36
|
+
@if $usx-attribution-secondary-text {
|
|
37
|
+
color: $usx-attribution-secondary-text;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -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
|
+
/* stylelint-disable no-descending-specificity -- Intentional cascade order for avatar overlap/stacked modifiers. */
|
|
5
|
+
.usx-avatar-group {
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 0.5rem;
|
|
9
|
+
|
|
10
|
+
&.usa-avatar-group--overlap {
|
|
11
|
+
&:not(.usa-avatar-group--stacked) {
|
|
12
|
+
.usx-avatar:not(:first-child) {
|
|
13
|
+
margin-left: -1.5rem;
|
|
14
|
+
|
|
15
|
+
@if $usx-avatar-group-overlap-size {
|
|
16
|
+
margin-left: -$usx-avatar-group-overlap-size;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.usx-avatar {
|
|
22
|
+
&:hover {
|
|
23
|
+
z-index: 1;
|
|
24
|
+
|
|
25
|
+
img {
|
|
26
|
+
box-shadow: 0 0 0 2px #00bde3;
|
|
27
|
+
|
|
28
|
+
@if $usx-avatar-group-overlap-box-shadow {
|
|
29
|
+
box-shadow: $usx-avatar-group-overlap-box-shadow;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.usa-avatar-group--stacked {
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
align-items: start;
|
|
39
|
+
|
|
40
|
+
&.usa-avatar-group--overlap {
|
|
41
|
+
.usx-avatar:not(:first-child) {
|
|
42
|
+
margin-top: -1rem;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.usx-avatar {
|
|
48
|
+
margin: 0;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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 -- Size modifiers intentionally precede the base content rule. */
|
|
5
|
+
.usx-avatar {
|
|
6
|
+
text-decoration: none;
|
|
7
|
+
display: block;
|
|
8
|
+
width: 3rem;
|
|
9
|
+
height: 3rem;
|
|
10
|
+
|
|
11
|
+
&.usx-avatar--size-sm {
|
|
12
|
+
width: 2.5rem;
|
|
13
|
+
height: 2.5rem;
|
|
14
|
+
|
|
15
|
+
.usx-avatar__content {
|
|
16
|
+
font-size: $usx-avatar-font-size-sm;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.usx-avatar--size-md {
|
|
21
|
+
width: 3rem;
|
|
22
|
+
height: 3rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.usx-avatar--size-lg {
|
|
26
|
+
width: 4rem;
|
|
27
|
+
height: 4rem;
|
|
28
|
+
|
|
29
|
+
.usx-avatar__content {
|
|
30
|
+
font-size: $usx-avatar-font-size-lg;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.usx-avatar--size-xl {
|
|
35
|
+
width: 5rem;
|
|
36
|
+
height: 5rem;
|
|
37
|
+
|
|
38
|
+
.usx-avatar__content {
|
|
39
|
+
font-size: $usx-avatar-font-size-xl;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.usx-avatar__img {
|
|
44
|
+
height: 100%;
|
|
45
|
+
width: 100%;
|
|
46
|
+
object-fit: cover;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.usx-avatar__content {
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 100%;
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
font-weight: $usx-avatar-content-font-weight;
|
|
56
|
+
line-height: 1;
|
|
57
|
+
|
|
58
|
+
.usa-icon {
|
|
59
|
+
width: 60%;
|
|
60
|
+
height: 60%;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
|
+
.usa-banner.usx-banner {
|
|
5
|
+
@if $usx-banner-bg {
|
|
6
|
+
background-color: $usx-banner-bg;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@if $usx-banner-text {
|
|
10
|
+
color: $usx-banner-text;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.usa-banner__header-text, .usa-banner__content {
|
|
14
|
+
@if $usx-banner-text {
|
|
15
|
+
color: $usx-banner-text;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.usa-banner__button {
|
|
20
|
+
@if $usx-banner-button-text {
|
|
21
|
+
color: $usx-banner-button-text;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.usa-banner__button::after {
|
|
26
|
+
@if $usx-banner-chevron-text {
|
|
27
|
+
background-color: $usx-banner-chevron-text;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|