This repository is currently being migrated. It's locked while the migration is in progress.
-
Notifications
You must be signed in to change notification settings - Fork 20
va-card-status: add new component #1862
Merged
Merged
Changes from 26 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
4f6f1af
setting up card status comp
ediiotero 6574834
Merge branch 'main' into 4519-Card-status-comp
ediiotero b35f23d
remove card-status comp and move changes into va-card comp
ediiotero 6ba20da
reset va-card and added new va-card-status
ediiotero 385bf4d
Merge branch 'main' into 4519-Card-status-comp
ediiotero 95ca813
adding tests
ediiotero 1b2bd5c
update heading style and added va-link-action, updated tests
ediiotero 78e86ad
Merge branch 'main' into 4519-Card-status-comp
ediiotero c4eec97
Removed slots, updated stories and tests
ediiotero f6d01ad
Update for 54.4.0 release
ediiotero e80ba7b
removing a story example
ediiotero 0e8268e
update component header and added subheader story
ediiotero 9b34b61
Merge branch 'main' of https://github.com/department-of-veterans-affa…
ediiotero cbbba28
update card status stories
ediiotero a24e1db
change error-message to error and update tests
ediiotero 08003c1
Merge branch 'main' of https://github.com/department-of-veterans-affa…
ediiotero 9397ee4
Merge branch 'main' of https://github.com/department-of-veterans-affa…
ediiotero 88a0510
update story names and links within cards
ediiotero 927d37e
Merge branch 'main' into 4519-Card-status-comp
ediiotero a89e13d
merge with main
ediiotero 56068db
fix conflict merge with main
ediiotero 266b4b6
Change heading to header, and updated tests
ediiotero d4dacc8
Merge branch 'main' into 4519-Card-status-comp
ediiotero c8332e4
merge with main updates to index file
ediiotero 7f4e6f8
fix header moving when level is changed
ediiotero 152c6fe
update string for messageAriaDescribedby
ediiotero f4dddcc
add sr-only text to card header and update error message
ediiotero a4b505c
update maturityCategory and maturityLevel
ediiotero c725695
Merge branch 'main' into 4519-Card-status-comp
ediiotero 0e96933
Merge branch 'main' into 4519-Card-status-comp
jamigibbs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| import { getWebComponentDocs, propStructure, StoryDocs } from './wc-helpers'; | ||
|
|
||
| const cardStatusDocs = getWebComponentDocs('va-card-status'); | ||
|
|
||
| export default { | ||
| title: 'Components/Card Status', | ||
| id: 'components/va-card-status', | ||
| parameters: { | ||
| componentSubtitle: 'va-card-status web component', | ||
| docs: { | ||
| page: () => <StoryDocs storyDefault={Default} data={cardStatusDocs} />, | ||
| }, | ||
| }, | ||
| }; | ||
|
|
||
| const defaultArgs = { | ||
| 'header-level': 3, | ||
| 'header-text': 'Mobile phone number', | ||
| 'subheader-text': '', | ||
| 'tag-status': 'info', | ||
| 'tag-text': '', | ||
| 'error': '', | ||
| 'link-href': 'https://www.va.gov', | ||
| 'link-text': 'Edit mobile phone number', | ||
| 'required': false, | ||
| }; | ||
|
|
||
| const Template = ({ | ||
| 'header-level': headerLevel, | ||
| 'header-text': headerText, | ||
| 'subheader-text': subheaderText, | ||
| 'tag-status': tagStatus, | ||
| 'tag-text': tagText, | ||
| 'error': error, | ||
| 'link-href': linkHref, | ||
| 'link-text': linkText, | ||
| 'required': required, | ||
| }) => ( | ||
| <va-card-status | ||
| header-level={headerLevel} | ||
| header-text={headerText} | ||
| subheader-text={subheaderText} | ||
| tag-status={tagStatus} | ||
| tag-text={tagText} | ||
| error={error} | ||
| link-href={linkHref} | ||
| link-text={linkText} | ||
| required={required} | ||
| > | ||
| <p>123-867-5309</p> | ||
| </va-card-status> | ||
| ); | ||
|
|
||
| export const Default = Template.bind(null); | ||
| Default.args = { | ||
| ...defaultArgs, | ||
| }; | ||
| Default.argTypes = propStructure(cardStatusDocs); | ||
|
|
||
| const TemplateErrorState = ({ | ||
| 'header-level': headerLevel, | ||
| 'header-text': headerText, | ||
| 'subheader-text': subheaderText, | ||
| 'tag-status': tagStatus, | ||
| 'tag-text': tagText, | ||
| 'error': error, | ||
| 'link-href': linkHref, | ||
| 'link-text': linkText, | ||
| 'required': required, | ||
| }) => ( | ||
| <va-card-status | ||
| header-level={headerLevel} | ||
| header-text={headerText} | ||
| subheader-text={subheaderText} | ||
| tag-status={tagStatus} | ||
| tag-text={tagText} | ||
| error={error} | ||
| link-href={linkHref} | ||
| link-text={linkText} | ||
| required={required} | ||
| > | ||
| <p>Not provided</p> | ||
| </va-card-status> | ||
| ); | ||
|
|
||
| export const missingContentState = TemplateErrorState.bind(null); | ||
| missingContentState.args = { | ||
| ...defaultArgs, | ||
| 'tag-text': 'Missing', | ||
| 'tag-status': 'error', | ||
| 'link-text': 'Add mobile phone number', | ||
| 'required': true, | ||
| }; | ||
|
|
||
| export const errorState = TemplateErrorState.bind(null); | ||
| errorState.args = { | ||
| ...defaultArgs, | ||
| 'error': | ||
| 'Your mobile phone number is missing. Select "Add" to enter your mobile phone number.', | ||
| 'tag-text': 'Missing', | ||
| 'tag-status': 'error', | ||
| 'link-text': 'Add mobile phone number', | ||
| 'required': true, | ||
| }; | ||
|
|
||
| export const withInfoTagAndSubheader= Template.bind(null); | ||
| withInfoTagAndSubheader.args = { | ||
| ...defaultArgs, | ||
| 'tag-text': 'Status', | ||
| 'required': true, | ||
| 'subheader-text': 'Optional subheader', | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.