Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch/13.5.3 #143

Merged
merged 5 commits into from
Aug 7, 2023
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
38 changes: 19 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rei/cedar",
"version": "13.5.2",
"version": "13.5.3",
"description": "REI Cedar Component Library",
"homepage": "https://rei.github.io/rei-cedar/",
"license": "MIT",
Expand Down Expand Up @@ -65,7 +65,7 @@
"backstopjs": "^5.3.0",
"c8": "^7.11.0",
"chalk": "^4.1.0",
"chromedriver": "^113.0.0",
"chromedriver": "^114.0.0",
"concat": "^1.0.3",
"cross-env": "^7.0.3",
"cz-conventional-changelog": "^3.3.0",
Expand Down
8 changes: 2 additions & 6 deletions src/components/accordion/CdrAccordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export default defineComponent({

setup(props, ctx) {
const unwrap = inject('unwrap', false);
const isGrouped = inject('grouped', false) ? 'li' : 'div';
const style = useCssModule();
const accordionContentEl = ref(null);
const focused = ref(false);
Expand Down Expand Up @@ -158,7 +157,6 @@ export default defineComponent({
headingClass,
headingContent,
headingContentStyle,
isGrouped,
unwrap,
accordionContentEl,
focused,
Expand All @@ -184,8 +182,7 @@ export default defineComponent({
</script>

<template>
<component
:is="isGrouped"
<div
:class="!isUnwrapped
? mapClasses(style, baseClass, compactClass, borderAlignedClass, focusedClass, noSpacingClass)
: null"
Expand All @@ -205,7 +202,6 @@ export default defineComponent({
:id="id"
v-on="listeners"
:aria-expanded="!isUnwrapped ? `${opened}` : null"
:aria-pressed="!isUnwrapped ? `${opened}` : null"
:aria-controls="!isUnwrapped ? `${id}-collapsible` : null"
>
<span
Expand Down Expand Up @@ -238,7 +234,7 @@ export default defineComponent({
<slot />
</div>
</div>
</component>
</div>
</template>

<style lang="scss" module src="./styles/CdrAccordion.module.scss">
Expand Down
5 changes: 2 additions & 3 deletions src/components/accordion/CdrAccordionGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export default defineComponent({
isUnwrapped: !!props.unwrap,
});
provide('unwrap', unwrapped);
provide('grouped', true);

const nextIdx = computed(() => {
const idx = currentIdx.value + 1;
Expand Down Expand Up @@ -103,15 +102,15 @@ export default defineComponent({
</script>

<template>
<ul
<div
:class="style[baseClass]"
ref="accordionGroupEl"
@focusin="focusin"
@keydown="handleKeyDown"
>
<!-- @slot CdrAccordionGroup content (i.e. CdrAccordion components) -->
<slot />
</ul>
</div>
</template>

<style lang="scss" module src="./styles/CdrAccordionGroup.module.scss">
Expand Down
6 changes: 0 additions & 6 deletions src/components/accordion/__tests__/CdrAccordionGroup.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ describe('CdrAccordionGroup', () => {
it('renders correctly', () => {
expect(wrapper.element).toMatchSnapshot()
});

describe('a11y requirements', () => {
it('accordion groups are organized into unordered lists', () => {
expect(wrapper.element.tagName).toBe('UL');
})
});
});

describe('with string value for unwrapped prop', ()=>{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ exports[`CdrAccordion > component snapshot when wrapped > renders correctly 1`]
<button
aria-controls="test-collapsible"
aria-expanded="false"
aria-pressed="false"
class="cdr-accordion__button js-cdr-accordion-button"
id="test"
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Vitest Snapshot v1

exports[`CdrAccordionGroup > when unwrapped > renders correctly 1`] = `
<ul
<div
class="cdr-accordion-group"
>
<!-- @slot CdrAccordionGroup content (i.e. CdrAccordion components) -->

<li
<div
class=""
id="tab1-accordion"
>
Expand Down Expand Up @@ -46,8 +46,8 @@ exports[`CdrAccordionGroup > when unwrapped > renders correctly 1`] = `

</div>
</div>
</li>
<li
</div>
<div
class=""
id="tab2-accordion"
>
Expand Down Expand Up @@ -87,8 +87,8 @@ exports[`CdrAccordionGroup > when unwrapped > renders correctly 1`] = `

</div>
</div>
</li>
<li
</div>
<div
class=""
id="tab3-accordion"
>
Expand Down Expand Up @@ -128,18 +128,18 @@ exports[`CdrAccordionGroup > when unwrapped > renders correctly 1`] = `

</div>
</div>
</li>
</div>

</ul>
</div>
`;

exports[`CdrAccordionGroup > when wrapped > renders correctly 1`] = `
<ul
<div
class="cdr-accordion-group"
>
<!-- @slot CdrAccordionGroup content (i.e. CdrAccordion components) -->

<li
<div
class="cdr-accordion cdr-accordion--focused"
id="tab1-accordion"
>
Expand All @@ -153,7 +153,6 @@ exports[`CdrAccordionGroup > when wrapped > renders correctly 1`] = `
<button
aria-controls="tab1-collapsible"
aria-expanded="false"
aria-pressed="false"
class="cdr-accordion__button js-cdr-accordion-button"
id="tab1"
>
Expand Down Expand Up @@ -198,8 +197,8 @@ exports[`CdrAccordionGroup > when wrapped > renders correctly 1`] = `

</div>
</div>
</li>
<li
</div>
<div
class="cdr-accordion"
id="tab2-accordion"
>
Expand All @@ -213,7 +212,6 @@ exports[`CdrAccordionGroup > when wrapped > renders correctly 1`] = `
<button
aria-controls="tab2-collapsible"
aria-expanded="false"
aria-pressed="false"
class="cdr-accordion__button js-cdr-accordion-button"
id="tab2"
>
Expand Down Expand Up @@ -258,8 +256,8 @@ exports[`CdrAccordionGroup > when wrapped > renders correctly 1`] = `

</div>
</div>
</li>
<li
</div>
<div
class="cdr-accordion"
id="tab3-accordion"
>
Expand All @@ -273,7 +271,6 @@ exports[`CdrAccordionGroup > when wrapped > renders correctly 1`] = `
<button
aria-controls="tab3-collapsible"
aria-expanded="false"
aria-pressed="false"
class="cdr-accordion__button js-cdr-accordion-button"
id="tab3"
>
Expand Down Expand Up @@ -318,18 +315,18 @@ exports[`CdrAccordionGroup > when wrapped > renders correctly 1`] = `

</div>
</div>
</li>
</div>

</ul>
</div>
`;

exports[`CdrAccordionGroup > with string value for unwrapped prop > renders correctly 1`] = `
<ul
<div
class="cdr-accordion-group"
>
<!-- @slot CdrAccordionGroup content (i.e. CdrAccordion components) -->

<li
<div
class=""
id="tab1-accordion"
>
Expand Down Expand Up @@ -369,8 +366,8 @@ exports[`CdrAccordionGroup > with string value for unwrapped prop > renders corr

</div>
</div>
</li>
<li
</div>
<div
class=""
id="tab2-accordion"
>
Expand Down Expand Up @@ -410,8 +407,8 @@ exports[`CdrAccordionGroup > with string value for unwrapped prop > renders corr

</div>
</div>
</li>
<li
</div>
<div
class=""
id="tab3-accordion"
>
Expand Down Expand Up @@ -451,7 +448,7 @@ exports[`CdrAccordionGroup > with string value for unwrapped prop > renders corr

</div>
</div>
</li>
</div>

</ul>
</div>
`;
5 changes: 4 additions & 1 deletion src/components/icon/CdrIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import mapClasses from '../../utils/mapClasses';
import { responsiveModifyClass } from '../../utils/buildClass';
import propValidator from '../../utils/propValidator';

/** Communicates meaning through graphics representing simple and complex ideas */
/** Communicates meaning through graphics representing simple and complex ideas
* @demoComponentNames icon-account-profile, icon-camera
*/

export default defineComponent({
name: 'CdrIcon',
props: {
Expand Down
Loading