Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4f6f1af
setting up card status comp
ediiotero Sep 30, 2025
6574834
Merge branch 'main' into 4519-Card-status-comp
ediiotero Oct 29, 2025
b35f23d
remove card-status comp and move changes into va-card comp
ediiotero Nov 13, 2025
6ba20da
reset va-card and added new va-card-status
ediiotero Dec 1, 2025
385bf4d
Merge branch 'main' into 4519-Card-status-comp
ediiotero Dec 1, 2025
95ca813
adding tests
ediiotero Dec 1, 2025
1b2bd5c
update heading style and added va-link-action, updated tests
ediiotero Dec 9, 2025
78e86ad
Merge branch 'main' into 4519-Card-status-comp
ediiotero Dec 15, 2025
c4eec97
Removed slots, updated stories and tests
ediiotero Dec 18, 2025
f6d01ad
Update for 54.4.0 release
ediiotero Dec 18, 2025
e80ba7b
removing a story example
ediiotero Dec 19, 2025
0e8268e
update component header and added subheader story
ediiotero Jan 8, 2026
9b34b61
Merge branch 'main' of https://github.com/department-of-veterans-affa…
ediiotero Jan 8, 2026
cbbba28
update card status stories
ediiotero Jan 12, 2026
a24e1db
change error-message to error and update tests
ediiotero Jan 13, 2026
08003c1
Merge branch 'main' of https://github.com/department-of-veterans-affa…
ediiotero Jan 13, 2026
9397ee4
Merge branch 'main' of https://github.com/department-of-veterans-affa…
ediiotero Jan 14, 2026
88a0510
update story names and links within cards
ediiotero Jan 14, 2026
927d37e
Merge branch 'main' into 4519-Card-status-comp
ediiotero Jan 15, 2026
a89e13d
merge with main
ediiotero Jan 15, 2026
56068db
fix conflict merge with main
ediiotero Jan 16, 2026
266b4b6
Change heading to header, and updated tests
ediiotero Jan 16, 2026
d4dacc8
Merge branch 'main' into 4519-Card-status-comp
ediiotero Jan 16, 2026
c8332e4
merge with main updates to index file
ediiotero Jan 16, 2026
7f4e6f8
fix header moving when level is changed
ediiotero Jan 16, 2026
152c6fe
update string for messageAriaDescribedby
ediiotero Jan 16, 2026
f4dddcc
add sr-only text to card header and update error message
ediiotero Jan 21, 2026
a4b505c
update maturityCategory and maturityLevel
ediiotero Jan 27, 2026
c725695
Merge branch 'main' into 4519-Card-status-comp
ediiotero Jan 27, 2026
0e96933
Merge branch 'main' into 4519-Card-status-comp
jamigibbs Jan 28, 2026
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
124 changes: 124 additions & 0 deletions packages/storybook/stories/va-card-status.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
import { getWebComponentDocs, propStructure, StoryDocs } from './wc-helpers';

const cardDocs = getWebComponentDocs('va-card-status');
Comment thread
amyleadem marked this conversation as resolved.
Outdated

export default {
title: 'Components/Card Status',
id: 'components/va-card-status',
parameters: {
componentSubtitle: 'va-card-status web component',
docs: {
page: () => <StoryDocs storyDefault={Default} data={cardDocs} />,
},
},
};

const defaultArgs = {
'heading-level': 3,
'heading-text': 'Card Status Heading',
'tag-status': 'informational',
Comment thread
amyleadem marked this conversation as resolved.
Outdated
'tag-text': '',
'error-message': '',
'link-href': '',
'link-text': '',
'show-sub-header': false,
'show-footer-slot': false,
'required': false,
};

const Template = ({
'heading-level': headingLevel,
'heading-text': headingText,
'tag-status': tagStatus,
'tag-text': tagText,
'error-message': errorMessage,
'link-href': linkHref,
'link-text': linkText,
'show-sub-header': showSubHeader,
'show-footer-slot': showFooterSlot,
'required': required,
}) => (
<va-card-status
heading-level={headingLevel}
heading-text={headingText}
tag-status={tagStatus}
tag-text={tagText}
error-message={errorMessage}
link-href={linkHref}
link-text={linkText}
required={required}
>
<h3 slot="header" className="vads-u-margin-y--1p5">
<span className="vads-c-eyebrow">Eyebrow Title</span>
Heading slot
</h3>
{showSubHeader && (
<h4 slot="subHeader" className="vads-u-margin-top--1p5">
Subheader Optional
</h4>
)}
Comment thread
amyleadem marked this conversation as resolved.
Outdated
<div>
<p>Example card content</p>
</div>
Comment thread
amyleadem marked this conversation as resolved.
Outdated
{showFooterSlot && (
<div slot="footer" className="vads-u-margin-top--3">
<va-button text="Update" />
<va-button secondary text="Delete" />
</div>
)}
Comment thread
amyleadem marked this conversation as resolved.
Outdated
</va-card-status>
);

export const Default = Template.bind(null);
Default.args = {
...defaultArgs,
};
Default.argTypes = propStructure(cardDocs);

export const withRequired = Template.bind(null);
withRequired.args = {
...defaultArgs,
'required': true,
};

export const withTag = Template.bind(null);
withTag.args = {
...defaultArgs,
'tag-text': 'Status',
'tag-status': 'informational',
};

export const withErrorMessageAndRequired = Template.bind(null);
withErrorMessageAndRequired.args = {
...defaultArgs,
'error-message': 'This is an error message.',
Comment thread
amyleadem marked this conversation as resolved.
Outdated
'required': true,
};

export const withErrorTagAndLink = Template.bind(null);
withErrorTagAndLink.args = {
...defaultArgs,
'error-message': 'This is an error message.',
'tag-status': 'error',
'tag-text': 'Missing',
'link-href': 'https://www.va.gov',
'link-text': 'Link to more info',
};

export const headingSlot = Template.bind(null);
headingSlot.args = {
...defaultArgs,
'heading-text': '',
};

export const subHeadingSlot = Template.bind(null);
subHeadingSlot.args = {
...defaultArgs,
'show-sub-header': true,
};

export const footerSlot = Template.bind(null);
footerSlot.args = {
...defaultArgs,
'show-footer-slot': true,
};
2 changes: 1 addition & 1 deletion packages/storybook/stories/va-card.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ export const withCallToAction = Template.bind(null);
withCallToAction.args = {
...defaultArgs,
'has-cta': true,
};
};
1 change: 1 addition & 0 deletions packages/storybook/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ declare global {
'va-button-icon': WCTypes.VaButtonIcon & IsElement;
'va-button-pair': WCTypes.VaButtonPair & IsElement;
'va-card': WCTypes.VaCard & IsElement;
'va-card-status': WCTypes.VaCardStatus & IsElement;
Comment thread
jamigibbs marked this conversation as resolved.
'va-checkbox': WCTypes.VaCheckbox & IsElement & { value?: string };
'va-checkbox-group': WCTypes.VaCheckboxGroup & IsElement;
'va-combo-box': WCTypes.VaComboBox & IsElement & IsElement;
Expand Down
97 changes: 97 additions & 0 deletions packages/web-components/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,45 @@ export namespace Components {
*/
"showShadow"?: boolean;
}
/**
* @componentName Card Status
* @maturityCategory use
* @maturityLevel deployed
*/
interface VaCardStatus {
/**
* The error message to render.
*/
"errorMessage"?: string;
/**
* Header level. Must be between 1 and 6
*/
"headingLevel"?: number;
/**
* Text to be displayed in the card header.
*/
"headingText"?: string;
/**
* Set the href for the card link.
*/
"linkHref"?: string;
/**
* Set the text for the card link.
*/
"linkText"?: string;
/**
* Sets the card to required and renders the (*Required) text.
*/
"required"?: boolean;
/**
* The status variant of the tag. Determines the background color and icon.
*/
"tagStatus": 'informational' | 'error';
Comment thread
amyleadem marked this conversation as resolved.
Outdated
/**
* The text to be displayed in the tag element.
*/
"tagText"?: string;
}
/**
* @nativeHandler onBlur
* @componentName Checkbox
Expand Down Expand Up @@ -2839,6 +2878,17 @@ declare global {
prototype: HTMLVaCardElement;
new (): HTMLVaCardElement;
};
/**
* @componentName Card Status
* @maturityCategory use
* @maturityLevel deployed
*/
interface HTMLVaCardStatusElement extends Components.VaCardStatus, HTMLStencilElement {
}
var HTMLVaCardStatusElement: {
prototype: HTMLVaCardStatusElement;
new (): HTMLVaCardStatusElement;
};
interface HTMLVaCheckboxElementEventMap {
"vaChange": any;
"component-library-analytics": any;
Expand Down Expand Up @@ -3858,6 +3908,7 @@ declare global {
"va-button-pair": HTMLVaButtonPairElement;
"va-button-segmented": HTMLVaButtonSegmentedElement;
"va-card": HTMLVaCardElement;
"va-card-status": HTMLVaCardStatusElement;
"va-checkbox": HTMLVaCheckboxElement;
"va-checkbox-group": HTMLVaCheckboxGroupElement;
"va-combo-box": HTMLVaComboBoxElement;
Expand Down Expand Up @@ -4381,6 +4432,45 @@ declare namespace LocalJSX {
*/
"showShadow"?: boolean;
}
/**
* @componentName Card Status
* @maturityCategory use
* @maturityLevel deployed
*/
interface VaCardStatus {
/**
* The error message to render.
*/
"errorMessage"?: string;
/**
* Header level. Must be between 1 and 6
*/
"headingLevel"?: number;
/**
* Text to be displayed in the card header.
*/
"headingText"?: string;
/**
* Set the href for the card link.
*/
"linkHref"?: string;
/**
* Set the text for the card link.
*/
"linkText"?: string;
/**
* Sets the card to required and renders the (*Required) text.
*/
"required"?: boolean;
/**
* The status variant of the tag. Determines the background color and icon.
*/
"tagStatus"?: 'informational' | 'error';
/**
* The text to be displayed in the tag element.
*/
"tagText"?: string;
}
/**
* @nativeHandler onBlur
* @componentName Checkbox
Expand Down Expand Up @@ -6596,6 +6686,7 @@ declare namespace LocalJSX {
"va-button-pair": VaButtonPair;
"va-button-segmented": VaButtonSegmented;
"va-card": VaCard;
"va-card-status": VaCardStatus;
"va-checkbox": VaCheckbox;
"va-checkbox-group": VaCheckboxGroup;
"va-combo-box": VaComboBox;
Expand Down Expand Up @@ -6743,6 +6834,12 @@ declare module "@stencil/core" {
* @maturityLevel deployed
*/
"va-card": LocalJSX.VaCard & JSXBase.HTMLAttributes<HTMLVaCardElement>;
/**
* @componentName Card Status
* @maturityCategory use
* @maturityLevel deployed
*/
"va-card-status": LocalJSX.VaCardStatus & JSXBase.HTMLAttributes<HTMLVaCardStatusElement>;
/**
* @nativeHandler onBlur
* @componentName Checkbox
Expand Down
Loading
Loading