Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions app/components/badge_component.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
@use 'uswds-core' as *;
@forward 'usa-verification-badge';

// Upstream: https://github.com/18F/identity-design-system/pull/445
.lg-verification-badge .usa-icon {
margin-right: units(1);
}
2 changes: 1 addition & 1 deletion app/javascript/packages/clipboard-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"@18f/identity-design-system": "^9.2.0"
"@18f/identity-design-system": "^9.3.0"
},
"sideEffects": [
"./clipboard-button-element.ts"
Expand Down
17 changes: 8 additions & 9 deletions app/javascript/packages/components/alert.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import type { AlertType } from './alert';

describe('Alert', () => {
describe('role', () => {
(
[
['success', 'status'],
['warning', 'status'],
['error', 'alert'],
['info', 'status'],
['other', 'status'],
] as [AlertType, 'alert' | 'status'][]
).forEach(([type, role]) => {
const variants: [AlertType, 'alert' | 'status'][] = [
['success', 'status'],
['warning', 'status'],
['error', 'alert'],
['info', 'status'],
];

variants.forEach(([type, role]) => {
context(`with ${type} type`, () => {
it(`should apply ${role} role`, () => {
const { getByRole } = render(<Alert type={type} />);
Expand Down
8 changes: 4 additions & 4 deletions app/javascript/packages/components/alert.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { forwardRef, createElement } from 'react';
import type { ReactNode, ForwardedRef } from 'react';

export type AlertType = 'success' | 'warning' | 'error' | 'info' | 'other';
export type AlertType = 'success' | 'warning' | 'error' | 'info';

interface AlertProps {
/**
* Alert type. Defaults to "other".
* Alert type.
*/
type?: AlertType;

Expand All @@ -32,10 +32,10 @@ interface AlertProps {
}

function Alert(
{ type = 'other', className, isFocusable, children, textTag = 'p' }: AlertProps,
{ type, className, isFocusable, children, textTag = 'p' }: AlertProps,
ref: ForwardedRef<any>,
) {
const classes = [`usa-alert usa-alert--${type}`, className].filter(Boolean).join(' ');
const classes = ['usa-alert', type && `usa-alert--${type}`, className].filter(Boolean).join(' ');
const role = type === 'error' ? 'alert' : 'status';

const inner = createElement(textTag, { className: 'usa-alert__text' }, children);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"build:css": "build-sass app/assets/stylesheets/*.css.scss app/components/*.scss --load-path=app/assets/stylesheets --out-dir=app/assets/builds"
},
"dependencies": {
"@18f/identity-design-system": "^9.2.0",
"@18f/identity-design-system": "^9.3.0",
"@babel/core": "^7.20.7",
"@babel/preset-env": "^7.15.6",
"@babel/preset-react": "^7.14.5",
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# yarn lockfile v1


"@18f/identity-design-system@^9.2.0":
version "9.2.0"
resolved "https://registry.yarnpkg.com/@18f/identity-design-system/-/identity-design-system-9.2.0.tgz#36f1e4c4c68cae52c0cd4d5256ac33e6ef872763"
integrity sha512-gzzcRtxRPKdxcbdgYKBS+IEmBielCwbxB9KkUTwNyXTqDMJoWmscSODPEpmegIEB8Tg/LXwxJQfr+LyEePYewQ==
"@18f/identity-design-system@^9.3.0":
version "9.3.0"
resolved "https://registry.yarnpkg.com/@18f/identity-design-system/-/identity-design-system-9.3.0.tgz#990089ea93c5ac773cf87ac61d175d739ec89ae7"
integrity sha512-vOhBNu20rtSUUIx0bpyLjUTcOzyzLpq9/Oyot+vWPYxyatTg2m+7dpQK8xSNVDtnNtpVEwOhf1GnOGF+v7n+nA==
dependencies:
"@types/uswds__uswds" "^3.8.0"
"@uswds/uswds" "^3.8.0"
"@uswds/uswds" "^3.8.1"

"@aashutoshrathi/word-wrap@^1.2.3":
version "1.2.6"
Expand Down Expand Up @@ -1895,10 +1895,10 @@
"@typescript-eslint/types" "6.7.5"
eslint-visitor-keys "^3.4.1"

"@uswds/uswds@^3.8.0":
version "3.8.0"
resolved "https://registry.yarnpkg.com/@uswds/uswds/-/uswds-3.8.0.tgz#dba0b0b38182053779276f9ae6809474bd31d548"
integrity sha512-rMwCXe/u4HGkfskvS1Iuabapi/EXku3ChaIFW7y/dUhc7R1TXQhbbfp8YXEjmXPF0yqJnv9T08WPgS0fQqWZ8w==
"@uswds/uswds@^3.8.1":
version "3.8.1"
resolved "https://registry.yarnpkg.com/@uswds/uswds/-/uswds-3.8.1.tgz#3d834559498ae1bb7d3a618f3f85a5f4e9818497"
integrity sha512-bKG/B9mJF1v0yoqth48wQDzST5Xyu3OxxpePIPDyhKWS84oDrCehnu3Z88JhSjdIAJMl8dtjtH8YvdO9kZUpAg==
dependencies:
classlist-polyfill "1.2.0"
object-assign "4.1.1"
Expand Down