@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,108 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
// Theme colors/border are single build-time constants (no per-instance
|
|
4
|
+
// overrides), so they're folded directly into the declarations below
|
|
5
|
+
// instead of round-tripping through custom properties that never change.
|
|
6
|
+
$switch-border: $usx-switch-border-width or 2px;
|
|
7
|
+
$switch-off-color: $usx-switch-border-off or black;
|
|
8
|
+
$switch-track-bg: $usx-switch-track-bg or #e2e8f0;
|
|
9
|
+
|
|
10
|
+
.usx-switch {
|
|
11
|
+
--size: calc(var(--size-selector, 0.25rem) * 6);
|
|
12
|
+
|
|
13
|
+
// Knob math is based on the space inside the border (not the outer
|
|
14
|
+
// --size), so the knob and its inset stay proportional as the border
|
|
15
|
+
// changes instead of overflowing/shrinking unevenly. --size varies per
|
|
16
|
+
// instance (see .usx-toggle-* below), so these stay real custom properties.
|
|
17
|
+
--inner-size: calc(var(--size) - (#{$switch-border} * 2));
|
|
18
|
+
--toggle-p: 2px;
|
|
19
|
+
--knob-size: calc(var(--inner-size) - (var(--toggle-p) * 2));
|
|
20
|
+
|
|
21
|
+
position: relative;
|
|
22
|
+
display: inline-block;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
padding: var(--toggle-p);
|
|
25
|
+
width: calc((var(--size) * 2) - (#{$switch-border} + var(--toggle-p)) * 2);
|
|
26
|
+
height: var(--size);
|
|
27
|
+
background: $switch-track-bg;
|
|
28
|
+
border-radius: calc(var(--size) / 2);
|
|
29
|
+
border: $switch-border solid $switch-off-color;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
appearance: none;
|
|
32
|
+
transition: background-color 0.18s ease, opacity 0.18s ease, border-color 0.18s ease;
|
|
33
|
+
|
|
34
|
+
&::before {
|
|
35
|
+
content: "";
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 50%;
|
|
38
|
+
left: var(--toggle-p);
|
|
39
|
+
transform: translateY(-50%);
|
|
40
|
+
width: var(--knob-size);
|
|
41
|
+
height: var(--knob-size);
|
|
42
|
+
border-radius: 50%;
|
|
43
|
+
background: $switch-off-color;
|
|
44
|
+
box-shadow: 0 -1px rgb(0 0 0 / 2%) inset, 0 8px 0 -4px rgb(0 0 0 / 2%) inset;
|
|
45
|
+
transition: left 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:focus-visible {
|
|
49
|
+
outline: 2px solid color-mix(in oklab, currentColor 60%, #fff);
|
|
50
|
+
outline-offset: 3px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:checked,
|
|
54
|
+
&[aria-checked="true"] {
|
|
55
|
+
/* track stays white; border and knob adopt currentColor */
|
|
56
|
+
border-color: currentcolor;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:indeterminate::before {
|
|
60
|
+
/* center the knob */
|
|
61
|
+
left: 50%;
|
|
62
|
+
transform: translate(-50%, -50%);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:checked::before,
|
|
66
|
+
&[aria-checked="true"]::before {
|
|
67
|
+
left: calc(100% - var(--knob-size) - var(--toggle-p));
|
|
68
|
+
background: currentcolor;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:disabled {
|
|
72
|
+
opacity: 0.45;
|
|
73
|
+
cursor: not-allowed;
|
|
74
|
+
|
|
75
|
+
&:checked {
|
|
76
|
+
color: #9c9c9c;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.usx-toggle-xs {
|
|
82
|
+
--size: calc(1rem + (2 * #{$switch-border}) - 4px);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.usx-toggle-sm {
|
|
86
|
+
--size: calc(1.25rem + (2 * #{$switch-border}) - 4px);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.usx-toggle-md {
|
|
90
|
+
--size: calc(1.5rem + (2 * #{$switch-border}) - 4px);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.usx-toggle-lg {
|
|
94
|
+
--size: calc(1.75rem + (2 * #{$switch-border}) - 4px);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.usx-toggle-xl {
|
|
98
|
+
--size: calc(2rem + (2 * #{$switch-border}) - 4px);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.usx-switch__label {
|
|
102
|
+
display: flex;
|
|
103
|
+
margin: 0;
|
|
104
|
+
align-items: center;
|
|
105
|
+
gap: .5rem;
|
|
106
|
+
width: fit-content;
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
}
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
// ─── USX Table ────────────────────────────────────────────────────────────────
|
|
4
|
+
// Extends USWDS `usa-table` with USX-specific behaviour and enhancements.
|
|
5
|
+
// USWDS classes (usa-table, usa-table--striped, etc.) still apply their own
|
|
6
|
+
// styles; these rules layer custom USX overrides and additions on top.
|
|
7
|
+
|
|
8
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
9
|
+
.usx-table-container--scrollable {
|
|
10
|
+
overflow: auto;
|
|
11
|
+
-webkit-overflow-scrolling: touch;
|
|
12
|
+
position: relative;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.usa-table {
|
|
16
|
+
color: $usx-text-ink;
|
|
17
|
+
|
|
18
|
+
td,
|
|
19
|
+
th {
|
|
20
|
+
border-color: $usx-table-border;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
tfoot td,
|
|
24
|
+
th,
|
|
25
|
+
thead td {
|
|
26
|
+
background-color: $usx-table-header-bg;
|
|
27
|
+
color: $usx-text-ink;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
td {
|
|
31
|
+
background-color: $usx-table-bg;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
thead th[aria-sort] {
|
|
35
|
+
background-color: $usx-table-sorted-column-bg;
|
|
36
|
+
color: $usx-table-sorted-column-text;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.usa-table--striped tbody tr:nth-child(odd) td {
|
|
41
|
+
background-color: $usx-table-stripe-bg;
|
|
42
|
+
color: $usx-text-ink;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.usx-table {
|
|
46
|
+
width: 100%;
|
|
47
|
+
position: relative;
|
|
48
|
+
|
|
49
|
+
// ── Base surfaces/borders/text ───────────────────────────────────────────────
|
|
50
|
+
// Real USWDS bakes its own `.usa-table` base styling as fixed values at ITS
|
|
51
|
+
// OWN build time: ink (#1b1b1b) text/borders, white body cells,
|
|
52
|
+
// "base-lighter" header/footer cells, "base-lightest" striped rows. Since
|
|
53
|
+
// both `usa-table` and `usx-table` land on the same element, compounding
|
|
54
|
+
// the selector with `&.usa-table` (rather than a plain descendant
|
|
55
|
+
// selector) guarantees these overrides win on specificity regardless of
|
|
56
|
+
// stylesheet load order, so the whole table body tracks the active
|
|
57
|
+
// surface/border/text theme instead of just the hover/selected extras
|
|
58
|
+
// further down this file.
|
|
59
|
+
&.usa-table {
|
|
60
|
+
color: $usx-text-ink;
|
|
61
|
+
|
|
62
|
+
td,
|
|
63
|
+
th {
|
|
64
|
+
border-color: $usx-table-border;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
tfoot td,
|
|
68
|
+
th,
|
|
69
|
+
thead td {
|
|
70
|
+
background-color: $usx-table-header-bg;
|
|
71
|
+
color: $usx-text-ink;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
td {
|
|
75
|
+
background-color: $usx-table-bg;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
thead th[aria-sort] {
|
|
79
|
+
background-color: $usx-table-sorted-column-bg;
|
|
80
|
+
color: $usx-table-sorted-column-text;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&.usa-table--striped tbody tr:nth-child(odd) td {
|
|
85
|
+
background-color: $usx-table-stripe-bg;
|
|
86
|
+
color: $usx-text-ink;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// ── Caption ─────────────────────────────────────────────────────────────────
|
|
90
|
+
// Real USWDS's `body { color: #1b1b1b; }` is a static, non-themeable value
|
|
91
|
+
// the caption would otherwise just inherit — pin it to the theme's text
|
|
92
|
+
// color so it responds to overrides instead of staying stuck black.
|
|
93
|
+
.usx-table__caption {
|
|
94
|
+
text-align: left;
|
|
95
|
+
font-style: italic;
|
|
96
|
+
margin-bottom: 0.5rem;
|
|
97
|
+
caption-side: top;
|
|
98
|
+
|
|
99
|
+
@if $usx-text-ink {
|
|
100
|
+
color: $usx-text-ink;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// ── Cells ────────────────────────────────────────────────────────────────────
|
|
105
|
+
.usx-table__cell {
|
|
106
|
+
vertical-align: top;
|
|
107
|
+
word-break: break-word;
|
|
108
|
+
height: inherit;
|
|
109
|
+
background-clip: unset;
|
|
110
|
+
|
|
111
|
+
&--align-left { text-align: left; }
|
|
112
|
+
&--align-center { text-align: center; }
|
|
113
|
+
&--align-right { text-align: right; }
|
|
114
|
+
|
|
115
|
+
// Selection checkbox / radio column
|
|
116
|
+
&--selection {
|
|
117
|
+
width: 2.5rem;
|
|
118
|
+
text-align: center;
|
|
119
|
+
white-space: nowrap;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Detail-toggle column
|
|
123
|
+
&--detail-toggle {
|
|
124
|
+
width: 3rem;
|
|
125
|
+
min-width: 2rem;
|
|
126
|
+
padding: 0;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// ── Head ─────────────────────────────────────────────────────────────────────
|
|
131
|
+
.usx-table__head {
|
|
132
|
+
th {
|
|
133
|
+
white-space: nowrap;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// ── Sort button ──────────────────────────────────────────────────────────────
|
|
138
|
+
.usx-table__sort-button {
|
|
139
|
+
display: inline-flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
gap: 0.25rem;
|
|
142
|
+
background: none;
|
|
143
|
+
border: none;
|
|
144
|
+
padding: 0;
|
|
145
|
+
font: inherit;
|
|
146
|
+
font-weight: $usx-font-weight-bold;
|
|
147
|
+
color: inherit;
|
|
148
|
+
cursor: pointer;
|
|
149
|
+
white-space: nowrap;
|
|
150
|
+
|
|
151
|
+
&:hover {
|
|
152
|
+
text-decoration: underline;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// ── Rows ─────────────────────────────────────────────────────────────────────
|
|
157
|
+
.usx-table__row {
|
|
158
|
+
// Allows for content stretching to fill dynamic row height
|
|
159
|
+
height: 100%;
|
|
160
|
+
min-height: 1px;
|
|
161
|
+
|
|
162
|
+
&--selected {
|
|
163
|
+
background-color: $usx-table-selected-bg !important;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&--disabled {
|
|
167
|
+
opacity: 0.5;
|
|
168
|
+
pointer-events: none;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&--clickable {
|
|
172
|
+
cursor: pointer;
|
|
173
|
+
|
|
174
|
+
&:hover {
|
|
175
|
+
background-color: $usx-table-bg-hover !important;
|
|
176
|
+
|
|
177
|
+
.usx-table__cell {
|
|
178
|
+
background-color: transparent; // Keep cells from layering on top of hover color
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// ── Checkboxes and radios ─────────────────────────────────────────────────────
|
|
185
|
+
// These cells hold a single checkbox/radio with no visible label text (the
|
|
186
|
+
// accessible name comes from aria-label on the input instead). USWDS's
|
|
187
|
+
// default `.usa-checkbox__label`/`.usa-radio__label` spacing is built for a
|
|
188
|
+
// label string following the box — margin-top pushes it down to align with
|
|
189
|
+
// surrounding form fields, and padding-left reserves room for that text.
|
|
190
|
+
// With no text at all the label's content box collapses to height: 0 (an
|
|
191
|
+
// empty inline-block has no line box to size itself against), so its
|
|
192
|
+
// baseline-anchored position lands near the *bottom* of the wrapper instead
|
|
193
|
+
// of the middle — which is what actually pushes the box out of alignment.
|
|
194
|
+
// Giving the label an explicit height (matching the box + its 2px margin)
|
|
195
|
+
// fixes the anchor point; `text-align: center` on the cell handles the rest.
|
|
196
|
+
.usx-table__checkbox,
|
|
197
|
+
.usx-table__radio {
|
|
198
|
+
display: inline-block;
|
|
199
|
+
|
|
200
|
+
.usa-checkbox__label,
|
|
201
|
+
.usa-radio__label {
|
|
202
|
+
margin-top: 2px;
|
|
203
|
+
padding-left: calc(1.25rem + 4px);
|
|
204
|
+
height: 1.25rem;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// ── Group rows ────────────────────────────────────────────────────────────────
|
|
209
|
+
.usx-table__group-row {
|
|
210
|
+
.usx-table__group-cell {
|
|
211
|
+
padding: 0;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.usx-table__group-toggle {
|
|
216
|
+
padding-top: 0.5rem;
|
|
217
|
+
padding-bottom: 0.5rem;
|
|
218
|
+
background-color: $usx-table-grouped-row-bg;
|
|
219
|
+
color: $usx-table-grouped-row-text;
|
|
220
|
+
|
|
221
|
+
&:focus {
|
|
222
|
+
outline-offset: -0.25rem;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// ── Expandable row details ────────────────────────────────────────────────────
|
|
227
|
+
.usx-table__detail-disclosure {
|
|
228
|
+
display: block;
|
|
229
|
+
height: 100%;
|
|
230
|
+
|
|
231
|
+
summary::-webkit-details-marker {
|
|
232
|
+
display: none;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
summary::marker {
|
|
236
|
+
content: '';
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.usx-table__detail-toggle {
|
|
241
|
+
padding: 0;
|
|
242
|
+
cursor: pointer;
|
|
243
|
+
color: inherit;
|
|
244
|
+
display: flex;
|
|
245
|
+
align-items: center;
|
|
246
|
+
justify-content: center;
|
|
247
|
+
height: 100%;
|
|
248
|
+
list-style: none;
|
|
249
|
+
|
|
250
|
+
&:focus {
|
|
251
|
+
outline-offset: -0.125rem;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.usx-table__detail-cell {
|
|
256
|
+
padding: 1rem;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// ── Footer ────────────────────────────────────────────────────────────────────
|
|
260
|
+
.usx-table__foot {
|
|
261
|
+
font-weight: $usx-font-weight-bold;
|
|
262
|
+
|
|
263
|
+
@if $usx-table-border {
|
|
264
|
+
border-top: 2px solid $usx-table-border;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// ── Placeholder ───────────────────────────────────────────────────────────────
|
|
269
|
+
.usx-table__placeholder-cell {
|
|
270
|
+
text-align: center;
|
|
271
|
+
padding: 2rem 1rem;
|
|
272
|
+
font-style: italic;
|
|
273
|
+
|
|
274
|
+
@if $usx-table-placeholder-text {
|
|
275
|
+
color: $usx-table-placeholder-text;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// ── Loading row (spinner while fetching next batch) ───────────────────────────
|
|
280
|
+
.usx-table__loading-cell {
|
|
281
|
+
text-align: center;
|
|
282
|
+
padding: 1rem;
|
|
283
|
+
border: none;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// ── Row detail toggle button (Django) ───────────────────────────────────────
|
|
287
|
+
.usx-table__detail-toggle .usx-table__detail-icon {
|
|
288
|
+
transition: transform 120ms ease-in-out;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.usx-table__detail-disclosure[open] .usx-table__detail-icon {
|
|
292
|
+
transform: rotate(180deg);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// No-JS row details: reveal the adjacent detail row when disclosure is open.
|
|
296
|
+
.usx-table__detail-row {
|
|
297
|
+
display: none;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.usx-table__row:has(.usx-table__detail-disclosure[open]) + .usx-table__detail-row {
|
|
301
|
+
display: table-row;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// ── Sentinel (IntersectionObserver anchor for onMore) ─────────────────────────
|
|
305
|
+
.usx-table__sentinel {
|
|
306
|
+
td {
|
|
307
|
+
padding: 0;
|
|
308
|
+
height: 1px;
|
|
309
|
+
border: none;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// ── Sticky header + sticky first column intersection cell ─────────────────────
|
|
314
|
+
&.usx-table--sticky-first-col {
|
|
315
|
+
th:first-child,
|
|
316
|
+
td:first-child {
|
|
317
|
+
position: sticky;
|
|
318
|
+
left: 0;
|
|
319
|
+
z-index: 1;
|
|
320
|
+
|
|
321
|
+
@if $usx-table-border {
|
|
322
|
+
box-shadow: 1px 0 0 0 $usx-table-border;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
thead th:first-child {
|
|
327
|
+
z-index: 3;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
|
+
.usx-tag {
|
|
5
|
+
letter-spacing: .07rem;
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
line-height: $usx-tag-line-height;
|
|
9
|
+
gap: .25rem;
|
|
10
|
+
border-radius: $usx-tag-radius;
|
|
11
|
+
|
|
12
|
+
&.usx-tag--outline {
|
|
13
|
+
background-color: transparent;
|
|
14
|
+
border: 1px solid currentcolor;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
> .usa-icon {
|
|
18
|
+
margin: .25rem .25rem .25rem 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:has(.usx-tag__dismiss) {
|
|
22
|
+
padding-right: .25rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.usx-tag__dismiss {
|
|
26
|
+
background: none;
|
|
27
|
+
border: none;
|
|
28
|
+
color: inherit;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
|
|
34
|
+
.usa-icon {
|
|
35
|
+
margin-right: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:hover {
|
|
39
|
+
color: $usx-color-primary-lighter;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:focus {
|
|
43
|
+
outline-offset: .25rem;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/* stylelint-enable selector-class-pattern */
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
@use 'pkg:@solexllc/usx-theme/variables' as *;
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable selector-class-pattern -- Public USX classes use BEM naming. */
|
|
4
|
+
.usx-task-list {
|
|
5
|
+
display: block;
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
list-style: none;
|
|
9
|
+
border-top: 2px solid #e2e8f0;
|
|
10
|
+
border-bottom: 2px solid #e2e8f0;
|
|
11
|
+
|
|
12
|
+
@if $usx-task-list-border {
|
|
13
|
+
border-color: $usx-task-list-border;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@if $usx-task-list-outer-border-width {
|
|
17
|
+
border-width: $usx-task-list-outer-border-width;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
li {
|
|
21
|
+
&:not(:first-child) {
|
|
22
|
+
border-top: 1px solid #e2e8f0;
|
|
23
|
+
|
|
24
|
+
@if $usx-task-list-border {
|
|
25
|
+
border-top-color: $usx-task-list-border;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@if $usx-task-list-inner-border-width {
|
|
29
|
+
border-top-width: $usx-task-list-inner-border-width;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.usx-task-list__item {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
justify-content: space-between;
|
|
38
|
+
align-items: flex-start;
|
|
39
|
+
gap: .5rem;
|
|
40
|
+
padding: .5rem;
|
|
41
|
+
|
|
42
|
+
@media (width >= 40em) {
|
|
43
|
+
flex-direction: row;
|
|
44
|
+
align-items: center;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:hover {
|
|
48
|
+
background-color: #e2e8f0;
|
|
49
|
+
|
|
50
|
+
@if $usx-task-list-bg-hover {
|
|
51
|
+
background-color: $usx-task-list-bg-hover;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.usx-task-list__link {
|
|
57
|
+
color: #005ea2;
|
|
58
|
+
font-size: $usx-task-list-link-font-size !important;
|
|
59
|
+
line-height: 1;
|
|
60
|
+
|
|
61
|
+
@if $usx-task-list-link-text {
|
|
62
|
+
color: $usx-task-list-link-text;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.usa-tag.usx-tag {
|
|
67
|
+
margin-right: 0;
|
|
68
|
+
flex-shrink: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.usx-task-list__hint {
|
|
72
|
+
margin-top: .125rem;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/* stylelint-enable selector-class-pattern */
|
|
@@ -0,0 +1,87 @@
|
|
|
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 */
|
|
8
|
+
|
|
9
|
+
/* ---------------------------------- */
|
|
10
|
+
|
|
11
|
+
.usa-textarea.usx-textarea {
|
|
12
|
+
@if $usx-textarea-radius {
|
|
13
|
+
border-radius: $usx-textarea-radius;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@if $usx-textarea-padding {
|
|
17
|
+
padding: $usx-textarea-padding;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* ---------------------------------- */
|
|
22
|
+
|
|
23
|
+
/* State Enhancements */
|
|
24
|
+
|
|
25
|
+
/* ---------------------------------- */
|
|
26
|
+
|
|
27
|
+
.usa-textarea.usx-textarea:not(.usa-input--error):not(.usa-input--success) {
|
|
28
|
+
&:not(:disabled) {
|
|
29
|
+
@if $usx-textarea-bg {
|
|
30
|
+
background-color: $usx-textarea-bg;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@if $usx-textarea-text {
|
|
34
|
+
color: $usx-textarea-text;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@if $usx-textarea-border {
|
|
38
|
+
border-color: $usx-textarea-border;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.usa-textarea.usx-textarea.usa-input--error {
|
|
44
|
+
@if $usx-input-error-border-width {
|
|
45
|
+
border-width: $usx-input-error-border-width;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@if $usx-input-error-border {
|
|
49
|
+
border-color: $usx-input-error-border;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@if $usx-input-error-border-style {
|
|
53
|
+
border-style: $usx-input-error-border-style;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@if $usx-input-error-padding-top {
|
|
57
|
+
padding-top: $usx-input-error-padding-top;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@if $usx-input-error-padding-bottom {
|
|
61
|
+
padding-bottom: $usx-input-error-padding-bottom;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Error can be toggled dynamically (e.g. character-count) on top of a
|
|
66
|
+
// statically-applied success class, so error must win when both are present.
|
|
67
|
+
.usa-textarea.usx-textarea.usa-input--success:not(.usa-input--error) {
|
|
68
|
+
@if $usx-input-success-border-width {
|
|
69
|
+
border-width: $usx-input-success-border-width;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@if $usx-input-success-border {
|
|
73
|
+
border-color: $usx-input-success-border;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@if $usx-input-success-border-style {
|
|
77
|
+
border-style: $usx-input-success-border-style;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@if $usx-input-success-padding-top {
|
|
81
|
+
padding-top: $usx-input-success-padding-top;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@if $usx-input-success-padding-bottom {
|
|
85
|
+
padding-bottom: $usx-input-success-padding-bottom;
|
|
86
|
+
}
|
|
87
|
+
}
|