Skip to content

Commit 03939b5

Browse files
committed
Return to stable uswds and nasawds releases
- uswds/uswds#5825 has been fixed. - https://github.com/lpsinger/react-uswds/tree/gcn is the same as trussworks/react-uswds#2726, but rebased. - I had to update some CSS where we have heavily customized the appearance of some USWDS components.
1 parent fa6aefd commit 03939b5

File tree

11 files changed

+108
-86
lines changed

11 files changed

+108
-86
lines changed

app/components/CredentialCard.tsx

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Form, useFetcher } from '@remix-run/react'
99
import type { ModalRef } from '@trussworks/react-uswds'
1010
import {
1111
Button,
12+
ButtonGroup,
1213
Grid,
1314
Icon,
1415
Modal,
@@ -54,33 +55,35 @@ export default function CredentialCard({
5455
</div>
5556
</div>
5657
<div className="tablet:grid-col flex-auto margin-y-auto">
57-
<ModalToggleButton
58-
opener
59-
disabled={disabled}
60-
modalRef={ref}
61-
type="button"
62-
className="usa-button--secondary"
63-
>
64-
<Icon.Delete
65-
role="presentation"
66-
className="bottom-aligned margin-right-05"
67-
/>
68-
Delete
69-
</ModalToggleButton>
70-
<Form
71-
method="GET"
72-
action="/quickstart/alerts"
73-
className="display-inline"
74-
>
75-
<input type="hidden" name="clientId" value={client_id} />
76-
<Button disabled={disabled} type="submit">
77-
Select
78-
<Icon.ArrowForward
58+
<ButtonGroup>
59+
<ModalToggleButton
60+
opener
61+
disabled={disabled}
62+
modalRef={ref}
63+
type="button"
64+
className="usa-button--secondary"
65+
>
66+
<Icon.Delete
7967
role="presentation"
80-
className="bottom-aligned margin-left-05"
68+
className="bottom-aligned margin-right-05"
8169
/>
82-
</Button>
83-
</Form>
70+
Delete
71+
</ModalToggleButton>
72+
<Form
73+
method="GET"
74+
action="/quickstart/alerts"
75+
className="display-inline"
76+
>
77+
<input type="hidden" name="clientId" value={client_id} />
78+
<Button disabled={disabled} type="submit">
79+
Select
80+
<Icon.ArrowForward
81+
role="presentation"
82+
className="bottom-aligned margin-left-05"
83+
/>
84+
</Button>
85+
</Form>
86+
</ButtonGroup>
8487
</div>
8588
</Grid>
8689
<Modal

app/components/tabs/index.module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
*/
88

99
.tabs {
10+
&,
11+
& :global(.usa-button-group.usa-button-group--segmented) {
12+
align-items: end;
13+
}
14+
1015
:global(.usa-button-group__item) {
1116
:global(.usa-button) {
1217
box-shadow: 0px 0px 0px 0px;

app/img/checkbox-indeterminate.svg

Lines changed: 0 additions & 10 deletions
This file was deleted.

app/routes/circulars.$circularId.($version)/route.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,11 @@ export default function () {
7272
}`
7373
return (
7474
<>
75-
<ButtonGroup>
76-
<Link to={`/circulars${searchString}`} className="usa-button">
75+
<ButtonGroup className="flex-wrap">
76+
<Link
77+
to={`/circulars${searchString}`}
78+
className="usa-button flex-align-stretch"
79+
>
7780
<div className="position-relative">
7881
<Icon.ArrowBack
7982
role="presentation"
@@ -118,7 +121,7 @@ export default function () {
118121
</ButtonGroup>
119122
{useSubmitterStatus() && (
120123
<Link
121-
className="usa-button usa-button--outline"
124+
className="usa-button usa-button--outline text-no-wrap"
122125
to={`/circulars/correction/${circularId}`}
123126
>
124127
Request Correction

app/routes/circulars._archive._index/DateSelectorMenu.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,14 @@ function DateSelectorButton({
4242
endDate?: string
4343
expanded?: boolean
4444
} & Omit<Parameters<typeof ButtonGroup>[0], 'segmented' | 'children'>) {
45-
const slimClasses = 'height-4 padding-y-0'
45+
const slimClasses = 'padding-y-1'
4646

4747
return (
4848
<ButtonGroup type="segmented" {...props}>
49-
<Button type="button" className={`${slimClasses} padding-x-2`}>
49+
<Button
50+
type="button"
51+
className={`${slimClasses} text-no-wrap padding-x-2`}
52+
>
5053
{(startDate && dateSelectorLabels[startDate]) ||
5154
(startDate && endDate && (
5255
<>

app/routes/circulars._archive._index/SortSelectorButton.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@ function SortButton({
3131
sort?: string
3232
expanded?: boolean
3333
} & Omit<Parameters<typeof ButtonGroup>[0], 'segmented' | 'children'>) {
34-
const slimClasses = 'height-4 padding-y-0'
34+
const slimClasses = 'padding-y-1'
3535

3636
return (
3737
<ButtonGroup type="segmented" {...props}>
38-
<Button type="button" className={`${slimClasses} padding-x-2`}>
38+
<Button
39+
type="button"
40+
className={`${slimClasses} text-no-wrap padding-x-2`}
41+
>
3942
Sort by{' '}
4043
{sortOptions[sort as keyof typeof sortOptions] ||
4144
sortOptions.circularID}

app/routes/circulars._archive._index/route.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ export default function () {
197197
</Label>
198198
<TextInput
199199
autoFocus
200+
className="minw-15"
200201
id="query"
201202
name="query"
202203
type="search"
@@ -223,10 +224,7 @@ export default function () {
223224
/>
224225
{query && <SortSelector form={formId} defaultValue={sort} />}
225226
<Link to={`/circulars/new${searchString}`}>
226-
<Button
227-
type="button"
228-
className="height-4 padding-top-0 padding-bottom-0"
229-
>
227+
<Button type="button" className="padding-y-1">
230228
<Icon.Edit role="presentation" /> New
231229
</Button>
232230
</Link>

app/routes/circulars.edit.$circularId/RichEditor/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import iconTable from '@gitlab/svgs/dist/sprite_icons/table.svg'
4444
function SlimButton({ className, ...props }: Parameters<typeof Button>[0]) {
4545
return (
4646
<Button
47-
className={classNames(className, 'height-4 padding-y-0 padding-x-105')}
47+
className={classNames(className, 'height-4 padding-y-1 padding-x-105')}
4848
{...props}
4949
/>
5050
)

app/theme.scss

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -283,31 +283,6 @@ input.react-tags__combobox-input:focus {
283283
font-weight: bold;
284284
}
285285

286-
/*
287-
* Indeterminate checkboxes.
288-
* FIXME: remove if/when https://github.com/uswds/uswds/pull/5549 is merged
289-
*/
290-
291-
.usa-checkbox__input:indeterminate {
292-
&:not(:disabled) {
293-
@include format-input {
294-
@include add-background-svg('checkbox-indeterminate', '~/img');
295-
background-size: 75%;
296-
background-position: center;
297-
background-color: #0050d8;
298-
box-shadow: 0 0 0 2px #0050d8;
299-
}
300-
}
301-
&:disabled {
302-
@include format-input {
303-
@include add-background-svg('checkbox-indeterminate', '~/img');
304-
background-size: 75%;
305-
background-position: center;
306-
background-color: rgba(27, 27, 27, 0.3);
307-
}
308-
}
309-
}
310-
311286
/*
312287
* Hero formatting
313288
*/

package-lock.json

Lines changed: 54 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)