Skip to content

Commit

Permalink
Merge pull request #859 from patrickcate/feature/1.8.x
Browse files Browse the repository at this point in the history
Feature/1.8.x
  • Loading branch information
patrickcate authored Mar 24, 2024
2 parents eb3cbb5 + 5a49f1f commit 00d63c9
Show file tree
Hide file tree
Showing 162 changed files with 1,511 additions and 1,452 deletions.
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
2 changes: 1 addition & 1 deletion .prettierrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
semi: false,
singleQuote: true,
tabWidth: 2,
trailingComma: 'es5',
trailingComma: 'all',
useTabs: false,
vueIndentScriptAndStyle: false,
}
393 changes: 228 additions & 165 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"pretest:component": "rm -rf .nyc_output coverage || true",
"test:component": "cross-env TZ=America/New_York cypress run --component",
"test:e2e": "cross-env TZ=America/New_York cypress run",
"prepare": "husky install",
"prepare": "husky",
"prepublishOnly": "npm run build",
"storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider start-storybook -p 6006",
"build-storybook": "cross-env NODE_OPTIONS=--openssl-legacy-provider STORYBOOK_MODE=BUILD build-storybook",
Expand All @@ -69,7 +69,7 @@
"@vueuse/components": "^10.7.0",
"@vueuse/core": "^10.7.0",
"@vueuse/integrations": "^10.7.0",
"date-fns": "^2.28.0",
"date-fns": "^3.6.0",
"fast-sort": "^3.1.3",
"focus-trap": "^7.0.0",
"just-kebab-case": "^4.0.0",
Expand Down Expand Up @@ -99,15 +99,15 @@
"cypress-real-events": "^1.11.0",
"cz-customizable": "^6.3.0",
"eslint": "^8.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-storybook": "^0.5.6",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-storybook": "^0.8.0",
"eslint-plugin-vue": "^9.1.1",
"husky": "^8.0.1",
"husky": "^9.0.11",
"hygen-neo": "^6.3.0",
"lint-staged": "^15.2.0",
"prettier": "^2.8.8",
"prettier": "^3.2.5",
"semantic-release": "^19.0.5",
"vite": "^4.0.0",
"vite-plugin-istanbul": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/BaseHeading/BaseHeading.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('BaseHeading', () => {

cy.get('@consoleWarn').should(
'be.calledWith',
`'notheading' is not a valid HTML heading element`
`'notheading' is not a valid HTML heading element`,
)
})
})
2 changes: 1 addition & 1 deletion src/components/BaseLink/BaseLink.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('BaseLink', () => {

cy.get('test-global-router-component').should(
'contain',
'Test Global Component Link'
'Test Global Component Link',
)
cy.get('test-global-router-component')
.should('have.attr', 'to')
Expand Down
78 changes: 39 additions & 39 deletions src/components/UsaAccordion/UsaAccordion.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ describe('UsaAccordion', () => {
slots: {
default: () => [
h(UsaAccordionItem, { label: 'Accordion 1' }, () =>
h('p', 'Accordion 1')
h('p', 'Accordion 1'),
),
h(UsaAccordionItem, { label: 'Accordion 2' }, () =>
h('p', 'Accordion 2')
h('p', 'Accordion 2'),
),
h(UsaAccordionItem, { label: 'Accordion 3' }, () =>
h('p', 'Accordion 3')
h('p', 'Accordion 3'),
),
h(UsaAccordionItem, { label: 'Accordion 4' }, () =>
h('p', 'Accordion 4')
h('p', 'Accordion 4'),
),
],
},
Expand All @@ -35,14 +35,14 @@ describe('UsaAccordion', () => {

cy.get(`h2.usa-accordion__heading:nth-of-type(${item})`).should('exist')
cy.get(
`h2.usa-accordion__heading:nth-of-type(${item}) button.usa-accordion__button`
`h2.usa-accordion__heading:nth-of-type(${item}) button.usa-accordion__button`,
)
.should('contain', `Accordion ${item}`)
.and('have.attr', 'aria-expanded')
.and('contain', 'false')

cy.get(
`h2.usa-accordion__heading:nth-of-type(${item}) button.usa-accordion__button`
`h2.usa-accordion__heading:nth-of-type(${item}) button.usa-accordion__button`,
)
.should('have.attr', 'aria-controls')
.and('contain', id)
Expand Down Expand Up @@ -84,16 +84,16 @@ describe('UsaAccordion', () => {
slots: {
default: () => [
h(UsaAccordionItem, { label: 'Accordion 1' }, () =>
h('p', 'Accordion 1')
h('p', 'Accordion 1'),
),
h(UsaAccordionItem, { label: 'Accordion 2' }, () =>
h('p', 'Accordion 2')
h('p', 'Accordion 2'),
),
h(UsaAccordionItem, { label: 'Accordion 3' }, () =>
h('p', 'Accordion 3')
h('p', 'Accordion 3'),
),
h(UsaAccordionItem, { label: 'Accordion 4' }, () =>
h('p', 'Accordion 4')
h('p', 'Accordion 4'),
),
],
},
Expand All @@ -102,22 +102,22 @@ describe('UsaAccordion', () => {
const items = ['first', 'second', 'third', 'fourth']

cy.get('.usa-accordion__heading:nth-of-type(1) .usa-accordion__button').as(
'firstButton'
'firstButton',
)
cy.get('.usa-accordion__content:nth-of-type(1)').as('firstContent')

cy.get('.usa-accordion__heading:nth-of-type(2) .usa-accordion__button').as(
'secondButton'
'secondButton',
)
cy.get('.usa-accordion__content:nth-of-type(2)').as('secondContent')

cy.get('.usa-accordion__heading:nth-of-type(3) .usa-accordion__button').as(
'thirdButton'
'thirdButton',
)
cy.get('.usa-accordion__content:nth-of-type(3)').as('thirdContent')

cy.get('.usa-accordion__heading:nth-of-type(4) .usa-accordion__button').as(
'fourthButton'
'fourthButton',
)
cy.get('.usa-accordion__content:nth-of-type(4)').as('fourthContent')

Expand All @@ -141,16 +141,16 @@ describe('UsaAccordion', () => {
slots: {
default: () => [
h(UsaAccordionItem, { label: 'Accordion 1' }, () =>
h('p', 'Accordion 1')
h('p', 'Accordion 1'),
),
h(UsaAccordionItem, { label: 'Accordion 2' }, () =>
h('p', 'Accordion 2')
h('p', 'Accordion 2'),
),
h(UsaAccordionItem, { label: 'Accordion 3' }, () =>
h('p', 'Accordion 3')
h('p', 'Accordion 3'),
),
h(UsaAccordionItem, { label: 'Accordion 4' }, () =>
h('p', 'Accordion 4')
h('p', 'Accordion 4'),
),
],
},
Expand All @@ -159,22 +159,22 @@ describe('UsaAccordion', () => {
const items = ['first', 'second', 'third', 'fourth']

cy.get('.usa-accordion__heading:nth-of-type(1) .usa-accordion__button').as(
'firstButton'
'firstButton',
)
cy.get('.usa-accordion__content:nth-of-type(1)').as('firstContent')

cy.get('.usa-accordion__heading:nth-of-type(2) .usa-accordion__button').as(
'secondButton'
'secondButton',
)
cy.get('.usa-accordion__content:nth-of-type(2)').as('secondContent')

cy.get('.usa-accordion__heading:nth-of-type(3) .usa-accordion__button').as(
'thirdButton'
'thirdButton',
)
cy.get('.usa-accordion__content:nth-of-type(3)').as('thirdContent')

cy.get('.usa-accordion__heading:nth-of-type(4) .usa-accordion__button').as(
'fourthButton'
'fourthButton',
)
cy.get('.usa-accordion__content:nth-of-type(4)').as('fourthContent')

Expand All @@ -197,16 +197,16 @@ describe('UsaAccordion', () => {
slots: {
default: () => [
h(UsaAccordionItem, { label: 'Accordion 1' }, () =>
h('p', 'Accordion 1')
h('p', 'Accordion 1'),
),
h(UsaAccordionItem, { label: 'Accordion 2', open: true }, () =>
h('p', 'Accordion 2')
h('p', 'Accordion 2'),
),
h(UsaAccordionItem, { label: 'Accordion 3' }, () =>
h('p', 'Accordion 3')
h('p', 'Accordion 3'),
),
h(UsaAccordionItem, { label: 'Accordion 4' }, () =>
h('p', 'Accordion 4')
h('p', 'Accordion 4'),
),
],
},
Expand Down Expand Up @@ -235,13 +235,13 @@ describe('UsaAccordion', () => {
slots: {
default: () => [
h(UsaAccordionItem, { label: 'Accordion 1', open: true }, () =>
h('p', 'Accordion 1')
h('p', 'Accordion 1'),
),
h(UsaAccordionItem, { label: 'Accordion 2', open: true }, () =>
h('p', 'Accordion 2')
h('p', 'Accordion 2'),
),
h(UsaAccordionItem, { label: 'Accordion 3', open: true }, () =>
h('p', 'Accordion 3')
h('p', 'Accordion 3'),
),
],
},
Expand All @@ -250,17 +250,17 @@ describe('UsaAccordion', () => {
const items = ['first', 'second', 'third']

cy.get('.usa-accordion__heading:nth-of-type(1) .usa-accordion__button').as(
'firstButton'
'firstButton',
)
cy.get('.usa-accordion__content:nth-of-type(1)').as('firstContent')

cy.get('.usa-accordion__heading:nth-of-type(2) .usa-accordion__button').as(
'secondButton'
'secondButton',
)
cy.get('.usa-accordion__content:nth-of-type(2)').as('secondContent')

cy.get('.usa-accordion__heading:nth-of-type(3) .usa-accordion__button').as(
'thirdButton'
'thirdButton',
)
cy.get('.usa-accordion__content:nth-of-type(3)').as('thirdContent')

Expand Down Expand Up @@ -289,13 +289,13 @@ describe('UsaAccordion', () => {
slots: {
default: () => [
h(UsaAccordionItem, { label: 'Accordion 1' }, () =>
h('p', 'Accordion 1')
h('p', 'Accordion 1'),
),
h(UsaAccordionItem, { label: 'Accordion 2' }, () =>
h('p', 'Accordion 2')
h('p', 'Accordion 2'),
),
h(UsaAccordionItem, { label: 'Accordion 3' }, () =>
h('p', 'Accordion 3')
h('p', 'Accordion 3'),
),
],
},
Expand All @@ -309,13 +309,13 @@ describe('UsaAccordion', () => {
slots: {
default: () => [
h(UsaAccordionItem, { label: 'Accordion 1' }, () =>
h('p', 'Accordion 1')
h('p', 'Accordion 1'),
),
h(UsaAccordionItem, { label: 'Accordion 2', open: true }, () =>
h('p', 'Accordion 2')
h('p', 'Accordion 2'),
),
h(UsaAccordionItem, { label: 'Accordion 3' }, () =>
h('p', 'Accordion 3')
h('p', 'Accordion 3'),
),
],
},
Expand All @@ -341,7 +341,7 @@ describe('UsaAccordion', () => {
})

cy.get(
'.usa-accordion__heading:nth-of-type(1) .usa-accordion__button'
'.usa-accordion__heading:nth-of-type(1) .usa-accordion__button',
).click()

cy.get('@wrapper')
Expand Down
2 changes: 1 addition & 1 deletion src/components/UsaAccordion/UsaAccordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ watch(accordionItems, () => {
provide(
'accordionHeadingTag',
computed(() => props.headingTag)
computed(() => props.headingTag),
)
provide('registerAccordionItem', registerAccordionItem)
provide('unregisterAccordionItem', unregisterAccordionItem)
Expand Down
4 changes: 2 additions & 2 deletions src/components/UsaAccordionItem/UsaAccordionItem.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ const DefaultTemplate = (args, { argTypes }) => ({
template: `<UsaAccordion>
<UsaAccordionItem :id="id" :label="label" :open="open" :custom-classes="customClasses">
<template v-if="${!!args['slot:label']}" #label>${
args['slot:label']
}</template>
args['slot:label']
}</template>
<template v-if="${!!args.default}" #default>${args.default}</template>
</UsaAccordionItem>
</UsaAccordion>`,
Expand Down
6 changes: 3 additions & 3 deletions src/components/UsaAccordionItem/UsaAccordionItem.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('UsaAccordionItem', () => {
cy.get('.usa-accordion__button').should('contain', 'Test Accordion Label')
cy.get('.usa-accordion__content').should(
'contain',
'Test Accordion Content'
'Test Accordion Content',
)
})

Expand All @@ -43,7 +43,7 @@ describe('UsaAccordionItem', () => {
.and('contain', 'test-accordion-item-id')
cy.get('.usa-accordion__content').should(
'have.id',
'test-accordion-item-id'
'test-accordion-item-id',
)
})

Expand All @@ -64,7 +64,7 @@ describe('UsaAccordionItem', () => {

cy.get('.usa-accordion__button').should(
'contain',
'Custom Accordion Slot Label'
'Custom Accordion Slot Label',
)
})

Expand Down
4 changes: 2 additions & 2 deletions src/components/UsaAlert/UsaAlert.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ const DefaultTemplate = (args, { argTypes }) => ({
:custom-classes="customClasses"
>
<template v-if="${!!args['slot:heading']}" #heading>${
args['slot:heading']
}</template>
args['slot:heading']
}</template>
<template v-if="${!!args.default}" #default>${args.default}</template>
<template v-if="${!!args.message}" #message>${args.message}</template>
</UsaAlert>`,
Expand Down
2 changes: 1 addition & 1 deletion src/components/UsaAlert/UsaAlert.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ describe('UsaAlert', () => {

cy.get('@consoleWarn').should(
'be.calledWith',
`'notvariant' is not a valid alert variant`
`'notvariant' is not a valid alert variant`,
)
})
})
Loading

0 comments on commit 00d63c9

Please sign in to comment.