diff --git a/packages/storybook/stories/va-featured-content-uswds.stories.jsx b/packages/storybook/stories/va-summary-box-uswds.stories.jsx similarity index 72% rename from packages/storybook/stories/va-featured-content-uswds.stories.jsx rename to packages/storybook/stories/va-summary-box-uswds.stories.jsx index 4b695fa76..dcb4aee94 100644 --- a/packages/storybook/stories/va-featured-content-uswds.stories.jsx +++ b/packages/storybook/stories/va-summary-box-uswds.stories.jsx @@ -2,15 +2,15 @@ import React from 'react'; import { getWebComponentDocs, propStructure, StoryDocs } from './wc-helpers'; -const featuredContentDocs = getWebComponentDocs('va-featured-content'); +const summaryBoxDocs = getWebComponentDocs('va-summary-box'); export default { - title: 'USWDS/Featured content USWDS', - id: 'uswds/va-featured-content', + title: 'USWDS/Summary box USWDS', + id: 'uswds/va-summary-box', parameters: { - componentSubtitle: `va-featured-content web component`, + componentSubtitle: `va-summary-box web component`, docs: { - page: () => , + page: () => , }, }, }; @@ -19,7 +19,7 @@ const defaultArgs = { uswds: true }; const Template = args => { const { uswds } = args return ( - +

If I'm a Veteran, can I get VR&E benefits and services?

@@ -42,11 +42,11 @@ const Template = args => { Apply for VR&E services -
+ ); } export const Default = Template.bind(null); Default.args = defaultArgs; -Default.argTypes = propStructure(featuredContentDocs); +Default.argTypes = propStructure(summaryBoxDocs); diff --git a/packages/storybook/stories/va-featured-content.stories.jsx b/packages/storybook/stories/va-summary-box.stories.jsx similarity index 72% rename from packages/storybook/stories/va-featured-content.stories.jsx rename to packages/storybook/stories/va-summary-box.stories.jsx index 44486b5d8..9c9ff5868 100644 --- a/packages/storybook/stories/va-featured-content.stories.jsx +++ b/packages/storybook/stories/va-summary-box.stories.jsx @@ -2,15 +2,15 @@ import React from 'react'; import { getWebComponentDocs, propStructure, StoryDocs } from './wc-helpers'; -const featuredContentDocs = getWebComponentDocs('va-featured-content'); +const summaryBoxDocs = getWebComponentDocs('va-summary-box'); export default { - title: 'Components/Featured content', - id: 'components/va-featured-content', + title: 'Components/Summary box', + id: 'components/va-summary-box', parameters: { - componentSubtitle: `va-featured-content web component`, + componentSubtitle: `va-summary-box web component`, docs: { - page: () => , + page: () => , }, }, }; @@ -19,7 +19,7 @@ const defaultArgs = { uswds: false }; const Template = args => { const { uswds } = args return ( - +

If I'm a Veteran, can I get VR&E benefits and services?

@@ -42,11 +42,11 @@ const Template = args => { Apply for VR&E services -
+ ); } export const Default = Template.bind(null); Default.args = defaultArgs; -Default.argTypes = propStructure(featuredContentDocs); +Default.argTypes = propStructure(summaryBoxDocs); diff --git a/packages/web-components/package.json b/packages/web-components/package.json index 20bcd5d95..c81d0dacb 100644 --- a/packages/web-components/package.json +++ b/packages/web-components/package.json @@ -1,6 +1,6 @@ { "name": "@department-of-veterans-affairs/web-components", - "version": "4.60.0", + "version": "5.0.0", "description": "Stencil Component Starter", "main": "dist/index.cjs.js", "module": "dist/index.js", diff --git a/packages/web-components/src/components.d.ts b/packages/web-components/src/components.d.ts index 81d161fba..2f0fa6d57 100644 --- a/packages/web-components/src/components.d.ts +++ b/packages/web-components/src/components.d.ts @@ -403,12 +403,6 @@ export namespace Components { */ "value"?: string; } - interface VaFeaturedContent { - /** - * Whether or not the component will use USWDS v3 styling. - */ - "uswds"?: boolean; - } interface VaFileInput { /** * A comma-separated list of unique file type specifiers. @@ -1173,6 +1167,12 @@ export namespace Components { */ "inputValue": string; } + interface VaSummaryBox { + /** + * Whether or not the component will use USWDS v3 styling. + */ + "uswds"?: boolean; + } interface VaTable { /** * Whether the initial sort state will be descending or not. @@ -1617,12 +1617,6 @@ declare global { prototype: HTMLVaDateElement; new (): HTMLVaDateElement; }; - interface HTMLVaFeaturedContentElement extends Components.VaFeaturedContent, HTMLStencilElement { - } - var HTMLVaFeaturedContentElement: { - prototype: HTMLVaFeaturedContentElement; - new (): HTMLVaFeaturedContentElement; - }; interface HTMLVaFileInputElement extends Components.VaFileInput, HTMLStencilElement { } var HTMLVaFileInputElement: { @@ -1785,6 +1779,12 @@ declare global { prototype: HTMLVaStatementOfTruthElement; new (): HTMLVaStatementOfTruthElement; }; + interface HTMLVaSummaryBoxElement extends Components.VaSummaryBox, HTMLStencilElement { + } + var HTMLVaSummaryBoxElement: { + prototype: HTMLVaSummaryBoxElement; + new (): HTMLVaSummaryBoxElement; + }; interface HTMLVaTableElement extends Components.VaTable, HTMLStencilElement { } var HTMLVaTableElement: { @@ -1831,7 +1831,6 @@ declare global { "va-checkbox-group": HTMLVaCheckboxGroupElement; "va-crisis-line-modal": HTMLVaCrisisLineModalElement; "va-date": HTMLVaDateElement; - "va-featured-content": HTMLVaFeaturedContentElement; "va-file-input": HTMLVaFileInputElement; "va-header-minimal": HTMLVaHeaderMinimalElement; "va-icon": HTMLVaIconElement; @@ -1859,6 +1858,7 @@ declare global { "va-segmented-progress-bar": HTMLVaSegmentedProgressBarElement; "va-select": HTMLVaSelectElement; "va-statement-of-truth": HTMLVaStatementOfTruthElement; + "va-summary-box": HTMLVaSummaryBoxElement; "va-table": HTMLVaTableElement; "va-table-row": HTMLVaTableRowElement; "va-telephone": HTMLVaTelephoneElement; @@ -2344,12 +2344,6 @@ declare namespace LocalJSX { */ "value"?: string; } - interface VaFeaturedContent { - /** - * Whether or not the component will use USWDS v3 styling. - */ - "uswds"?: boolean; - } interface VaFileInput { /** * A comma-separated list of unique file type specifiers. @@ -3258,6 +3252,12 @@ declare namespace LocalJSX { */ "onVaInputChange"?: (event: VaStatementOfTruthCustomEvent) => void; } + interface VaSummaryBox { + /** + * Whether or not the component will use USWDS v3 styling. + */ + "uswds"?: boolean; + } interface VaTable { /** * Whether the initial sort state will be descending or not. @@ -3498,7 +3498,6 @@ declare namespace LocalJSX { "va-checkbox-group": VaCheckboxGroup; "va-crisis-line-modal": VaCrisisLineModal; "va-date": VaDate; - "va-featured-content": VaFeaturedContent; "va-file-input": VaFileInput; "va-header-minimal": VaHeaderMinimal; "va-icon": VaIcon; @@ -3526,6 +3525,7 @@ declare namespace LocalJSX { "va-segmented-progress-bar": VaSegmentedProgressBar; "va-select": VaSelect; "va-statement-of-truth": VaStatementOfTruth; + "va-summary-box": VaSummaryBox; "va-table": VaTable; "va-table-row": VaTableRow; "va-telephone": VaTelephone; @@ -3552,7 +3552,6 @@ declare module "@stencil/core" { "va-checkbox-group": LocalJSX.VaCheckboxGroup & JSXBase.HTMLAttributes; "va-crisis-line-modal": LocalJSX.VaCrisisLineModal & JSXBase.HTMLAttributes; "va-date": LocalJSX.VaDate & JSXBase.HTMLAttributes; - "va-featured-content": LocalJSX.VaFeaturedContent & JSXBase.HTMLAttributes; "va-file-input": LocalJSX.VaFileInput & JSXBase.HTMLAttributes; "va-header-minimal": LocalJSX.VaHeaderMinimal & JSXBase.HTMLAttributes; "va-icon": LocalJSX.VaIcon & JSXBase.HTMLAttributes; @@ -3580,6 +3579,7 @@ declare module "@stencil/core" { "va-segmented-progress-bar": LocalJSX.VaSegmentedProgressBar & JSXBase.HTMLAttributes; "va-select": LocalJSX.VaSelect & JSXBase.HTMLAttributes; "va-statement-of-truth": LocalJSX.VaStatementOfTruth & JSXBase.HTMLAttributes; + "va-summary-box": LocalJSX.VaSummaryBox & JSXBase.HTMLAttributes; "va-table": LocalJSX.VaTable & JSXBase.HTMLAttributes; "va-table-row": LocalJSX.VaTableRow & JSXBase.HTMLAttributes; "va-telephone": LocalJSX.VaTelephone & JSXBase.HTMLAttributes; diff --git a/packages/web-components/src/components/va-featured-content/test/va-featured-content.e2e.ts b/packages/web-components/src/components/va-summary-box/test/va-summary-box.e2e.ts similarity index 89% rename from packages/web-components/src/components/va-featured-content/test/va-featured-content.e2e.ts rename to packages/web-components/src/components/va-summary-box/test/va-summary-box.e2e.ts index 3b5f7ca92..38c213178 100644 --- a/packages/web-components/src/components/va-featured-content/test/va-featured-content.e2e.ts +++ b/packages/web-components/src/components/va-summary-box/test/va-summary-box.e2e.ts @@ -1,11 +1,11 @@ import { newE2EPage } from '@stencil/core/testing'; import { axeCheck } from '../../../testing/test-helpers'; -describe('va-featured-content', () => { +describe('va-summary-box', () => { it('renders v1', async () => { const page = await newE2EPage(); await page.setContent(` - +

If I'm a Veteran, can I get VR&E benefits and services?

@@ -16,12 +16,12 @@ describe('va-featured-content', () => {
  • Have a service-connected disability rating of at least 10% from VA, and
  • Apply for VR&E services
  • -
    + `); - const element = await page.find('va-featured-content'); + const element = await page.find('va-summary-box'); expect(element).toEqualHtml(` - +
    @@ -36,7 +36,7 @@ describe('va-featured-content', () => {
  • Have a service-connected disability rating of at least 10% from VA, and
  • Apply for VR&E services
  • - + `); }); @@ -44,9 +44,9 @@ describe('va-featured-content', () => { const heading = "If I'm a Veteran, can I get VR&E benefits and services?"; const page = await newE2EPage(); await page.setContent(` - +

    ${heading}

    -
    + `); const element = await page.find('h3'); expect(element).not.toBeNull(); @@ -56,7 +56,7 @@ describe('va-featured-content', () => { it('passes an axe check', async () => { const page = await newE2EPage(); await page.setContent(` - +

    If I'm a Veteran, can I get VR&E benefits and services?

    @@ -67,7 +67,7 @@ describe('va-featured-content', () => {
  • Have a service-connected disability rating of at least 10% from VA, and
  • Apply for VR&E services
  • -
    + `); await axeCheck(page); @@ -76,7 +76,7 @@ describe('va-featured-content', () => { it('renders v3', async () => { const page = await newE2EPage(); await page.setContent(` - +

    If I'm a Veteran, can I get VR&E benefits and services?

    @@ -87,12 +87,12 @@ describe('va-featured-content', () => {
  • Have a service-connected disability rating of at least 10% from VA, and
  • Apply for VR&E services
  • -
    + `); - const element = await page.find('va-featured-content'); + const element = await page.find('va-summary-box'); expect(element).toEqualHtml(` - +
    @@ -109,7 +109,7 @@ describe('va-featured-content', () => {
  • Have a service-connected disability rating of at least 10% from VA, and
  • Apply for VR&E services
  • - + `); }); @@ -117,9 +117,9 @@ describe('va-featured-content', () => { const heading = "If I'm a Veteran, can I get VR&E benefits and services?"; const page = await newE2EPage(); await page.setContent(` - +

    ${heading}

    -
    + `); const element = await page.find('h3'); expect(element).not.toBeNull(); @@ -129,7 +129,7 @@ describe('va-featured-content', () => { it('passes an axe check', async () => { const page = await newE2EPage(); await page.setContent(` - +

    If I'm a Veteran, can I get VR&E benefits and services?

    @@ -140,7 +140,7 @@ describe('va-featured-content', () => {
  • Have a service-connected disability rating of at least 10% from VA, and
  • Apply for VR&E services
  • -
    + `); await axeCheck(page); diff --git a/packages/web-components/src/components/va-featured-content/va-featured-content.scss b/packages/web-components/src/components/va-summary-box/va-summary-box.scss similarity index 100% rename from packages/web-components/src/components/va-featured-content/va-featured-content.scss rename to packages/web-components/src/components/va-summary-box/va-summary-box.scss diff --git a/packages/web-components/src/components/va-featured-content/va-featured-content.tsx b/packages/web-components/src/components/va-summary-box/va-summary-box.tsx similarity index 92% rename from packages/web-components/src/components/va-featured-content/va-featured-content.tsx rename to packages/web-components/src/components/va-summary-box/va-summary-box.tsx index 0f534b1fc..8d91a3bb3 100644 --- a/packages/web-components/src/components/va-featured-content/va-featured-content.tsx +++ b/packages/web-components/src/components/va-summary-box/va-summary-box.tsx @@ -1,16 +1,16 @@ import { Component, Host, h, Prop, Element, State } from '@stencil/core'; /** - * @componentName Featured content + * @componentName Summary box * @maturityCategory use * @maturityLevel deployed */ @Component({ - tag: 'va-featured-content', - styleUrl: 'va-featured-content.scss', + tag: 'va-summary-box', + styleUrl: 'va-summary-box.scss', shadow: true, }) -export class VaFeaturedContent { +export class VaSummaryBox { /** * Whether or not the component will use USWDS v3 styling. */